|
suricata
|
#include "suricata-common.h"#include "suricata.h"#include "conf.h"#include "detect.h"#include "detect-parse.h"#include "runmodes.h"#include "threads.h"#include "threadvars.h"#include "tm-threads.h"#include "queue.h"#include "detect-engine.h"#include "detect-engine-loader.h"#include "detect-engine-build.h"#include "detect-engine-analyzer.h"#include "detect-engine-mpm.h"#include "detect-engine-sigorder.h"#include "util-detect.h"#include "util-threshold-config.h"#include "util-path.h"#include "rust.h"
Go to the source code of this file.
Data Structures | |
| struct | DetectLoaderThreadData_ |
Macros | |
| #define | NLOADERS 4 |
Typedefs | |
| typedef struct DetectLoaderThreadData_ | DetectLoaderThreadData |
Functions | |
| char * | DetectLoadCompleteSigPath (const DetectEngineCtx *de_ctx, const char *sig_file) |
| Create the path if default-rule-path was specified. More... | |
| int | SigLoadSignatures (DetectEngineCtx *de_ctx, char *sig_file, bool sig_file_exclusive) |
| Load signatures. More... | |
| int | DetectLoaderQueueTask (int loader_id, LoaderFunc Func, void *func_ctx, LoaderFreeFunc FreeFunc) |
| int | DetectLoadersSync (void) |
| wait for loader tasks to complete More... | |
| void | DetectLoadersInit (void) |
| void | TmThreadContinueDetectLoaderThreads (void) |
| Unpauses all threads present in tv_root. More... | |
| SC_ATOMIC_DECLARE (int, detect_loader_cnt) | |
| void | DetectLoaderThreadSpawn (void) |
| spawn the detect loader manager thread More... | |
| void | TmModuleDetectLoaderRegister (void) |
Variables | |
| int | rule_reload |
| int | engine_analysis |
| bool | rule_engine_analysis_set = false |
Definition in file detect-engine-loader.c.
| #define NLOADERS 4 |
Definition at line 520 of file detect-engine-loader.c.
| typedef struct DetectLoaderThreadData_ DetectLoaderThreadData |
| char* DetectLoadCompleteSigPath | ( | const DetectEngineCtx * | de_ctx, |
| const char * | sig_file | ||
| ) |
Create the path if default-rule-path was specified.
| sig_file | The name of the file |
| str | Pointer to the string path + sig_file |
Definition at line 106 of file detect-engine-loader.c.
| int DetectLoaderQueueTask | ( | int | loader_id, |
| LoaderFunc | Func, | ||
| void * | func_ctx, | ||
| LoaderFreeFunc | FreeFunc | ||
| ) |
| loader | -1 for auto select |
| loader_id | or negative in case of error |
Definition at line 527 of file detect-engine-loader.c.
| void DetectLoadersInit | ( | void | ) |
Definition at line 604 of file detect-engine-loader.c.
References FatalError, NLOADERS, and SCConfGetInt().

| int DetectLoadersSync | ( | void | ) |
wait for loader tasks to complete
| result | 0 for ok, -1 for errors |
Definition at line 561 of file detect-engine-loader.c.
References SCLogDebug.
| void DetectLoaderThreadSpawn | ( | void | ) |
spawn the detect loader manager thread
Definition at line 749 of file detect-engine-loader.c.
| SC_ATOMIC_DECLARE | ( | int | , |
| detect_loader_cnt | |||
| ) |
| int SigLoadSignatures | ( | DetectEngineCtx * | de_ctx, |
| char * | sig_file, | ||
| bool | sig_file_exclusive | ||
| ) |
Load signatures.
| de_ctx | Pointer to the detection engine context |
| sig_file | Filename (or pattern) holding signatures |
| sig_file_exclusive | File passed in 'sig_file' should be loaded exclusively. |
| -1 | on error |
Definition at line 372 of file detect-engine-loader.c.
References DetectEngineCtx_::config_prefix, de_ctx, RUNMODE_ENGINE_ANALYSIS, SCEnter, SCRunmodeGet(), SetupEngineAnalysis(), and DetectEngineCtx_::sig_stat.

| void TmModuleDetectLoaderRegister | ( | void | ) |
Definition at line 765 of file detect-engine-loader.c.
References TmModule_::name, TmModule_::ThreadInit, TMM_DETECTLOADER, and tmm_modules.
| void TmThreadContinueDetectLoaderThreads | ( | void | ) |
Unpauses all threads present in tv_root.
Definition at line 649 of file detect-engine-loader.c.
References ThreadVars_::name, ThreadVars_::next, SCMutexLock, SCMutexUnlock, TmThreadContinue(), tv, tv_root, tv_root_lock, and TVT_MAX.

| int engine_analysis |
Referenced by SCParseCommandLine().
| bool rule_engine_analysis_set = false |
Definition at line 56 of file detect-engine-loader.c.
| int rule_reload |