suricata
suricata.h File Reference
#include "suricata-common.h"
#include "packet-queue.h"
#include "runmodes.h"
#include <ctype.h>
Include dependency graph for suricata.h:

Go to the source code of this file.

Data Structures

struct  SCInstance_
 

Macros

#define PROG_NAME   "Suricata"
 
#define PROG_VER   "5.0.0-dev"
 
#define DEFAULT_CONF_FILE   CONFIG_DIR "/suricata.yaml"
 
#define DEFAULT_PID_DIR   LOCAL_STATE_DIR "/run/"
 
#define DEFAULT_PID_BASENAME   "suricata.pid"
 
#define DEFAULT_PID_FILENAME   DEFAULT_PID_DIR DEFAULT_PID_BASENAME
 
#define DOC_URL   "https://suricata.readthedocs.io/en/"
 
#define DOC_VERSION   "latest"
 
#define SURICATA_STOP   (1 << 0)
 
#define SURICATA_DONE   (1 << 2)
 
#define IS_SURI_HOST_MODE_SNIFFER_ONLY(host_mode)   ((host_mode) == SURI_HOST_IS_SNIFFER_ONLY)
 
#define IS_SURI_HOST_MODE_ROUTER(host_mode)   ((host_mode) == SURI_HOST_IS_ROUTER)
 
#define u8_tolower(c)   tolower((uint8_t)(c))
 

Typedefs

typedef struct SCInstance_ SCInstance
 

Enumerations

enum  { SURICATA_INIT = 0, SURICATA_RUNTIME, SURICATA_DEINIT }
 
enum  EngineMode { ENGINE_MODE_IDS, ENGINE_MODE_IPS }
 
enum  { SURI_HOST_IS_SNIFFER_ONLY, SURI_HOST_IS_ROUTER }
 

Functions

void EngineModeSetIPS (void)
 
void EngineModeSetIDS (void)
 
int EngineModeIsIPS (void)
 
int EngineModeIsIDS (void)
 
void GlobalsInitPreConfig (void)
 
void EngineStop (void)
 make sure threads can stop the engine by calling this function. Purpose: pcap file mode needs to be able to tell the engine the file eof is reached. More...
 
void EngineDone (void)
 Used to indicate that the current task is done. More...
 
int RunmodeIsUnittests (void)
 
int RunmodeGetCurrent (void)
 
int IsRuleReloadSet (int quiet)
 
int SuriHasSigFile (void)
 
void PreRunInit (const int runmode)
 
void PreRunPostPrivsDropInit (const int runmode)
 
void PostRunDeinit (const int runmode, struct timeval *start_time)
 
void RegisterAllModules (void)
 

Variables

PacketQueue trans_q [256]
 
volatile uint8_t suricata_ctl_flags
 
int g_disable_randomness
 
int run_mode
 

Detailed Description

Author
Victor Julien victo.nosp@m.r@in.nosp@m.linia.nosp@m.c.ne.nosp@m.t

Definition in file suricata.h.

Macro Definition Documentation

#define DEFAULT_CONF_FILE   CONFIG_DIR "/suricata.yaml"

Definition at line 80 of file suricata.h.

Referenced by ListAppLayerProtocols(), and RegisterAllModules().

#define DEFAULT_PID_BASENAME   "suricata.pid"

Definition at line 83 of file suricata.h.

#define DEFAULT_PID_DIR   LOCAL_STATE_DIR "/run/"

Definition at line 82 of file suricata.h.

#define DEFAULT_PID_FILENAME   DEFAULT_PID_DIR DEFAULT_PID_BASENAME

Definition at line 84 of file suricata.h.

Referenced by RegisterAllModules().

#define DOC_URL   "https://suricata.readthedocs.io/en/"

Definition at line 86 of file suricata.h.

