diff --git a/src/output-json.h b/src/output-json.h index e35b81be45..1acde3e677 100644 --- a/src/output-json.h +++ b/src/output-json.h @@ -39,10 +39,7 @@ TmEcode OutputJSON(json_t *js, void *data, uint64_t *count); int OutputJSONBuffer(json_t *js, LogFileCtx *file_ctx, MemBuffer *buffer); OutputCtx *OutputJsonInitCtx(ConfNode *); -enum JsonOutput { ALERT_FILE, - ALERT_SYSLOG, - ALERT_UNIX_DGRAM, - ALERT_UNIX_STREAM }; + enum JsonFormat { COMPACT, INDENT }; /* @@ -50,11 +47,10 @@ enum JsonFormat { COMPACT, INDENT }; */ typedef struct OutputJsonCtx_ { LogFileCtx *file_ctx; - enum JsonOutput json_out; + enum LogFileType json_out; enum JsonFormat format; } OutputJsonCtx; - typedef struct AlertJsonThread_ { /** LogFileCtx has the pointer to the file and a mutex to allow multithreading */ LogFileCtx *file_ctx; diff --git a/src/util-logopenfile.h b/src/util-logopenfile.h index 65d179a6f7..49e770a504 100644 --- a/src/util-logopenfile.h +++ b/src/util-logopenfile.h @@ -31,6 +31,11 @@ typedef struct { uint16_t fileno; } PcieFile; +enum LogFileType { ALERT_FILE, + ALERT_SYSLOG, + ALERT_UNIX_DGRAM, + ALERT_UNIX_STREAM }; + /** Global structure for Output Context */ typedef struct LogFileCtx_ { union { @@ -45,6 +50,9 @@ typedef struct LogFileCtx_ { * record cannot be written to the file in one call */ SCMutex fp_mutex; + /** the type of file */ + enum LogFileType type; + /** The name of the file */ char *filename;