suricata
|
Go to the source code of this file.
Functions | |
int | SCThresholdConfParseFile (DetectEngineCtx *, FILE *) |
Parses the Threshold Config file. | |
int | SCThresholdConfInitContext (DetectEngineCtx *) |
Inits the context to be used by the Threshold Config parsing API. | |
void | SCThresholdConfRegisterTests (void) |
This function registers unit tests for Classification Config API. | |
void | SCThresholdConfGlobalInit (void) |
Definition in file util-threshold-config.h.
void SCThresholdConfGlobalInit | ( | void | ) |
Definition at line 102 of file util-threshold-config.c.
References DETECT_BASE_REGEX, DETECT_RATE_REGEX, DETECT_SUPPRESS_REGEX, DETECT_THRESHOLD_REGEX, DetectSetupPCRE2(), and FatalError.
Referenced by GlobalsInitPreConfig().
int SCThresholdConfInitContext | ( | DetectEngineCtx * | de_ctx | ) |
Inits the context to be used by the Threshold Config parsing API.
This function initializes the hash table to be used by the Detection Engine Context to hold the data from the threshold.config file, obtains the file desc to parse the threshold.config file, and inits the regex used to parse the lines from threshold.config file.
de_ctx | Pointer to the Detection Engine Context. |
0 | On success. |
-1 | On failure. |
Definition at line 169 of file util-threshold-config.c.
References de_ctx, RUNMODE_CONF_TEST, SCLogDebug, SCLogWarning, SCRunmodeGet(), and SCThresholdConfParseFile().
Referenced by SigLoadSignatures().
int SCThresholdConfParseFile | ( | DetectEngineCtx * | de_ctx, |
FILE * | fp | ||
) |
Parses the Threshold Config file.
de_ctx | Pointer to the Detection Engine Context. |
fd | Pointer to file descriptor. |
Definition at line 983 of file util-threshold-config.c.
References DetectEngineCtx_::config_prefix, de_ctx, RUNMODE_CONF_TEST, SCLogDebug, SCLogInfo, SCRunmodeGet(), and DetectEngineCtx_::tenant_id.
Referenced by SCThresholdConfInitContext().
void SCThresholdConfRegisterTests | ( | void | ) |
This function registers unit tests for Classification Config API.
Definition at line 2580 of file util-threshold-config.c.
References UtRegisterTest().