Referenced by DetectAckRegister(), DetectBase64DataRegister(), DetectBase64DecodeRegister(), DetectBsizeRegister(), DetectBypassRegister(), DetectClasstypeRegister(), DetectContentRegister(), DetectDepthRegister(), DetectDetectionFilterRegister(), DetectDistanceRegister(), DetectDsizeRegister(), DetectFastPatternRegister(), DetectFiledataRegister(), DetectFileextRegister(), DetectFilemagicRegister(), DetectFileMd5Register(), DetectFilenameRegister(), DetectFileSha1Register(), DetectFileSha256Register(), DetectFilesizeRegister(), DetectFilestoreRegister(), DetectFlowbitsRegister(), DetectFlowintRegister(), DetectFlowRegister(), DetectFragBitsRegister(), DetectFragOffsetRegister(), DetectFtpbounceRegister(), DetectFtpdataRegister(), DetectGidRegister(), DetectHttpClientBodyRegister(), DetectHttpCookieRegister(), DetectHttpHeaderNamesRegister(), DetectHttpHeaderRegister(), DetectHttpHHRegister(), DetectHttpMethodRegister(), DetectHttpProtocolRegister(), DetectHttpRawHeaderRegister(), DetectHttpRequestLineRegister(), DetectHttpResponseLineRegister(), DetectHttpServerBodyRegister(), DetectHttpStartRegister(), DetectHttpStatCodeRegister(), DetectHttpStatMsgRegister(), DetectHttpUARegister(), DetectHttpUriRegister(), DetectIcmpIdRegister(), DetectIcmpSeqRegister(), DetectICodeRegister(), DetectIdRegister(), DetectIpOptsRegister(), DetectIPProtoRegister(), DetectIsdataatRegister(), DetectITypeRegister(), DetectMetadataRegister(), DetectMsgRegister(), DetectNfsProcedureRegister(), DetectNfsVersionRegister(), DetectNocaseRegister(), DetectOffsetRegister(), DetectPcreRegister(), DetectPriorityRegister(), DetectReferenceRegister(), DetectRevRegister(), DetectRpcRegister(), DetectSameipRegister(), DetectSeqRegister(), DetectSidRegister(), DetectSshProtocolRegister(), DetectSshSoftwareRegister(), DetectSshSoftwareVersionRegister(), DetectSshVersionRegister(), DetectStreamSizeRegister(), DetectTargetRegister(), DetectTemplate2Register(), DetectThresholdRegister(), DetectTlsFingerprintRegister(), DetectTlsIssuerRegister(), DetectTlsJa3HashRegister(), DetectTlsJa3StringRegister(), DetectTlsRegister(), DetectTlsSerialRegister(), DetectTlsSniRegister(), DetectTlsSubjectRegister(), DetectTlsValidityRegister(), DetectTlsVersionRegister(), DetectTosRegister(), DetectTransformCompressWhitespaceRegister(), DetectTransformMd5Register(), DetectTransformSha1Register(), DetectTransformSha256Register(), DetectTransformStripWhitespaceRegister(), DetectTtlRegister(), DetectUrilenRegister(), DetectWindowRegister(), DetectWithinRegister(), and DetectXbitsRegister().

#define DOC_VERSION   "latest"

Definition at line 91 of file suricata.h.

