|
suricata
|
#include "suricata-common.h"#include "flow-storage.h"#include "flow-util.h"#include "flow-private.h"#include "util-storage.h"#include "conf.h"#include "util-misc.h"#include "util-byte.h"#include "util-flow-rate.h"#include "util-unittest.h"#include "util-unittest-helper.h"
Go to the source code of this file.
Functions | |
| void | FlowRateRegisterFlowStorage (void) |
| bool | FlowRateStorageEnabled (void) |
| FlowRateStore * | FlowRateStoreInit (void) |
| FlowStorageId | FlowRateGetStorageID (void) |
| void | FlowRateStoreUpdate (FlowRateStore *frs, SCTime_t p_ts, uint32_t pkt_len, int direction) |
| bool | FlowRateIsExceeding (FlowRateStore *frs, int direction) |
| void | FlowRateRegisterTests (void) |
Variables | |
| FlowStorageId | g_flowrate_storage_id = { .id = -1 } |
| FlowRateConfig | flow_rate_config |
Definition in file util-flow-rate.c.
| 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.
| FlowRateConfig flow_rate_config |
Definition at line 39 of file util-flow-rate.c.
Referenced by FlowRateIsExceeding(), FlowRateRegisterFlowStorage(), and FlowRateStoreInit().
| FlowStorageId g_flowrate_storage_id = { .id = -1 } |
Definition at line 37 of file util-flow-rate.c.
Referenced by FlowRateGetStorageID(), FlowRateRegisterFlowStorage(), and FlowRateStorageEnabled().