MpmCtx *mpm_ctx, const DetectBufferMpmRegistry *mpm_reg, int list_id);
/* file API */
-static uint8_t DetectEngineInspectFiledata(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);
int PrefilterMpmFiledataRegister(DetectEngineCtx *de_ctx, SigGroupHead *sgh, MpmCtx *mpm_ctx,
const DetectBufferMpmRegistry *mpm_reg, int list_id);
/* common */
-typedef struct PrefilterMpmFiledata {
- int list_id;
- int base_list_id;
- const MpmCtx *mpm_ctx;
- const DetectEngineTransforms *transforms;
-} PrefilterMpmFiledata;
-
static void PrefilterMpmFiledataFree(void *ptr)
{
SCFree(ptr);
}
}
-static uint8_t DetectEngineInspectFiledata(DetectEngineCtx *de_ctx, DetectEngineThreadCtx *det_ctx,
+uint8_t DetectEngineInspectFiledata(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)
{
/* prototypes */
void DetectFiledataRegister (void);
+typedef struct PrefilterMpmFiledata {
+ int list_id;
+ int base_list_id;
+ const MpmCtx *mpm_ctx;
+ const DetectEngineTransforms *transforms;
+} PrefilterMpmFiledata;
+
+uint8_t DetectEngineInspectFiledata(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);
+int PrefilterMpmFiledataRegister(DetectEngineCtx *de_ctx, SigGroupHead *sgh, MpmCtx *mpm_ctx,
+ const DetectBufferMpmRegistry *mpm_reg, int list_id);
+
#endif /* __DETECT_FILEDATA_H__ */
#include "detect-engine-content-inspection.h"
#include "detect-content.h"
#include "detect-pcre.h"
+// PrefilterMpmFiledata
+#include "detect-file-data.h"
#include "flow.h"
#include "flow-var.h"
DetectAppLayerMpmRegister2("http_client_body", SIG_FLAG_TOSERVER, 2,
PrefilterMpmHttpRequestBodyRegister, NULL, ALPROTO_HTTP1, HTP_REQUEST_BODY);
+ DetectAppLayerInspectEngineRegister2("http_client_body", ALPROTO_HTTP2, SIG_FLAG_TOSERVER,
+ HTTP2StateDataClient, DetectEngineInspectFiledata, NULL);
+ DetectAppLayerMpmRegister2("http_client_body", SIG_FLAG_TOSERVER, 2,
+ PrefilterMpmFiledataRegister, NULL, ALPROTO_HTTP2, HTTP2StateDataClient);
+
DetectBufferTypeSetDescriptionByName("http_client_body",
"http request body");
{
if (DetectBufferSetActiveList(de_ctx, s, g_http_client_body_buffer_id) < 0)
return -1;
- if (DetectSignatureSetAppProto(s, ALPROTO_HTTP1) < 0)
+ if (DetectSignatureSetAppProto(s, ALPROTO_HTTP) < 0)
return -1;
return 0;
}