]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
stats: export StatsToJSON
authorVictor Julien <victor@inliniac.net>
Wed, 17 Feb 2016 19:25:47 +0000 (20:25 +0100)
committerVictor Julien <victor@inliniac.net>
Mon, 22 Feb 2016 12:03:00 +0000 (13:03 +0100)
src/output-json-stats.c
src/output-json-stats.h

index 68701dd9d95f19b14d0a34e01b2a00872c57f9bb..a94a5996ae93405e08cc6b82810dfde1b67eebb8 100644 (file)
 
 #ifdef HAVE_LIBJANSSON
 
-#define JSON_STATS_TOTALS  (1<<0)
-#define JSON_STATS_THREADS (1<<1)
-#define JSON_STATS_DELTAS  (1<<2)
-
 typedef struct OutputStatsCtx_ {
     LogFileCtx *file_ctx;
     uint32_t flags; /** Store mode */
index 9ad1d9b8164adfc9a8288e63163113073b3238d6..ab1e6b55c014a5980c28c41d0865a6dcf6a7ee99 100644 (file)
 #ifndef __OUTPUT_JSON_COUNTERS_H__
 #define __OUTPUT_JSON_COUNTERS_H__
 
+#include "output-stats.h"
+
+#define JSON_STATS_TOTALS  (1<<0)
+#define JSON_STATS_THREADS (1<<1)
+#define JSON_STATS_DELTAS  (1<<2)
+
+#ifdef HAVE_LIBJANSSON
+json_t *StatsToJSON(const StatsTable *st, uint8_t flags);
+#endif
 void TmModuleJsonStatsLogRegister (void);
 
 #endif /* __OUTPUT_JSON_COUNTERS_H__ */