suricata
detect-engine-buffer.h File Reference

Go to the source code of this file.

Typedefs

typedef struct DetectEngineCtx_ DetectEngineCtx
 
typedef struct DetectEngineThreadCtx_ DetectEngineThreadCtx
 
typedef struct Signature_ Signature
 
typedef struct SigMatch_ SigMatch
 

Functions

int WARN_UNUSED SCDetectBufferSetActiveList (DetectEngineCtx *de_ctx, Signature *s, const int list)
 
int DetectBufferGetActiveList (DetectEngineCtx *de_ctx, Signature *s)
 
SigMatchDetectBufferGetFirstSigMatch (const Signature *s, const uint32_t buf_id)
 
SigMatchDetectBufferGetLastSigMatch (const Signature *s, const uint32_t buf_id)
 
int SCDetectSignatureAddTransform (Signature *s, int transform, void *options)
 
int SCDetectRegisterThreadCtxGlobalFuncs (const char *name, void *(*InitFunc)(void *), void *data, void(*FreeFunc)(void *))
 Register Thread keyword context Funcs (Global) More...
 
void * SCDetectThreadCtxGetGlobalKeywordThreadCtx (DetectEngineThreadCtx *det_ctx, int id)
 Retrieve thread local keyword ctx by id. More...
 

Detailed Description

Typedef Documentation

◆ DetectEngineCtx

Definition at line 1 of file detect-engine-buffer.h.

◆ DetectEngineThreadCtx

Definition at line 1 of file detect-engine-buffer.h.

◆ SigMatch

typedef struct SigMatch_ SigMatch

Definition at line 1 of file detect-engine-buffer.h.

◆ Signature

typedef struct Signature_ Signature

Definition at line 1 of file detect-engine-buffer.h.

Function Documentation

◆ DetectBufferGetActiveList()

◆ DetectBufferGetFirstSigMatch()

SigMatch* DetectBufferGetFirstSigMatch ( const Signature s,
const uint32_t  buf_id 
)

◆ DetectBufferGetLastSigMatch()

SigMatch* DetectBufferGetLastSigMatch ( const Signature s,
const uint32_t  buf_id 
)

◆ SCDetectBufferSetActiveList()

int WARN_UNUSED SCDetectBufferSetActiveList ( DetectEngineCtx de_ctx,
Signature s,
const int  list 
)

Definition at line 29 of file detect-engine-buffer.c.

◆ SCDetectRegisterThreadCtxGlobalFuncs()

int SCDetectRegisterThreadCtxGlobalFuncs ( const char *  name,
void *(*)(void *)  InitFunc,
void *  data,
void(*)(void *)  FreeFunc 
)

Register Thread keyword context Funcs (Global)

IDs stay static over reloads and between tenants

Parameters
namekeyword name for error printing
InitFuncfunction ptr
FreeFuncfunction ptr
Return values
idfor retrieval of ctx at runtime
-1on error

Definition at line 4013 of file detect-engine.c.

References BUG_ON.

◆ SCDetectSignatureAddTransform()

◆ SCDetectThreadCtxGetGlobalKeywordThreadCtx()

void* SCDetectThreadCtxGetGlobalKeywordThreadCtx ( DetectEngineThreadCtx det_ctx,
int  id 
)

Retrieve thread local keyword ctx by id.

Parameters
det_ctxdetection engine thread ctx to retrieve the ctx from
idid of the ctx returned by DetectRegisterThreadCtxInitFunc at keyword init.
Return values
ctxor NULL on error

Definition at line 4057 of file detect-engine.c.

References DetectEngineThreadCtx_::global_keyword_ctxs_array, and DetectEngineThreadCtx_::global_keyword_ctxs_size.

Referenced by HttpHeaderGetBufferSpace().

Here is the caller graph for this function: