From: Jason Ish Date: Tue, 19 Nov 2019 19:42:24 +0000 (-0600) Subject: app-layer: add tx detect functions to register struct X-Git-Tag: suricata-5.0.1~72 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=20bc08a72271a6b7237efd663765c872e6d8125e;p=thirdparty%2Fsuricata.git app-layer: add tx detect functions to register struct --- diff --git a/src/app-layer-register.c b/src/app-layer-register.c index 4bbaea2d8c..3fd73c46d7 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 70340edd12..fbba2f3303 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; /**