suricata
|
#include "suricata-common.h"
#include "flow.h"
#include "conf.h"
#include "tm-threads.h"
#include "util-error.h"
#include "util-debug.h"
#include "output.h"
#include "alert-fastlog.h"
#include "alert-debuglog.h"
#include "alert-syslog.h"
#include "output-json.h"
#include "output-json-alert.h"
#include "output-json-anomaly.h"
#include "output-json-flow.h"
#include "output-json-netflow.h"
#include "log-cf-common.h"
#include "output-json-drop.h"
#include "output-eve-stream.h"
#include "log-httplog.h"
#include "output-json-http.h"
#include "output-json-dns.h"
#include "output-json-modbus.h"
#include "log-tlslog.h"
#include "log-tlsstore.h"
#include "output-json-tls.h"
#include "output-json-ssh.h"
#include "log-pcap.h"
#include "output-json-file.h"
#include "output-json-smtp.h"
#include "output-json-stats.h"
#include "log-tcp-data.h"
#include "log-stats.h"
#include "output-json-nfs.h"
#include "output-json-ftp.h"
#include "output-json-tftp.h"
#include "output-json-smb.h"
#include "output-json-ike.h"
#include "output-json-krb5.h"
#include "output-json-quic.h"
#include "output-json-dhcp.h"
#include "output-json-snmp.h"
#include "output-json-sip.h"
#include "output-json-rfb.h"
#include "output-json-mqtt.h"
#include "output-json-pgsql.h"
#include "output-json-template.h"
#include "output-json-rdp.h"
#include "output-json-http2.h"
#include "output-lua.h"
#include "output-json-dnp3.h"
#include "output-json-metadata.h"
#include "output-json-dcerpc.h"
#include "output-json-frame.h"
#include "output-json-bittorrent-dht.h"
#include "output-filestore.h"
Go to the source code of this file.
Data Structures | |
struct | RootLogger_ |
Typedefs | |
typedef struct RootLogger_ | RootLogger |
Functions | |
typedef | TAILQ_HEAD (LoggerThreadStore_, LoggerThreadStoreNode_) |
TAILQ_HEAD (OutputFileRolloverFlag_) | |
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. More... | |
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. More... | |
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 | 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 | 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 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. 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 *conf_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... | |
TmEcode | OutputLoggerLog (ThreadVars *tv, Packet *p, void *thread_data) |
TmEcode | OutputLoggerThreadInit (ThreadVars *tv, const void *initdata, void **data) |
TmEcode | OutputLoggerThreadDeinit (ThreadVars *tv, void *thread_data) |
void | OutputLoggerExitPrintStats (ThreadVars *tv, void *thread_data) |
void | OutputRegisterRootLogger (ThreadInitFunc ThreadInit, ThreadDeinitFunc ThreadDeinit, ThreadExitPrintStatsFunc ThreadExitPrintStats, OutputLogFunc LogFunc, OutputGetActiveCountFunc ActiveCntFunc) |
void | OutputSetupActiveLoggers (void) |
void | OutputClearActiveLoggers (void) |
void | TmModuleLoggerRegister (void) |
void | OutputRegisterRootLoggers (void) |
Register all root loggers. More... | |
void | OutputRegisterLoggers (void) |
Register all non-root logging modules. More... | |
Variables | |
LoggerThreadStoreNode | |
OutputFileRolloverFlag | |
The root logging output for all non-application logging.
The loggers are made up of a hierarchy of loggers. At the top we have the root logger which is the main entry point to logging. Under the root there exists parent loggers that are the entry point for specific types of loggers such as packet logger, transaction loggers, etc. Each parent logger may have 0 or more loggers that actual handle the job of producing output to something like a file.
Definition in file output.c.
typedef struct RootLogger_ RootLogger |
void OutputClearActiveLoggers | ( | void | ) |
Definition at line 1008 of file output.c.
References SCFree, TAILQ_FIRST, and TAILQ_REMOVE.
void OutputDeregisterAll | ( | void | ) |
Deregister all modules. Useful for a memory clean exit.
Definition at line 800 of file output.c.
References output_modules, SCFree, TAILQ_FIRST, and TAILQ_REMOVE.
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 785 of file output.c.
References OutputModule_::conf_name, output_modules, and TAILQ_FOREACH.
void OutputLoggerExitPrintStats | ( | ThreadVars * | tv, |
void * | thread_data | ||
) |
TmEcode OutputLoggerLog | ( | ThreadVars * | tv, |
Packet * | p, | ||
void * | thread_data | ||
) |
TmEcode OutputLoggerThreadDeinit | ( | ThreadVars * | tv, |
void * | thread_data | ||
) |
Definition at line 922 of file output.c.
References TM_ECODE_FAILED.
TmEcode OutputLoggerThreadInit | ( | ThreadVars * | tv, |
const void * | initdata, | ||
void ** | data | ||
) |
void OutputNotifyFileRotation | ( | void | ) |
Notifies all registered file rotation notification flags.
Definition at line 870 of file output.c.
References OutputFileRolloverFlag, and TAILQ_FOREACH.
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 508 of file output.c.
References OutputModule_::conf_name, FatalError, OutputModule_::FiledataLogFunc, OutputModule_::InitFunc, OutputModule_::logger_id, OutputModule_::name, output_modules, SCCalloc, SCLogDebug, TAILQ_INSERT_TAIL, OutputModule_::ThreadDeinit, OutputModule_::ThreadExitPrintStats, OutputModule_::ThreadInit, and unlikely.
Referenced by 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 547 of file output.c.
References OutputModule_::conf_name, FatalError, OutputModule_::FiledataLogFunc, OutputModule_::InitSubFunc, OutputModule_::logger_id, OutputModule_::name, output_modules, OutputModule_::parent_name, SCCalloc, SCLogDebug, TAILQ_INSERT_TAIL, OutputModule_::ThreadDeinit, OutputModule_::ThreadExitPrintStats, OutputModule_::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 430 of file output.c.
References OutputModule_::conf_name, FatalError, OutputModule_::FileLogFunc, OutputModule_::InitFunc, OutputModule_::logger_id, OutputModule_::name, output_modules, SCCalloc, SCLogDebug, TAILQ_INSERT_TAIL, OutputModule_::ThreadDeinit, OutputModule_::ThreadExitPrintStats, OutputModule_::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 832 of file output.c.
References OutputFileRolloverFlag, SCCalloc, SCLogError, TAILQ_INSERT_TAIL, and unlikely.
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 468 of file output.c.
References OutputModule_::conf_name, FatalError, OutputModule_::FileLogFunc, OutputModule_::InitSubFunc, OutputModule_::logger_id, OutputModule_::name, output_modules, OutputModule_::parent_name, SCCalloc, SCLogDebug, TAILQ_INSERT_TAIL, OutputModule_::ThreadDeinit, OutputModule_::ThreadExitPrintStats, OutputModule_::ThreadInit, and unlikely.
Referenced by JsonFileLogRegister().
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 587 of file output.c.
References OutputModule_::conf_name, FatalError, OutputModule_::FlowLogFunc, OutputModule_::InitSubFunc, OutputModule_::logger_id, OutputModule_::name, output_modules, OutputModule_::parent_name, SCCalloc, SCLogDebug, TAILQ_INSERT_TAIL, OutputModule_::ThreadDeinit, OutputModule_::ThreadExitPrintStats, OutputModule_::ThreadInit, and unlikely.
Referenced by JsonFlowLogRegister(), and JsonNetFlowLogRegister().
void OutputRegisterLoggers | ( | void | ) |
Register all non-root logging modules.
Definition at line 1038 of file output.c.
References AlertDebugLogRegister(), AlertFastLogRegister(), AlertSyslogRegister(), EveStreamLogRegister(), JsonAlertLogRegister(), JsonAnomalyLogRegister(), JsonBitTorrentDHTLogRegister(), JsonDCERPCLogRegister(), JsonDHCPLogRegister(), JsonDNP3LogRegister(), JsonDnsLogRegister(), JsonDropLogRegister(), JsonFileLogRegister(), JsonFlowLogRegister(), JsonFrameLogRegister(), JsonFTPLogRegister(), JsonHttp2LogRegister(), JsonHttpLogRegister(), JsonIKELogRegister(), JsonKRB5LogRegister(), JsonMetadataLogRegister(), JsonModbusLogRegister(), JsonMQTTLogRegister(), JsonNetFlowLogRegister(), JsonNFSLogRegister(), JsonPgsqlLogRegister(), JsonQuicLogRegister(), JsonRdpLogRegister(), JsonRFBLogRegister(), JsonSIPLogRegister(), JsonSMBLogRegister(), JsonSmtpLogRegister(), JsonSNMPLogRegister(), JsonSshLogRegister(), JsonStatsLogRegister(), JsonTemplateLogRegister(), JsonTFTPLogRegister(), JsonTlsLogRegister(), LogCustomFormatRegister(), LogHttpLogRegister(), LogStatsLogRegister(), LogTcpDataLogRegister(), LogTlsLogRegister(), LogTlsStoreRegister(), LuaLogRegister(), OutputFilestoreRegister(), OutputJsonRegister(), and PcapLogRegister().
Referenced by TmModuleLoggerRegister().
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 176 of file output.c.
References OutputModule_::conf_name, FatalError, OutputModule_::InitFunc, OutputModule_::logger_id, OutputModule_::name, output_modules, OutputModule_::PacketConditionFunc, OutputModule_::PacketLogFunc, SCCalloc, SCLogDebug, TAILQ_INSERT_TAIL, OutputModule_::ThreadDeinit, OutputModule_::ThreadExitPrintStats, OutputModule_::ThreadInit, and unlikely.
Referenced by AlertDebugLogRegister(), AlertFastLogRegister(), AlertSyslogRegister(), and PcapLogRegister().
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 216 of file output.c.
References OutputModule_::conf_name, FatalError, OutputModule_::InitSubFunc, OutputModule_::logger_id, OutputModule_::name, output_modules, OutputModule_::PacketConditionFunc, OutputModule_::PacketLogFunc, OutputModule_::parent_name, SCCalloc, SCLogDebug, TAILQ_INSERT_TAIL, OutputModule_::ThreadDeinit, OutputModule_::ThreadExitPrintStats, OutputModule_::ThreadInit, and unlikely.
Referenced by EveStreamLogRegister(), JsonAlertLogRegister(), JsonAnomalyLogRegister(), JsonDropLogRegister(), JsonFrameLogRegister(), and JsonMetadataLogRegister().
void OutputRegisterRootLogger | ( | ThreadInitFunc | ThreadInit, |
ThreadDeinitFunc | ThreadDeinit, | ||
ThreadExitPrintStatsFunc | ThreadExitPrintStats, | ||
OutputLogFunc | LogFunc, | ||
OutputGetActiveCountFunc | ActiveCntFunc | ||
) |
Definition at line 962 of file output.c.
References RootLogger_::ActiveCntFunc, BUG_ON, FatalError, RootLogger_::LogFunc, SCCalloc, TAILQ_INSERT_TAIL, RootLogger_::ThreadDeinit, RootLogger_::ThreadExitPrintStats, and RootLogger_::ThreadInit.
Referenced by OutputPacketLoggerRegister(), OutputStreamingLoggerRegister(), and OutputTxLoggerRegister().
void OutputRegisterRootLoggers | ( | void | ) |
Register all root loggers.
Definition at line 1026 of file output.c.
References OutputFiledataLoggerRegister(), OutputFileLoggerRegister(), OutputPacketLoggerRegister(), OutputStreamingLoggerRegister(), and OutputTxLoggerRegister().
Referenced by TmModuleLoggerRegister().
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 709 of file output.c.
References OutputModule_::conf_name, FatalError, OutputModule_::InitFunc, OutputModule_::logger_id, OutputModule_::name, output_modules, SCCalloc, SCLogDebug, OutputModule_::StatsLogFunc, TAILQ_INSERT_TAIL, OutputModule_::ThreadDeinit, OutputModule_::ThreadExitPrintStats, OutputModule_::ThreadInit, and unlikely.
Referenced by 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 747 of file output.c.
References OutputModule_::conf_name, FatalError, OutputModule_::InitSubFunc, OutputModule_::logger_id, OutputModule_::name, output_modules, OutputModule_::parent_name, SCCalloc, SCLogDebug, OutputModule_::StatsLogFunc, TAILQ_INSERT_TAIL, OutputModule_::ThreadDeinit, OutputModule_::ThreadExitPrintStats, OutputModule_::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 627 of file output.c.
References OutputModule_::conf_name, FatalError, OutputModule_::InitFunc, OutputModule_::logger_id, OutputModule_::name, output_modules, SCCalloc, SCLogDebug, OutputModule_::stream_type, OutputModule_::StreamingLogFunc, TAILQ_INSERT_TAIL, OutputModule_::ThreadDeinit, OutputModule_::ThreadExitPrintStats, OutputModule_::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 668 of file output.c.
References OutputModule_::conf_name, FatalError, OutputModule_::InitSubFunc, OutputModule_::logger_id, OutputModule_::name, output_modules, OutputModule_::parent_name, SCCalloc, SCLogDebug, OutputModule_::stream_type, OutputModule_::StreamingLogFunc, TAILQ_INSERT_TAIL, OutputModule_::ThreadDeinit, OutputModule_::ThreadExitPrintStats, OutputModule_::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 400 of file output.c.
Referenced by 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 338 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 369 of file output.c.
Referenced by 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 411 of file output.c.
Referenced by JsonBitTorrentDHTLogRegister(), JsonDCERPCLogRegister(), JsonDHCPLogRegister(), JsonDNP3LogRegister(), JsonFTPLogRegister(), JsonHttpLogRegister(), JsonIKELogRegister(), JsonKRB5LogRegister(), JsonModbusLogRegister(), JsonMQTTLogRegister(), JsonNFSLogRegister(), JsonPgsqlLogRegister(), JsonQuicLogRegister(), JsonRdpLogRegister(), JsonRFBLogRegister(), JsonSIPLogRegister(), JsonSMBLogRegister(), JsonSmtpLogRegister(), JsonSNMPLogRegister(), JsonTemplateLogRegister(), 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 | ||
) |
Definition at line 349 of file output.c.
Referenced by JsonSshLogRegister().
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 380 of file output.c.
Referenced by JsonHttp2LogRegister(), and JsonTlsLogRegister().
void OutputSetupActiveLoggers | ( | void | ) |
Definition at line 995 of file output.c.
References TAILQ_FIRST.
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 853 of file output.c.
References next, OutputFileRolloverFlag, SCFree, TAILQ_FIRST, TAILQ_NEXT, and TAILQ_REMOVE.
Referenced by LogFileFreeCtx().
typedef TAILQ_HEAD | ( | LoggerThreadStore_ | , |
LoggerThreadStoreNode_ | |||
) |
void TmModuleLoggerRegister | ( | void | ) |
Definition at line 1017 of file output.c.
References OutputRegisterLoggers(), and OutputRegisterRootLoggers().
Referenced by RegisterAllModules().
OutputFileRolloverFlag |
Definition at line 132 of file output.c.
Referenced by OutputNotifyFileRotation(), OutputRegisterFileRotationFlag(), and OutputUnregisterFileRotationFlag().