suricata
|
Go to the source code of this file.
Data Structures | |
struct | DetectLoaderTask_ |
struct | DetectLoaderControl_ |
Typedefs | |
typedef int(* | LoaderFunc) (void *ctx, int loader_id) |
typedef void(* | LoaderFreeFunc) (void *ctx) |
typedef struct DetectLoaderTask_ | DetectLoaderTask |
typedef struct DetectLoaderControl_ | DetectLoaderControl |
Functions | |
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... | |
void | DetectLoaderThreadSpawn (void) |
spawn the detect loader manager thread More... | |
void | TmModuleDetectLoaderRegister (void) |
Detect loader API, for using multiple 'loader' threads that can load multiple detection engines in parallel.
Definition in file detect-engine-loader.h.
typedef struct DetectLoaderControl_ DetectLoaderControl |
typedef struct DetectLoaderTask_ DetectLoaderTask |
typedef void(* LoaderFreeFunc) (void *ctx) |
Definition at line 35 of file detect-engine-loader.h.
typedef int(* LoaderFunc) (void *ctx, int loader_id) |
ctx | function specific data |
loader_id | id of the loader that executed the task |
Definition at line 34 of file detect-engine-loader.h.
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 423 of file detect-engine-loader.c.
void DetectLoadersInit | ( | void | ) |
Definition at line 500 of file detect-engine-loader.c.
References ConfGetInt(), FatalError, and NLOADERS.
int DetectLoadersSync | ( | void | ) |
wait for loader tasks to complete
result | 0 for ok, -1 for errors |
Definition at line 457 of file detect-engine-loader.c.
References SCLogDebug.
void DetectLoaderThreadSpawn | ( | void | ) |
spawn the detect loader manager thread
Definition at line 636 of file detect-engine-loader.c.
void TmModuleDetectLoaderRegister | ( | void | ) |
Definition at line 652 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 545 of file detect-engine-loader.c.
References ThreadVars_::name, ThreadVars_::next, SCMutexLock, SCMutexUnlock, TmThreadContinue(), tv, tv_root, tv_root_lock, and TVT_MAX.