]> git.ipfire.org Git - people/ms/suricata.git/commitdiff
jansson: include in suricata-common.h
authorVictor Julien <victor@inliniac.net>
Thu, 18 Feb 2016 10:58:07 +0000 (11:58 +0100)
committerVictor Julien <victor@inliniac.net>
Mon, 22 Feb 2016 12:02:59 +0000 (13:02 +0100)
22 files changed:
src/counters.h
src/output-json-alert.c
src/output-json-alert.h
src/output-json-dns.c
src/output-json-drop.c
src/output-json-email-common.c
src/output-json-file.c
src/output-json-flow.c
src/output-json-http.c
src/output-json-http.h
src/output-json-netflow.c
src/output-json-smtp.c
src/output-json-smtp.h
src/output-json-ssh.c
src/output-json-ssh.h
src/output-json-stats.c
src/output-json-template.c
src/output-json-tls.c
src/output-json-tls.h
src/output-json.c
src/output-json.h
src/suricata-common.h

index 023d15aac73814ab1983fba9aa031f1d1c7ae38a..39fa0bc7f03f73dea8587da71b0f7161cc5faae3 100644 (file)
@@ -141,9 +141,8 @@ void StatsThreadCleanup(struct ThreadVars_ *);
     } while (0)
 
 #ifdef BUILD_UNIX_SOCKET
-#include <jansson.h>
 TmEcode StatsOutputCounterSocket(json_t *cmd,
-                               json_t *answer, void *data);
+                                 json_t *answer, void *data);
 #endif
 
 #endif /* __COUNTERS_H__ */
index f7281f49a41ee606077ff0e350f2dd109e1bfc62..8d09ed759b5231b3ca3c0090fcaa5c277f1b69af 100644 (file)
@@ -69,7 +69,6 @@
 #define MODULE_NAME "JsonAlertLog"
 
 #ifdef HAVE_LIBJANSSON
-#include <jansson.h>
 
 #define LOG_JSON_PAYLOAD 1
 #define LOG_JSON_PACKET 2
index c981574f90dde8606265180d74f2ffdbdda50750..a10a316d20b3a1375313bdbffd078050d55336f2 100644 (file)
@@ -29,7 +29,6 @@
 
 void TmModuleJsonAlertLogRegister (void);
 #ifdef HAVE_LIBJANSSON
-#include <jansson.h>
 void AlertJsonHeader(const Packet *p, const PacketAlert *pa, json_t *js);
 #endif /* HAVE_LIBJANSSON */
 
index 7165d80e136bd8927fd2e545c4dd38dd939c3c58..288142cd11913feb6f2b671a600e451d200fe80a 100644 (file)
@@ -51,7 +51,6 @@
 #include "output-json.h"
 
 #ifdef HAVE_LIBJANSSON
-#include <jansson.h>
 
 /* we can do query logging as well, but it's disabled for now as the
  * TX id handling doesn't expect it */
index 234332c8983828859a9339589427e3a24ec4bbf9..f82c9c00db3d1895d08077da3f0570890b3c8e64 100644 (file)
@@ -59,7 +59,6 @@
 #define MODULE_NAME "JsonDropLog"
 
 #ifdef HAVE_LIBJANSSON
-#include <jansson.h>
 
 #define LOG_DROP_ALERTS 1
 
index 88cd3acf4b2c37439447f88d8f093acb770426df..f91f7f3073880979c858080b94576c5c5a7c6eb3 100644 (file)
@@ -54,7 +54,6 @@
 #include "output-json-email-common.h"
 
 #ifdef HAVE_LIBJANSSON
-#include <jansson.h>
 
 #define LOG_EMAIL_DEFAULT       0
 #define LOG_EMAIL_EXTENDED      (1<<0)
index 12e416ac73230a64fbc3dee8da540e2d3bb1799b..0e1db3746505df8d2c49e5622fb7084e907cc93b 100644 (file)
@@ -65,7 +65,6 @@
 #include "stream-tcp-reassemble.h"
 
 #ifdef HAVE_LIBJANSSON
