From 20bc08a72271a6b7237efd663765c872e6d8125e Mon Sep 17 00:00:00 2001 From: Jason Ish Date: Tue, 19 Nov 2019 13:42:24 -0600 Subject: [PATCH] app-layer: add tx detect functions to register struct --- src/app-layer-register.c | 5 +++++ src/app-layer-register.h | 3 +++ 2 files changed, 8 insertions(+) diff --git a/src/app-layer-register.c b/src/app-layer-register.c index 4bbaea2d8c2..3fd73c46d7f 100644 --- a/src/app-layer-register.c +++ b/src/app-layer-register.c @@ -171,6 +171,11 @@ int AppLayerRegisterParser(const struct AppLayerParser *p, AppProto alproto) p->GetTxIterator); } + if (p->SetTxDetectFlags && p->GetTxDetectFlags) { + AppLayerParserRegisterDetectFlagsFuncs(p->ip_proto, alproto, + p->GetTxDetectFlags, p->SetTxDetectFlags); + } + return 0; } diff --git a/src/app-layer-register.h b/src/app-layer-register.h index 70340edd123..fbba2f3303b 100644 --- a/src/app-layer-register.h +++ b/src/app-layer-register.h @@ -71,6 +71,9 @@ typedef struct AppLayerParser { AppLayerGetTxIterTuple (*GetTxIterator)(const uint8_t ipproto, const AppProto alproto, void *alstate, uint64_t min_tx_id, uint64_t max_tx_id, AppLayerGetTxIterState *istate); + + void (*SetTxDetectFlags)(void *, uint8_t, uint64_t); + uint64_t (*GetTxDetectFlags)(void *, uint8_t); } AppLayerParser; /**