Go to the documentation of this file.
42 static bool PrefilterIcmpv6mtuIsPrefilterable(
const Signature *s);
65 static inline int DetectICMPv6mtuGetValue(
Packet *p, uint32_t *picmpv6mtu)
93 if (DetectICMPv6mtuGetValue(p, &picmpv6mtu) == 0) {
114 if (icmpv6mtud == NULL)
140 rs_detect_u32_free(ptr);
149 if (DetectICMPv6mtuGetValue(p, &picmpv6mtu) == 0) {
156 if (!PrefilterPacketHeaderExtraMatch(ctx, p))
162 du32.mode = ctx->
v1.
u8[0];
163 du32.arg1 = ctx->
v1.
u32[1];
164 du32.arg2 = ctx->
v1.
u32[2];
167 SCLogDebug(
"packet matches icmpv6.mtu/hl %u", picmpv6mtu);
177 PrefilterPacketIcmpv6mtuMatch);
180 static bool PrefilterIcmpv6mtuIsPrefilterable(
const Signature *s)
void SigMatchAppendSMToList(Signature *s, SigMatch *new, const int list)
Append a SigMatch to the list type.
int DetectU32Match(const uint32_t parg, const DetectUintData_u32 *du32)
void(* Free)(DetectEngineCtx *, void *)
#define DETECT_PROTO_IPV6
#define PKT_IS_PSEUDOPKT(p)
return 1 if the packet is a pseudo packet
Container for matching data for a signature group.
#define ICMPV6_HAS_MTU(p)
DetectUintData_u32 * DetectU32Parse(const char *u32str)
This function is used to parse u32 options passed via some u32 keyword.
void PrefilterPacketU32Set(PrefilterPacketHeaderValue *v, void *smctx)
void DetectICMPv6mtuRegisterTests(void)
this function registers unit tests for DetectICMPv6mtu
main detection engine ctx
#define ICMPV6_GET_CODE(p)
int(* Setup)(DetectEngineCtx *, Signature *, const char *)
int(* SetupPrefilter)(DetectEngineCtx *de_ctx, struct SigGroupHead_ *sgh)
void DetectICMPv6mtuRegister(void)
Registration function for icmpv6.mtu: keyword.
#define ICMPV6_GET_MTU(p)
void DetectICMPv6mtuFree(DetectEngineCtx *de_ctx, void *)
this function will free memory associated with DetectU32Data
bool PrefilterPacketU32Compare(PrefilterPacketHeaderValue v, void *smctx)
int(* Match)(DetectEngineThreadCtx *, Packet *, const Signature *, const SigMatchCtx *)
SigMatch * SigMatchAlloc(void)
Used to start a pointer to SigMatch context Should never be dereferenced without casting to something...
SigTableElmt sigmatch_table[DETECT_TBLSIZE]
DetectUintData_u32 DetectU32Data
int PrefilterSetupPacketHeader(DetectEngineCtx *de_ctx, SigGroupHead *sgh, int sm_type, void(*Set)(PrefilterPacketHeaderValue *v, void *), bool(*Compare)(PrefilterPacketHeaderValue v, void *), void(*Match)(DetectEngineThreadCtx *det_ctx, Packet *p, const void *pectx))
bool(* SupportsPrefilter)(const Signature *s)
a single match condition for a signature
void(* RegisterTests)(void)
#define SIG_FLAG_REQUIRE_PACKET