Go to the source code of this file.
◆ DETECT_PCRE_CAPTURE_MAX
#define DETECT_PCRE_CAPTURE_MAX 8 |
◆ DETECT_PCRE_CASELESS
#define DETECT_PCRE_CASELESS 0x00004 |
◆ DETECT_PCRE_NEGATE
#define DETECT_PCRE_NEGATE 0x00080 |
◆ DETECT_PCRE_RAWBYTES
#define DETECT_PCRE_RAWBYTES 0x00002 |
◆ DETECT_PCRE_RELATIVE
#define DETECT_PCRE_RELATIVE 0x00001 |
◆ DETECT_PCRE_RELATIVE_NEXT
#define DETECT_PCRE_RELATIVE_NEXT 0x00040 |
◆ SC_MATCH_LIMIT_DEFAULT
#define SC_MATCH_LIMIT_DEFAULT 3500 |
◆ SC_MATCH_LIMIT_RECURSION_DEFAULT
#define SC_MATCH_LIMIT_RECURSION_DEFAULT 1500 |
◆ DetectPcreData
◆ DetectPcrePayloadMatch()
Match a regex on a single payload.
- Parameters
-
det_ctx | Thread detection ctx. |
s | Signature. |
sm | Sig match to match against. |
p | Packet to set PktVars if any. |
f | Flow to set FlowVars if any. |
payload | Payload to inspect. |
payload_len | Length of the payload. |
- Return values
-
Definition at line 222 of file detect-pcre.c.
References DetectEngineThreadCtx_::buffer_offset, BUG_ON, DetectPcreData_::capids, DetectPcreData_::captypes, SigMatchData_::ctx, DETECT_PCRE_NEGATE, DETECT_PCRE_RELATIVE, DETECT_VAR_TYPE_FLOW_POSTMATCH, DETECT_VAR_TYPE_PKT_POSTMATCH, DetectThreadCtxGetKeywordThreadCtx(), DetectVarStoreMatch(), DetectVarStoreMatchKeyValue(), DetectPcreData_::flags, DetectPcreData_::idx, len, payload_len, DetectEngineThreadCtx_::pcre_match_start_offset, SCEnter, SCFree, SCLogDebug, SCMalloc, SCReturnInt, DetectPcreData_::thread_ctx_id, unlikely, VAR_TYPE_ALERT_VAR, VAR_TYPE_FLOW_VAR, VAR_TYPE_PKT_VAR, and VAR_TYPE_PKT_VAR_KV.
◆ DetectPcreRegister()
void DetectPcreRegister |
( |
void |
| ) |
|
Definition at line 97 of file detect-pcre.c.
References SigTableElmt_::desc, DETECT_PCRE, DetectSetupPCRE2(), FatalError, SigTableElmt_::flags, SigTableElmt_::Free, SigTableElmt_::Match, SigTableElmt_::name, PageSupportsRWX, PARSE_CAPTURE_REGEX, PARSE_REGEX, SigTableElmt_::RegisterTests, SC_MATCH_LIMIT_DEFAULT, SC_MATCH_LIMIT_RECURSION_DEFAULT, SCConfGetInt(), SCLogConfig, SCLogDebug, SCLogInfo, SigTableElmt_::Setup, SIGMATCH_HANDLE_NEGATION, SIGMATCH_QUOTES_OPTIONAL, sigmatch_table, and SigTableElmt_::url.
Referenced by SigTableSetup().