|
|
|
|
@ -258,34 +258,22 @@ static TmEcode JsonSmtpLogThreadDeinit(ThreadVars *t, void *data)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void TmModuleJsonSmtpLogRegister (void) {
|
|
|
|
|
tmm_modules[TMM_JSONSMTPLOG].name = "JsonSmtpLog";
|
|
|
|
|
tmm_modules[TMM_JSONSMTPLOG].ThreadInit = JsonSmtpLogThreadInit;
|
|
|
|
|
tmm_modules[TMM_JSONSMTPLOG].ThreadDeinit = JsonSmtpLogThreadDeinit;
|
|
|
|
|
tmm_modules[TMM_JSONSMTPLOG].RegisterTests = NULL;
|
|
|
|
|
tmm_modules[TMM_JSONSMTPLOG].cap_flags = 0;
|
|
|
|
|
tmm_modules[TMM_JSONSMTPLOG].flags = TM_FLAG_LOGAPI_TM;
|
|
|
|
|
|
|
|
|
|
/* register as separate module */
|
|
|
|
|
OutputRegisterTxModule("JsonSmtpLog", "smtp-json-log", OutputSmtpLogInit,
|
|
|
|
|
ALPROTO_SMTP, JsonSmtpLogger, NULL, NULL, NULL);
|
|
|
|
|
ALPROTO_SMTP, JsonSmtpLogger, JsonSmtpLogThreadInit,
|
|
|
|
|
JsonSmtpLogThreadDeinit, NULL);
|
|
|
|
|
|
|
|
|
|
/* also register as child of eve-log */
|
|
|
|
|
OutputRegisterTxSubModule("eve-log", "JsonSmtpLog", "eve-log.smtp",
|
|
|
|
|
OutputSmtpLogInitSub, ALPROTO_SMTP, JsonSmtpLogger, NULL, NULL, NULL);
|
|
|
|
|
OutputSmtpLogInitSub, ALPROTO_SMTP, JsonSmtpLogger,
|
|
|
|
|
JsonSmtpLogThreadInit, JsonSmtpLogThreadDeinit, NULL);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#else
|
|
|
|
|
|
|
|
|
|
static TmEcode OutputJsonThreadInit(ThreadVars *t, void *initdata, void **data)
|
|
|
|
|
{
|
|
|
|
|
SCLogInfo("Can't init JSON output - JSON support was disabled during build.");
|
|
|
|
|
return TM_ECODE_FAILED;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void TmModuleJsonSmtpLogRegister (void)
|
|
|
|
|
{
|
|
|
|
|
tmm_modules[TMM_JSONSMTPLOG].name = "JsonSmtpLog";
|
|
|
|
|
tmm_modules[TMM_JSONSMTPLOG].ThreadInit = OutputJsonThreadInit;
|
|
|
|
|
SCLogInfo("Can't register JSON output - JSON support was disabled during build.");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|