Go to the documentation of this file.
36 static int DetectTcpWscaleMatch(
41 static bool PrefilterTcpWscaleIsPrefilterable(
const Signature *s);
74 static int DetectTcpWscaleMatch(
79 if (!(PacketIsTCP(p)))
129 static void PrefilterPacketTcpWscaleMatch(
133 if (!(PacketIsTCP(p)))
144 if (!PrefilterPacketHeaderExtraMatch(
ctx, p))
148 du8.mode =
ctx->v1.u8[0];
149 du8.arg1 =
ctx->v1.u8[1];
150 du8.arg2 =
ctx->v1.u8[2];
155 PrefilterAddSids(&det_ctx->
pmq,
ctx->sigs_array,
ctx->sigs_cnt);
165 static bool PrefilterTcpWscaleIsPrefilterable(
const Signature *s)
#define SIG_MASK_REQUIRE_REAL_PKT
struct SigMatch_ * smlists[DETECT_SM_LIST_MAX]
SigTableElmt * sigmatch_table
void(* Free)(DetectEngineCtx *, void *)
#define PKT_IS_PSEUDOPKT(p)
return 1 if the packet is a pseudo packet
#define DETECT_TABLE_PACKET_FILTER_FLAG
Container for matching data for a signature group.
main detection engine ctx
#define SIGMATCH_SUPPORT_FIREWALL
int(* Setup)(DetectEngineCtx *, Signature *, const char *)
#define TCP_GET_WSCALE(p)
#define DETECT_TABLE_PACKET_TD_FLAG
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.
SigMatch * SCSigMatchAppendSMToList(DetectEngineCtx *de_ctx, Signature *s, uint16_t type, SigMatchCtx *ctx, const int list)
Append a SigMatch to the list type.
DetectUintData_u8 DetectU8Data
void PrefilterPacketU8Set(PrefilterPacketHeaderValue *v, void *smctx)
void DetectTcpWscaleRegister(void)
Registration function for tcp.wscale keyword.
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...
int DetectU8Match(const uint8_t parg, const DetectUintData_u8 *du8)
#define DETECT_TABLE_PACKET_PRE_FLOW_FLAG
#define DETECT_TABLE_PACKET_PRE_STREAM_FLAG
bool(* SupportsPrefilter)(const Signature *s)
a single match condition for a signature
bool PrefilterPacketU8Compare(PrefilterPacketHeaderValue v, void *smctx)
#define TCP_HAS_WSCALE(p)
#define DEBUG_VALIDATE_BUG_ON(exp)
void DetectTcpWscaleFree(DetectEngineCtx *, void *)
this function will free memory associated with DetectU8Data
#define SIG_FLAG_REQUIRE_PACKET