suricata
util-plugin.c File Reference
Include dependency graph for util-plugin.c:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  UtilPluginTestKwData_
 

Macros

#define UTIL_PLUGIN_TEST_KW   "util-plugin-test"
 

Typedefs

typedef struct UtilPluginTestKwData_ UtilPluginTestKwData
 

Functions

void UtilPluginRegisterTests (void)
 

Detailed Description

Tests for plugin patterns.

These tests exercise the API as it is used by plugins and by keywords implemented in Rust, which can't see Suricata internals such as the Signature and SigMatch structs. Some of these patterns are not used by Suricata itself, so these tests may be their only in-tree user.

Write the tests the way a plugin would: register through the public helpers (e.g. SCDetectHelperKeywordRegister()) and only use SC-prefixed API functions for keyword and signature access, never struct fields. This file can see the internals, so nothing but this rule enforces that.

Definition in file util-plugin.c.

Macro Definition Documentation

◆ UTIL_PLUGIN_TEST_KW

#define UTIL_PLUGIN_TEST_KW   "util-plugin-test"

Definition at line 48 of file util-plugin.c.

Typedef Documentation

◆ UtilPluginTestKwData

Function Documentation

◆ UtilPluginRegisterTests()

void UtilPluginRegisterTests ( void  )

Definition at line 211 of file util-plugin.c.

References UtRegisterTest().

Here is the call graph for this function: