Go to the documentation of this file.
126 static inline void FlowSetICMPv4CounterPart(
Flow *f)
132 f->
icmp_d.type = (uint8_t)ctype;
135 static inline void FlowSetICMPv6CounterPart(
Flow *f)
141 f->
icmp_d.type = (uint8_t)ctype;
173 if (p->
tcph != NULL) {
176 }
else if (p->
udph != NULL) {
179 }
else if (p->
icmpv4h != NULL) {
182 FlowSetICMPv4CounterPart(f);
183 }
else if (p->
icmpv6h != NULL) {
186 FlowSetICMPv6CounterPart(f);
187 }
else if (p->
sctph != NULL) {
190 }
else if (p->
esph != NULL) {
223 static void FlowBypassFree(
void *x)
239 NULL, FlowBypassFree);
245 const char *name = NULL;
247 name =
"flow.end.state.new";
249 name =
"flow.end.state.established";
251 name =
"flow.end.state.closed";
253 name =
"flow.end.state.local_bypassed";
254 #ifdef CAPTURE_OFFLOAD
255 }
else if (i == FLOW_STATE_CAPTURE_BYPASSED) {
256 name =
"flow.end.state.capture_bypassed";
265 const char *name = NULL;
268 name =
"flow.end.tcp_state.none";
271 name =
"flow.end.tcp_state.syn_sent";
274 name =
"flow.end.tcp_state.syn_recv";
277 name =
"flow.end.tcp_state.established";
280 name =
"flow.end.tcp_state.fin_wait1";
283 name =
"flow.end.tcp_state.fin_wait2";
286 name =
"flow.end.tcp_state.time_wait";
289 name =
"flow.end.tcp_state.last_ack";
292 name =
"flow.end.tcp_state.close_wait";
295 name =
"flow.end.tcp_state.closing";
298 name =
"flow.end.tcp_state.closed";
#define SET_SCTP_DST_PORT(pkt, prt)
FlowStorageId GetFlowBypassInfoID(void)
int ICMPv6GetCounterpart(uint8_t type)
FlowStorageId g_bypass_info_id
void RegisterFlowBypassInfo(void)
#define SC_ATOMIC_ADD(name, val)
add a value to our atomic variable
struct Flow_ Flow
Flow data structure.
uint16_t flow_tcp_liberal
uint16_t flow_state[FLOW_STATE_SIZE]
#define SET_UDP_DST_PORT(pkt, prt)
struct Flow_::@116::@122 icmp_s
uint8_t FlowGetReverseProtoMapping(uint8_t rproto)
#define FLOW_SET_IPV6_DST_ADDR_FROM_PACKET(p, a)
struct Packet_::@32::@42 icmp_s
#define FLOW_CHECK_MEMCAP(size)
check if a memory alloc would fit in the memcap
uint16_t flow_tcp_state[TCP_CLOSED+1]
#define FLOW_INITIALIZE(f)
@ FLOW_STATE_LOCAL_BYPASSED
#define SET_TCP_SRC_PORT(pkt, prt)
void(* BypassFree)(void *data)
#define SET_UDP_SRC_PORT(pkt, prt)
#define FLOW_SET_IPV6_SRC_ADDR_FROM_PACKET(p, a)
Per thread variable structure.
unsigned int FlowStorageSize(void)
int FlowSetStorageById(Flow *f, FlowStorageId id, void *ptr)
FlowStorageId FlowStorageRegister(const char *name, const unsigned int size, void *(*Alloc)(unsigned int), void(*Free)(void *))
bool MacSetFlowStorageEnabled(void)
#define SC_ATOMIC_SUB(name, val)
sub a value from our atomic variable
uint8_t FlowGetProtoMapping(uint8_t proto)
Function to map the protocol to the defined FLOW_PROTO_* enumeration.
#define FLOW_SET_IPV4_DST_ADDR_FROM_PACKET(p, a)
#define ESP_GET_SPI(p)
Get the spi field off a packet.
struct LiveDevice_ * livedev
int ICMPv4GetCounterpart(uint8_t type)
Data structures and function prototypes for keeping state for the detection engine.
FlowStorageId MacSetGetFlowStorageID(void)
void * FlowGetStorageById(const Flow *f, FlowStorageId id)
struct Flow_::@118::@124 icmp_d
#define FLOW_SET_IPV4_SRC_ADDR_FROM_PACKET(p, a)
#define SET_SCTP_SRC_PORT(pkt, prt)
void MacSetReset(MacSet *ms)
void FlowFree(Flow *f)
cleanup & free the memory of a flow
MacSet * MacSetInit(int size)
struct LiveDevice_ * livedev
struct Flow_::@116::@123 esp
Flow * FlowAlloc(void)
allocate a flow
void FlowEndCountersRegister(ThreadVars *t, FlowEndCounters *fec)
uint16_t StatsRegisterCounter(const char *name, struct ThreadVars_ *tv)
Registers a normal, unqualified counter.
#define SET_TCP_DST_PORT(pkt, prt)
void FlowInit(Flow *f, const Packet *p)
#define DEBUG_VALIDATE_BUG_ON(exp)
#define IPV4_GET_IPTTL(p)