]> git.ipfire.org Git - people/ms/suricata.git/commitdiff
app-layer-register: add GetTxIterator
authorJason Ish <ish@unx.ca>
Thu, 31 May 2018 22:34:23 +0000 (16:34 -0600)
committerJason Ish <ish@unx.ca>
Fri, 15 Jun 2018 21:28:30 +0000 (15:28 -0600)
Add a field to set the GetTxIterator function to the AppLayerParser
registration struct.

src/app-layer-register.c
src/app-layer-register.h

index 2f21709e3b481aab9f45f0b875183e97e2067196..52bb46602dd93294ea9ae1cd0e1824aa67d74b75 100644 (file)
@@ -162,6 +162,11 @@ int AppLayerRegisterParser(const struct AppLayerParser *p, AppProto alproto)
                 p->StateGetFiles);
     }
 
+    if (p->GetTxIterator) {
+        AppLayerParserRegisterGetTxIterator(p->ip_proto, alproto,
+                p->GetTxIterator);
+    }
+
     return 0;
 }
 
index 872dca7a920e8aed5c3d608aae928971e517aee6..c7bb7d4e39f9af4910c7bf6ce524ccc9a85b0589 100644 (file)
@@ -65,6 +65,10 @@ typedef struct AppLayerParser {
     int (*SetTxMpmIDs)(void *tx, uint64_t);
 
     FileContainer *(*StateGetFiles)(void *, uint8_t);
+
+    AppLayerGetTxIterTuple (*GetTxIterator)(const uint8_t ipproto,
+            const AppProto alproto, void *alstate, uint64_t min_tx_id,
+            uint64_t max_tx_id, AppLayerGetTxIterState *istate);
 } AppLayerParser;
 
 /**