Go to the documentation of this file.
123 static inline void FlowSetICMPv4CounterPart(
Flow *f)
129 f->
icmp_d.type = (uint8_t)ctype;
132 static inline void FlowSetICMPv6CounterPart(
Flow *f)
138 f->
icmp_d.type = (uint8_t)ctype;
169 printf(
"FIXME: %s:%s:%" PRId32
"\n", __FILE__, __FUNCTION__, __LINE__);
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) {
195 printf(
"FIXME: %s:%s:%" PRId32
"\n", __FILE__, __FUNCTION__, __LINE__);
225 static void FlowBypassFree(
void *x)
241 NULL, FlowBypassFree);
#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.
#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
#define FLOW_INITIALIZE(f)
#define SET_TCP_SRC_PORT(pkt, prt)
struct Packet_::@39::@48 icmp_s
void(* BypassFree)(void *data)
#define SET_UDP_SRC_PORT(pkt, prt)
#define FLOW_SET_IPV6_SRC_ADDR_FROM_PACKET(p, a)
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(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
struct Flow_::@121::@127 icmp_d
MacSet * MacSetInit(int size)
struct LiveDevice_ * livedev
struct Flow_::@119::@126 esp
#define COPY_TIMESTAMP(src, dst)
Flow * FlowAlloc(void)
allocate a flow
#define SET_TCP_DST_PORT(pkt, prt)
void FlowInit(Flow *f, const Packet *p)
struct Flow_::@119::@125 icmp_s
#define IPV4_GET_IPTTL(p)