From: Victor Julien Date: Thu, 18 Feb 2016 10:58:07 +0000 (+0100) Subject: jansson: include in suricata-common.h X-Git-Tag: suricata-3.0.1RC1~132 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c446abeb471d8be516bf11f0106797526b7122b3;p=thirdparty%2Fsuricata.git jansson: include in suricata-common.h --- diff --git a/src/counters.h b/src/counters.h index 023d15aac7..39fa0bc7f0 100644 --- a/src/counters.h +++ b/src/counters.h @@ -141,9 +141,8 @@ void StatsThreadCleanup(struct ThreadVars_ *); } while (0) #ifdef BUILD_UNIX_SOCKET -#include TmEcode StatsOutputCounterSocket(json_t *cmd, - json_t *answer, void *data); + json_t *answer, void *data); #endif #endif /* __COUNTERS_H__ */ diff --git a/src/output-json-alert.c b/src/output-json-alert.c index f7281f49a4..8d09ed759b 100644 --- a/src/output-json-alert.c +++ b/src/output-json-alert.c @@ -69,7 +69,6 @@ #define MODULE_NAME "JsonAlertLog" #ifdef HAVE_LIBJANSSON -#include #define LOG_JSON_PAYLOAD 1 #define LOG_JSON_PACKET 2 diff --git a/src/output-json-alert.h b/src/output-json-alert.h index c981574f90..a10a316d20 100644 --- a/src/output-json-alert.h +++ b/src/output-json-alert.h @@ -29,7 +29,6 @@ void TmModuleJsonAlertLogRegister (void); #ifdef HAVE_LIBJANSSON -#include void AlertJsonHeader(const Packet *p, const PacketAlert *pa, json_t *js); #endif /* HAVE_LIBJANSSON */ diff --git a/src/output-json-dns.c b/src/output-json-dns.c index 7165d80e13..288142cd11 100644 --- a/src/output-json-dns.c +++ b/src/output-json-dns.c @@ -51,7 +51,6 @@ #include "output-json.h" #ifdef HAVE_LIBJANSSON -#include /* we can do query logging as well, but it's disabled for now as the * TX id handling doesn't expect it */ diff --git a/src/output-json-drop.c b/src/output-json-drop.c index 234332c898..f82c9c00db 100644 --- a/src/output-json-drop.c +++ b/src/output-json-drop.c @@ -59,7 +59,6 @@ #define MODULE_NAME "JsonDropLog" #ifdef HAVE_LIBJANSSON -#include #define LOG_DROP_ALERTS 1 diff --git a/src/output-json-email-common.c b/src/output-json-email-common.c index 88cd3acf4b..f91f7f3073 100644 --- a/src/output-json-email-common.c +++ b/src/output-json-email-common.c @@ -54,7 +54,6 @@ #include "output-json-email-common.h" #ifdef HAVE_LIBJANSSON -#include #define LOG_EMAIL_DEFAULT 0 #define LOG_EMAIL_EXTENDED (1<<0) diff --git a/src/output-json-file.c b/src/output-json-file.c index 12e416ac73..0e1db37465 100644 --- a/src/output-json-file.c +++ b/src/output-json-file.c @@ -65,7 +65,6 @@ #include "stream-tcp-reassemble.h" #ifdef HAVE_LIBJANSSON -#include typedef struct OutputFileCtx_ { LogFileCtx *file_ctx; diff --git a/src/output-json-flow.c b/src/output-json-flow.c index 372bafa44c..b59cf4f63b 100644 --- a/src/output-json-flow.c +++ b/src/output-json-flow.c @@ -49,7 +49,6 @@ #include "stream-tcp-private.h" #ifdef HAVE_LIBJANSSON -#include typedef struct LogJsonFileCtx_ { LogFileCtx *file_ctx; diff --git a/src/output-json-http.c b/src/output-json-http.c index ddd5dfd681..7e17b4dd60 100644 --- a/src/output-json-http.c +++ b/src/output-json-http.c @@ -50,7 +50,6 @@ #include "output-json.h" #ifdef HAVE_LIBJANSSON -#include typedef struct LogHttpFileCtx_ { LogFileCtx *file_ctx; diff --git a/src/output-json-http.h b/src/output-json-http.h index bcaa57aa94..0c886f3dd5 100644 --- a/src/output-json-http.h +++ b/src/output-json-http.h @@ -27,7 +27,6 @@ void TmModuleJsonHttpLogRegister (void); #ifdef HAVE_LIBJANSSON -#include 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); diff --git a/src/output-json-netflow.c b/src/output-json-netflow.c index 2adb368894..a55bc8cf4e 100644 --- a/src/output-json-netflow.c +++ b/src/output-json-netflow.c @@ -49,7 +49,6 @@ #include "stream-tcp-private.h" #ifdef HAVE_LIBJANSSON -#include typedef struct LogJsonFileCtx_ { LogFileCtx *file_ctx; diff --git a/src/output-json-smtp.c b/src/output-json-smtp.c index 364d4ff431..b4b0bfdda0 100644 --- a/src/output-json-smtp.c +++ b/src/output-json-smtp.c @@ -52,7 +52,6 @@ #include "output-json-email-common.h" #ifdef HAVE_LIBJANSSON -#include static json_t *JsonSmtpDataLogger(const Flow *f, void *state, void *vtx, uint64_t tx_id) { diff --git a/src/output-json-smtp.h b/src/output-json-smtp.h index 0c60f2d489..2f79d99201 100644 --- a/src/output-json-smtp.h +++ b/src/output-json-smtp.h @@ -26,7 +26,6 @@ void TmModuleJsonSmtpLogRegister (void); #ifdef HAVE_LIBJANSSON -#include json_t *JsonSMTPAddMetadata(const Flow *f, uint64_t tx_id); #endif diff --git a/src/output-json-ssh.c b/src/output-json-ssh.c index 55e77a7ead..4a5542a9a1 100644 --- a/src/output-json-ssh.c +++ b/src/output-json-ssh.c @@ -50,7 +50,6 @@ #include "output-json.h" #ifdef HAVE_LIBJANSSON -#include #define MODULE_NAME "LogSshLog" diff --git a/src/output-json-ssh.h b/src/output-json-ssh.h index 28667ca70e..5d0752bf2a 100644 --- a/src/output-json-ssh.h +++ b/src/output-json-ssh.h @@ -28,7 +28,6 @@ void TmModuleJsonSshLogRegister (void); #ifdef HAVE_LIBJANSSON #include "app-layer-ssh.h" -#include void JsonSshLogJSON(json_t *js, SshState *tx); #endif diff --git a/src/output-json-stats.c b/src/output-json-stats.c index 3fd37ad3d0..f17593235d 100644 --- a/src/output-json-stats.c +++ b/src/output-json-stats.c @@ -49,7 +49,6 @@ #define MODULE_NAME "JsonStatsLog" #ifdef HAVE_LIBJANSSON -#include #define JSON_STATS_TOTALS (1<<0) #define JSON_STATS_THREADS (1<<1) diff --git a/src/output-json-template.c b/src/output-json-template.c index 8a00d88beb..15bea7c513 100644 --- a/src/output-json-template.c +++ b/src/output-json-template.c @@ -39,7 +39,6 @@ #include "app-layer-template.h" #ifdef HAVE_LIBJANSSON -#include typedef struct LogTemplateFileCtx_ { LogFileCtx *file_ctx; diff --git a/src/output-json-tls.c b/src/output-json-tls.c index 3cedfd203a..cd88f1e580 100644 --- a/src/output-json-tls.c +++ b/src/output-json-tls.c @@ -50,7 +50,6 @@ #include "output-json.h" #ifdef HAVE_LIBJANSSON -#include SC_ATOMIC_DECLARE(unsigned int, cert_id); diff --git a/src/output-json-tls.h b/src/output-json-tls.h index d9d1142b93..f330ad898a 100644 --- a/src/output-json-tls.h +++ b/src/output-json-tls.h @@ -28,7 +28,6 @@ void TmModuleJsonTlsLogRegister (void); #ifdef HAVE_LIBJANSSON #include "app-layer-ssl.h" -#include void JsonTlsLogJSONBasic(json_t *js, SSLState *ssl_state); void JsonTlsLogJSONExtended(json_t *js, SSLState *ssl_state); diff --git a/src/output-json.c b/src/output-json.c index 3a24fcecfb..5e048fe4e7 100644 --- a/src/output-json.c +++ b/src/output-json.c @@ -109,8 +109,6 @@ void OutputJsonRegisterTests (void) #else /* implied we do have JSON support */ -#include - #define DEFAULT_LOG_FILENAME "eve.json" #define DEFAULT_ALERT_SYSLOG_FACILITY_STR "local0" #define DEFAULT_ALERT_SYSLOG_FACILITY LOG_LOCAL0 diff --git a/src/output-json.h b/src/output-json.h index 752f14992d..edfae89201 100644 --- a/src/output-json.h +++ b/src/output-json.h @@ -24,15 +24,14 @@ #ifndef __OUTPUT_JSON_H__ #define __OUTPUT_JSON_H__ -void TmModuleOutputJsonRegister (void); - -#ifdef HAVE_LIBJANSSON - -#include #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); diff --git a/src/suricata-common.h b/src/suricata-common.h index 4d60f78781..df3ef79bee 100644 --- a/src/suricata-common.h +++ b/src/suricata-common.h @@ -210,6 +210,10 @@ #endif #endif /* !__CYGWIN__ */ +#ifdef HAVE_LIBJANSSON +#include +#endif + #if CPPCHECK==1 #define BUG_ON(x) if (((x))) exit(1) #else