suricata
|
#include "suricata-common.h"
#include "suricata.h"
#include "decode.h"
#include "conf.h"
#include "threadvars.h"
#include "tm-threads.h"
#include "runmodes.h"
#include "util-random.h"
#include "util-time.h"
#include "flow.h"
#include "flow-queue.h"
#include "flow-hash.h"
#include "flow-util.h"
#include "flow-var.h"
#include "flow-private.h"
#include "flow-timeout.h"
#include "flow-manager.h"
#include "flow-storage.h"
#include "flow-spare-pool.h"
#include "stream-tcp-private.h"
#include "stream-tcp-reassemble.h"
#include "stream-tcp.h"
#include "util-unittest.h"
#include "util-unittest-helper.h"
#include "util-byte.h"
#include "util-debug.h"
#include "util-privs.h"
#include "util-signal.h"
#include "threads.h"
#include "detect.h"
#include "detect-engine-state.h"
#include "stream.h"
#include "app-layer-parser.h"
#include "host-timeout.h"
#include "defrag-timeout.h"
#include "ippair-timeout.h"
#include "output-flow.h"
#include "util-validate.h"
Go to the source code of this file.
Data Structures | |
struct | FlowTimeoutCounters_ |
struct | FlowManagerTimeoutThread |
struct | FlowQueueTimeoutCounters |
struct | FlowCounters_ |
struct | FlowManagerThreadData_ |
struct | FlowRecyclerThreadData_ |
Macros | |
#define | FLOW_NORMAL_MODE_UPDATE_DELAY_SEC 1 |
#define | FLOW_NORMAL_MODE_UPDATE_DELAY_NSEC 0 |
#define | FLOW_EMERG_MODE_UPDATE_DELAY_SEC 0 |
#define | FLOW_EMERG_MODE_UPDATE_DELAY_NSEC 300000 |
#define | NEW_FLOW_COUNT_COND 10 |
#define | BITS 32 |
#define | TYPE uint32_t |
Typedefs | |
typedef struct FlowTimeoutCounters_ | FlowTimeoutCounters |
typedef struct FlowManagerTimeoutThread | FlowManagerTimeoutThread |
typedef struct FlowQueueTimeoutCounters | FlowQueueTimeoutCounters |
typedef struct FlowCounters_ | FlowCounters |
typedef struct FlowManagerThreadData_ | FlowManagerThreadData |
typedef struct FlowRecyclerThreadData_ | FlowRecyclerThreadData |
Functions | |
SC_ATOMIC_DECLARE (uint32_t, flowmgr_cnt) | |
SC_ATOMIC_DECLARE (uint32_t, flowrec_cnt) | |
SC_ATOMIC_DECLARE (uint32_t, flowrec_busy) | |
SC_ATOMIC_EXTERN (unsigned int, flow_flags) | |
void | FlowTimeoutsInit (void) |
void | FlowTimeoutsEmergency (void) |
void | FlowDisableFlowManagerThread (void) |
Used to disable flow manager thread(s). More... | |
void | FlowManagerThreadSpawn () |
spawn the flow manager thread More... | |
void | FlowRecyclerThreadSpawn () |
spawn the flow recycler thread More... | |
void | FlowDisableFlowRecyclerThread (void) |
Used to disable flow recycler thread(s). More... | |
void | TmModuleFlowManagerRegister (void) |
void | TmModuleFlowRecyclerRegister (void) |
Variables | |
int | run_mode |
FlowQueue | flow_recycle_q |
int | g_detect_disabled |
Definition in file flow-manager.c.
#define BITS 32 |
#define FLOW_EMERG_MODE_UPDATE_DELAY_NSEC 300000 |
Definition at line 107 of file flow-manager.c.
#define FLOW_EMERG_MODE_UPDATE_DELAY_SEC 0 |
Definition at line 106 of file flow-manager.c.
#define FLOW_NORMAL_MODE_UPDATE_DELAY_NSEC 0 |
Definition at line 104 of file flow-manager.c.
#define FLOW_NORMAL_MODE_UPDATE_DELAY_SEC 1 |
Definition at line 103 of file flow-manager.c.
#define NEW_FLOW_COUNT_COND 10 |
Definition at line 108 of file flow-manager.c.
#define TYPE uint32_t |
typedef struct FlowCounters_ FlowCounters |
typedef struct FlowManagerThreadData_ FlowManagerThreadData |
typedef struct FlowManagerTimeoutThread FlowManagerTimeoutThread |
typedef struct FlowQueueTimeoutCounters FlowQueueTimeoutCounters |
typedef struct FlowRecyclerThreadData_ FlowRecyclerThreadData |
typedef struct FlowTimeoutCounters_ FlowTimeoutCounters |
void FlowDisableFlowManagerThread | ( | void | ) |
Used to disable flow manager thread(s).
Definition at line 140 of file flow-manager.c.
References FatalError, ThreadVars_::name, ThreadVars_::next, SC_ATOMIC_SET, SC_ERR_SHUTDOWN, SCMutexLock, SCMutexUnlock, SleepMsec, thread_name_flow_mgr, THV_KILL, THV_RUNNING_DONE, TmThreadsCheckFlag(), TmThreadsSetFlag(), tv, tv_root, tv_root_lock, and TVT_MGMT.
Referenced by PostRunDeinit().
void FlowDisableFlowRecyclerThread | ( | void | ) |
Used to disable flow recycler thread(s).
Definition at line 1295 of file flow-manager.c.
void FlowManagerThreadSpawn | ( | ) |
spawn the flow manager thread
Definition at line 1054 of file flow-manager.c.
References ConfGetInt(), FatalError, and SC_ERR_INVALID_ARGUMENTS.
void FlowRecyclerThreadSpawn | ( | ) |
spawn the flow recycler thread
Definition at line 1257 of file flow-manager.c.
References ConfGetInt(), FatalError, and SC_ERR_INVALID_ARGUMENTS.
void FlowTimeoutsEmergency | ( | void | ) |
Definition at line 96 of file flow-manager.c.
References flow_timeouts_emerg, and SC_ATOMIC_SET.
void FlowTimeoutsInit | ( | void | ) |
Definition at line 91 of file flow-manager.c.
References flow_timeouts_normal, and SC_ATOMIC_SET.
Referenced by FlowInitFlowProto().
SC_ATOMIC_DECLARE | ( | uint32_t | , |
flowmgr_cnt | |||
) |
SC_ATOMIC_DECLARE | ( | uint32_t | , |
flowrec_busy | |||
) |
SC_ATOMIC_DECLARE | ( | uint32_t | , |
flowrec_cnt | |||
) |
SC_ATOMIC_EXTERN | ( | unsigned int | , |
flow_flags | |||
) |
void TmModuleFlowManagerRegister | ( | void | ) |
Definition at line 1355 of file flow-manager.c.
References TmModule_::name, TmModule_::ThreadInit, TMM_FLOWMANAGER, and tmm_modules.
Referenced by RegisterAllModules().
void TmModuleFlowRecyclerRegister | ( | void | ) |
Definition at line 1369 of file flow-manager.c.
References TmModule_::name, TmModule_::ThreadInit, TMM_FLOWRECYCLER, and tmm_modules.
Referenced by RegisterAllModules().
FlowQueue flow_recycle_q |
queue to pass flows to cleanup/log thread(s)
Definition at line 77 of file flow-manager.c.
Referenced by FlowInitConfig(), and FlowShutdown().
int g_detect_disabled |
global indicating if detection is enabled
Definition at line 210 of file suricata.c.
int run_mode |
Run mode selected
Definition at line 196 of file suricata.c.