dhcp/eve: add common eve fields

Add the common eve fields like metadata and community id.
pull/5012/head
Jason Ish 6 years ago committed by Victor Julien
parent deed0541bb
commit e9a3415fc2

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

Loading…
Cancel
Save