47static void DetectITypeRegisterTests(
void);
52static bool PrefilterITypeIsPrefilterable(
const Signature *s);
91 if (PacketIsICMPv4(p)) {
93 }
else if (PacketIsICMPv6(p)) {
94 const ICMPV6Hdr *icmpv6h = PacketGetICMPv6(p);
152 Packet *p,
const void *pectx)
157 if (PacketIsICMPv4(p)) {
159 }
else if (PacketIsICMPv6(p)) {
160 const ICMPV6Hdr *icmpv6h = PacketGetICMPv6(p);
170 PrefilterAddSids(&det_ctx->
pmq, sa->
sigs, sa->
cnt);
180static bool PrefilterITypeIsPrefilterable(
const Signature *s)
200static int DetectITypeParseTest01(
void)
216static int DetectITypeParseTest02(
void)
232static int DetectITypeParseTest03(
void)
248static int DetectITypeParseTest04(
void)
265static int DetectITypeParseTest05(
void)
281static int DetectITypeParseTest06(
void)
297static int DetectITypeParseTest07(
void)
313static int DetectITypeParseTest08(
void)
325void DetectITypeRegisterTests(
void)
#define ICMPV6_GET_TYPE(icmp6h)
#define PKT_IS_PSEUDOPKT(p)
return 1 if the packet is a pseudo packet
int PrefilterSetupPacketHeaderU8Hash(DetectEngineCtx *de_ctx, SigGroupHead *sgh, int sm_type, SignatureMask mask, void(*Set)(PrefilterPacketHeaderValue *v, void *), bool(*Compare)(PrefilterPacketHeaderValue v, void *), void(*Match)(DetectEngineThreadCtx *det_ctx, Packet *p, const void *pectx))
DetectUintData_u8 * DetectU8Parse(const char *u8str)
This function is used to parse u8 options passed via some u8 keyword.
void PrefilterPacketU8Set(PrefilterPacketHeaderValue *v, void *smctx)
int DetectU8Match(const uint8_t parg, const DetectUintData_u8 *du8)
bool PrefilterPacketU8Compare(PrefilterPacketHeaderValue v, void *smctx)
DetectUintData_u8 DetectU8Data
void DetectITypeFree(DetectEngineCtx *, void *)
this function will free memory associated with DetectU8Data
void DetectITypeRegister(void)
Registration function for itype: keyword.
SigMatch * SCSigMatchAppendSMToList(DetectEngineCtx *de_ctx, Signature *s, uint16_t type, SigMatchCtx *ctx, const int list)
Append a SigMatch to the list type.
SigTableElmt * sigmatch_table
#define SIG_FLAG_REQUIRE_PACKET
#define SIGMATCH_SUPPORT_FIREWALL
#define SIG_MASK_REQUIRE_REAL_PKT
#define FAIL_IF_NULL(expr)
Fail a test if expression evaluates to NULL.
void UtRegisterTest(const char *name, int(*TestFn)(void))
Register unit test.
#define FAIL_IF_NOT(expr)
Fail a test if expression evaluates to false.
#define PASS
Pass the test.
#define FAIL_IF_NOT_NULL(expr)
Fail a test if expression evaluates to non-NULL.
main detection engine ctx
struct Packet_::@33::@40 icmp_s
Container for matching data for a signature group.
Used to start a pointer to SigMatch context Should never be dereferenced without casting to something...
a single match condition for a signature
int(* Setup)(DetectEngineCtx *, Signature *, const char *)
int(* SetupPrefilter)(DetectEngineCtx *de_ctx, struct SigGroupHead_ *sgh)
void(* Free)(DetectEngineCtx *, void *)
void(* RegisterTests)(void)
int(* Match)(DetectEngineThreadCtx *, Packet *, const Signature *, const SigMatchCtx *)
bool(* SupportsPrefilter)(const Signature *s)
struct SigMatch_ * smlists[DETECT_SM_LIST_MAX]
SignatureInitData * init_data
#define DEBUG_VALIDATE_BUG_ON(exp)