|
|
@ -53,6 +53,7 @@
|
|
|
|
typedef struct LogTFTPFileCtx_ {
|
|
|
|
typedef struct LogTFTPFileCtx_ {
|
|
|
|
LogFileCtx *file_ctx;
|
|
|
|
LogFileCtx *file_ctx;
|
|
|
|
uint32_t flags;
|
|
|
|
uint32_t flags;
|
|
|
|
|
|
|
|
OutputJsonCommonSettings cfg;
|
|
|
|
} LogTFTPFileCtx;
|
|
|
|
} LogTFTPFileCtx;
|
|
|
|
|
|
|
|
|
|
|
|
typedef struct LogTFTPLogThread_ {
|
|
|
|
typedef struct LogTFTPLogThread_ {
|
|
|
@ -78,6 +79,7 @@ static int JsonTFTPLogger(ThreadVars *tv, void *thread_data,
|
|
|
|
|
|
|
|
|
|
|
|
json_object_set_new(js, "tftp", tftpjs);
|
|
|
|
json_object_set_new(js, "tftp", tftpjs);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
JsonAddCommonOptions(&thread->tftplog_ctx->cfg, p, f, js);
|
|
|
|
MemBufferReset(thread->buffer);
|
|
|
|
MemBufferReset(thread->buffer);
|
|
|
|
OutputJSONBuffer(js, thread->tftplog_ctx->file_ctx, &thread->buffer);
|
|
|
|
OutputJSONBuffer(js, thread->tftplog_ctx->file_ctx, &thread->buffer);
|
|
|
|
|
|
|
|
|
|
|
@ -107,6 +109,7 @@ static OutputInitResult OutputTFTPLogInitSub(ConfNode *conf,
|
|
|
|
return result;
|
|
|
|
return result;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
tftplog_ctx->file_ctx = ajt->file_ctx;
|
|
|
|
tftplog_ctx->file_ctx = ajt->file_ctx;
|
|
|
|
|
|
|
|
tftplog_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)) {
|
|
|
|