suricata
|
#include "rust.h"
Go to the source code of this file.
Data Structures | |
struct | OutputFileLoggerThreadData_ |
Typedefs | |
typedef struct OutputFileLoggerThreadData_ | OutputFileLoggerThreadData |
typedef int(* | SCFileLogger) (ThreadVars *, void *thread_data, const Packet *, const File *, void *tx, const uint64_t tx_id, uint8_t direction) |
Functions | |
TmEcode | OutputFileLogThreadInit (ThreadVars *tv, OutputFileLoggerThreadData **data) |
thread init for the file logger This will run the thread init functions for the individual registered loggers More... | |
TmEcode | OutputFileLogThreadDeinit (ThreadVars *tv, OutputFileLoggerThreadData *thread_data) |
void | OutputFileLogFfc (ThreadVars *tv, OutputFileLoggerThreadData *op_thread_data, Packet *p, FileContainer *ffc, void *txv, const uint64_t tx_id, AppLayerTxData *txd, const bool file_close, const bool file_trunc, uint8_t dir) |
int | SCOutputRegisterFileLogger (LoggerId id, const char *name, SCFileLogger LogFunc, void *initdata, ThreadInitFunc ThreadInit, ThreadDeinitFunc ThreadDeinit) |
Register a file logger. More... | |
void | OutputFileLoggerRegister (void) |
void | OutputFileShutdown (void) |
AppLayer File Logger Output registration functions
Definition in file output-file.h.
typedef struct OutputFileLoggerThreadData_ OutputFileLoggerThreadData |
per thread data for this module, contains a list of per thread data for the packet loggers.
typedef int(* SCFileLogger) (ThreadVars *, void *thread_data, const Packet *, const File *, void *tx, const uint64_t tx_id, uint8_t direction) |
file logger function pointer type
Definition at line 48 of file output-file.h.
void OutputFileLogFfc | ( | ThreadVars * | tv, |
OutputFileLoggerThreadData * | op_thread_data, | ||
Packet * | p, | ||
FileContainer * | ffc, | ||
void * | txv, | ||
const uint64_t | tx_id, | ||
AppLayerTxData * | txd, | ||
const bool | file_close, | ||
const bool | file_trunc, | ||
uint8_t | dir | ||
) |
Definition at line 96 of file output-file.c.
References FILE_LOGGED, FILE_STATE_CLOSED, FILE_STATE_OPENED, FILE_STATE_TRUNCATED, FileApplyTxFlags(), FileForceMagic(), File_::flags, FileContainer_::head, File_::next, SCLogDebug, and File_::state.
void OutputFileLoggerRegister | ( | void | ) |
Internal function: private API.
Definition at line 235 of file output-file.c.
TmEcode OutputFileLogThreadDeinit | ( | ThreadVars * | tv, |
OutputFileLoggerThreadData * | thread_data | ||
) |
Definition at line 211 of file output-file.c.
References OutputFileLoggerThreadData_::store.
TmEcode OutputFileLogThreadInit | ( | ThreadVars * | tv, |
OutputFileLoggerThreadData ** | data | ||
) |
thread init for the file logger This will run the thread init functions for the individual registered loggers
Definition at line 164 of file output-file.c.
References SCCalloc, SCFree, SCLogDebug, and TM_ECODE_FAILED.
void OutputFileShutdown | ( | void | ) |
Internal function: private API.
Definition at line 239 of file output-file.c.
int SCOutputRegisterFileLogger | ( | LoggerId | id, |
const char * | name, | ||
SCFileLogger | LogFunc, | ||
void * | initdata, | ||
ThreadInitFunc | ThreadInit, | ||
ThreadDeinitFunc | ThreadDeinit | ||
) |
Register a file logger.
logger_id | An ID used to distinguish this logger from others while profiling. |
name | An informational name for this logger. Used only for debugging. |
LogFunc | A function that will be called to log each file to be logged. |
initdata | Initialization data that will pass to the ThreadInitFunc. |
ThreadInitFunc | Thread initialization function. |
ThreadDeinitFunc | Thread de-initialization function. |
0 | on success, -1 on failure. |
Definition at line 56 of file output-file.c.