suricata
|
#include "detect-engine-state.h"
Go to the source code of this file.
Data Structures | |
struct | PrefilterStore_ |
Typedefs | |
typedef struct PrefilterStore_ | PrefilterStore |
Functions | |
void | Prefilter (DetectEngineThreadCtx *, const SigGroupHead *, Packet *p, const uint8_t flags) |
int | PrefilterAppendEngine (DetectEngineCtx *de_ctx, SigGroupHead *sgh, void(*Prefilter)(DetectEngineThreadCtx *det_ctx, Packet *p, const void *pectx), void *pectx, void(*FreeFunc)(void *pectx), const char *name) |
int | PrefilterAppendPayloadEngine (DetectEngineCtx *de_ctx, SigGroupHead *sgh, void(*Prefilter)(DetectEngineThreadCtx *det_ctx, Packet *p, const void *pectx), void *pectx, void(*FreeFunc)(void *pectx), const char *name) |
int | PrefilterAppendTxEngine (DetectEngineCtx *de_ctx, SigGroupHead *sgh, void(*PrefilterTx)(DetectEngineThreadCtx *det_ctx, const void *pectx, Packet *p, Flow *f, void *tx, const uint64_t idx, const uint8_t flags), const AppProto alproto, const int tx_min_progress, void *pectx, void(*FreeFunc)(void *pectx), const char *name) |
void | DetectRunPrefilterTx (DetectEngineThreadCtx *det_ctx, const SigGroupHead *sgh, Packet *p, const uint8_t ipproto, const uint8_t flow_flags, const AppProto alproto, void *alstate, DetectTransaction *tx) |
run prefilter engines on a transaction More... | |
void | PrefilterFreeEnginesList (PrefilterEngineList *list) |
void | PrefilterSetupRuleGroup (DetectEngineCtx *de_ctx, SigGroupHead *sgh) |
void | PrefilterCleanupRuleGroup (const DetectEngineCtx *de_ctx, SigGroupHead *sgh) |
const char * | PrefilterStoreGetName (const uint32_t id) |
void | PrefilterInit (DetectEngineCtx *de_ctx) |
void | PrefilterDeinit (DetectEngineCtx *de_ctx) |
int | PrefilterGenericMpmRegister (DetectEngineCtx *de_ctx, SigGroupHead *sgh, MpmCtx *mpm_ctx, const DetectBufferMpmRegistery *mpm_reg, int list_id) |
int | PrefilterGenericMpmPktRegister (DetectEngineCtx *de_ctx, SigGroupHead *sgh, MpmCtx *mpm_ctx, const DetectBufferMpmRegistery *mpm_reg, int list_id) |
Definition in file detect-engine-prefilter.h.
typedef struct PrefilterStore_ PrefilterStore |
void DetectRunPrefilterTx | ( | DetectEngineThreadCtx * | det_ctx, |
const SigGroupHead * | sgh, | ||
Packet * | p, | ||
const uint8_t | ipproto, | ||
const uint8_t | flow_flags, | ||
const AppProto | alproto, | ||
void * | alstate, | ||
DetectTransaction * | tx | ||
) |
run prefilter engines on a transaction
Definition at line 90 of file detect-engine-prefilter.c.
References PrefilterEngine_::alproto, PrefilterEngine_::cb, Packet_::flow, PrefilterEngine_::gid, PrefilterEngine_::is_last, likely, PrefilterEngine_::local_id, next, PACKET_PROFILING_DETECT_START, PrefilterEngine_::pectx, DetectEngineThreadCtx_::pmq, DetectTransaction_::prefilter_flags, PREFILTER_PROFILING_END, PREFILTER_PROFILING_START, PrefilterEngine_::PrefilterTx, PROF_DETECT_PF_SORT1, PrefilterRuleStore_::rule_id_array_cnt, SCLogDebug, SigGroupHead_::tx_engines, DetectTransaction_::tx_id, PrefilterEngine_::tx_min_progress, DetectTransaction_::tx_progress, and DetectTransaction_::tx_ptr.
void Prefilter | ( | DetectEngineThreadCtx * | , |
const SigGroupHead * | , | ||
Packet * | p, | ||
const uint8_t | flags | ||
) |
Definition at line 139 of file detect-engine-prefilter.c.
References PrefilterEngine_::cb, Packet_::flags, PrefilterEngine_::gid, PrefilterEngine_::is_last, likely, PACKET_PROFILING_DETECT_END, PACKET_PROFILING_DETECT_START, SigGroupHead_::payload_engines, Packet_::payload_len, PrefilterEngine_::pectx, PKT_DETECT_HAS_STREAMDATA, SigGroupHead_::pkt_engines, PKT_NOPAYLOAD_INSPECTION, DetectEngineThreadCtx_::pmq, PrefilterEngine_::Prefilter, PREFILTER_PROFILING_END, PREFILTER_PROFILING_START, PROF_DETECT_PF_PAYLOAD, PROF_DETECT_PF_PKT, PROF_DETECT_PF_SORT1, PrefilterRuleStore_::rule_id_array_cnt, and SCEnter.
int PrefilterAppendEngine | ( | DetectEngineCtx * | de_ctx, |
SigGroupHead * | sgh, | ||
void(*)(DetectEngineThreadCtx *det_ctx, Packet *p, const void *pectx) | Prefilter, | ||
void * | pectx, | ||
void(*)(void *pectx) | FreeFunc, | ||
const char * | name | ||
) |
Definition at line 189 of file detect-engine-prefilter.c.
References CLS, PrefilterEngineList_::Free, PrefilterEngineList_::gid, PrefilterEngineList_::id, SigGroupHead_::init, PrefilterEngineList_::name, PrefilterEngineList_::next, PrefilterEngineList_::pectx, SigGroupHeadInitData_::pkt_engines, PrefilterEngineList_::Prefilter, and SCMallocAligned.
Referenced by PrefilterGenericMpmPktRegister().
int PrefilterAppendPayloadEngine | ( | DetectEngineCtx * | de_ctx, |
SigGroupHead * | sgh, | ||
void(*)(DetectEngineThreadCtx *det_ctx, Packet *p, const void *pectx) | Prefilter, | ||
void * | pectx, | ||
void(*)(void *pectx) | FreeFunc, | ||
const char * | name | ||
) |
Definition at line 223 of file detect-engine-prefilter.c.
References CLS, PrefilterEngineList_::Free, PrefilterEngineList_::gid, PrefilterEngineList_::id, SigGroupHead_::init, PrefilterEngineList_::name, PrefilterEngineList_::next, SigGroupHeadInitData_::payload_engines, PrefilterEngineList_::pectx, PrefilterEngineList_::Prefilter, and SCMallocAligned.
Referenced by PrefilterPktPayloadRegister(), and PrefilterPktStreamRegister().
int PrefilterAppendTxEngine | ( | DetectEngineCtx * | de_ctx, |
SigGroupHead * | sgh, | ||
void(*)(DetectEngineThreadCtx *det_ctx, const void *pectx, Packet *p, Flow *f, void *tx, const uint64_t idx, const uint8_t flags) | PrefilterTx, | ||
const AppProto | alproto, | ||
const int | tx_min_progress, | ||
void * | pectx, | ||
void(*)(void *pectx) | FreeFunc, | ||
const char * | name | ||
) |
Definition at line 257 of file detect-engine-prefilter.c.
References PrefilterEngineList_::alproto, CLS, PrefilterEngineList_::Free, PrefilterEngineList_::gid, PrefilterEngineList_::id, SigGroupHead_::init, PrefilterEngineList_::name, PrefilterEngineList_::next, PrefilterEngineList_::pectx, PrefilterEngineList_::PrefilterTx, SCMallocAligned, SigGroupHeadInitData_::tx_engines, and PrefilterEngineList_::tx_min_progress.
Referenced by PrefilterGenericMpmRegister(), and PrefilterMpmFiledataRegister().
void PrefilterCleanupRuleGroup | ( | const DetectEngineCtx * | de_ctx, |
SigGroupHead * | sgh | ||
) |
Definition at line 332 of file detect-engine-prefilter.c.
References SigGroupHead_::pkt_engines.
Referenced by SigGroupHeadFree().
void PrefilterDeinit | ( | DetectEngineCtx * | de_ctx | ) |
Definition at line 483 of file detect-engine-prefilter.c.
References de_ctx, HashListTableFree(), and DetectEngineCtx_::prefilter_hash_table.
void PrefilterFreeEnginesList | ( | PrefilterEngineList * | list | ) |
Definition at line 304 of file detect-engine-prefilter.c.
Referenced by SigGroupHeadInitDataFree().
int PrefilterGenericMpmPktRegister | ( | DetectEngineCtx * | de_ctx, |
SigGroupHead * | sgh, | ||
MpmCtx * | mpm_ctx, | ||
const DetectBufferMpmRegistery * | mpm_reg, | ||
int | list_id | ||
) |
Definition at line 681 of file detect-engine-prefilter.c.
References de_ctx, PrefilterMpmPktCtx::GetData, PrefilterMpmPktCtx::list_id, PrefilterMpmPktCtx::mpm_ctx, DetectBufferMpmRegistery_::pkt_v1, PrefilterAppendEngine(), SCCalloc, SCEnter, DetectBufferMpmRegistery_::transforms, and PrefilterMpmPktCtx::transforms.
int PrefilterGenericMpmRegister | ( | DetectEngineCtx * | de_ctx, |
SigGroupHead * | sgh, | ||
MpmCtx * | mpm_ctx, | ||
const DetectBufferMpmRegistery * | mpm_reg, | ||
int | list_id | ||
) |
Definition at line 611 of file detect-engine-prefilter.c.
References DetectBufferMpmRegistery_::app_v2, de_ctx, PrefilterMpmCtx::GetData, PrefilterMpmCtx::list_id, PrefilterMpmCtx::mpm_ctx, PrefilterAppendTxEngine(), SCCalloc, SCEnter, PrefilterMpmCtx::transforms, and DetectBufferMpmRegistery_::transforms.
void PrefilterInit | ( | DetectEngineCtx * | de_ctx | ) |
Definition at line 490 of file detect-engine-prefilter.c.
References BUG_ON, de_ctx, HashListTableInit(), and DetectEngineCtx_::prefilter_hash_table.
void PrefilterSetupRuleGroup | ( | DetectEngineCtx * | de_ctx, |
SigGroupHead * | sgh | ||
) |
Definition at line 348 of file detect-engine-prefilter.c.
References de_ctx, DETECT_PREFILTER_AUTO, DETECT_TBLSIZE, FatalError, SigGroupHead_::init, PatternMatchPrepareGroup(), SigGroupHeadInitData_::pkt_engines, DetectEngineCtx_::prefilter_setting, SC_ERR_INITIALIZATION, SigTableElmt_::SetupPrefilter, sigmatch_table, and DetectEngineCtx_::sm_types_prefilter.
const char* PrefilterStoreGetName | ( | const uint32_t | id | ) |
Definition at line 555 of file detect-engine-prefilter.c.