|
suricata
|

Go to the source code of this file.
Data Structures | |
| struct | FlowRateConfig_ |
| struct | FlowRateDirStore_ |
| struct | FlowRateStore_ |
Typedefs | |
| typedef struct FlowRateConfig_ | FlowRateConfig |
| typedef struct FlowRateDirStore_ | FlowRateDirStore |
| typedef struct FlowRateStore_ | FlowRateStore |
Functions | |
| bool | FlowRateStorageEnabled (void) |
| void | FlowRateRegisterFlowStorage (void) |
| FlowRateStore * | FlowRateStoreInit (void) |
| FlowStorageId | FlowRateGetStorageID (void) |
| void | FlowRateStoreUpdate (FlowRateStore *, SCTime_t, uint32_t, int) |
| bool | FlowRateIsExceeding (FlowRateStore *, int) |
| void | FlowRateRegisterTests (void) |
Variables | |
| FlowRateConfig | flow_rate_config |
Definition in file util-flow-rate.h.
| typedef struct FlowRateConfig_ FlowRateConfig |
| typedef struct FlowRateDirStore_ FlowRateDirStore |
| typedef struct FlowRateStore_ FlowRateStore |
| FlowStorageId FlowRateGetStorageID | ( | void | ) |
Definition at line 134 of file util-flow-rate.c.
References g_flowrate_storage_id.
Referenced by FlowInit().

| bool FlowRateIsExceeding | ( | FlowRateStore * | frs, |
| int | direction | ||
| ) |
Definition at line 228 of file util-flow-rate.c.
References FlowRateConfig_::bytes, FlowRateStore_::dir, flow_rate_config, and FlowRateDirStore_::sum.
| void FlowRateRegisterFlowStorage | ( | void | ) |
Definition at line 60 of file util-flow-rate.c.
References FlowRateConfig_::bytes, FatalError, flow_rate_config, FlowStorageRegister(), g_flowrate_storage_id, FlowRateConfig_::interval, ParseSizeStringU64(), SCConfGetNode(), SCConfNodeLookupChild(), SCConfNodeLookupChildValue(), SCTIME_ADD_SECS, SCTIME_INITIALIZER, and StringParseUint16().
Referenced by PostConfLoadedSetup().


| void FlowRateRegisterTests | ( | void | ) |
Definition at line 630 of file util-flow-rate.c.
References UtRegisterTest().

| bool FlowRateStorageEnabled | ( | void | ) |
Definition at line 97 of file util-flow-rate.c.
References g_flowrate_storage_id, and FlowStorageId::id.
Referenced by FlowInit().

| FlowRateStore * FlowRateStoreInit | ( | void | ) |
Definition at line 102 of file util-flow-rate.c.
References FlowRateDirStore_::buf, DEBUG_VALIDATE_BUG_ON, FlowRateStore_::dir, FLOW_CHECK_MEMCAP, flow_rate_config, FlowRateConfig_::interval, FlowRateDirStore_::last_ts, SC_ATOMIC_ADD, SCCalloc, SCTIME_INITIALIZER, SCTime_t::secs, FlowRateDirStore_::size, FlowRateDirStore_::start_ts, and unlikely.
Referenced by FlowInit().

| void FlowRateStoreUpdate | ( | FlowRateStore * | frs, |
| SCTime_t | p_ts, | ||
| uint32_t | pkt_len, | ||
| int | direction | ||
| ) |
Definition at line 193 of file util-flow-rate.c.
References DEBUG_VALIDATE_BUG_ON, FlowRateStore_::dir, FlowRateDirStore_::last_idx, FlowRateDirStore_::last_ts, SCTime_t::secs, FlowRateDirStore_::size, FlowRateDirStore_::start_ts, and FlowRateDirStore_::sum.
|
extern |
Definition at line 39 of file util-flow-rate.c.
Referenced by FlowRateIsExceeding(), FlowRateRegisterFlowStorage(), and FlowRateStoreInit().