suricata
|
#include "runmode-pcap.h"
#include "runmode-pcap-file.h"
#include "runmode-pfring.h"
#include "runmode-nfq.h"
#include "runmode-ipfw.h"
#include "runmode-erf-file.h"
#include "runmode-erf-dag.h"
#include "runmode-napatech.h"
#include "runmode-af-packet.h"
#include "runmode-nflog.h"
#include "runmode-unix-socket.h"
#include "runmode-netmap.h"
#include "runmode-windivert.h"
#include "runmode-dpdk.h"
Go to the source code of this file.
Functions | |
char * | RunmodeGetActive (void) |
const char * | RunModeGetMainMode (void) |
void | RunModeListRunmodes (void) |
Lists all registered runmodes. More... | |
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 (enum RunModes, const char *, const char *, int(*RunModeFunc)(void)) |
Registers a new runmode. More... | |
void | RunModeInitialize (void) |
void | RunModeInitializeOutputs (void) |
void | RunModeShutDown (void) |
int | RunModeOutputFileEnabled (void) |
int | RunModeOutputFiledataEnabled (void) |
bool | IsRunModeOffline (enum RunModes run_mode_to_check) |
bool | IsRunModeSystem (enum RunModes 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 |
int | threading_set_cpu_affinity |
float | threading_detect_ratio |
uint64_t | threading_set_stack_size |
int | debuglog_enabled |
Definition in file runmodes.h.
enum RunModes |
Definition at line 27 of file runmodes.h.
bool IsRunModeOffline | ( | enum RunModes | run_mode_to_check | ) |
bool indicating if run mode is offline
Definition at line 531 of file runmodes.c.
References RUNMODE_CONF_TEST, RUNMODE_ENGINE_ANALYSIS, RUNMODE_ERF_FILE, RUNMODE_PCAP_FILE, and RUNMODE_UNIX_SOCKET.
Referenced by ConfUnixSocketIsEnable().
bool IsRunModeSystem | ( | enum RunModes | run_mode_to_check | ) |
Definition at line 518 of file runmodes.c.
References RUNMODE_ENGINE_ANALYSIS, RUNMODE_ERF_FILE, and RUNMODE_PCAP_FILE.
void RunModeDispatch | ( | int | , |
const char * | , | ||
const char * | capture_plugin_name, | ||
const char * | capture_plugin_args | ||
) |
Definition at line 291 of file runmodes.c.
References ConfGet(), FatalError, SCCapturePlugin_::GetDefaultMode, RUNMODE_AFP_DEV, RUNMODE_DAG, RUNMODE_DPDK, RUNMODE_ERF_FILE, RUNMODE_IPFW, RUNMODE_NAPATECH, RUNMODE_NETMAP, RUNMODE_NFLOG, RUNMODE_NFQ, RUNMODE_PCAP_DEV, RUNMODE_PCAP_FILE, RUNMODE_PFRING, RUNMODE_PLUGIN, RUNMODE_UNIX_SOCKET, RUNMODE_WINDIVERT, RunModeAFPGetDefaultMode(), RunModeDpdkGetDefaultMode(), RunModeErfDagGetDefaultMode(), RunModeErfFileGetDefaultMode(), RunModeFilePcapGetDefaultMode(), RunModeIdsGetDefaultMode(), RunModeIdsNflogGetDefaultMode(), RunModeIdsPfringGetDefaultMode(), RunModeIpsIPFWGetDefaultMode(), RunModeIpsNFQGetDefaultMode(), RunModeIpsWinDivertGetDefaultMode(), RunModeNapatechGetDefaultMode(), RunModeNetmapGetDefaultMode(), RunModeUnixSocketGetDefaultMode(), SC_ERR_FATAL, SC_ERR_PLUGIN, SC_ERR_RUNMODE, SCLogWarning, SCPluginFindCaptureByName(), SCStrdup, and unlikely.
void RunModeEnablesBypassManager | ( | void | ) |
Definition at line 425 of file runmodes.c.
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 RunmodeGetCurrent().
void RunModeInitialize | ( | void | ) |
Initialize multithreading settings.
Definition at line 932 of file runmodes.c.
References AffinitySetupLoadFromConfig(), ConfGetBool(), ConfGetFloat(), ConfGetNode(), ConfGetValue(), FALSE, FatalError, ParseSizeStringU64(), SC_ERR_INVALID_ARGUMENT, SCLogDebug, threading_detect_ratio, threading_set_cpu_affinity, threading_set_stack_size, TRUE, and WarnInvalidConfEntry.
Referenced by RunModeErfFileAutoFp(), RunModeErfFileSingle(), RunModeFilePcapAutoFp(), RunModeFilePcapSingle(), RunModeIdsAFPAutoFp(), RunModeIdsAFPSingle(), RunModeIdsAFPWorkers(), RunModeIdsDpdkWorkers(), RunModeIdsErfDagAutoFp(), RunModeIdsErfDagSingle(), RunModeIdsErfDagWorkers(), RunModeIdsNflogAutoFp(), RunModeIdsNflogSingle(), RunModeIdsNflogWorkers(), RunModeIdsPcapAutoFp(), RunModeIdsPcapSingle(), RunModeIdsPcapWorkers(), RunModeIdsPfringAutoFp(), RunModeIdsPfringSingle(), RunModeIdsPfringWorkers(), RunModeIpsIPFWAutoFp(), RunModeIpsIPFWWorker(), RunModeIpsNFQAutoFp(), RunModeIpsNFQWorker(), and RunModeIpsWinDivertAutoFp().
void RunModeInitializeOutputs | ( | void | ) |
Initialize the output modules.
Definition at line 749 of file runmodes.c.
References ConfGetNode().
Referenced by PreRunPostPrivsDropInit().
void RunModeListRunmodes | ( | void | ) |
Lists all registered runmodes.
Definition at line 248 of file runmodes.c.
References RUNMODE_UNKNOWN, and RUNMODE_USER_MAX.
int RunModeNeedsBypassManager | ( | void | ) |
Definition at line 430 of file runmodes.c.
int RunModeOutputFiledataEnabled | ( | void | ) |
Definition at line 513 of file runmodes.c.
int RunModeOutputFileEnabled | ( | void | ) |
Definition at line 508 of file runmodes.c.
void RunModeRegisterNewRunMode | ( | enum RunModes | runmode, |
const char * | name, | ||
const char * | description, | ||
int(*)(void) | RunModeFunc | ||
) |
Registers a new runmode.
runmode | Runmode type. |
name | Custom mode for this specific runmode type. Within each runmode type, each custom name is a primary key. |
description | Description for this runmode. |
RunModeFunc | The function to be run for this runmode. |
Definition at line 446 of file runmodes.c.
Referenced by RunModeDpdkRegister(), RunModeErfDagRegister(), RunModeErfFileRegister(), RunModeFilePcapRegister(), RunModeIdsAFPRegister(), RunModeIdsNetmapRegister(), RunModeIdsNflogRegister(), RunModeIdsPcapRegister(), RunModeIdsPfringRegister(), RunModeIpsIPFWRegister(), RunModeIpsNFQRegister(), RunModeIpsWinDivertRegister(), RunModeNapatechRegister(), RunModeUnixSocketRegister(), and UtRunModeRegister().
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 549 of file runmodes.c.
int debuglog_enabled |
Definition at line 59 of file runmodes.c.
const char* thread_name_autofp |
Definition at line 64 of file runmodes.c.
Referenced by RunModeErfFileAutoFp(), RunModeFilePcapAutoFp(), RunModeIdsNflogAutoFp(), RunModeSetIPSAutoFp(), and TmThreadWaitOnThreadInit().
const char* thread_name_counter_stats |
Definition at line 73 of file runmodes.c.
const char* thread_name_counter_wakeup |
Definition at line 74 of file runmodes.c.
const char* thread_name_detect_loader |
Definition at line 72 of file runmodes.c.
const char* thread_name_flow_bypass |
Definition at line 70 of file runmodes.c.
Referenced by BypassedFlowManagerThreadSpawn().
const char* thread_name_flow_mgr |
Definition at line 68 of file runmodes.c.
Referenced by FlowDisableFlowManagerThread(), and TmThreadWaitOnThreadInit().
const char* thread_name_flow_rec |
Definition at line 69 of file runmodes.c.
Referenced by TmThreadWaitOnThreadInit().
const char* thread_name_single |
Definition at line 65 of file runmodes.c.
Referenced by RunModeErfFileSingle(), RunModeFilePcapSingle(), and RunModeIdsNflogSingle().
const char* thread_name_unix_socket |
Definition at line 71 of file runmodes.c.
const char* thread_name_verdict |
Definition at line 67 of file runmodes.c.
Referenced by RunModeSetIPSAutoFp(), and TmThreadWaitOnThreadInit().
const char* thread_name_workers |
Definition at line 66 of file runmodes.c.
Referenced by RunModeErfFileAutoFp(), RunModeFilePcapAutoFp(), RunModeIdsDpdkWorkers(), RunModeIdsNflogWorkers(), RunModeSetIPSAutoFp(), RunModeSetIPSWorker(), RunModeSetLiveCaptureAutoFp(), and TmThreadWaitOnThreadInit().
float threading_detect_ratio |
Definition at line 927 of file runmodes.c.
Referenced by RunModeErfFileAutoFp(), RunModeFilePcapAutoFp(), RunModeInitialize(), and TmThreadsGetWorkerThreadMax().
int threading_set_cpu_affinity |
Definition at line 60 of file runmodes.c.
Referenced by RunModeErfFileAutoFp(), RunModeInitialize(), and TmThreadSetCPU().
uint64_t threading_set_stack_size |
Definition at line 61 of file runmodes.c.
Referenced by RunModeInitialize(), and TmThreadSpawn().