This patch adds a `tx_cnt` field to `netflow` events to give some
context about the underlying protocol activity.
Ticket: #7635
},
"wrong_thread": {
"type": "boolean"
+ },
+ "tx_cnt": {
+ "type": "integer"
}
},
"additionalProperties": false
#include "detect.h"
#include "pkt-var.h"
#include "conf.h"
+#include "app-layer-parser.h"
#include "threads.h"
#include "threadvars.h"
SCJbClose(jb); /* close array */
}
+ if (f->alstate) {
+ uint64_t tx_id = AppLayerParserGetTxCnt(f, f->alstate);
+ if (tx_id) {
+ SCJbSetUint(jb, "tx_cnt", tx_id);
+ }
+ }
+
/* Close flow. */
SCJbClose(jb);