]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
flow-log: log pkts, bytes
authorVictor Julien <victor@inliniac.net>
Fri, 2 May 2014 06:25:22 +0000 (08:25 +0200)
committerVictor Julien <victor@inliniac.net>
Mon, 28 Jul 2014 13:47:44 +0000 (15:47 +0200)
Only in DEBUG currently.

src/output-json-flow.c

index 495f7849216e2f1defb4e855cb65ae95a72c5952..7416c5f2ef96f04e48d24913393235565b13147c 100644 (file)
@@ -181,6 +181,18 @@ static void JsonFlowLogJSON(JsonFlowLogThread *aft, json_t *js, Flow *f)
 
     json_object_set_new(hjs, "app_proto", json_string(AppProtoToString(f->alproto)));
 
+    /* debug until we move this out of the debug wrapper in the flow code */
+#ifdef DEBUG
+    json_object_set_new(hjs, "pkts_toserver",
+            json_integer(f->todstpktcnt));
+    json_object_set_new(hjs, "pkts_toclient",
+            json_integer(f->tosrcpktcnt));
+    json_object_set_new(hjs, "bytes",
+            json_integer(f->bytecnt));
+
+
+#endif
+
     json_object_set_new(js, "flow", hjs);
 }