Go to the documentation of this file.
61 static void DetectHttpUriRegisterTests(
void);
66 Flow *_f,
const uint8_t _flow_flags,
67 void *txv,
const int list_id);
76 Flow *_f,
const uint8_t _flow_flags,
77 void *txv,
const int list_id);
80 static int g_http_raw_uri_buffer_id = 0;
81 static int g_http_uri_buffer_id = 0;
91 "content modifier to match specifically and only on the HTTP uri-buffer";
124 DetectHttpUriSetupCallback);
162 DetectHttpRawUriSetupCallback);
213 const uint8_t _flow_flags,
void *txv,
const int list_id)
219 htp_tx_t *tx = (htp_tx_t *)txv;
220 bstr *request_uri_normalized = (bstr *)htp_tx_normalized_uri(tx);
221 if (request_uri_normalized == NULL)
224 const uint32_t data_len = (uint32_t)bstr_len(request_uri_normalized);
225 const uint8_t *data = bstr_ptr(request_uri_normalized);
228 det_ctx, list_id, buffer, data, data_len, transforms);
243 const uint8_t *b = NULL;
245 if (SCHttp2TxGetUri(txv, &b, &b_len) != 1)
247 if (b == NULL || b_len == 0)
299 const uint8_t _flow_flags,
void *txv,
const int list_id)
305 htp_tx_t *tx = (htp_tx_t *)txv;
306 if (
unlikely(htp_tx_request_uri(tx) == NULL)) {
309 const uint32_t data_len = (uint32_t)bstr_len(htp_tx_request_uri(tx));
310 const uint8_t *data = bstr_ptr(htp_tx_request_uri(tx));
313 det_ctx, list_id, buffer, data, data_len, transforms);
int DetectSignatureSetAppProto(Signature *s, AppProto alproto)
#define SIGMATCH_INFO_STICKY_BUFFER
SigTableElmt * sigmatch_table
uint8_t 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.
#define SIGMATCH_INFO_CONTENT_MODIFIER
void InspectionBufferSetupAndApplyTransforms(DetectEngineThreadCtx *det_ctx, const int list_id, InspectionBuffer *buffer, const uint8_t *data, const uint32_t data_len, const DetectEngineTransforms *transforms)
setup the buffer with our initial data
void DetectHttpUriRegister(void)
Registration function for keywords: http_uri and http.uri.
void DetectBufferTypeRegisterSetupCallback(const char *name, void(*SetupCallback)(const DetectEngineCtx *, Signature *))
main detection engine ctx
void DetectBufferTypeRegisterValidateCallback(const char *name, bool(*ValidateCallback)(const Signature *, const char **sigerror, const DetectBufferType *))
int SCDetectBufferSetActiveList(DetectEngineCtx *de_ctx, Signature *s, const int list)
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
int PrefilterGenericMpmRegister(DetectEngineCtx *de_ctx, SigGroupHead *sgh, MpmCtx *mpm_ctx, const DetectBufferMpmRegistry *mpm_reg, int list_id)
void DetectAppLayerMpmRegister(const char *name, int direction, int priority, PrefilterRegisterFunc PrefilterRegister, InspectionBufferGetDataPtr GetData, AppProto alproto, int tx_min_progress)
register an app layer keyword for mpm
int DetectEngineContentModifierBufferSetup(DetectEngineCtx *de_ctx, Signature *s, const char *arg, int sm_type, int sm_list, AppProto alproto)
bool DetectUrilenValidateContent(const Signature *s, const char **sigerror, const DetectBufferType *dbt)
void DetectAppLayerInspectEngineRegister(const char *name, AppProto alproto, uint32_t dir, int progress, InspectEngineFuncPtr Callback, InspectionBufferGetDataPtr GetData)
Registers an app inspection engine.
void DetectBufferTypeSetDescriptionByName(const char *name, const char *desc)
void(* RegisterTests)(void)