detect-pcre.h File Reference
#include "detect-parse.h"
Include dependency graph for detect-pcre.h:

Go to the source code of this file.

Data Structures

struct  DetectPcreData_


#define DETECT_PCRE_RELATIVE   0x00001
#define DETECT_PCRE_RAWBYTES   0x00002
#define DETECT_PCRE_CASELESS   0x00004
#define DETECT_PCRE_NEGATE   0x00080


typedef struct DetectPcreData_ DetectPcreData


int DetectPcrePayloadMatch (DetectEngineThreadCtx *, const Signature *, const SigMatchData *, Packet *, Flow *, const uint8_t *, uint32_t)
 Match a regex on a single payload. More...
void DetectPcreRegister (void)

Detailed Description

Macro Definition Documentation



Definition at line 38 of file detect-pcre.h.


#define DETECT_PCRE_CASELESS   0x00004

Definition at line 33 of file detect-pcre.h.


#define DETECT_PCRE_NEGATE   0x00080

Definition at line 36 of file detect-pcre.h.


#define DETECT_PCRE_RAWBYTES   0x00002

Definition at line 32 of file detect-pcre.h.


#define DETECT_PCRE_RELATIVE   0x00001

Definition at line 30 of file detect-pcre.h.



Definition at line 35 of file detect-pcre.h.



Definition at line 40 of file detect-pcre.h.



Definition at line 41 of file detect-pcre.h.

Typedef Documentation

◆ DetectPcreData

Function Documentation

◆ DetectPcrePayloadMatch()

int DetectPcrePayloadMatch ( DetectEngineThreadCtx det_ctx,
const Signature s,
const SigMatchData smd,
Packet p,
Flow f,
const uint8_t *  payload,
uint32_t  payload_len 

Match a regex on a single payload.

det_ctxThread detection ctx.
smSig match to match against.
pPacket to set PktVars if any.
fFlow to set FlowVars if any.
payloadPayload to inspect.
payload_lenLength of the payload.
Return values
0No match.

Definition at line 173 of file detect-pcre.c.

References DetectEngineThreadCtx_::buffer_offset, SigMatchData_::ctx, DETECT_PCRE_RELATIVE, DetectThreadCtxGetKeywordThreadCtx(), DetectPcreData_::flags, len, payload_len, DetectEngineThreadCtx_::pcre_match_start_offset, SCEnter, and DetectPcreData_::thread_ctx_id.

Here is the call graph for this function:

◆ DetectPcreRegister()

void DetectPcreRegister ( void  )

Definition at line 96 of file detect-pcre.c.

References SigTableElmt_::desc, DETECT_PCRE, SigTableElmt_::Match, SigTableElmt_::name, SigTableElmt_::Setup, sigmatch_table, and SigTableElmt_::url.

Referenced by SigTableSetup().

Here is the caller graph for this function: