Go to the documentation of this file.
58 static int JsonDHCPLogger(
ThreadVars *
tv,
void *thread_data,
59 const Packet *p,
Flow *f,
void *state,
void *tx, uint64_t tx_id)
64 if (!rs_dhcp_logger_do_log(
ctx->rs_logger, tx)) {
73 rs_dhcp_logger_log(
ctx->rs_logger, tx, js);
81 static void OutputDHCPLogDeInitCtxSub(
OutputCtx *output_ctx)
84 rs_dhcp_logger_free(dhcplog_ctx->
rs_logger);
105 output_ctx->
data = dhcplog_ctx;
106 output_ctx->
DeInit = OutputDHCPLogDeInitCtxSub;
108 dhcplog_ctx->
rs_logger = rs_dhcp_logger_new(conf);
112 result.
ctx = output_ctx;
117 static TmEcode JsonDHCPLogThreadInit(
ThreadVars *t,
const void *initdata,
void **data)
126 if (thread->
thread == NULL) {
131 *data = (
void *)thread;
138 if (thread == NULL) {
150 OutputDHCPLogInitSub,
ALPROTO_DHCP, JsonDHCPLogger, JsonDHCPLogThreadInit,
151 JsonDHCPLogThreadDeinit);
void FreeEveThreadCtx(OutputJsonThreadCtx *ctx)
OutputJsonThreadCtx * CreateEveThreadCtx(ThreadVars *t, OutputJsonCtx *ctx)
void OutputRegisterTxSubModule(LoggerId id, const char *parent_name, const char *name, const char *conf_name, OutputInitSubFunc InitFunc, AppProto alproto, TxLogger TxLogFunc, ThreadInitFunc ThreadInit, ThreadDeinitFunc ThreadDeinit)
void JsonDHCPLogRegister(void)
struct LogDHCPLogThread_ LogDHCPLogThread
void AppLayerParserRegisterLogger(uint8_t ipproto, AppProto alproto)
JsonBuilder * CreateEveHeader(const Packet *p, enum OutputJsonLogDirection dir, const char *event_type, JsonAddrInfo *addr, OutputJsonCtx *eve_ctx)
Per thread variable structure.
LogDHCPFileCtx * dhcplog_ctx
struct LogDHCPFileCtx_ LogDHCPFileCtx
void(* DeInit)(struct OutputCtx_ *)
int OutputJsonBuilderBuffer(ThreadVars *tv, const Packet *p, Flow *f, JsonBuilder *js, OutputJsonThreadCtx *ctx)
OutputJsonThreadCtx * thread