Go to the documentation of this file.
43 static int g_buffer_id = 0;
45 #ifdef KEYWORD_TOSERVER
48 const uint8_t _flow_flags,
void *txv,
const int list_id)
54 htp_tx_t *tx = (htp_tx_t *)txv;
56 if (tx->request_headers == NULL)
59 htp_header_t *h = (htp_header_t *)htp_table_get_c(tx->request_headers,
61 if (h == NULL || h->value == NULL) {
62 SCLogDebug(
"HTTP %s header not present in this request",
67 const uint32_t data_len = bstr_len(h->value);
68 const uint8_t *data = bstr_ptr(h->value);
86 const uint8_t *b = NULL;
88 if (rs_http2_tx_get_header_value(txv, STREAM_TOSERVER,
HEADER_NAME, &b, &b_len) != 1)
90 if (b == NULL || b_len == 0)
101 #ifdef KEYWORD_TOCLIENT
104 const uint8_t _flow_flags,
void *txv,
const int list_id)
110 htp_tx_t *tx = (htp_tx_t *)txv;
112 if (tx->response_headers == NULL)
115 htp_header_t *h = (htp_header_t *)htp_table_get_c(tx->response_headers,
117 if (h == NULL || h->value == NULL) {
118 SCLogDebug(
"HTTP %s header not present in this request",
123 const uint32_t data_len = bstr_len(h->value);
124 const uint8_t *data = bstr_ptr(h->value);
142 const uint8_t *b = NULL;
144 if (rs_http2_tx_get_header_value(txv, STREAM_TOCLIENT,
HEADER_NAME, &b, &b_len) != 1)
146 if (b == NULL || b_len == 0)
177 static void DetectHttpHeadersRegisterStub(
void)
180 #ifdef KEYWORD_NAME_LEGACY
188 #ifdef KEYWORD_TOSERVER
194 #ifdef KEYWORD_TOCLIENT
200 #ifdef KEYWORD_TOSERVER
206 #ifdef KEYWORD_TOCLIENT
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.
int DetectBufferSetActiveList(DetectEngineCtx *de_ctx, Signature *s, const int list)
main detection engine ctx
#define SIG_FLAG_TOCLIENT
int(* Setup)(DetectEngineCtx *, Signature *, const char *)
InspectionBuffer * InspectionBufferGet(DetectEngineThreadCtx *det_ctx, const int list_id)
int DetectBufferTypeGetByName(const char *name)
#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
#define KEYWORD_NAME_LEGACY
void InspectionBufferApplyTransforms(InspectionBuffer *buffer, const DetectEngineTransforms *transforms)
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
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)