-#include <jansson.h>
 
 typedef struct OutputFileCtx_ {
     LogFileCtx *file_ctx;
index 372bafa44cfeefd5024e52812c25b511a94e4082..b59cf4f63b467ae1cd983c8fc4d48cc529cddc86 100644 (file)
@@ -49,7 +49,6 @@
 #include "stream-tcp-private.h"
 
 #ifdef HAVE_LIBJANSSON
-#include <jansson.h>
 
 typedef struct LogJsonFileCtx_ {
     LogFileCtx *file_ctx;
index ddd5dfd681336d3f2933b9a6f036ac3fceefefd2..7e17b4dd600e5f21dc30dfbccd0136ebca94f6fe 100644 (file)
@@ -50,7 +50,6 @@
 #include "output-json.h"
 
 #ifdef HAVE_LIBJANSSON
-#include <jansson.h>
 
 typedef struct LogHttpFileCtx_ {
     LogFileCtx *file_ctx;
index bcaa57aa9476e5e0c8fcd7dc9b10d2300a1f8e93..0c886f3dd56dd944bc6502d7337b2c364e658ac0 100644 (file)
@@ -27,7 +27,6 @@
 void TmModuleJsonHttpLogRegister (void);
 
 #ifdef HAVE_LIBJANSSON
-#include <jansson.h>
 void JsonHttpLogJSONBasic(json_t *js, htp_tx_t *tx);
 void JsonHttpLogJSONExtended(json_t *js, htp_tx_t *tx);
 json_t *JsonHttpAddMetadata(const Flow *f, uint64_t tx_id);
index 2adb3688946f21b8145c26dcb18a09a5044706e3..a55bc8cf4eaf8c48f24c15f20a97a8bab8277a03 100644 (file)
@@ -49,7 +49,6 @@
 #include "stream-tcp-private.h"
 
 #ifdef HAVE_LIBJANSSON
-#include <jansson.h>
 
 typedef struct LogJsonFileCtx_ {
     LogFileCtx *file_ctx;
index 364d4ff4310f97a19736cff26c723dab44fbe397..b4b0bfdda01b6e8de5047015411ab7fcbfbe8a29 100644 (file)
@@ -52,7 +52,6 @@
 #include "output-json-email-common.h"
 
 #ifdef HAVE_LIBJANSSON
-#include <jansson.h>
 
 static json_t *JsonSmtpDataLogger(const Flow *f, void *state, void *vtx, uint64_t tx_id)
 {
index 0c60f2d4891acd6acfbe0278871975c50bdf88d6..2f79d992011a4477ebc0ca5afd862d785fbba16a 100644 (file)
@@ -26,7 +26,6 @@
 
 void TmModuleJsonSmtpLogRegister (void);
 #ifdef HAVE_LIBJANSSON
-#include <jansson.h>
 json_t *JsonSMTPAddMetadata(const Flow *f, uint64_t tx_id);
 #endif
 
index 55e77a7ead0234a2046ade556c5014943dd9ab2a..4a5542a9a12eb012d8dd8b1c48f748cf63a1380a 100644 (file)
@@ -50,7 +50,6 @@
 #include "output-json.h"
 
 #ifdef HAVE_LIBJANSSON
-#include <jansson.h>
 
 #define MODULE_NAME "LogSshLog"
 
index 28667ca70ea8ad36d2526710393b5da022f4fd9f..5d0752bf2a53299575eda0ce0d25bb3a69e041cc 100644 (file)
@@ -28,7 +28,6 @@ void TmModuleJsonSshLogRegister (void);
 
 #ifdef HAVE_LIBJANSSON
 #include "app-layer-ssh.h"
-#include <jansson.h>
 
 void JsonSshLogJSON(json_t *js, SshState *tx);
 #endif
index 3fd37ad3d0b4c42bdb0c6b9cf0a020c9a0e1adf5..f17593235d5e89d372cf6bc85b0381124a79746b 100644 (file)
@@ -49,7 +49,6 @@
 #define MODULE_NAME "JsonStatsLog"
 
 #ifdef HAVE_LIBJANSSON
-#include <jansson.h>
 
 #define JSON_STATS_TOTALS  (1<<0)
 #define JSON_STATS_THREADS (1<<1)
index 8a00d88bebe7251738964c1c741e5121c4633df8..15bea7c513718754148c1328bfbcd068886acdae 100644 (file)
@@ -39,7 +39,6 @@
 #include "app-layer-template.h"
 
 #ifdef HAVE_LIBJANSSON
-#include <jansson.h>
 
 typedef struct LogTemplateFileCtx_ {
     LogFileCtx *file_ctx;
index 3cedfd203a6f17fbb97fb160642bbdd0448dea42..cd88f1e580079d8f5c6f563d922692639ce94294 100644 (file)
@@ -50,7 +50,6 @@
 #include "output-json.h"
 
 #ifdef HAVE_LIBJANSSON
-#include <jansson.h>
 
 SC_ATOMIC_DECLARE(unsigned int, cert_id);
 
index d9d1142b93f6b3c1caeadde64e32f4770ddd000a..f330ad898aad2d138776493b7043ab4ce35527e7 100644 (file)
@@ -28,7 +28,6 @@ void TmModuleJsonTlsLogRegister (void);
 
 #ifdef HAVE_LIBJANSSON
 #include "app-layer-ssl.h"
-#include <jansson.h>
 
 void JsonTlsLogJSONBasic(json_t *js, SSLState *ssl_state);
 void JsonTlsLogJSONExtended(json_t *js, SSLState *ssl_state);
index 3a24fcecfb187889c6b5947acd80cd38d621cb5c..5e048fe4e7b97f1250f6ad5248aba7bb7d86033b 100644 (file)
@@ -109,8 +109,6 @@ void OutputJsonRegisterTests (void)
 
 #else /* implied we do have JSON support */
 
-#include <jansson.h>
-
 #define DEFAULT_LOG_FILENAME "eve.json"
 #define DEFAULT_ALERT_SYSLOG_FACILITY_STR       "local0"
 #define DEFAULT_ALERT_SYSLOG_FACILITY           LOG_LOCAL0
index 752f14992da019908935020dca2cd1bf99411d6f..edfae89201291ed15b337364e898f080db0ab002 100644 (file)
 #ifndef __OUTPUT_JSON_H__
 #define __OUTPUT_JSON_H__
 
-void TmModuleOutputJsonRegister (void);
-
-#ifdef HAVE_LIBJANSSON
-
-#include <jansson.h>
 #include "suricata-common.h"
 #include "util-buffer.h"
 #include "util-logopenfile.h"
 
+void TmModuleOutputJsonRegister (void);
+
+#ifdef HAVE_LIBJANSSON
+
 void CreateJSONFlowId(json_t *js, const Flow *f);
 void JsonTcpFlags(uint8_t flags, json_t *js);
 json_t *CreateJSONHeader(Packet *p, int direction_sensative, char *event_type);
index 4d60f787818391780ee6053a533a229c51cace5a..df3ef79bee885ffa07a9f9e26dc2f1c713de4a60 100644 (file)
 #endif
 #endif /* !__CYGWIN__ */
 
+#ifdef HAVE_LIBJANSSON
+#include <jansson.h>
+#endif
+
 #if CPPCHECK==1
 #define BUG_ON(x) if (((x))) exit(1)
 #else