suricata
|
#include "suricata-common.h"
#include "log-tcp-data.h"
#include "threadvars.h"
#include "util-conf.h"
#include "util-logopenfile.h"
#include "util-path.h"
#include "util-print.h"
Go to the source code of this file.
Data Structures | |
struct | LogTcpDataFileCtx_ |
struct | LogTcpDataLogThread_ |
Macros | |
#define | DEFAULT_LOG_FILENAME "tcp-data.log" |
#define | MODULE_NAME "LogTcpDataLog" |
#define | OUTPUT_BUFFER_SIZE 65535 |
Typedefs | |
typedef struct LogTcpDataFileCtx_ | LogTcpDataFileCtx |
typedef struct LogTcpDataLogThread_ | LogTcpDataLogThread |
Functions | |
TmEcode | LogTcpDataLogThreadInit (ThreadVars *, const void *, void **) |
TmEcode | LogTcpDataLogThreadDeinit (ThreadVars *, void *) |
int | LogTcpDataLogger (ThreadVars *tv, void *thread_data, const Flow *f, const uint8_t *data, uint32_t data_len, uint64_t tx_id, uint8_t flags) |
void | LogTcpDataLogRegister (void) |
OutputInitResult | LogTcpDataLogInitCtx (ConfNode *conf) |
Create a new http log LogFileCtx. More... | |
Definition in file log-tcp-data.c.
#define DEFAULT_LOG_FILENAME "tcp-data.log" |
Definition at line 35 of file log-tcp-data.c.
#define MODULE_NAME "LogTcpDataLog" |
Definition at line 37 of file log-tcp-data.c.
#define OUTPUT_BUFFER_SIZE 65535 |
Definition at line 39 of file log-tcp-data.c.
typedef struct LogTcpDataFileCtx_ LogTcpDataFileCtx |
typedef struct LogTcpDataLogThread_ LogTcpDataLogThread |
int LogTcpDataLogger | ( | ThreadVars * | tv, |
void * | thread_data, | ||
const Flow * | f, | ||
const uint8_t * | data, | ||
uint32_t | data_len, | ||
uint64_t | tx_id, | ||
uint8_t | flags | ||
) |
Definition at line 151 of file log-tcp-data.c.
References LogTcpDataFileCtx_::dir, SCEnter, and LogTcpDataLogThread_::tcpdatalog_ctx.
Referenced by LogTcpDataLogRegister().
OutputInitResult LogTcpDataLogInitCtx | ( | ConfNode * | conf | ) |
Create a new http log LogFileCtx.
conf | Pointer to ConfNode containing this loggers configuration. |
Definition at line 211 of file log-tcp-data.c.
References ConfigGetLogDirectory(), ConfNodeLookupChildValue(), OutputCtx_::data, DEFAULT_LOG_FILENAME, OutputCtx_::DeInit, LogTcpDataFileCtx_::dir, LogTcpDataFileCtx_::file, LogTcpDataFileCtx_::file_ctx, LogTcpDataFileCtx_::log_dir, LogFileFreeCtx(), LogFileNewCtx(), ConfNode_::name, SCCalloc, SCConfLogOpenGeneric(), SCFree, SCLogError, SCLogInfo, SCMkDir, STREAMING_HTTP_BODIES, STREAMING_TCP_DATA, strlcpy(), LogTcpDataFileCtx_::type, and unlikely.
Referenced by LogTcpDataLogRegister().
void LogTcpDataLogRegister | ( | void | ) |
Definition at line 46 of file log-tcp-data.c.
References LOGGER_TCP_DATA, LogTcpDataLogger(), LogTcpDataLogInitCtx(), LogTcpDataLogThreadDeinit(), LogTcpDataLogThreadInit(), MODULE_NAME, OutputRegisterStreamingModule(), STREAMING_HTTP_BODIES, and STREAMING_TCP_DATA.
TmEcode LogTcpDataLogThreadDeinit | ( | ThreadVars * | t, |
void * | data | ||
) |
Definition at line 192 of file log-tcp-data.c.
References LogTcpDataLogThread_::buffer, MemBufferFree(), SCFree, and TM_ECODE_OK.
Referenced by LogTcpDataLogRegister().
TmEcode LogTcpDataLogThreadInit | ( | ThreadVars * | t, |
const void * | initdata, | ||
void ** | data | ||
) |
Definition at line 166 of file log-tcp-data.c.
References LogTcpDataLogThread_::buffer, MemBufferCreateNew(), OUTPUT_BUFFER_SIZE, SCCalloc, SCFree, SCLogDebug, LogTcpDataLogThread_::tcpdatalog_ctx, TM_ECODE_FAILED, TM_ECODE_OK, and unlikely.
Referenced by LogTcpDataLogRegister().