Go to the documentation of this file.
24 #ifndef SURICATA_OUTPUT_H
25 #define SURICATA_OUTPUT_H
30 #define DEFAULT_LOG_MODE_APPEND "yes"
31 #define DEFAULT_LOG_FILETYPE "regular"
115 int tc_log_progress,
int ts_log_progress,
ThreadInitFunc ThreadInit,
TmEcode(* OutputLogFunc)(ThreadVars *, Packet *, void *)
TmEcode OutputLoggerThreadInit(ThreadVars *, const void *, void **)
typedef TAILQ_HEAD(OutputModuleList_, OutputModule_) OutputModuleList
void OutputRegisterTxModule(LoggerId id, const char *name, const char *conf_name, OutputInitFunc InitFunc, AppProto alproto, TxLogger TxLogFunc, ThreadInitFunc ThreadInit, ThreadDeinitFunc ThreadDeinit)
Register a tx output module.
void OutputRegisterFileSubModule(LoggerId id, const char *parent_name, const char *name, const char *conf_name, OutputInitSubFunc InitFunc, SCFileLogger FileLogFunc, ThreadInitFunc ThreadInit, ThreadDeinitFunc ThreadDeinit)
Register a file output sub-module.
struct OutputModule_ OutputModule
int(* SCFileLogger)(ThreadVars *, void *thread_data, const Packet *, const File *, void *tx, const uint64_t tx_id, uint8_t direction)
struct OutputInitResult_ OutputInitResult
struct OutputLoggerThreadStore_ * next
TAILQ_ENTRY(OutputModule_) entries
int(* TxLogger)(ThreadVars *, void *thread_data, const Packet *, Flow *f, void *state, void *tx, uint64_t tx_id)
Transaction logger function pointer type.
int(* FlowLogger)(ThreadVars *, void *thread_data, Flow *f)
Flow logger function pointer type.
int(* PacketLogger)(ThreadVars *, void *thread_data, const Packet *)
Packet logger function pointer type.
OutputInitSubFunc InitSubFunc
OutputModule * OutputGetModuleByConfName(const char *name)
Get an output module by name.
int(* SCFiledataLogger)(ThreadVars *, void *thread_data, const Packet *, File *, void *tx, const uint64_t tx_id, const uint8_t *, uint32_t, uint8_t, uint8_t dir)
File-data logger function pointer type.
PacketLogger PacketLogFunc
TmEcode OutputLoggerLog(ThreadVars *, Packet *, void *)
bool(* EveJsonSimpleTxLogFunc)(void *, struct JsonBuilder *)
SCFiledataLogger FiledataLogFunc
void OutputDeregisterAll(void)
Deregister all modules. Useful for a memory clean exit.
enum SCOutputStreamingType stream_type
ThreadInitFunc ThreadInit
EveJsonSimpleAppLayerLogger * SCEveJsonSimpleGetLogger(AppProto alproto)
OutputModuleList output_modules
OutputInitResult(* OutputInitSubFunc)(ConfNode *, OutputCtx *)
void OutputDropLoggerDisable(void)
ThreadDeinitFunc ThreadDeinit
void OutputRegisterStatsSubModule(LoggerId id, const char *parent_name, const char *name, const char *conf_name, OutputInitSubFunc InitFunc, StatsLogger StatsLogFunc, ThreadInitFunc ThreadInit, ThreadDeinitFunc ThreadDeinit)
Register a stats data output sub-module.
void OutputRegisterModule(const char *, const char *, OutputInitFunc)
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)
Per thread variable structure.
void OutputRegisterStreamingModule(LoggerId id, const char *name, const char *conf_name, OutputInitFunc InitFunc, SCStreamingLogger StreamingLogFunc, enum SCOutputStreamingType stream_type, ThreadInitFunc ThreadInit, ThreadDeinitFunc ThreadDeinit)
Register a streaming data output module.
TmEcode(* ThreadInitFunc)(ThreadVars *, const void *, void **)
SCStreamingLogger StreamingLogFunc
struct OutputLoggerThreadStore_ OutputLoggerThreadStore
void OutputUnregisterFileRotationFlag(int *flag)
Unregister a file rotation flag.
struct EveJsonSimpleAppLayerLogger EveJsonSimpleAppLayerLogger
void TmModuleLoggerRegister(void)
void OutputClearActiveLoggers(void)
void OutputRegisterTxModuleWithCondition(LoggerId id, const char *name, const char *conf_name, OutputInitFunc InitFunc, AppProto alproto, TxLogger TxLogFunc, TxLoggerCondition TxLogCondition, ThreadInitFunc ThreadInit, ThreadDeinitFunc ThreadDeinit)
Register a tx output module with condition.
void OutputRegisterStatsModule(LoggerId id, const char *name, const char *conf_name, OutputInitFunc InitFunc, StatsLogger StatsLogFunc, ThreadInitFunc ThreadInit, ThreadDeinitFunc ThreadDeinit)
Register a stats data output module.
bool(* TxLoggerCondition)(ThreadVars *, const Packet *, void *state, void *tx, uint64_t tx_id)
Transaction logger condition function pointer type.
int OutputDropLoggerEnable(void)
TxLoggerCondition TxLogCondition
void OutputRegisterTxModuleWithProgress(LoggerId id, const char *name, const char *conf_name, OutputInitFunc InitFunc, AppProto alproto, TxLogger TxLogFunc, int tc_log_progress, int ts_log_progress, ThreadInitFunc ThreadInit, ThreadDeinitFunc ThreadDeinit)
Register a tx output module with progress.
void OutputRegisterPacketSubModule(LoggerId id, const char *parent_name, const char *name, const char *conf_name, OutputInitSubFunc InitFunc, PacketLogger LogFunc, PacketLogCondition ConditionFunc, ThreadInitFunc ThreadInit, ThreadDeinitFunc ThreadDeinit)
Register a packet output sub-module.
void OutputRegisterFiledataModule(LoggerId id, const char *name, const char *conf_name, OutputInitFunc InitFunc, SCFiledataLogger FiledataLogFunc, ThreadInitFunc ThreadInit, ThreadDeinitFunc ThreadDeinit)
Register a file data output module.
EveJsonSimpleTxLogFunc LogTx
void OutputRegisterTxSubModuleWithCondition(LoggerId id, const char *parent_name, const char *name, const char *conf_name, OutputInitSubFunc InitFunc, AppProto alproto, TxLogger TxLogFunc, TxLoggerCondition TxLogCondition, ThreadInitFunc ThreadInit, ThreadDeinitFunc ThreadDeinit)
void OutputRegisterTxSubModuleWithProgress(LoggerId id, const char *parent_name, const char *name, const char *conf_name, OutputInitSubFunc InitFunc, AppProto alproto, TxLogger TxLogFunc, int tc_log_progress, int ts_log_progress, ThreadInitFunc ThreadInit, ThreadDeinitFunc ThreadDeinit)
TmEcode OutputLoggerThreadDeinit(ThreadVars *, void *)
bool(* PacketLogCondition)(ThreadVars *, void *thread_data, const Packet *)
Packet logger condition function point type.
PacketLogCondition PacketConditionFunc
uint32_t(* OutputGetActiveCountFunc)(void)
void OutputRegisterFileRotationFlag(int *flag)
Register a flag for file rotation notification.
void OutputRegisterFlowSubModule(LoggerId id, const char *parent_name, const char *name, const char *conf_name, OutputInitSubFunc InitFunc, FlowLogger FlowLogFunc, ThreadInitFunc ThreadInit, ThreadDeinitFunc ThreadDeinit)
Register a flow output sub-module.
void OutputNotifyFileRotation(void)
Notifies all registered file rotation notification flags.
int(* StatsLogger)(ThreadVars *, void *thread_data, const StatsTable *)
OutputInitResult(* OutputInitFunc)(ConfNode *)
void OutputLoggerExitPrintStats(ThreadVars *, void *)
void OutputRegisterPacketModule(LoggerId id, const char *name, const char *conf_name, OutputInitFunc InitFunc, PacketLogger LogFunc, PacketLogCondition ConditionFunc, ThreadInitFunc, ThreadDeinitFunc)
Register a packet output module.
void OutputRegisterRootLogger(ThreadInitFunc ThreadInit, ThreadDeinitFunc ThreadDeinit, OutputLogFunc LogFunc, OutputGetActiveCountFunc ActiveCntFunc)
int(* SCStreamingLogger)(ThreadVars *, void *thread_data, const Flow *f, const uint8_t *data, uint32_t data_len, uint64_t tx_id, uint8_t flags)
TmEcode(* ThreadDeinitFunc)(ThreadVars *, void *)
void OutputSetupActiveLoggers(void)