suricata
output-filedata.c File Reference
#include "suricata-common.h"
#include "output.h"
#include "output-filedata.h"
#include "app-layer-parser.h"
#include "detect-filemagic.h"
#include "conf.h"
#include "util-profiling.h"
#include "util-validate.h"
#include "util-magic.h"
#include "util-path.h"
Include dependency graph for output-filedata.c:

Go to the source code of this file.

Data Structures

struct  OutputFiledataLogger_
 

Typedefs

typedef struct OutputFiledataLogger_ OutputFiledataLogger
 

Functions

int OutputRegisterFiledataLogger (LoggerId id, const char *name, FiledataLogger LogFunc, OutputCtx *output_ctx, ThreadInitFunc ThreadInit, ThreadDeinitFunc ThreadDeinit, ThreadExitPrintStatsFunc ThreadExitPrintStats)
 
 SC_ATOMIC_DECLARE (unsigned int, g_file_store_id)
 
void OutputFiledataLogFfc (ThreadVars *tv, OutputFiledataLoggerThreadData *td, Packet *p, AppLayerGetFileState files, void *txv, const uint64_t tx_id, AppLayerTxData *txd, const uint8_t call_flags, const bool file_close, const bool file_trunc, const uint8_t dir)
 
TmEcode OutputFiledataLogThreadInit (ThreadVars *tv, OutputFiledataLoggerThreadData **data)
 thread init for the filedata logger This will run the thread init functions for the individual registered loggers More...
 
TmEcode OutputFiledataLogThreadDeinit (ThreadVars *tv, OutputFiledataLoggerThreadData *op_thread_data)
 
void OutputFiledataLoggerRegister (void)
 
void OutputFiledataShutdown (void)
 

Variables

bool g_filedata_logger_enabled = false
 

Detailed Description

Author
Victor Julien victo.nosp@m.r@in.nosp@m.linia.nosp@m.c.ne.nosp@m.t

AppLayer Filedata Logger Output registration functions

Definition in file output-filedata.c.

Typedef Documentation

◆ OutputFiledataLogger

Function Documentation

◆ OutputFiledataLogFfc()

void OutputFiledataLogFfc ( ThreadVars tv,
OutputFiledataLoggerThreadData td,
Packet p,
AppLayerGetFileState  files,
void *  txv,
const uint64_t  tx_id,
AppLayerTxData txd,
const uint8_t  call_flags,
const bool  file_close,
const bool  file_trunc,
const uint8_t  dir 
)

◆ OutputFiledataLoggerRegister()

void OutputFiledataLoggerRegister ( void  )

Definition at line 275 of file output-filedata.c.

References SC_ATOMIC_INIT, and SC_ATOMIC_SET.

Referenced by OutputRegisterRootLoggers().

Here is the caller graph for this function:

◆ OutputFiledataLogThreadDeinit()

TmEcode OutputFiledataLogThreadDeinit ( ThreadVars tv,
OutputFiledataLoggerThreadData op_thread_data 
)

Definition at line 250 of file output-filedata.c.

References OutputFiledataLoggerThreadData_::store.

◆ OutputFiledataLogThreadInit()

TmEcode OutputFiledataLogThreadInit ( ThreadVars tv,
OutputFiledataLoggerThreadData **  data 
)

thread init for the filedata logger This will run the thread init functions for the individual registered loggers

Definition at line 204 of file output-filedata.c.

References SCCalloc, SCFree, SCLogDebug, and TM_ECODE_FAILED.

◆ OutputFiledataShutdown()

void OutputFiledataShutdown ( void  )

Definition at line 281 of file output-filedata.c.

◆ OutputRegisterFiledataLogger()

◆ SC_ATOMIC_DECLARE()

SC_ATOMIC_DECLARE ( unsigned int  ,
g_file_store_id   
)

Variable Documentation

◆ g_filedata_logger_enabled

bool g_filedata_logger_enabled = false

Definition at line 37 of file output-filedata.c.