Go to the documentation of this file.
40 static int DetectSCTPChunkTypeMatch(
46 static bool PrefilterSCTPChunkTypeIsPrefilterable(
const Signature *s);
59 PrefilterSCTPChunkTypeIsPrefilterable;
63 static int DetectSCTPChunkTypeMatch(
68 if (!PacketIsSCTP(
p)) {
74 for (uint8_t i = 0; i <
cnt; i++) {
101 SCDetectU8Free(data);
104 static void PrefilterPacketSCTPChunkTypeMatch(
109 if (!PacketIsSCTP(
p)) {
116 uint32_t seen[8] = { 0 };
117 for (uint8_t i = 0; i <
cnt; i++) {
119 if (seen[val >> 5] & (1U << (val & 0x1F))) {
122 seen[val >> 5] |= 1U << (val & 0x1F);
125 PrefilterAddSids(&det_ctx->
pmq, sa->sigs, sa->cnt);
134 PrefilterPacketSCTPChunkTypeMatch);
137 static bool PrefilterSCTPChunkTypeIsPrefilterable(
const Signature *s)
#define SIGMATCH_INFO_MULTI_UINT
#define SIG_MASK_REQUIRE_REAL_PKT
SigTableElmt * sigmatch_table
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.
uint8_t chunk_types[SCTP_MAX_TRACKED_CHUNKS]
#define SIGMATCH_INFO_UINT8
main detection engine ctx
void DetectSCTPChunkTypeRegister(void)
int(* Setup)(DetectEngineCtx *, Signature *, const char *)
int(* SetupPrefilter)(DetectEngineCtx *de_ctx, struct SigGroupHead_ *sgh)
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))
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)
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)
uint8_t tracked_chunk_cnt
void DetectSCTPChunkTypeFree(DetectEngineCtx *, void *)
#define SIGMATCH_INFO_ENUM_UINT
bool(* SupportsPrefilter)(const Signature *s)
bool PrefilterPacketU8Compare(PrefilterPacketHeaderValue v, void *smctx)
#define DEBUG_VALIDATE_BUG_ON(exp)
union PacketL4::L4Vars vars
#define SIG_FLAG_REQUIRE_PACKET