Referenced by DetectAckRegister(), DetectBase64DataRegister(), DetectBase64DecodeRegister(), DetectBsizeRegister(), DetectBypassRegister(), DetectClasstypeRegister(), DetectContentRegister(), DetectDepthRegister(), DetectDetectionFilterRegister(), DetectDistanceRegister(), DetectDsizeRegister(), DetectFastPatternRegister(), DetectFiledataRegister(), DetectFileextRegister(), DetectFilemagicRegister(), DetectFileMd5Register(), DetectFilenameRegister(), DetectFileSha1Register(), DetectFileSha256Register(), DetectFilesizeRegister(), DetectFilestoreRegister(), DetectFlowbitsRegister(), DetectFlowintRegister(), DetectFlowRegister(), DetectFragBitsRegister(), DetectFragOffsetRegister(), DetectFtpbounceRegister(), DetectFtpdataRegister(), DetectGidRegister(), DetectHttpClientBodyRegister(), DetectHttpCookieRegister(), DetectHttpHeaderNamesRegister(), DetectHttpHeaderRegister(), DetectHttpHHRegister(), DetectHttpMethodRegister(), DetectHttpProtocolRegister(), DetectHttpRawHeaderRegister(), DetectHttpRequestLineRegister(), DetectHttpResponseLineRegister(), DetectHttpServerBodyRegister(), DetectHttpStartRegister(), DetectHttpStatCodeRegister(), DetectHttpStatMsgRegister(), DetectHttpUARegister(), DetectHttpUriRegister(), DetectIcmpIdRegister(), DetectIcmpSeqRegister(), DetectICodeRegister(), DetectIdRegister(), DetectIpOptsRegister(), DetectIPProtoRegister(), DetectIsdataatRegister(), DetectITypeRegister(), DetectMetadataRegister(), DetectMsgRegister(), DetectNfsProcedureRegister(), DetectNfsVersionRegister(), DetectNocaseRegister(), DetectOffsetRegister(), DetectPcreRegister(), DetectPriorityRegister(), DetectReferenceRegister(), DetectRevRegister(), DetectRpcRegister(), DetectSameipRegister(), DetectSeqRegister(), DetectSidRegister(), DetectSshProtocolRegister(), DetectSshSoftwareRegister(), DetectSshSoftwareVersionRegister(), DetectSshVersionRegister(), DetectStreamSizeRegister(), DetectTargetRegister(), DetectTemplate2Register(), DetectThresholdRegister(), DetectTlsFingerprintRegister(), DetectTlsIssuerRegister(), DetectTlsJa3HashRegister(), DetectTlsJa3StringRegister(), DetectTlsRegister(), DetectTlsSerialRegister(), DetectTlsSniRegister(), DetectTlsSubjectRegister(), DetectTlsValidityRegister(), DetectTlsVersionRegister(), DetectTosRegister(), DetectTransformCompressWhitespaceRegister(), DetectTransformMd5Register(), DetectTransformSha1Register(), DetectTransformSha256Register(), DetectTransformStripWhitespaceRegister(), DetectTtlRegister(), DetectUrilenRegister(), DetectWindowRegister(), DetectWithinRegister(), and DetectXbitsRegister().

#define IS_SURI_HOST_MODE_ROUTER (   host_mode)    ((host_mode) == SURI_HOST_IS_ROUTER)

Definition at line 125 of file suricata.h.

#define IS_SURI_HOST_MODE_SNIFFER_ONLY (   host_mode)    ((host_mode) == SURI_HOST_IS_SNIFFER_ONLY)

Definition at line 124 of file suricata.h.

#define PROG_NAME   "Suricata"

Definition at line 71 of file suricata.h.

Referenced by EngineDone(), ReceivePfringThreadInit(), and RegisterAllModules().

#define PROG_VER   "5.0.0-dev"

Definition at line 72 of file suricata.h.

Referenced by EngineDone(), and RegisterAllModules().

#define SURICATA_DONE   (1 << 2)

packets capture ended

Definition at line 98 of file suricata.h.

Referenced by EngineDone().

#define SURICATA_STOP   (1 << 0)

gracefully stop the engine: process all outstanding packets first

Definition at line 95 of file suricata.h.

Referenced by EngineStop(), NapatechPacketLoopZC(), NoWinDivertSupportExit(), PcapFileDispatch(), PostRunDeinit(), ReceiveErfDagLoop(), ReceiveErfFileLoop(), ReceivePcapLoop(), and ReceivePfringLoop().

#define u8_tolower (   c)    tolower((uint8_t)(c))

Typedef Documentation

typedef struct SCInstance_ SCInstance

Enumeration Type Documentation

anonymous enum
Enumerator
SURICATA_INIT 
SURICATA_RUNTIME 
SURICATA_DEINIT 

Definition at line 101 of file suricata.h.

