Go to the documentation of this file.
45 static bool PrefilterTcpmssIsPrefilterable(
const Signature *s);
79 if (!(PacketIsTCP(p)))
124 rs_detect_u16_free(ptr);
133 if (!(PacketIsTCP(p)))
144 if (!PrefilterPacketHeaderExtraMatch(
ctx, p))
148 du16.mode =
ctx->v1.u8[0];
149 du16.arg1 =
ctx->v1.u16[1];
150 du16.arg2 =
ctx->v1.u16[2];
154 SCLogDebug(
"packet matches tcpmss/hl %u", ptcpmss);
155 PrefilterAddSids(&det_ctx->
pmq,
ctx->sigs_array,
ctx->sigs_cnt);
165 static bool PrefilterTcpmssIsPrefilterable(
const Signature *s)
#define SIG_MASK_REQUIRE_REAL_PKT
struct SigMatch_ * smlists[DETECT_SM_LIST_MAX]
void PrefilterPacketU16Set(PrefilterPacketHeaderValue *v, void *smctx)
SigTableElmt * sigmatch_table
void(* Free)(DetectEngineCtx *, void *)
void DetectTcpmssRegister(void)
Registration function for tcpmss: keyword.
#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
int(* Setup)(DetectEngineCtx *, Signature *, const char *)
void DetectTcpmssFree(DetectEngineCtx *, void *)
this function will free memory associated with DetectU16Data
int(* SetupPrefilter)(DetectEngineCtx *de_ctx, struct SigGroupHead_ *sgh)
SignatureInitData * init_data
int PrefilterSetupPacketHeader(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))
int(* Match)(DetectEngineThreadCtx *, Packet *, const Signature *, const SigMatchCtx *)
Used to start a pointer to SigMatch context Should never be dereferenced without casting to something...
void DetectTcpmssRegisterTests(void)
int DetectU16Match(const uint16_t parg, const DetectUintData_u16 *du16)
DetectUintData_u16 * DetectU16Parse(const char *u16str)
This function is used to parse u16 options passed via some u16 keyword.
bool PrefilterPacketU16Compare(PrefilterPacketHeaderValue v, void *smctx)
bool(* SupportsPrefilter)(const Signature *s)
a single match condition for a signature
SigMatch * SigMatchAppendSMToList(DetectEngineCtx *de_ctx, Signature *s, uint16_t type, SigMatchCtx *ctx, const int list)
Append a SigMatch to the list type.
DetectUintData_u16 DetectU16Data
#define DEBUG_VALIDATE_BUG_ON(exp)
#define SIG_FLAG_REQUIRE_PACKET