suricata
|
Go to the source code of this file.
Typedefs | |
typedef enum SCRunModes | SCRunMode |
Functions | |
char * | RunmodeGetActive (void) |
const char * | RunModeGetMainMode (void) |
void | RunModeListRunmodes (void) |
Lists all registered runmodes. More... | |
int | RunModeEngineIsIPS (int capture_mode, const char *runmode, const char *capture_plugin_name) |
void | RunModeDispatch (int, const char *, const char *capture_plugin_name, const char *capture_plugin_args) |
void | RunModeRegisterRunModes (void) |
Register all runmodes in the engine. More... | |
void | RunModeRegisterNewRunMode (SCRunMode, const char *, const char *, int(*RunModeFunc)(void), int(*RunModeIsIPSEnabled)(void)) |
void | RunModeInitializeThreadSettings (void) |
void | RunModeInitializeOutputs (void) |
void | RunModeShutDown (void) |
int | RunModeOutputFiledataEnabled (void) |
bool | IsRunModeOffline (SCRunMode run_mode_to_check) |
bool | IsRunModeSystem (SCRunMode run_mode_to_check) |
void | RunModeEnablesBypassManager (void) |
int | RunModeNeedsBypassManager (void) |
Variables | |
const char * | thread_name_autofp |
const char * | thread_name_single |
const char * | thread_name_workers |
const char * | thread_name_verdict |
const char * | thread_name_flow_mgr |
const char * | thread_name_flow_bypass |
const char * | thread_name_flow_rec |
const char * | thread_name_unix_socket |
const char * | thread_name_detect_loader |
const char * | thread_name_counter_stats |
const char * | thread_name_counter_wakeup |
const char * | thread_name_heartbeat |
bool | threading_set_cpu_affinity |
float | threading_detect_ratio |
uint64_t | threading_set_stack_size |
int | debuglog_enabled |
Definition in file runmodes.h.
typedef enum SCRunModes SCRunMode |
enum SCRunModes |
Definition at line 27 of file runmodes.h.
bool IsRunModeOffline | ( | SCRunMode | run_mode_to_check | ) |
bool indicating if run mode is offline
bool IsRunModeSystem | ( | SCRunMode | run_mode_to_check | ) |
void RunModeDispatch | ( | int | , |
const char * | , | ||
const char * | capture_plugin_name, | ||
const char * | capture_plugin_args | ||
) |
Definition at line 399 of file runmodes.c.
void RunModeEnablesBypassManager | ( | void | ) |
Definition at line 455 of file runmodes.c.
int RunModeEngineIsIPS | ( | int | capture_mode, |
const char * | runmode, | ||
const char * | capture_plugin_name | ||
) |
Definition at line 369 of file runmodes.c.
Referenced by PostConfLoadedSetup().
char* RunmodeGetActive | ( | void | ) |
Return the running mode
The returned string must not be freed.
Definition at line 199 of file runmodes.c.
const char* RunModeGetMainMode | ( | void | ) |
Return the running mode
The returned string must not be freed.
Definition at line 211 of file runmodes.c.
References SCRunmodeGet().
void RunModeInitializeOutputs | ( | void | ) |
Initialize the output modules.
Definition at line 759 of file runmodes.c.
References OutputModule_::conf_name, OutputInitResult_::ctx, FatalError, FatalErrorOnInit, g_alproto_max, OutputModule_::InitFunc, OutputModule_::InitSubFunc, next, OutputInitResult_::ok, output_modules, SCConfGetNode(), SCConfNodeLookupChild(), SCConfNodeLookupChildValue(), SCConfValIsTrue(), SCLogInfo, SCLogWarning, TAILQ_FOREACH, and SCConfNode_::val.
Referenced by PreRunPostPrivsDropInit().
void RunModeInitializeThreadSettings | ( | void | ) |
Initialize multithreading settings.
Definition at line 944 of file runmodes.c.
References AffinitySetupLoadFromConfig(), FatalError, ParseSizeStringU64(), SCConfGet(), SCConfGetBool(), SCConfGetFloat(), SCConfGetNode(), SCLogDebug, SCLogNotice, threading_detect_ratio, threading_set_cpu_affinity, threading_set_stack_size, and WarnInvalidConfEntry.
void RunModeListRunmodes | ( | void | ) |
Lists all registered runmodes.
Definition at line 247 of file runmodes.c.
References RUNMODE_UNKNOWN, and RUNMODE_USER_MAX.
int RunModeNeedsBypassManager | ( | void | ) |
Definition at line 460 of file runmodes.c.
int RunModeOutputFiledataEnabled | ( | void | ) |
Definition at line 533 of file runmodes.c.
void RunModeRegisterNewRunMode | ( | SCRunMode | , |
const char * | , | ||
const char * | , | ||
int(*)(void) | RunModeFunc, | ||
int(*)(void) | RunModeIsIPSEnabled | ||
) |
void RunModeRegisterRunModes | ( | void | ) |
Register all runmodes in the engine.
Definition at line 221 of file runmodes.c.
Referenced by InitGlobal().
void RunModeShutDown | ( | void | ) |
Cleanup the run mode.
Definition at line 569 of file runmodes.c.
int debuglog_enabled |
Definition at line 61 of file runmodes.c.
const char* thread_name_autofp |
Definition at line 66 of file runmodes.c.
Referenced by RunModeErfFileAutoFp(), RunModeFilePcapAutoFp(), and RunModeSetIPSAutoFp().
const char* thread_name_counter_stats |
Definition at line 75 of file runmodes.c.
const char* thread_name_counter_wakeup |
Definition at line 76 of file runmodes.c.
const char* thread_name_detect_loader |
Definition at line 74 of file runmodes.c.
const char* thread_name_flow_bypass |
Definition at line 72 of file runmodes.c.
Referenced by BypassedFlowManagerThreadSpawn().
const char* thread_name_flow_mgr |
Definition at line 70 of file runmodes.c.
Referenced by FlowDisableFlowManagerThread().
const char* thread_name_flow_rec |
Definition at line 71 of file runmodes.c.
const char* thread_name_heartbeat |
Definition at line 77 of file runmodes.c.
const char* thread_name_single |
Definition at line 67 of file runmodes.c.
Referenced by RunModeErfFileSingle(), RunModeFilePcapSingle(), and RunModeIdsAFXDPSingle().
const char* thread_name_unix_socket |
Definition at line 73 of file runmodes.c.
const char* thread_name_verdict |
Definition at line 69 of file runmodes.c.
Referenced by RunModeSetIPSAutoFp().
const char* thread_name_workers |
Definition at line 68 of file runmodes.c.
Referenced by RunModeErfFileAutoFp(), RunModeFilePcapAutoFp(), RunModeIdsAFXDPWorkers(), RunModeIdsDpdkWorkers(), RunModeSetIPSAutoFp(), RunModeSetIPSWorker(), and RunModeSetLiveCaptureAutoFp().
float threading_detect_ratio |
Definition at line 939 of file runmodes.c.
Referenced by RunModeErfFileAutoFp(), RunModeFilePcapAutoFp(), RunModeInitializeThreadSettings(), and TmThreadsGetWorkerThreadMax().
bool threading_set_cpu_affinity |
Definition at line 62 of file runmodes.c.
Referenced by RunModeErfFileAutoFp(), RunModeInitializeThreadSettings(), and TmThreadSetCPU().
uint64_t threading_set_stack_size |
Definition at line 63 of file runmodes.c.
Referenced by RunModeInitializeThreadSettings(), and TmThreadSpawn().