Go to the documentation of this file.
45 static bool PrefilterTemplate2IsPrefilterable(
const Signature *s);
112 if (template2d == NULL)
132 rs_detect_u8_free(ptr);
158 if (!PrefilterPacketHeaderExtraMatch(ctx, p))
162 du8.mode = ctx->
v1.
u8[0];
163 du8.arg1 = ctx->
v1.
u8[1];
164 du8.arg2 = ctx->
v1.
u8[2];
168 SCLogDebug(
"packet matches template2/hl %u", ptemplate2);
179 static bool PrefilterTemplate2IsPrefilterable(
const Signature *s)
struct SigMatch_ * smlists[DETECT_SM_LIST_MAX]
void(* Free)(DetectEngineCtx *, void *)
#define PKT_IS_PSEUDOPKT(p)
return 1 if the packet is a pseudo packet
Container for matching data for a signature group.
main detection engine ctx
void DetectTemplate2Free(DetectEngineCtx *, void *)
this function will free memory associated with DetectU8Data
int(* Setup)(DetectEngineCtx *, Signature *, const char *)
int(* SetupPrefilter)(DetectEngineCtx *de_ctx, struct SigGroupHead_ *sgh)
DetectUintData_u8 * DetectU8Parse(const char *u8str)
This function is used to parse u8 options passed via some u8 keyword.
DetectUintData_u8 DetectU8Data
void PrefilterPacketU8Set(PrefilterPacketHeaderValue *v, void *smctx)
void DetectTemplate2RegisterTests(void)
SignatureInitData * init_data
int(* Match)(DetectEngineThreadCtx *, Packet *, const Signature *, const SigMatchCtx *)
Used to start a pointer to SigMatch context Should never be dereferenced without casting to something...
int DetectU8Match(const uint8_t parg, const DetectUintData_u8 *du8)
SigTableElmt sigmatch_table[DETECT_TBLSIZE]
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
bool PrefilterPacketU8Compare(PrefilterPacketHeaderValue v, void *smctx)
SigMatch * SigMatchAppendSMToList(DetectEngineCtx *de_ctx, Signature *s, uint16_t type, SigMatchCtx *ctx, const int list)
Append a SigMatch to the list type.
void DetectTemplate2Register(void)
Registration function for template2: keyword.
#define IPV4_GET_IPTTL(p)
#define SIG_FLAG_REQUIRE_PACKET