Go to the documentation of this file.
62 static void DetectHttpUriRegisterTests(
void);
66 static bool DetectHttpUriValidateCallback(
const Signature *s,
const char **sigerror);
69 Flow *_f,
const uint8_t _flow_flags,
70 void *txv,
const int list_id);
78 static bool DetectHttpRawUriValidateCallback(
const Signature *s,
const char **);
81 Flow *_f,
const uint8_t _flow_flags,
82 void *txv,
const int list_id);
85 static int g_http_raw_uri_buffer_id = 0;
86 static int g_http_uri_buffer_id = 0;
128 DetectHttpUriSetupCallback);
131 DetectHttpUriValidateCallback);
167 DetectHttpRawUriSetupCallback);
170 DetectHttpRawUriValidateCallback);
192 static bool DetectHttpUriValidateCallback(
const Signature *s,
const char **sigerror)
224 const uint8_t _flow_flags,
void *txv,
const int list_id)
230 htp_tx_t *tx = (htp_tx_t *)txv;
257 const uint8_t *b = NULL;
259 if (rs_http2_tx_get_uri(txv, &b, &b_len) != 1)
261 if (b == NULL || b_len == 0)
287 static bool DetectHttpRawUriValidateCallback(
const Signature *s,
const char **sigerror)
319 const uint8_t _flow_flags,
void *txv,
const int list_id)
325 htp_tx_t *tx = (htp_tx_t *)txv;
326 if (
unlikely(tx->request_uri == NULL)) {
329 const uint32_t data_len = bstr_len(tx->request_uri);
330 const uint8_t *data = bstr_ptr(tx->request_uri);
int DetectSignatureSetAppProto(Signature *s, AppProto alproto)
#define SIGMATCH_INFO_STICKY_BUFFER
#define SIGMATCH_INFO_CONTENT_MODIFIER
void DetectHttpUriRegister(void)
Registration function for keywords: http_uri and http.uri.
void DetectBufferTypeRegisterSetupCallback(const char *name, void(*SetupCallback)(const DetectEngineCtx *, Signature *))
int PrefilterGenericMpmRegister(DetectEngineCtx *de_ctx, SigGroupHead *sgh, MpmCtx *mpm_ctx, const DetectBufferMpmRegistery *mpm_reg, int list_id)
main detection engine ctx
bstr * request_uri_normalized
int(* Setup)(DetectEngineCtx *, Signature *, const char *)
void DetectUrilenApplyToContent(Signature *s, int list)
set prefilter dsize pair
InspectionBuffer * InspectionBufferGet(DetectEngineThreadCtx *det_ctx, const int list_id)
int DetectBufferTypeGetByName(const char *name)
int DetectHttpUriSetup(DetectEngineCtx *de_ctx, Signature *s, const char *str)
this function setups the http_uri modifier keyword used in the rule
#define SIG_FLAG_TOSERVER
void DetectBufferTypeRegisterValidateCallback(const char *name, bool(*ValidateCallback)(const Signature *, const char **sigerror))
int DetectEngineInspectBufferGeneric(DetectEngineCtx *de_ctx, DetectEngineThreadCtx *det_ctx, const DetectEngineAppInspectionEngine *engine, const Signature *s, Flow *f, uint8_t flags, void *alstate, void *txv, uint64_t tx_id)
Do the content inspection & validation for a signature.
int DetectEngineContentModifierBufferSetup(DetectEngineCtx *de_ctx, Signature *s, const char *arg, int sm_type, int sm_list, AppProto alproto)
void DetectAppLayerInspectEngineRegister2(const char *name, AppProto alproto, uint32_t dir, int progress, InspectEngineFuncPtr2 Callback2, InspectionBufferGetDataPtr GetData)
register inspect engine at start up time
void DetectAppLayerMpmRegister2(const char *name, int direction, int priority, int(*PrefilterRegister)(DetectEngineCtx *de_ctx, SigGroupHead *sgh, MpmCtx *mpm_ctx, const DetectBufferMpmRegistery *mpm_reg, int list_id), InspectionBufferGetDataPtr GetData, AppProto alproto, int tx_min_progress)
register a MPM engine
void InspectionBufferApplyTransforms(InspectionBuffer *buffer, const DetectEngineTransforms *transforms)
SigTableElmt sigmatch_table[DETECT_TBLSIZE]
void InspectionBufferSetup(DetectEngineThreadCtx *det_ctx, const int list_id, InspectionBuffer *buffer, const uint8_t *data, const uint32_t data_len)
setup the buffer with our initial data
int DetectBufferSetActiveList(Signature *s, const int list)
void DetectBufferTypeSetDescriptionByName(const char *name, const char *desc)
bool DetectUrilenValidateContent(const Signature *s, int list, const char **sigerror)
void(* RegisterTests)(void)