* \param txv tx to inspect
* \param pectx inspection context
*/
-static void PrefilterTxDnsQuery(DetectEngineThreadCtx *det_ctx,
- const void *pectx,
- Packet *p, Flow *f, void *txv,
- const uint64_t idx, const uint8_t flags)
+static void PrefilterTxDnsQuery(DetectEngineThreadCtx *det_ctx, const void *pectx, Packet *p,
+ Flow *f, void *txv, const uint64_t idx, const AppLayerTxData *_txd, const uint8_t flags)
{
SCEnter();
}
PREFILTER_PROFILING_START(det_ctx);
- engine->cb.PrefilterTx(det_ctx, engine->pectx,
- p, p->flow, tx->tx_ptr, tx->tx_id, flow_flags);
+ engine->cb.PrefilterTx(det_ctx, engine->pectx, p, p->flow, tx->tx_ptr, tx->tx_id,
+ tx->tx_data_ptr, flow_flags);
PREFILTER_PROFILING_END(det_ctx, engine->gid);
if (tx->tx_progress > engine->ctx.tx_min_progress && engine->is_last_for_progress) {
}
int PrefilterAppendTxEngine(DetectEngineCtx *de_ctx, SigGroupHead *sgh,
- void (*PrefilterTxFunc)(DetectEngineThreadCtx *det_ctx, const void *pectx,
- Packet *p, Flow *f, void *tx,
- const uint64_t idx, const uint8_t flags),
- AppProto alproto, int tx_min_progress,
- void *pectx, void (*FreeFunc)(void *pectx),
- const char *name)
+ PrefilterTxFn PrefilterTxFunc, AppProto alproto, int tx_min_progress, void *pectx,
+ void (*FreeFunc)(void *pectx), const char *name)
{
if (sgh == NULL || PrefilterTxFunc == NULL || pectx == NULL)
return -1;
* \param txv tx to inspect
* \param pectx inspection context
*/
-static void PrefilterMpm(DetectEngineThreadCtx *det_ctx,
- const void *pectx,
- Packet *p, Flow *f, void *txv,
- const uint64_t idx, const uint8_t flags)
+static void PrefilterMpm(DetectEngineThreadCtx *det_ctx, const void *pectx, Packet *p, Flow *f,
+ void *txv, const uint64_t idx, const AppLayerTxData *_txd, const uint8_t flags)
{
SCEnter();
void *pectx, void (*FreeFunc)(void *pectx),
const char *name);
int PrefilterAppendTxEngine(DetectEngineCtx *de_ctx, SigGroupHead *sgh,
- void (*PrefilterTx)(DetectEngineThreadCtx *det_ctx, const void *pectx, Packet *p, Flow *f,
- void *tx, const uint64_t idx, const uint8_t flags),
- const AppProto alproto, const int tx_min_progress, void *pectx,
- void (*FreeFunc)(void *pectx), const char *name);
+ PrefilterTxFn PrefilterTxFunc, const AppProto alproto, const int tx_min_progress,
+ void *pectx, void (*FreeFunc)(void *pectx), const char *name);
int PrefilterAppendFrameEngine(DetectEngineCtx *de_ctx, SigGroupHead *sgh,
PrefilterFrameFn PrefilterFrameFunc, AppProto alproto, uint8_t frame_type, void *pectx,
void (*FreeFunc)(void *pectx), const char *name);
* \param flags STREAM_* flags including direction
*/
static void PrefilterTxHTTPFiledata(DetectEngineThreadCtx *det_ctx, const void *pectx, Packet *p,
- Flow *f, void *txv, const uint64_t idx, const uint8_t flags)
+ Flow *f, void *txv, const uint64_t idx, const AppLayerTxData *_txd, const uint8_t flags)
{
SCEnter();
* \param idx transaction id
* \param flags STREAM_* flags including direction
*/
-static void PrefilterTxFiledata(DetectEngineThreadCtx *det_ctx,
- const void *pectx,
- Packet *p, Flow *f, void *txv,
- const uint64_t idx, const uint8_t flags)
+static void PrefilterTxFiledata(DetectEngineThreadCtx *det_ctx, const void *pectx, Packet *p,
+ Flow *f, void *txv, const uint64_t idx, const AppLayerTxData *_txd, const uint8_t flags)
{
SCEnter();
* \param txv tx to inspect
* \param pectx inspection context
*/
-static void PrefilterTxFilemagic(DetectEngineThreadCtx *det_ctx,
- const void *pectx,
- Packet *p, Flow *f, void *txv,
- const uint64_t idx, const uint8_t flags)
+static void PrefilterTxFilemagic(DetectEngineThreadCtx *det_ctx, const void *pectx, Packet *p,
+ Flow *f, void *txv, const uint64_t idx, const AppLayerTxData *_txd, const uint8_t flags)
{
SCEnter();
* \param txv tx to inspect
* \param pectx inspection context
*/
-static void PrefilterTxFilename(DetectEngineThreadCtx *det_ctx,
- const void *pectx,
- Packet *p, Flow *f, void *txv,
- const uint64_t idx, const uint8_t flags)
+static void PrefilterTxFilename(DetectEngineThreadCtx *det_ctx, const void *pectx, Packet *p,
+ Flow *f, void *txv, const uint64_t idx, const AppLayerTxData *_txd, const uint8_t flags)
{
SCEnter();
* \param flags STREAM_* flags including direction
*/
static void PrefilterTxHttpRequestBody(DetectEngineThreadCtx *det_ctx, const void *pectx, Packet *p,
- Flow *f, void *txv, const uint64_t idx, const uint8_t flags)
+ Flow *f, void *txv, const uint64_t idx, const AppLayerTxData *_txd, const uint8_t flags)
{
SCEnter();
* \param txv tx to inspect
* \param pectx inspection context
*/
-static void PrefilterMpmHttpHeader(DetectEngineThreadCtx *det_ctx,
- const void *pectx,
- Packet *p, Flow *f, void *txv,
- const uint64_t idx, const uint8_t flags)
+static void PrefilterMpmHttpHeader(DetectEngineThreadCtx *det_ctx, const void *pectx, Packet *p,
+ Flow *f, void *txv, const uint64_t idx, const AppLayerTxData *_txd, const uint8_t flags)
{
SCEnter();
}
}
-static void PrefilterMpmHttpTrailer(DetectEngineThreadCtx *det_ctx,
- const void *pectx,
- Packet *p, Flow *f, void *txv,
- const uint64_t idx, const uint8_t flags)
+static void PrefilterMpmHttpTrailer(DetectEngineThreadCtx *det_ctx, const void *pectx, Packet *p,
+ Flow *f, void *txv, const uint64_t idx, const AppLayerTxData *_txd, const uint8_t flags)
{
SCEnter();
((flags & STREAM_TOCLIENT) && !htud->response_has_trailers))) {
SCReturn;
}
- PrefilterMpmHttpHeader(det_ctx, pectx, p, f, txv, idx, flags);
+ PrefilterMpmHttpHeader(det_ctx, pectx, p, f, txv, idx, _txd, flags);
SCReturn;
}
* \param txv tx to inspect
* \param pectx inspection context
*/
-static void PrefilterMpmHttpHeaderRaw(DetectEngineThreadCtx *det_ctx,
- const void *pectx,
- Packet *p, Flow *f, void *txv,
- const uint64_t idx, const uint8_t flags)
+static void PrefilterMpmHttpHeaderRaw(DetectEngineThreadCtx *det_ctx, const void *pectx, Packet *p,
+ Flow *f, void *txv, const uint64_t idx, const AppLayerTxData *_txd, const uint8_t flags)
{
SCEnter();
}
}
-static void PrefilterMpmHttpTrailerRaw(DetectEngineThreadCtx *det_ctx,
- const void *pectx,
- Packet *p, Flow *f, void *txv,
- const uint64_t idx, const uint8_t flags)
+static void PrefilterMpmHttpTrailerRaw(DetectEngineThreadCtx *det_ctx, const void *pectx, Packet *p,
+ Flow *f, void *txv, const uint64_t idx, const AppLayerTxData *_txd, const uint8_t flags)
{
SCEnter();
((flags & STREAM_TOCLIENT) && !htud->response_has_trailers))) {
SCReturn;
}
- PrefilterMpmHttpHeaderRaw(det_ctx, pectx, p, f, txv, idx, flags);
+ PrefilterMpmHttpHeaderRaw(det_ctx, pectx, p, f, txv, idx, _txd, flags);
SCReturn;
}
SCReturnPtr(buffer, "InspectionBuffer");
}
-static void PrefilterTxHttp2HName(DetectEngineThreadCtx *det_ctx,
- const void *pectx,
- Packet *p, Flow *f, void *txv,
- const uint64_t idx, const uint8_t flags)
+static void PrefilterTxHttp2HName(DetectEngineThreadCtx *det_ctx, const void *pectx, Packet *p,
+ Flow *f, void *txv, const uint64_t idx, const AppLayerTxData *_txd, const uint8_t flags)
{
SCEnter();
SCReturnPtr(buffer, "InspectionBuffer");
}
-static void PrefilterTxHttp2Header(DetectEngineThreadCtx *det_ctx,
- const void *pectx,
- Packet *p, Flow *f, void *txv,
- const uint64_t idx, const uint8_t flags)
+static void PrefilterTxHttp2Header(DetectEngineThreadCtx *det_ctx, const void *pectx, Packet *p,
+ Flow *f, void *txv, const uint64_t idx, const AppLayerTxData *_txd, const uint8_t flags)
{
SCEnter();
* \param pectx inspection context
*/
static void PrefilterTxIkeVendor(DetectEngineThreadCtx *det_ctx, const void *pectx, Packet *p,
- Flow *f, void *txv, const uint64_t idx, const uint8_t flags)
+ Flow *f, void *txv, const uint64_t idx, const AppLayerTxData *_txd, const uint8_t flags)
{
SCEnter();
* \param txv tx to inspect
* \param pectx inspection context
*/
-static void PrefilterTxKrb5CName(DetectEngineThreadCtx *det_ctx,
- const void *pectx,
- Packet *p, Flow *f, void *txv,
- const uint64_t idx, const uint8_t flags)
+static void PrefilterTxKrb5CName(DetectEngineThreadCtx *det_ctx, const void *pectx, Packet *p,
+ Flow *f, void *txv, const uint64_t idx, const AppLayerTxData *_txd, const uint8_t flags)
{
SCEnter();
* \param txv tx to inspect
* \param pectx inspection context
*/
-static void PrefilterTxKrb5SName(DetectEngineThreadCtx *det_ctx,
- const void *pectx,
- Packet *p, Flow *f, void *txv,
- const uint64_t idx, const uint8_t flags)
+static void PrefilterTxKrb5SName(DetectEngineThreadCtx *det_ctx, const void *pectx, Packet *p,
+ Flow *f, void *txv, const uint64_t idx, const AppLayerTxData *_txd, const uint8_t flags)
{
SCEnter();
* \param txv tx to inspect
* \param pectx inspection context
*/
-static void PrefilterTxMQTTSubscribeTopic(DetectEngineThreadCtx *det_ctx,
- const void *pectx,
- Packet *p, Flow *f, void *txv,
- const uint64_t idx, const uint8_t flags)
+static void PrefilterTxMQTTSubscribeTopic(DetectEngineThreadCtx *det_ctx, const void *pectx,
+ Packet *p, Flow *f, void *txv, const uint64_t idx, const AppLayerTxData *_txd,
+ const uint8_t flags)
{
SCEnter();
* \param txv tx to inspect
* \param pectx inspection context
*/
-static void PrefilterTxMQTTUnsubscribeTopic(DetectEngineThreadCtx *det_ctx,
- const void *pectx,
- Packet *p, Flow *f, void *txv,
- const uint64_t idx, const uint8_t flags)
+static void PrefilterTxMQTTUnsubscribeTopic(DetectEngineThreadCtx *det_ctx, const void *pectx,
+ Packet *p, Flow *f, void *txv, const uint64_t idx, const AppLayerTxData *_txd,
+ const uint8_t flags)
{
SCEnter();
* \param pectx inspection context
*/
static void PrefilterTxQuicHash(DetectEngineThreadCtx *det_ctx, const void *pectx, Packet *p,
- Flow *f, void *txv, const uint64_t idx, const uint8_t flags)
+ Flow *f, void *txv, const uint64_t idx, const AppLayerTxData *_txd, const uint8_t flags)
{
SCEnter();
* \param pectx inspection context
*/
static void PrefilterTxQuicString(DetectEngineThreadCtx *det_ctx, const void *pectx, Packet *p,
- Flow *f, void *txv, const uint64_t idx, const uint8_t flags)
+ Flow *f, void *txv, const uint64_t idx, const AppLayerTxData *_txd, const uint8_t flags)
{
SCEnter();
return DETECT_ENGINE_INSPECT_SIG_NO_MATCH;
}
-static void PrefilterTxTlsCerts(DetectEngineThreadCtx *det_ctx,
- const void *pectx, Packet *p, Flow *f, void *txv,
- const uint64_t idx, const uint8_t flags)
+static void PrefilterTxTlsCerts(DetectEngineThreadCtx *det_ctx, const void *pectx, Packet *p,
+ Flow *f, void *txv, const uint64_t idx, const AppLayerTxData *_txd, const uint8_t flags)
{
SCEnter();
typedef void (*PrefilterFrameFn)(DetectEngineThreadCtx *det_ctx, const void *pectx, Packet *p,
const struct Frames *frames, const struct Frame *frame, const uint32_t idx);
+typedef struct AppLayerTxData AppLayerTxData;
+typedef void (*PrefilterTxFn)(DetectEngineThreadCtx *det_ctx, const void *pectx, Packet *p, Flow *f,
+ void *tx, const uint64_t tx_id, const AppLayerTxData *tx_data, const uint8_t flags);
+
typedef struct PrefilterEngineList_ {
uint16_t id;
void *pectx;
void (*Prefilter)(DetectEngineThreadCtx *det_ctx, Packet *p, const void *pectx);
- void (*PrefilterTx)(DetectEngineThreadCtx *det_ctx, const void *pectx,
- Packet *p, Flow *f, void *tx,
- const uint64_t idx, const uint8_t flags);
+ PrefilterTxFn PrefilterTx;
PrefilterFrameFn PrefilterFrame;
struct PrefilterEngineList_ *next;
union {
void (*Prefilter)(DetectEngineThreadCtx *det_ctx, Packet *p, const void *pectx);
- void (*PrefilterTx)(DetectEngineThreadCtx *det_ctx, const void *pectx,
- Packet *p, Flow *f, void *tx,
- const uint64_t idx, const uint8_t flags);
+ PrefilterTxFn PrefilterTx;
PrefilterFrameFn PrefilterFrame;
} cb;