Go to the documentation of this file.
24 #ifndef SURICATA_UTIL_MPM_H
25 #define SURICATA_UTIL_MPM_H
30 #define MPM_INIT_HASH_SIZE 65536
85 #define MPMCTX_FLAGS_GLOBAL BIT_U8(0)
86 #define MPMCTX_FLAGS_NODEPTH BIT_U8(1)
113 #define MPM_CTX_FACTORY_UNIQUE_CONTEXT -1
132 #define MPM_PATTERN_FLAG_NOCASE 0x01
134 #define MPM_PATTERN_FLAG_DEPTH 0x04
136 #define MPM_PATTERN_FLAG_OFFSET 0x08
139 #define MPM_PATTERN_CTX_OWNS_ID 0x20
140 #define MPM_PATTERN_FLAG_ENDSWITH 0x40
142 #define MPM_FEATURE_FLAG_DEPTH BIT_U8(0)
143 #define MPM_FEATURE_FLAG_OFFSET BIT_U8(1)
144 #define MPM_FEATURE_FLAG_ENDSWITH BIT_U8(2)
197 uint16_t
offset, uint16_t depth,
200 uint16_t
offset, uint16_t depth,
206 uint16_t
offset, uint16_t depth, uint32_t pid,
void(* PrintThreadCtx)(struct MpmThreadCtx_ *)
void(* InitThreadCtx)(struct MpmCtx_ *, struct MpmThreadCtx_ *)
int MpmAddPattern(MpmCtx *mpm_ctx, uint8_t *pat, uint16_t patlen, uint16_t offset, uint16_t depth, uint32_t pid, SigIntId sid, uint8_t flags)
structure for storing potential rule matches
int MpmAddPatternCI(struct MpmCtx_ *mpm_ctx, uint8_t *pat, uint16_t patlen, uint16_t offset, uint16_t depth, uint32_t pid, SigIntId sid, uint8_t flags)
struct MpmCtxFactoryContainer_ MpmCtxFactoryContainer
struct MpmTableElmt_ MpmTableElmt
int MpmAddPatternCS(struct MpmCtx_ *mpm_ctx, uint8_t *pat, uint16_t patlen, uint16_t offset, uint16_t depth, uint32_t pid, SigIntId sid, uint8_t flags)
main detection engine ctx
int(* AddPatternNocase)(struct MpmCtx_ *, uint8_t *, uint16_t, uint16_t, uint16_t, uint32_t, SigIntId, uint8_t)
int(* AddPattern)(struct MpmCtx_ *, uint8_t *, uint16_t, uint16_t, uint16_t, uint32_t, SigIntId, uint8_t)
MpmTableElmt mpm_table[MPM_TABLE_SIZE]
struct MpmCtxFactoryItem MpmCtxFactoryItem
struct MpmThreadCtx_ MpmThreadCtx
void(* InitCtx)(struct MpmCtx_ *)
void MpmInitThreadCtx(MpmThreadCtx *mpm_thread_ctx, uint16_t)
void(* PrintCtx)(struct MpmCtx_ *)
struct MpmPattern_ MpmPattern
struct MpmPattern_ * next
int32_t MpmFactoryIsMpmCtxAvailable(const struct DetectEngineCtx_ *, const MpmCtx *)
uint8_t mpm_default_matcher
MpmCtxFactoryItem * items
void MpmFreePattern(MpmCtx *mpm_ctx, MpmPattern *p)
int(* Prepare)(struct MpmCtx_ *)
uint32_t(* Search)(const struct MpmCtx_ *, struct MpmThreadCtx_ *, PrefilterRuleStore *, const uint8_t *, uint32_t)
struct MpmCtxFactoryItem * next
void MpmFactoryReClaimMpmCtx(const struct DetectEngineCtx_ *, MpmCtx *)
void MpmRegisterTests(void)
void MpmFactoryDeRegisterAllMpmCtxProfiles(struct DetectEngineCtx_ *)
void(* DestroyCtx)(struct MpmCtx_ *)
int32_t MpmFactoryRegisterMpmCtxProfile(struct DetectEngineCtx_ *, const char *, const int, const AppProto)
Register a new Mpm Context.
void(* DestroyThreadCtx)(struct MpmCtx_ *, struct MpmThreadCtx_ *)
void MpmInitCtx(MpmCtx *mpm_ctx, uint8_t matcher)
MpmCtx * MpmFactoryGetMpmCtxForProfile(const struct DetectEngineCtx_ *, int32_t, int)
void(* RegisterUnittests)(void)
void MpmDestroyThreadCtx(MpmThreadCtx *mpm_thread_ctx, const uint16_t matcher)