|
|
@ -216,9 +216,6 @@ static int JsonDNP3LoggerToServer(ThreadVars *tv, void *thread_data,
|
|
|
|
LogDNP3LogThread *thread = (LogDNP3LogThread *)thread_data;
|
|
|
|
LogDNP3LogThread *thread = (LogDNP3LogThread *)thread_data;
|
|
|
|
DNP3Transaction *tx = vtx;
|
|
|
|
DNP3Transaction *tx = vtx;
|
|
|
|
|
|
|
|
|
|
|
|
MemBuffer *buffer = (MemBuffer *)thread->ctx->buffer;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
MemBufferReset(buffer);
|
|
|
|
|
|
|
|
if (tx->has_request && tx->request_done) {
|
|
|
|
if (tx->has_request && tx->request_done) {
|
|
|
|
JsonBuilder *js =
|
|
|
|
JsonBuilder *js =
|
|
|
|
CreateEveHeader(p, LOG_DIR_FLOW, "dnp3", NULL, thread->dnp3log_ctx->eve_ctx);
|
|
|
|
CreateEveHeader(p, LOG_DIR_FLOW, "dnp3", NULL, thread->dnp3log_ctx->eve_ctx);
|
|
|
@ -229,7 +226,7 @@ static int JsonDNP3LoggerToServer(ThreadVars *tv, void *thread_data,
|
|
|
|
jb_open_object(js, "dnp3");
|
|
|
|
jb_open_object(js, "dnp3");
|
|
|
|
JsonDNP3LogRequest(js, tx);
|
|
|
|
JsonDNP3LogRequest(js, tx);
|
|
|
|
jb_close(js);
|
|
|
|
jb_close(js);
|
|
|
|
OutputJsonBuilderBuffer(js, thread->ctx->file_ctx, &buffer);
|
|
|
|
OutputJsonBuilderBuffer(js, thread->ctx);
|
|
|
|
jb_free(js);
|
|
|
|
jb_free(js);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -243,9 +240,6 @@ static int JsonDNP3LoggerToClient(ThreadVars *tv, void *thread_data,
|
|
|
|
LogDNP3LogThread *thread = (LogDNP3LogThread *)thread_data;
|
|
|
|
LogDNP3LogThread *thread = (LogDNP3LogThread *)thread_data;
|
|
|
|
DNP3Transaction *tx = vtx;
|
|
|
|
DNP3Transaction *tx = vtx;
|
|
|
|
|
|
|
|
|
|
|
|
MemBuffer *buffer = (MemBuffer *)thread->ctx->buffer;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
MemBufferReset(buffer);
|
|
|
|
|
|
|
|
if (tx->has_response && tx->response_done) {
|
|
|
|
if (tx->has_response && tx->response_done) {
|
|
|
|
JsonBuilder *js =
|
|
|
|
JsonBuilder *js =
|
|
|
|
CreateEveHeader(p, LOG_DIR_FLOW, "dnp3", NULL, thread->dnp3log_ctx->eve_ctx);
|
|
|
|
CreateEveHeader(p, LOG_DIR_FLOW, "dnp3", NULL, thread->dnp3log_ctx->eve_ctx);
|
|
|
@ -256,7 +250,7 @@ static int JsonDNP3LoggerToClient(ThreadVars *tv, void *thread_data,
|
|
|
|
jb_open_object(js, "dnp3");
|
|
|
|
jb_open_object(js, "dnp3");
|
|
|
|
JsonDNP3LogResponse(js, tx);
|
|
|
|
JsonDNP3LogResponse(js, tx);
|
|
|
|
jb_close(js);
|
|
|
|
jb_close(js);
|
|
|
|
OutputJsonBuilderBuffer(js, thread->ctx->file_ctx, &buffer);
|
|
|
|
OutputJsonBuilderBuffer(js, thread->ctx);
|
|
|
|
jb_free(js);
|
|
|
|
jb_free(js);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|