Go to the documentation of this file.
44 static int g_buffer_id = 0;
59 const uint32_t local_id)
76 const uint8_t *data = (
const uint8_t *)PacketGetSCTP(
p) +
offset;
78 SCLogDebug(
"data out of range: %p > %p", (data + (ptrdiff_t)
len),
95 uint8_t *_alert_flags)
104 const int list_id = engine->
sm_list;
110 for (uint8_t i = 0; i <
cnt; i++) {
111 InspectionBuffer *buffer = GetBuffer(det_ctx, transforms,
p, list_id, (uint32_t)i);
112 if (buffer == NULL || buffer->
inspect == NULL)
133 static void PrefilterMpmSCTPChunkDataPkt(
136 if (!PacketIsSCTP(
p))
145 const int list_id =
ctx->list_id;
147 for (uint8_t i = 0; i <
cnt; i++) {
149 if (buffer == NULL || buffer->
inspect == NULL)
160 static void PrefilterMpmSCTPChunkDataFree(
void *ptr)
183 "sticky buffer to match on each SCTP DATA chunk payload";
SigTableElmt * sigmatch_table
Container for matching data for a signature group.
void DetectPktMpmRegister(const char *name, int priority, int(*PrefilterRegister)(DetectEngineCtx *de_ctx, SigGroupHead *sgh, MpmCtx *mpm_ctx, const DetectBufferMpmRegistry *mpm_reg, int list_id), InspectionBufferGetPktDataPtr GetData)
register a MPM engine
int PrefilterAppendEngine(DetectEngineCtx *de_ctx, SigGroupHead *sgh, PrefilterPktFn PrefilterFunc, SignatureMask mask, enum SignatureHookPkt hook, void *pectx, void(*FreeFunc)(void *pectx), const char *name)
main detection engine ctx
@ SIGNATURE_HOOK_PKT_NOT_SET
void DetectBufferTypeSupportsMultiInstance(const char *name)
one time registration of keywords at start up
int SCDetectBufferSetActiveList(DetectEngineCtx *de_ctx, Signature *s, const int list)
int(* Setup)(DetectEngineCtx *, Signature *, const char *)
DetectEngineTransforms transforms
const DetectEngineTransforms * transforms
void DetectBufferTypeSupportsPacket(const char *name)
uint16_t data_offsets[SCTP_MAX_DATA_CHUNKS]
#define SCTP_MAX_DATA_CHUNKS
char pname[DETECT_PROFILE_NAME_LEN]
void DetectPktInspectEngineRegister(const char *name, InspectionBufferGetPktDataPtr GetPktData, InspectionBufferPktInspectFunc Callback)
register inspect engine at start up time
#define DETECT_ENGINE_INSPECT_SIG_MATCH
const DetectEngineTransforms * transforms
uint32_t(* Search)(const struct MpmCtx_ *, struct MpmThreadCtx_ *, PrefilterRuleStore *, const uint8_t *, uint32_t)
void DetectSCTPChunkDataRegister(void)
#define PREFILTER_PROFILING_ADD_BYTES(det_ctx, bytes)
int DetectBufferTypeRegister(const char *name)
struct DetectEnginePktInspectionEngine::@85 v1
@ DETECT_ENGINE_CONTENT_INSPECTION_MODE_HEADER
#define DETECT_ENGINE_INSPECT_SIG_NO_MATCH
#define SIGMATCH_INFO_STICKY_BUFFER
MpmTableElmt mpm_table[MPM_TABLE_SIZE]
void InspectionBufferSetupMultiEmpty(InspectionBuffer *buffer)
setup the buffer empty
bool DetectEngineContentInspectionBuffer(DetectEngineCtx *de_ctx, DetectEngineThreadCtx *det_ctx, const Signature *s, const SigMatchData *smd, Packet *p, Flow *f, const InspectionBuffer *b, const enum DetectContentInspectionType inspection_mode)
wrapper around DetectEngineContentInspectionInternal to return true/false only
uint16_t data_lens[SCTP_MAX_DATA_CHUNKS]
#define DEBUG_VALIDATE_BUG_ON(exp)
void InspectionBufferSetupMulti(DetectEngineThreadCtx *det_ctx, InspectionBuffer *buffer, const DetectEngineTransforms *transforms, const uint8_t *data, const uint32_t data_len)
setup the buffer with our initial data
union PacketL4::L4Vars vars
InspectionBuffer * InspectionBufferMultipleForListGet(DetectEngineThreadCtx *det_ctx, const int list_id, const uint32_t local_id)
for a InspectionBufferMultipleForList get a InspectionBuffer
struct PrefilterMpmSCTPChunkData PrefilterMpmSCTPChunkData
int DetectProtoContainsProto(const DetectProto *dp, int proto)
see if a DetectProto contains a certain proto
#define SIG_FLAG_REQUIRE_PACKET