Go to the documentation of this file.
125 static inline void FlowSetICMPv4CounterPart(
Flow *f)
131 f->
icmp_d.type = (uint8_t)ctype;
134 static inline void FlowSetICMPv6CounterPart(
Flow *f)
140 f->
icmp_d.type = (uint8_t)ctype;
171 if (p->
tcph != NULL) {
174 }
else if (p->
udph != NULL) {
177 }
else if (p->
icmpv4h != NULL) {
180 FlowSetICMPv4CounterPart(f);
181 }
else if (p->
icmpv6h != NULL) {
184 FlowSetICMPv6CounterPart(f);
185 }
else if (p->
sctph != NULL) {
188 }
else if (p->
esph != NULL) {
217 static void FlowBypassFree(
void *x)
233 NULL, FlowBypassFree);
239 const char *name = NULL;
241 name =
"flow.end.state.new";
243 name =
"flow.end.state.established";
245 name =
"flow.end.state.closed";
247 name =
"flow.end.state.local_bypassed";
248 #ifdef CAPTURE_OFFLOAD
249 }
else if (i == FLOW_STATE_CAPTURE_BYPASSED) {
250 name =
"flow.end.state.capture_bypassed";
259 const char *name = NULL;
262 name =
"flow.end.tcp_state.none";
265 name =
"flow.end.tcp_state.syn_sent";
268 name =
"flow.end.tcp_state.syn_recv";
271 name =
"flow.end.tcp_state.established";
274 name =
"flow.end.tcp_state.fin_wait1";
277 name =
"flow.end.tcp_state.fin_wait2";
280 name =
"flow.end.tcp_state.time_wait";
283 name =
"flow.end.tcp_state.last_ack";
286 name =
"flow.end.tcp_state.close_wait";
289 name =
"flow.end.tcp_state.closing";
292 name =
"flow.end.tcp_state.closed";
struct Packet_::@31::@41 icmp_s
#define SET_SCTP_DST_PORT(pkt, prt)
struct Flow_::@119::@125 icmp_d
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)
uint8_t FlowGetReverseProtoMapping(uint8_t rproto)
#define FLOW_SET_IPV6_DST_ADDR_FROM_PACKET(p, a)
#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
struct Flow_::@117::@124 esp
#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 *))
struct Flow_::@117::@123 icmp_s
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)
#define FLOW_SET_IPV4_SRC_ADDR_FROM_PACKET(p, a)
#define SET_SCTP_SRC_PORT(pkt, prt)
void FlowFree(Flow *f)
cleanup & free the memory of a flow
MacSet * MacSetInit(int size)
struct LiveDevice_ * livedev
uint16_t vlan_id[VLAN_MAX_LAYERS]
uint16_t vlan_id[VLAN_MAX_LAYERS]
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)