|
|
|
@ -50,6 +50,7 @@ typedef struct LogDHCPFileCtx_ {
|
|
|
|
LogFileCtx *file_ctx;
|
|
|
|
LogFileCtx *file_ctx;
|
|
|
|
uint32_t flags;
|
|
|
|
uint32_t flags;
|
|
|
|
void *rs_logger;
|
|
|
|
void *rs_logger;
|
|
|
|
|
|
|
|
OutputJsonCommonSettings cfg;
|
|
|
|
} LogDHCPFileCtx;
|
|
|
|
} LogDHCPFileCtx;
|
|
|
|
|
|
|
|
|
|
|
|
typedef struct LogDHCPLogThread_ {
|
|
|
|
typedef struct LogDHCPLogThread_ {
|
|
|
|
@ -73,6 +74,8 @@ static int JsonDHCPLogger(ThreadVars *tv, void *thread_data,
|
|
|
|
return TM_ECODE_FAILED;
|
|
|
|
return TM_ECODE_FAILED;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
EveAddCommonOptions(&thread->dhcplog_ctx->cfg, p, f, js);
|
|
|
|
|
|
|
|
|
|
|
|
rs_dhcp_logger_log(ctx->rs_logger, tx, js);
|
|
|
|
rs_dhcp_logger_log(ctx->rs_logger, tx, js);
|
|
|
|
if (!jb_close(js)) {
|
|
|
|
if (!jb_close(js)) {
|
|
|
|
goto fail;
|
|
|
|
goto fail;
|
|
|
|
@ -108,6 +111,7 @@ static OutputInitResult OutputDHCPLogInitSub(ConfNode *conf,
|
|
|
|
return result;
|
|
|
|
return result;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
dhcplog_ctx->file_ctx = ajt->file_ctx;
|
|
|
|
dhcplog_ctx->file_ctx = ajt->file_ctx;
|
|
|
|
|
|
|
|
dhcplog_ctx->cfg = ajt->cfg;
|
|
|
|
|
|
|
|
|
|
|
|
OutputCtx *output_ctx = SCCalloc(1, sizeof(*output_ctx));
|
|
|
|
OutputCtx *output_ctx = SCCalloc(1, sizeof(*output_ctx));
|
|
|
|
if (unlikely(output_ctx == NULL)) {
|
|
|
|
if (unlikely(output_ctx == NULL)) {
|
|
|
|
|