suricata
|
#include "suricata.h"
#include "tm-threads.h"
#include "output-packet.h"
#include "output-tx.h"
#include "output-file.h"
#include "output-filedata.h"
#include "output-flow.h"
#include "output-streaming.h"
#include "output-stats.h"
Go to the source code of this file.
Data Structures | |
struct | OutputInitResult_ |
struct | OutputModule_ |
Macros | |
#define | DEFAULT_LOG_MODE_APPEND "yes" |
#define | DEFAULT_LOG_FILETYPE "regular" |
Typedefs | |
typedef struct OutputInitResult_ | OutputInitResult |
typedef OutputInitResult(* | OutputInitFunc) (ConfNode *) |
typedef OutputInitResult(* | OutputInitSubFunc) (ConfNode *, OutputCtx *) |
typedef TmEcode(* | OutputLogFunc) (ThreadVars *, Packet *, void *) |
typedef struct OutputModule_ | OutputModule |
Functions | |
typedef | TAILQ_HEAD (OutputModuleList_, OutputModule_) OutputModuleList |
void | OutputRegisterModule (const char *, const char *, OutputInitFunc) |
void | OutputRegisterPacketModule (LoggerId id, const char *name, const char *conf_name, OutputInitFunc InitFunc, PacketLogger LogFunc, PacketLogCondition ConditionFunc, ThreadInitFunc, ThreadDeinitFunc, ThreadExitPrintStatsFunc) |
Register a packet output module. More... | |
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, ThreadExitPrintStatsFunc ThreadExitPrintStats) |
Register a packet output sub-module. More... | |
void | OutputRegisterTxModule (LoggerId id, const char *name, const char *conf_name, OutputInitFunc InitFunc, AppProto alproto, TxLogger TxLogFunc, ThreadInitFunc ThreadInit, ThreadDeinitFunc ThreadDeinit, ThreadExitPrintStatsFunc ThreadExitPrintStats) |
Register a tx output module. More... | |
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, ThreadExitPrintStatsFunc ThreadExitPrintStats) |
void | OutputRegisterTxModuleWithCondition (LoggerId id, const char *name, const char *conf_name, OutputInitFunc InitFunc, AppProto alproto, TxLogger TxLogFunc, TxLoggerCondition TxLogCondition, ThreadInitFunc ThreadInit, ThreadDeinitFunc ThreadDeinit, ThreadExitPrintStatsFunc ThreadExitPrintStats) |
Register a tx output module with condition. More... | |
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, ThreadExitPrintStatsFunc ThreadExitPrintStats) |
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, ThreadExitPrintStatsFunc ThreadExitPrintStats) |
Register a tx output module with progress. More... | |
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, ThreadExitPrintStatsFunc ThreadExitPrintStats) |
void | OutputRegisterFileModule (LoggerId id, const char *name, const char *conf_name, OutputInitFunc InitFunc, FileLogger FileLogFunc, ThreadInitFunc ThreadInit, ThreadDeinitFunc ThreadDeinit, ThreadExitPrintStatsFunc ThreadExitPrintStats) |
Register a file output module. More... | |
void | OutputRegisterFileSubModule (LoggerId id, const char *parent_name, const char *name, const char *conf_name, OutputInitSubFunc InitFunc, FileLogger FileLogFunc, ThreadInitFunc ThreadInit, ThreadDeinitFunc ThreadDeinit, ThreadExitPrintStatsFunc ThreadExitPrintStats) |
Register a file output sub-module. More... | |
void | OutputRegisterFiledataModule (LoggerId id, const char *name, const char *conf_name, OutputInitFunc InitFunc, FiledataLogger FiledataLogFunc, ThreadInitFunc ThreadInit, ThreadDeinitFunc ThreadDeinit, ThreadExitPrintStatsFunc ThreadExitPrintStats) |
Register a file data output module. More... | |
void | OutputRegisterFiledataSubModule (LoggerId, const char *parent_name, const char *name, const char *conf_name, OutputInitSubFunc InitFunc, FiledataLogger FiledataLogFunc, ThreadInitFunc ThreadInit, ThreadDeinitFunc ThreadDeinit, ThreadExitPrintStatsFunc ThreadExitPrintStats) |
Register a file data output sub-module. More... | |
void | OutputRegisterFlowModule (LoggerId id, const char *name, const char *conf_name, OutputInitFunc InitFunc, FlowLogger FlowLogFunc, ThreadInitFunc ThreadInit, ThreadDeinitFunc ThreadDeinit, ThreadExitPrintStatsFunc ThreadExitPrintStats) |
Register a flow output module. More... | |
void | OutputRegisterFlowSubModule (LoggerId id, const char *parent_name, const char *name, const char *conf_name, OutputInitSubFunc InitFunc, FlowLogger FlowLogFunc, ThreadInitFunc ThreadInit, ThreadDeinitFunc ThreadDeinit, ThreadExitPrintStatsFunc ThreadExitPrintStats) |
Register a flow output sub-module. More... | |
void | OutputRegisterStreamingModule (LoggerId id, const char *name, const char *conf_name, OutputInitFunc InitFunc, StreamingLogger StreamingLogFunc, enum OutputStreamingType stream_type, ThreadInitFunc ThreadInit, ThreadDeinitFunc ThreadDeinit, ThreadExitPrintStatsFunc ThreadExitPrintStats) |
Register a streaming data output module. More... | |
void | OutputRegisterStreamingSubModule (LoggerId id, const char *parent_name, const char *name, const char *conf_name, OutputInitSubFunc InitFunc, StreamingLogger StreamingLogFunc, enum OutputStreamingType stream_type, ThreadInitFunc ThreadInit, ThreadDeinitFunc ThreadDeinit, ThreadExitPrintStatsFunc ThreadExitPrintStats) |
Register a streaming data output sub-module. More... | |
void | OutputRegisterStatsModule (LoggerId id, const char *name, const char *conf_name, OutputInitFunc InitFunc, StatsLogger StatsLogFunc, ThreadInitFunc ThreadInit, ThreadDeinitFunc ThreadDeinit, ThreadExitPrintStatsFunc ThreadExitPrintStats) |
Register a stats data output module. More... | |
void | OutputRegisterStatsSubModule (LoggerId id, const char *parent_name, const char *name, const char *conf_name, OutputInitSubFunc InitFunc, StatsLogger StatsLogFunc, ThreadInitFunc ThreadInit, ThreadDeinitFunc ThreadDeinit, ThreadExitPrintStatsFunc ThreadExitPrintStats) |
Register a stats data output sub-module. More... | |
OutputModule * | OutputGetModuleByConfName (const char *name) |
Get an output module by name. More... | |
void | OutputDeregisterAll (void) |
Deregister all modules. Useful for a memory clean exit. More... | |
int | OutputDropLoggerEnable (void) |
void | OutputDropLoggerDisable (void) |
void | OutputRegisterFileRotationFlag (int *flag) |
Register a flag for file rotation notification. More... | |
void | OutputUnregisterFileRotationFlag (int *flag) |
Unregister a file rotation flag. More... | |
void | OutputNotifyFileRotation (void) |
Notifies all registered file rotation notification flags. More... | |
void | OutputRegisterRootLogger (ThreadInitFunc ThreadInit, ThreadDeinitFunc ThreadDeinit, ThreadExitPrintStatsFunc ThreadExitPrintStats, OutputLogFunc LogFunc) |
void | TmModuleLoggerRegister (void) |
TmEcode | OutputLoggerLog (ThreadVars *, Packet *, void *) |
TmEcode | OutputLoggerThreadInit (ThreadVars *, const void *, void **) |
TmEcode | OutputLoggerThreadDeinit (ThreadVars *, void *) |
void | OutputLoggerExitPrintStats (ThreadVars *, void *) |
Variables | |
OutputModuleList | output_modules |
Definition in file output.h.
#define DEFAULT_LOG_FILETYPE "regular" |
Definition at line 31 of file output.h.
Referenced by SCConfLogOpenGeneric().
#define DEFAULT_LOG_MODE_APPEND "yes" |
Definition at line 30 of file output.h.
Referenced by SCConfLogOpenGeneric().
typedef OutputInitResult(* OutputInitFunc) (ConfNode *) |
typedef struct OutputInitResult_ OutputInitResult |
typedef OutputInitResult(* OutputInitSubFunc) (ConfNode *, OutputCtx *) |
typedef TmEcode(* OutputLogFunc) (ThreadVars *, Packet *, void *) |
typedef struct OutputModule_ OutputModule |
void OutputDeregisterAll | ( | void | ) |
Deregister all modules. Useful for a memory clean exit.
Definition at line 839 of file output.c.
References output_modules, SCFree, TAILQ_FIRST, and TAILQ_REMOVE.
Referenced by GlobalsInitPreConfig().
OutputModule* OutputGetModuleByConfName | ( | const char * | conf_name | ) |
Get an output module by name.
The | OutputModule with the given name or NULL if no output module with the given name is registered. |
Definition at line 824 of file output.c.
References OutputModule_::conf_name, output_modules, and TAILQ_FOREACH.
Referenced by RunModeInitializeOutputs(), and RunModeShutDown().
void OutputLoggerExitPrintStats | ( | ThreadVars * | , |
void * | |||
) |
Definition at line 990 of file output.c.
References LoggerThreadStoreNode, TAILQ_FIRST, TAILQ_NEXT, and RootLogger_::ThreadExitPrintStats.
Referenced by ProfileFlowWorkerIdToString().
TmEcode OutputLoggerLog | ( | ThreadVars * | , |
Packet * | , | ||
void * | |||
) |
Definition at line 917 of file output.c.
References RootLogger_::LogFunc, LoggerThreadStoreNode, TAILQ_FIRST, TAILQ_NEXT, and TM_ECODE_OK.
TmEcode OutputLoggerThreadDeinit | ( | ThreadVars * | , |
void * | |||
) |
Definition at line 964 of file output.c.
References LoggerThreadStoreNode, SCFree, TAILQ_FIRST, TAILQ_NEXT, TAILQ_REMOVE, RootLogger_::ThreadDeinit, TM_ECODE_FAILED, and TM_ECODE_OK.
Referenced by OutputLoggerThreadInit().
TmEcode OutputLoggerThreadInit | ( | ThreadVars * | , |
const void * | , | ||
void ** | |||
) |
Definition at line 933 of file output.c.
References LoggerThreadStoreNode, OutputLoggerThreadDeinit(), SCCalloc, TAILQ_FOREACH, TAILQ_INIT, TAILQ_INSERT_TAIL, RootLogger_::ThreadInit, TM_ECODE_FAILED, and TM_ECODE_OK.
void OutputNotifyFileRotation | ( | void | ) |
Notifies all registered file rotation notification flags.
Definition at line 910 of file output.c.
References OutputFileRolloverFlag, and TAILQ_FOREACH.
Referenced by PostRunDeinit().
void OutputRegisterFiledataModule | ( | LoggerId | id, |
const char * | name, | ||
const char * | conf_name, | ||
OutputInitFunc | InitFunc, | ||
FiledataLogger | FiledataLogFunc, | ||
ThreadInitFunc | ThreadInit, | ||
ThreadDeinitFunc | ThreadDeinit, | ||
ThreadExitPrintStatsFunc | ThreadExitPrintStats | ||
) |
Register a file data output module.
This function will register an output module so it can be configured with the configuration file.
Returns | 0 on success, -1 on failure. |
Definition at line 501 of file output.c.
References OutputModule_::conf_name, OutputModule_::FiledataLogFunc, OutputModule_::InitFunc, OutputModule_::logger_id, OutputModule_::name, output_modules, SC_ERR_FATAL, SCCalloc, SCLogDebug, SCLogError, TAILQ_INSERT_TAIL, OutputModule_::ThreadDeinit, RootLogger_::ThreadDeinit, OutputModule_::ThreadExitPrintStats, RootLogger_::ThreadExitPrintStats, OutputModule_::ThreadInit, RootLogger_::ThreadInit, and unlikely.
Referenced by LogFilestoreRegister(), and OutputFilestoreRegister().
void OutputRegisterFiledataSubModule | ( | LoggerId | id, |
const char * | parent_name, | ||
const char * | name, | ||
const char * | conf_name, | ||
OutputInitSubFunc | InitFunc, | ||
FiledataLogger | FiledataLogFunc, | ||
ThreadInitFunc | ThreadInit, | ||
ThreadDeinitFunc | ThreadDeinit, | ||
ThreadExitPrintStatsFunc | ThreadExitPrintStats | ||
) |
Register a file data output sub-module.
This function will register an output module so it can be configured with the configuration file.
Returns | 0 on success, -1 on failure. |
Definition at line 541 of file output.c.
References OutputModule_::conf_name, OutputModule_::FiledataLogFunc, OutputModule_::InitSubFunc, OutputModule_::logger_id, OutputModule_::name, output_modules, OutputModule_::parent_name, SC_ERR_FATAL, SCCalloc, SCLogDebug, SCLogError, TAILQ_INSERT_TAIL, OutputModule_::ThreadDeinit, RootLogger_::ThreadDeinit, OutputModule_::ThreadExitPrintStats, RootLogger_::ThreadExitPrintStats, OutputModule_::ThreadInit, RootLogger_::ThreadInit, and unlikely.
void OutputRegisterFileModule | ( | LoggerId | id, |
const char * | name, | ||
const char * | conf_name, | ||
OutputInitFunc | InitFunc, | ||
FileLogger | FileLogFunc, | ||
ThreadInitFunc | ThreadInit, | ||
ThreadDeinitFunc | ThreadDeinit, | ||
ThreadExitPrintStatsFunc | ThreadExitPrintStats | ||
) |
Register a file output module.
This function will register an output module so it can be configured with the configuration file.
Returns | 0 on success, -1 on failure. |
Definition at line 421 of file output.c.
References OutputModule_::conf_name, OutputModule_::FileLogFunc, OutputModule_::InitFunc, OutputModule_::logger_id, OutputModule_::name, output_modules, SC_ERR_FATAL, SCCalloc, SCLogDebug, SCLogError, TAILQ_INSERT_TAIL, OutputModule_::ThreadDeinit, RootLogger_::ThreadDeinit, OutputModule_::ThreadExitPrintStats, RootLogger_::ThreadExitPrintStats, OutputModule_::ThreadInit, RootLogger_::ThreadInit, and unlikely.
void OutputRegisterFileRotationFlag | ( | int * | flag | ) |
Register a flag for file rotation notification.
flag | A pointer that will be set to 1 when file rotation is requested. |
Definition at line 871 of file output.c.
References OutputFileRolloverFlag, SC_ERR_MEM_ALLOC, SCCalloc, SCLogError, TAILQ_INSERT_TAIL, and unlikely.
Referenced by OutputJsonInitCtx(), SCConfLogOpenGeneric(), SCLogAllocLogOPBuffer(), and Unified2AlertInitCtx().
void OutputRegisterFileSubModule | ( | LoggerId | id, |
const char * | parent_name, | ||
const char * | name, | ||
const char * | conf_name, | ||
OutputInitSubFunc | InitFunc, | ||
FileLogger | FileLogFunc, | ||
ThreadInitFunc | ThreadInit, | ||
ThreadDeinitFunc | ThreadDeinit, | ||
ThreadExitPrintStatsFunc | ThreadExitPrintStats | ||
) |
Register a file output sub-module.
This function will register an output module so it can be configured with the configuration file.
Returns | 0 on success, -1 on failure. |
Definition at line 460 of file output.c.
References OutputModule_::conf_name, OutputModule_::FileLogFunc, OutputModule_::InitSubFunc, OutputModule_::logger_id, OutputModule_::name, output_modules, OutputModule_::parent_name, SC_ERR_FATAL, SCCalloc, SCLogDebug, SCLogError, TAILQ_INSERT_TAIL, OutputModule_::ThreadDeinit, RootLogger_::ThreadDeinit, OutputModule_::ThreadExitPrintStats, RootLogger_::ThreadExitPrintStats, OutputModule_::ThreadInit, RootLogger_::ThreadInit, and unlikely.
Referenced by JsonFileLogRegister().
void OutputRegisterFlowModule | ( | LoggerId | id, |
const char * | name, | ||
const char * | conf_name, | ||
OutputInitFunc | InitFunc, | ||
FlowLogger | FlowLogFunc, | ||
ThreadInitFunc | ThreadInit, | ||
ThreadDeinitFunc | ThreadDeinit, | ||
ThreadExitPrintStatsFunc | ThreadExitPrintStats | ||
) |
Register a flow output module.
This function will register an output module so it can be configured with the configuration file.
Returns | 0 on success, -1 on failure. |
Definition at line 582 of file output.c.
References OutputModule_::conf_name, OutputModule_::FlowLogFunc, OutputModule_::InitFunc, OutputModule_::logger_id, OutputModule_::name, output_modules, SC_ERR_FATAL, SCCalloc, SCLogDebug, SCLogError, TAILQ_INSERT_TAIL, OutputModule_::ThreadDeinit, RootLogger_::ThreadDeinit, OutputModule_::ThreadExitPrintStats, RootLogger_::ThreadExitPrintStats, OutputModule_::ThreadInit, RootLogger_::ThreadInit, and unlikely.
Referenced by JsonFlowLogRegister(), and JsonNetFlowLogRegister().
void OutputRegisterFlowSubModule | ( | LoggerId | id, |
const char * | parent_name, | ||
const char * | name, | ||
const char * | conf_name, | ||
OutputInitSubFunc | InitFunc, | ||
FlowLogger | FlowLogFunc, | ||
ThreadInitFunc | ThreadInit, | ||
ThreadDeinitFunc | ThreadDeinit, | ||
ThreadExitPrintStatsFunc | ThreadExitPrintStats | ||
) |
Register a flow output sub-module.
This function will register an output module so it can be configured with the configuration file.
Returns | 0 on success, -1 on failure. |
Definition at line 621 of file output.c.
References OutputModule_::conf_name, OutputModule_::FlowLogFunc, OutputModule_::InitSubFunc, OutputModule_::logger_id, OutputModule_::name, output_modules, OutputModule_::parent_name, SC_ERR_FATAL, SCCalloc, SCLogDebug, SCLogError, TAILQ_INSERT_TAIL, OutputModule_::ThreadDeinit, RootLogger_::ThreadDeinit, OutputModule_::ThreadExitPrintStats, RootLogger_::ThreadExitPrintStats, OutputModule_::ThreadInit, RootLogger_::ThreadInit, and unlikely.
Referenced by JsonFlowLogRegister(), and JsonNetFlowLogRegister().
void OutputRegisterModule | ( | const char * | , |
const char * | , | ||
OutputInitFunc | |||
) |
void OutputRegisterPacketModule | ( | LoggerId | id, |
const char * | name, | ||
const char * | conf_name, | ||
OutputInitFunc | InitFunc, | ||
PacketLogger | PacketLogFunc, | ||
PacketLogCondition | PacketConditionFunc, | ||
ThreadInitFunc | ThreadInit, | ||
ThreadDeinitFunc | ThreadDeinit, | ||
ThreadExitPrintStatsFunc | ThreadExitPrintStats | ||
) |
Register a packet output module.
This function will register an output module so it can be configured with the configuration file.
Returns | 0 on success, -1 on failure. |
Definition at line 163 of file output.c.
References OutputModule_::conf_name, OutputModule_::InitFunc, OutputModule_::logger_id, OutputModule_::name, output_modules, OutputModule_::PacketConditionFunc, OutputModule_::PacketLogFunc, SC_ERR_FATAL, SCCalloc, SCLogDebug, SCLogError, TAILQ_INSERT_TAIL, OutputModule_::ThreadDeinit, RootLogger_::ThreadDeinit, OutputModule_::ThreadExitPrintStats, RootLogger_::ThreadExitPrintStats, OutputModule_::ThreadInit, RootLogger_::ThreadInit, and unlikely.
Referenced by AlertDebugLogRegister(), AlertFastLogRegister(), AlertPreludeRegister(), AlertSyslogRegister(), JsonAlertLogRegister(), JsonDropLogRegister(), JsonMetadataLogRegister(), LogDropLogRegister(), PcapLogRegister(), and Unified2AlertRegister().
void OutputRegisterPacketSubModule | ( | LoggerId | id, |
const char * | parent_name, | ||
const char * | name, | ||
const char * | conf_name, | ||
OutputInitSubFunc | InitFunc, | ||
PacketLogger | PacketLogFunc, | ||
PacketLogCondition | PacketConditionFunc, | ||
ThreadInitFunc | ThreadInit, | ||
ThreadDeinitFunc | ThreadDeinit, | ||
ThreadExitPrintStatsFunc | ThreadExitPrintStats | ||
) |
Register a packet output sub-module.
This function will register an output module so it can be configured with the configuration file.
Returns | 0 on success, -1 on failure. |
Definition at line 204 of file output.c.
References OutputModule_::alproto, OutputModule_::conf_name, OutputModule_::InitFunc, OutputModule_::InitSubFunc, OutputModule_::logger_id, OutputModule_::name, output_modules, OutputModule_::PacketConditionFunc, OutputModule_::PacketLogFunc, OutputModule_::parent_name, SC_ERR_FATAL, SCCalloc, SCLogDebug, SCLogError, TAILQ_INSERT_TAIL, OutputModule_::tc_log_progress, OutputModule_::ThreadDeinit, RootLogger_::ThreadDeinit, OutputModule_::ThreadExitPrintStats, RootLogger_::ThreadExitPrintStats, OutputModule_::ThreadInit, RootLogger_::ThreadInit, OutputModule_::ts_log_progress, OutputModule_::TxLogCondition, OutputModule_::TxLogFunc, and unlikely.
Referenced by JsonAlertLogRegister(), JsonAnomalyLogRegister(), JsonDropLogRegister(), and JsonMetadataLogRegister().
void OutputRegisterRootLogger | ( | ThreadInitFunc | ThreadInit, |
ThreadDeinitFunc | ThreadDeinit, | ||
ThreadExitPrintStatsFunc | ThreadExitPrintStats, | ||
OutputLogFunc | LogFunc | ||
) |
Definition at line 1004 of file output.c.
References RootLogger_::LogFunc, SCCalloc, TAILQ_INSERT_TAIL, RootLogger_::ThreadDeinit, RootLogger_::ThreadExitPrintStats, and RootLogger_::ThreadInit.
Referenced by OutputFiledataLoggerRegister(), OutputFileLoggerRegister(), OutputPacketLoggerRegister(), OutputStreamingLoggerRegister(), and OutputTxLoggerRegister().
void OutputRegisterStatsModule | ( | LoggerId | id, |
const char * | name, | ||
const char * | conf_name, | ||
OutputInitFunc | InitFunc, | ||
StatsLogger | StatsLogFunc, | ||
ThreadInitFunc | ThreadInit, | ||
ThreadDeinitFunc | ThreadDeinit, | ||
ThreadExitPrintStatsFunc | ThreadExitPrintStats | ||
) |
Register a stats data output module.
This function will register an output module so it can be configured with the configuration file.
Returns | 0 on success, -1 on failure. |
Definition at line 746 of file output.c.
References OutputModule_::conf_name, OutputModule_::InitFunc, OutputModule_::logger_id, OutputModule_::name, output_modules, SC_ERR_FATAL, SCCalloc, SCLogDebug, SCLogError, OutputModule_::StatsLogFunc, TAILQ_INSERT_TAIL, OutputModule_::ThreadDeinit, RootLogger_::ThreadDeinit, OutputModule_::ThreadExitPrintStats, RootLogger_::ThreadExitPrintStats, OutputModule_::ThreadInit, RootLogger_::ThreadInit, and unlikely.
Referenced by JsonStatsLogRegister(), and LogStatsLogRegister().
void OutputRegisterStatsSubModule | ( | LoggerId | id, |
const char * | parent_name, | ||
const char * | name, | ||
const char * | conf_name, | ||
OutputInitSubFunc | InitFunc, | ||
StatsLogger | StatsLogFunc, | ||
ThreadInitFunc | ThreadInit, | ||
ThreadDeinitFunc | ThreadDeinit, | ||
ThreadExitPrintStatsFunc | ThreadExitPrintStats | ||
) |
Register a stats data output sub-module.
This function will register an output module so it can be configured with the configuration file.
Returns | 0 on success, -1 on failure. |
Definition at line 785 of file output.c.
References OutputModule_::conf_name, OutputModule_::InitSubFunc, OutputModule_::logger_id, OutputModule_::name, output_modules, OutputModule_::parent_name, SC_ERR_FATAL, SCCalloc, SCLogDebug, SCLogError, OutputModule_::StatsLogFunc, TAILQ_INSERT_TAIL, OutputModule_::ThreadDeinit, RootLogger_::ThreadDeinit, OutputModule_::ThreadExitPrintStats, RootLogger_::ThreadExitPrintStats, OutputModule_::ThreadInit, RootLogger_::ThreadInit, and unlikely.
Referenced by JsonStatsLogRegister().
void OutputRegisterStreamingModule | ( | LoggerId | id, |
const char * | name, | ||
const char * | conf_name, | ||
OutputInitFunc | InitFunc, | ||
StreamingLogger | StreamingLogFunc, | ||
enum OutputStreamingType | stream_type, | ||
ThreadInitFunc | ThreadInit, | ||
ThreadDeinitFunc | ThreadDeinit, | ||
ThreadExitPrintStatsFunc | ThreadExitPrintStats | ||
) |
Register a streaming data output module.
This function will register an output module so it can be configured with the configuration file.
Returns | 0 on success, -1 on failure. |
Definition at line 662 of file output.c.
References OutputModule_::conf_name, OutputModule_::InitFunc, OutputModule_::logger_id, OutputModule_::name, output_modules, SC_ERR_FATAL, SCCalloc, SCLogDebug, SCLogError, OutputModule_::stream_type, OutputModule_::StreamingLogFunc, TAILQ_INSERT_TAIL, OutputModule_::ThreadDeinit, RootLogger_::ThreadDeinit, OutputModule_::ThreadExitPrintStats, RootLogger_::ThreadExitPrintStats, OutputModule_::ThreadInit, RootLogger_::ThreadInit, and unlikely.
Referenced by LogTcpDataLogRegister().
void OutputRegisterStreamingSubModule | ( | LoggerId | id, |
const char * | parent_name, | ||
const char * | name, | ||
const char * | conf_name, | ||
OutputInitSubFunc | InitFunc, | ||
StreamingLogger | StreamingLogFunc, | ||
enum OutputStreamingType | stream_type, | ||
ThreadInitFunc | ThreadInit, | ||
ThreadDeinitFunc | ThreadDeinit, | ||
ThreadExitPrintStatsFunc | ThreadExitPrintStats | ||
) |
Register a streaming data output sub-module.
This function will register an output module so it can be configured with the configuration file.
Returns | 0 on success, -1 on failure. |
Definition at line 704 of file output.c.
References OutputModule_::conf_name, OutputModule_::InitSubFunc, OutputModule_::logger_id, OutputModule_::name, output_modules, OutputModule_::parent_name, SC_ERR_FATAL, SCCalloc, SCLogDebug, SCLogError, OutputModule_::stream_type, OutputModule_::StreamingLogFunc, TAILQ_INSERT_TAIL, OutputModule_::ThreadDeinit, RootLogger_::ThreadDeinit, OutputModule_::ThreadExitPrintStats, RootLogger_::ThreadExitPrintStats, OutputModule_::ThreadInit, RootLogger_::ThreadInit, and unlikely.
void OutputRegisterTxModule | ( | LoggerId | id, |
const char * | name, | ||
const char * | conf_name, | ||
OutputInitFunc | InitFunc, | ||
AppProto | alproto, | ||
TxLogger | TxLogFunc, | ||
ThreadInitFunc | ThreadInit, | ||
ThreadDeinitFunc | ThreadDeinit, | ||
ThreadExitPrintStatsFunc | ThreadExitPrintStats | ||
) |
Register a tx output module.
This function will register an output module so it can be configured with the configuration file.
Returns | 0 on success, -1 on failure. |
Definition at line 391 of file output.c.
Referenced by JsonHttpLogRegister(), JsonSmtpLogRegister(), and LogHttpLogRegister().
void OutputRegisterTxModuleWithCondition | ( | LoggerId | id, |
const char * | name, | ||
const char * | conf_name, | ||
OutputInitFunc | InitFunc, | ||
AppProto | alproto, | ||
TxLogger | TxLogFunc, | ||
TxLoggerCondition | TxLogCondition, | ||
ThreadInitFunc | ThreadInit, | ||
ThreadDeinitFunc | ThreadDeinit, | ||
ThreadExitPrintStatsFunc | ThreadExitPrintStats | ||
) |
Register a tx output module with condition.
This function will register an output module so it can be configured with the configuration file.
Returns | 0 on success, -1 on failure. |
Definition at line 329 of file output.c.
Referenced by LogTlsStoreRegister().
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, | ||
ThreadExitPrintStatsFunc | ThreadExitPrintStats | ||
) |
Register a tx output module with progress.
This function will register an output module so it can be configured with the configuration file.
Returns | 0 on success, -1 on failure. |
Definition at line 360 of file output.c.
Referenced by JsonDnsLogRegister(), JsonSshLogRegister(), JsonTlsLogRegister(), and LogTlsLogRegister().
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, | ||
ThreadExitPrintStatsFunc | ThreadExitPrintStats | ||
) |
Definition at line 402 of file output.c.
Referenced by JsonAnomalyLogRegister(), JsonDHCPLogRegister(), JsonFTPLogRegister(), JsonHttpLogRegister(), JsonIKEv2LogRegister(), JsonKRB5LogRegister(), JsonNFSLogRegister(), JsonRdpLogRegister(), JsonSIPLogRegister(), JsonSMBLogRegister(), JsonSmtpLogRegister(), JsonSNMPLogRegister(), JsonTemplateLogRegister(), JsonTemplateRustLogRegister(), and JsonTFTPLogRegister().
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, | ||
ThreadExitPrintStatsFunc | ThreadExitPrintStats | ||
) |
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, | ||
ThreadExitPrintStatsFunc | ThreadExitPrintStats | ||
) |
Definition at line 371 of file output.c.
Referenced by JsonDNP3LogRegister(), JsonDnsLogRegister(), JsonSshLogRegister(), and JsonTlsLogRegister().
void OutputUnregisterFileRotationFlag | ( | int * | flag | ) |
Unregister a file rotation flag.
Note that it is safe to call this function with a flag that may not have been registered, in which case this function won't do anything.
flag | A pointer that has been previously registered for file rotation notifications. |
Definition at line 893 of file output.c.
References next, OutputFileRolloverFlag, SCFree, TAILQ_FIRST, TAILQ_NEXT, and TAILQ_REMOVE.
Referenced by LogFileFreeCtx().
typedef TAILQ_HEAD | ( | OutputModuleList_ | , |
OutputModule_ | |||
) |
void TmModuleLoggerRegister | ( | void | ) |
Definition at line 1020 of file output.c.
References OutputRegisterLoggers(), and OutputRegisterRootLoggers().
Referenced by RegisterAllModules().
OutputModuleList output_modules |
Referenced by OutputDeregisterAll(), OutputGetModuleByConfName(), OutputRegisterFiledataModule(), OutputRegisterFiledataSubModule(), OutputRegisterFileModule(), OutputRegisterFileSubModule(), OutputRegisterFlowModule(), OutputRegisterFlowSubModule(), OutputRegisterPacketModule(), OutputRegisterPacketSubModule(), OutputRegisterStatsModule(), OutputRegisterStatsSubModule(), OutputRegisterStreamingModule(), OutputRegisterStreamingSubModule(), RunModeInitializeOutputs(), RunModeShutDown(), and TAILQ_HEAD().