anonymous enum
Enumerator
SURI_HOST_IS_SNIFFER_ONLY 
SURI_HOST_IS_ROUTER 

Definition at line 119 of file suricata.h.

enum EngineMode
Enumerator
ENGINE_MODE_IDS 
ENGINE_MODE_IPS 

Definition at line 108 of file suricata.h.

Function Documentation

void EngineDone ( void  )

Used to indicate that the current task is done.

This is mainly used by pcap-file to tell it has finished to treat a pcap files when running in unix-socket mode.

Definition at line 431 of file suricata.c.

References CLS, ConfSetFinal(), EngineModeIsIPS(), PROG_NAME, PROG_VER, SC_ERR_BPF, SC_ERR_FATAL, SC_ERR_FOPEN, SC_ERR_MEM_ALLOC, SC_ERR_NOT_SUPPORTED, SCFree, SCLogError, SCMalloc, strlcat(), suricata_ctl_flags, SURICATA_DONE, TM_ECODE_FAILED, TM_ECODE_OK, unlikely, and xstr.

Referenced by TmThreadsSlotVarRun().

Here is the call graph for this function:

Here is the caller graph for this function:

int EngineModeIsIDS ( void  )

Definition at line 244 of file suricata.c.

References ENGINE_MODE_IDS.

int EngineModeIsIPS ( void  )
void EngineModeSetIDS ( void  )

Definition at line 254 of file suricata.c.

References ENGINE_MODE_IDS.

void EngineModeSetIPS ( void  )

Definition at line 249 of file suricata.c.

References ENGINE_MODE_IPS.

Referenced by PostRunDeinit(), and RegisterAllModules().

Here is the caller graph for this function:

void EngineStop ( void  )

make sure threads can stop the engine by calling this function. Purpose: pcap file mode needs to be able to tell the engine the file eof is reached.

Definition at line 420 of file suricata.c.

References suricata_ctl_flags, and SURICATA_STOP.

Referenced by PcapFileGlobalInit(), and ReceiveErfFileLoop().

Here is the caller graph for this function:

int IsRuleReloadSet ( int  quiet)
void PostRunDeinit ( const int  runmode,
struct timeval *  start_time 
)

Definition at line 2270 of file suricata.c.

