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;
172 if (p->
tcph != NULL) {
175 }
else if (p->
udph != NULL) {
178 }
else if (p->
icmpv4h != NULL) {
181 FlowSetICMPv4CounterPart(f);
182 }
else if (p->
icmpv6h != NULL) {
185 FlowSetICMPv6CounterPart(f);
186 }
else if (p->
sctph != NULL) {
189 }
else if (p->
esph != NULL) {
222 static void FlowBypassFree(
void *x)
238 NULL, FlowBypassFree);
244 const char *name = NULL;
246 name =
"flow.end.state.new";
248 name =
"flow.end.state.established";
250 name =
"flow.end.state.closed";
252 name =
"flow.end.state.local_bypassed";
253 #ifdef CAPTURE_OFFLOAD
254 }
else if (i == FLOW_STATE_CAPTURE_BYPASSED) {
255 name =
"flow.end.state.capture_bypassed";
264 const char *name = NULL;
267 name =
"flow.end.tcp_state.none";
270 name =
"flow.end.tcp_state.syn_sent";
273 name =
"flow.end.tcp_state.syn_recv";
276 name =
"flow.end.tcp_state.established";
279 name =
"flow.end.tcp_state.fin_wait1";
282 name =
"flow.end.tcp_state.fin_wait2";
285 name =
"flow.end.tcp_state.time_wait";
288 name =
"flow.end.tcp_state.last_ack";
291 name =
"flow.end.tcp_state.close_wait";
294 name =
"flow.end.tcp_state.closing";
297 name =
"flow.end.tcp_state.closed";
struct Packet_::@31::@41 icmp_s
#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)
uint8_t FlowGetReverseProtoMapping(uint8_t rproto)
#define FLOW_SET_IPV6_DST_ADDR_FROM_PACKET(p, a)
struct Flow_::@115::@121 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)
struct Flow_::@117::@123 icmp_d
#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_::@115::@122 esp
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 MacSetReset(MacSet *ms)
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)