#include "detect-engine.h"
#include "detect-engine-mpm.h"
#include "detect-reference.h"
+#include "app-layer-parser.h"
#include "util-classification-config.h"
#include "util-syslog.h"
#include "alert-json.h"
-/*#undef HAVE_LIBJANSSON for testing without messing with config */
#ifndef HAVE_LIBJANSSON
+
/** Handle the case where no JSON support is compiled in.
*
*/
tmm_modules[TMM_OUTPUTJSON].Func = AlertJson;
tmm_modules[TMM_OUTPUTJSON].ThreadDeinit = AlertJsonThreadDeinit;
tmm_modules[TMM_OUTPUTJSON].RegisterTests = AlertJsonRegisterTests;
-
- /* enable the logger for the app layer */
- AppLayerRegisterLogger(ALPROTO_DNS_UDP);
- AppLayerRegisterLogger(ALPROTO_DNS_TCP);
-
- AppLayerRegisterLogger(ALPROTO_HTTP);
+}
OutputCtx *AlertJsonInitCtx(ConfNode *conf)
{
return TM_ECODE_FAILED;
}
-void AlertJsonRegisterTests (void) {
+void AlertJsonRegisterTests (void)
+{
}
#else /* implied we do have JSON support */
tmm_modules[TMM_OUTPUTJSON].cap_flags = 0;
OutputRegisterModule(MODULE_NAME, "eve-log", AlertJsonInitCtx);
+
+ /* enable the logger for the app layer */
+ AppLayerRegisterLogger(ALPROTO_DNS_UDP);
+ AppLayerRegisterLogger(ALPROTO_DNS_TCP);
+ AppLayerRegisterLogger(ALPROTO_HTTP);
+ AppLayerRegisterLogger(ALPROTO_TLS);
}
/* Default Sensor ID value */
#ifdef UNITTESTS
-
#endif /* UNITTESTS */
}
#ifndef __ALERT_JSON_H__
#define __ALERT_JSON_H__
+void TmModuleAlertJsonRegister (void);
+
+#ifdef HAVE_LIBJANSSON
+
json_t *CreateJSONHeader(Packet *p, int direction_sensative);
TmEcode OutputJSON(json_t *js, void *data, uint64_t *count);
-void TmModuleAlertJsonRegister (void);
void TmModuleAlertJsonIPv4Register (void);
void TmModuleAlertJsonPv6Register (void);
OutputCtx *AlertJsonInitCtx(ConfNode *);
OutputCtx *tls_ctx;
} AlertJsonThread;
+#endif /* HAVE_LIBJANSSON */
+
#endif /* __ALERT_JSON_H__ */