References AFPRunModeIsIPS(), AppLayerHtpNeedFileInspection(), AppLayerSetup(), ByteExtractStringUint16(), SCInstance_::checksum_validation, CheckValidDaemonModes(), CIDRInit(), SCInstance_::conf_filename, ConfGet(), ConfGetBool(), ConfGetChildValueBool(), ConfGetInt(), ConfGetNode(), ConfGetValue(), ConfigCheckLogDirectory(), ConfigGetLogDirectory(), ConfigSetLogDirectory(), ConfSet(), ConfSetFinal(), CoredumpLoadConfig(), SCInstance_::daemon, DecodeGlobalConfig(), DecodeUnregisterCounters(), DEFAULT_MAX_PENDING_PACKETS, DEFAULT_MTU, DEFAULT_PACKET_SIZE, default_packet_size, DefragDestroy(), SCInstance_::delayed_detect, DETECT_ENGINE_TYPE_NORMAL, DetectAddressTestConfVars(), DetectEngineAddToMaster(), DetectEngineBumpVersion(), DetectEngineCtxInit(), DetectEngineCtxInitStubForDD(), DetectEngineCtxInitStubForMT(), DetectEngineEnabled(), DetectEngineMultiTenantSetup(), DetectEngineReload(), DetectEngineReloadIsStart(), DetectEngineReloadSetIdle(), DetectEngineReloadStart(), DetectPortTestConfVars(), SCInstance_::disabled_detect, EngineModeIsIPS(), EngineModeSetIPS(), DetectEngineCtx_::failure_fatal, FALSE, FatalError, FlowDisableFlowManagerThread(), FlowDisableFlowRecyclerThread(), FlowForceReassembly(), FlowShutdown(), g_default_mtu, GetIfaceMaxPacketSize(), GetIfaceMTU(), host_mode, HOST_VERBOSE, HostBitInitCtx(), HostCleanup(), HostInitConfig(), IPPairBitInitCtx(), IPPairShutdown(), SCInstance_::keyword_info, DetectEngineCtx_::last_reload, len, ListAppLayerProtocols(), ListKeywords(), LiveDeviceFinalize(), LiveGetDeviceCount(), LiveGetDeviceName(), LiveSetOffloadDisable(), LiveSetOffloadWarn(), SCInstance_::log_dir, MAX, max_pending_packets, MpmTableSetup(), NetmapRunModeIsIPS(), next, NFQInitConfig(), SCInstance_::offline, OutputNotifyFileRotation(), PacketAlertTagInit(), PacketPoolDestroy(), PacketPoolInit(), ParseSizeStringU32(), PreRunInit(), profiling_rules_enabled, SCInstance_::regex_arg, RegisterAllModules(), SCInstance_::run_mode, run_mode, RUNMODE_AFP_DEV, RUNMODE_CONF_TEST, SCInstance_::runmode_custom_mode, RUNMODE_ENGINE_ANALYSIS, RUNMODE_LIST_APP_LAYERS, RUNMODE_LIST_KEYWORDS, RUNMODE_LIST_RUNMODES, RUNMODE_LIST_UNITTEST, RUNMODE_NETMAP, RUNMODE_NFQ, RUNMODE_PCAP_DEV, RUNMODE_PFRING, RUNMODE_PRINT_BUILDINFO, RUNMODE_PRINT_USAGE, RUNMODE_PRINT_VERSION, RUNMODE_UNITTEST, RUNMODE_UNIX_SOCKET, RUNMODE_UNKNOWN, RUNMODE_WINDIVERT, RunModeListRunmodes(), RunModeShutDown(), RunUnittests(), SC_ERR_INITIALIZATION, SC_ERR_INVALID_YAML_CONF_ENTRY, SC_ERR_LIVE_RULE_SWAP, SC_ERR_LOGDIR_CONFIG, SC_ERR_NO_RULES_LOADED, SC_ERR_SIZE_PARSE, SCAsn1LoadConfig(), SCClassConfInit(), SCEnter, SCHInfoLoadFromConfig(), SCLogDebug, SCLogError, SCLogInfo, SCLogNotice, SCLogWarning, SCProfilingDestroy(), SCProfilingDump(), SCProtoNameInit(), SCReferenceConfInit(), SCReturnInt, SCInstance_::set_logdir, SCInstance_::sig_file, SCInstance_::sig_file_exclusive, sighup_count, sigint_count, SigLoadSignatures(), SigTableSetup(), sigterm_count, sigusr2_count, SLL_HEADER_LEN, SpmTableSetup(), StatsReleaseResources(), StorageFinalize(), StorageInit(), STREAM_VERBOSE, StreamTcpFreeConfig(), strlcpy(), SURI_HOST_IS_ROUTER, SURI_HOST_IS_SNIFFER_ONLY, suricata_ctl_flags, SURICATA_STOP, SCInstance_::system, TagInitCtx(), TAILQ_FOREACH, ThresholdInit(), TM_ECODE_DONE, TM_ECODE_FAILED, TM_ECODE_OK, TmModuleRunInit(), TmqhSetup(), TmqResetQueues(), TmThreadCheckThreadState(), TmThreadClearThreadsFamily(), TmThreadDisablePacketThreads(), TmThreadDisableReceiveThreads(), TmThreadKillThreadsFamily(), TVT_MGMT, TVT_PPT, DetectEngineCtx_::type, UtilSignalHandlerSetup(), UtilSignalUnblock(), ConfNode_::val, and WarnInvalidConfEntry.

Referenced by main(), and RunModeUnixSocketGetDefaultMode().

Here is the caller graph for this function:

void PreRunPostPrivsDropInit ( const int  runmode)

Definition at line 2256 of file suricata.c.

References RUNMODE_UNIX_SOCKET, RunModeInitializeOutputs(), StatsSetupPostConfigPostOutput(), and StatsSetupPostConfigPreOutput().

Referenced by main(), and RunModeUnixSocketGetDefaultMode().

Here is the call graph for this function:

Here is the caller graph for this function:

void RegisterAllModules ( void  )

Definition at line 863 of file suricata.c.

References ALPROTO_DCERPC, ALPROTO_DNP3, ALPROTO_DNS, ALPROTO_ENIP, ALPROTO_FTP, ALPROTO_HTTP, ALPROTO_MODBUS, ALPROTO_SMB, ALPROTO_SMTP, ALPROTO_SSH, ALPROTO_TLS, AppLayerParserSetup(), AppLayerProtoDetectSetup(), SCInstance_::aux_run_mode, SCInstance_::checksum_validation, SCInstance_::conf_filename, ConfGet(), ConfigCheckLogDirectory(), ConfigSetLogDirectory(), ConfSetFinal(), ConfSetFromString(), ConfYamlLoadFile(), coverage_unittests, SCInstance_::daemon, Daemonize(), DecodeERSPAN(), DecodeEthernet(), DecodeIPV4(), DecodeIPV6(), DecodePPP(), DEFAULT_CONF_FILE, DEFAULT_PID_FILENAME, SCInstance_::delayed_detect, SCInstance_::disabled_detect, SCInstance_::do_setgid, SCInstance_::do_setuid, engine_analysis, EngineModeSetIPS(), FALSE, g_detect_disabled, g_disable_randomness, SCInstance_::group_name, SCInstance_::groupid, IPFWRegisterQueue(), IsRunModeOffline(), IsRunModeSystem(), SCInstance_::keyword_info, LiveBuildDeviceList(), LiveBuildDeviceListCustom(), LiveRegisterDeviceName(), MpmTableSetup(), NFQParseAndRegisterQueues(), SCInstance_::offline, SCInstance_::pcap_dev, PcapTranslateIPToDevice(), SCInstance_::pid_filename, PROG_NAME, PROG_VER, SCInstance_::progname, SCInstance_::regex_arg, RegisterDCERPCParsers(), RegisterDNP3Parsers(), RegisterDNSTCPParsers(), RegisterDNSUDPParsers(), RegisterENIPTCPParsers(), RegisterFTPParsers(), RegisterHTPParsers(), RegisterModbusParsers(), RegisterSMBParsers(), RegisterSMTPParsers(), RegisterSSHParsers(), RegisterSSLParsers(), SCInstance_::run_mode, RUNMODE_AFP_DEV, RUNMODE_CONF_TEST, SCInstance_::runmode_custom_mode, RUNMODE_DAG, RUNMODE_DUMP_CONFIG, RUNMODE_ENGINE_ANALYSIS, RUNMODE_ERF_FILE, RUNMODE_IPFW, RUNMODE_LIST_APP_LAYERS, RUNMODE_LIST_KEYWORDS, RUNMODE_LIST_RUNMODES, RUNMODE_LIST_UNITTEST, RUNMODE_NAPATECH, RUNMODE_NETMAP, RUNMODE_NFLOG, RUNMODE_NFQ, RUNMODE_PCAP_DEV, RUNMODE_PCAP_FILE, RUNMODE_PFRING, RUNMODE_PRINT_BUILDINFO, RUNMODE_PRINT_USAGE, RUNMODE_PRINT_VERSION, RUNMODE_UNITTEST, RUNMODE_UNIX_SOCKET, RUNMODE_UNKNOWN, RUNMODE_WINDIVERT, SC_ERR_CMD_LINE, SC_ERR_DAG_REQUIRED, SC_ERR_FATAL, SC_ERR_GID_FAILED, SC_ERR_INITIALIZATION, SC_ERR_IPFW_NOSUPPORT, SC_ERR_LIBCAP_NG_REQUIRED, SC_ERR_LOGDIR_CMDLINE, SC_ERR_MEM_ALLOC, SC_ERR_MULTIPLE_RUN_MODE, SC_ERR_NAPATECH_REQUIRED, SC_ERR_NFLOG_NOSUPPORT, SC_ERR_NFQ_NOSUPPORT, SC_ERR_NO_AF_PACKET, SC_ERR_NO_NETMAP, SC_ERR_NO_PCAP_SET_BUFFER_SIZE, SC_ERR_NO_PF_RING, SC_ERR_PCAP_TRANSLATE, SC_ERR_PIDFILE_DAEMON, SC_ERR_UID_FAILED, SC_ERR_WINDIVERT_NOSUPPORT, sc_set_caps, SC_WARN_FASTER_CAPTURE_AVAILABLE, SCEnter, SCFree, SCGetGroupID(), SCGetUserID(), SCLogError, SCLogInfo, SCLogNotice, SCLogWarning, SCPidfileCreate(), SCPidfileTestRunning(), SCReturnInt, SCStrdup, SCInstance_::set_logdir, SCInstance_::sig_file, SCInstance_::sig_file_exclusive, SpmTableSetup(), SCInstance_::start_time, StatsInit(), strlcpy(), SCInstance_::system, TM_ECODE_FAILED, TM_ECODE_OK, tmm_modules, TMM_SIZE, TmModuleBypassedFlowManagerRegister(), TmModuleDebugList(), TmModuleDecodeAFPRegister(), TmModuleDecodeErfDagRegister(), TmModuleDecodeErfFileRegister(), TmModuleDecodeIPFWRegister(), TmModuleDecodeNetmapRegister(), TmModuleDecodeNFLOGRegister(), TmModuleDecodeNFQRegister(), TmModuleDecodePcapFileRegister(), TmModuleDecodePcapRegister(), TmModuleDecodePfringRegister(), TmModuleDecodeWinDivertRegister(), TmModuleFlowManagerRegister(), TmModuleFlowRecyclerRegister(), TmModuleFlowWorkerRegister(), TmModuleLoggerRegister(), TmModuleNapatechDecodeRegister(), TmModuleNapatechStreamRegister(), TmModuleReceiveAFPRegister(), TmModuleReceiveErfDagRegister(), TmModuleReceiveErfFileRegister(), TmModuleReceiveIPFWRegister(), TmModuleReceiveNetmapRegister(), TmModuleReceiveNFLOGRegister(), TmModuleReceiveNFQRegister(), TmModuleReceivePcapFileRegister(), TmModuleReceivePcapRegister(), TmModuleReceivePfringRegister(), TmModuleReceiveWinDivertRegister(), TmModuleRespondRejectRegister(), TmModuleStatsLoggerRegister(), TmModuleUnixManagerRegister(), TmModuleVerdictIPFWRegister(), TmModuleVerdictNFQRegister(), TmModuleVerdictWinDivertRegister(), TRUE, unittests_fatal, SCInstance_::user_name, SCInstance_::userid, UtilSignalHandlerSetup(), SCInstance_::verbose, and xstr.

Referenced by PostRunDeinit(), and RunUnittests().

Here is the caller graph for this function:

int RunmodeGetCurrent ( void  )

Definition at line 267 of file suricata.c.

References run_mode, sighup_count, sigint_count, sigterm_count, and sigusr2_count.

Referenced by ConfUnixSocketIsEnable(), OutputJsonRegister(), RunModeGetMainMode(), SCConfLogOpenGeneric(), and SigLoadSignatures().

Here is the caller graph for this function:

int SuriHasSigFile ( void  )

Definition at line 234 of file suricata.c.

References SCInstance_::sig_file.

Variable Documentation

int g_disable_randomness

disable randomness to get reproducible results accross runs

Definition at line 226 of file suricata.c.

Referenced by HTPFreeConfig(), RandomGet(), and RegisterAllModules().

int run_mode

Run mode selected

Definition at line 202 of file suricata.c.

Referenced by PostRunDeinit(), RunmodeGetCurrent(), and RunmodeIsUnittests().