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

Go to the source code of this file.

Data Structures

struct  OutputLoggerThreadStore_
 
struct  OutputLoggerThreadData_
 
struct  OutputFiledataLogger_
 

Typedefs

typedef struct OutputLoggerThreadStore_ OutputLoggerThreadStore
 
typedef struct OutputLoggerThreadData_ OutputLoggerThreadData
 
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 OutputFiledataLoggerRegister (void)
 
void OutputFiledataShutdown (void)
 

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

per thread data for this module, contains a list of per thread data for the packet loggers.

Function Documentation

void OutputFiledataLoggerRegister ( void  )

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

References OutputRegisterRootLogger(), and SC_ATOMIC_INIT.

Referenced by OutputRegisterRootLoggers().

Here is the call graph for this function:

Here is the caller graph for this function:

void OutputFiledataShutdown ( void  )

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

References OutputFiledataLogger_::next, and SCFree.

Referenced by RunModeShutDown().

Here is the caller graph for this function:

int OutputRegisterFiledataLogger ( LoggerId  id,
const char *  name,
FiledataLogger  LogFunc,
OutputCtx ,
ThreadInitFunc  ThreadInit,
ThreadDeinitFunc  ThreadDeinit,
ThreadExitPrintStatsFunc  ThreadExitPrintStats 
)

packet logger condition function pointer type, must return true for packets that should be logged

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

References Flow_::alproto, Flow_::alstate, AppLayerParserGetFiles(), BUG_ON, ConfGetNode(), ConfigGetLogDirectory(), ConfNodeLookupChild(), File_::content_stored, DEBUG_VALIDATE_BUG_ON, FILE_STATE_CLOSED, FILE_STORE, File_::file_store_id, FILE_STORED, FILE_TRUNCATED, FileCloseFilePtr(), FileDataSize(), FileForceMagic(), File_::flags, flags, Packet_::flags, Packet_::flow, FLOW_PKT_TOCLIENT, FLOW_PKT_TOSERVER, Packet_::flowflags, FileContainer_::head, OutputFiledataLogger_::LogFunc, OutputFiledataLogger_::logger_id, OutputFiledataLogger_::name, OutputLoggerThreadStore_::next, OutputFiledataLogger_::next, File_::next, OutputFiledataLogger_::output_ctx, OUTPUT_FILEDATA_FLAG_CLOSE, OUTPUT_FILEDATA_FLAG_OPEN, PACKET_PROFILING_LOGGER_END, PACKET_PROFILING_LOGGER_START, PathIsAbsolute(), PKT_PSEUDO_STREAM_END, Packet_::proto, File_::sb, SC_ATOMIC_ADD, SC_ATOMIC_CAS, SC_ATOMIC_DECLARE(), SC_ATOMIC_GET, SC_ERR_FWRITE, SCFree, SCLogDebug, SCLogError, SCLogInfo, SCMalloc, SCMutexLock, SCMutexUnlock, SCReturn, SCReturnInt, File_::state, OutputLoggerThreadData_::store, STREAM_TOCLIENT, STREAM_TOSERVER, StreamingBufferGetDataAtOffset(), StreamTcpReassembleDepthReached(), TAILQ_FOREACH, OutputLoggerThreadStore_::thread_data, OutputFiledataLogger_::ThreadDeinit, OutputFiledataLogger_::ThreadExitPrintStats, OutputFiledataLogger_::ThreadInit, TM_ECODE_FAILED, TM_ECODE_OK, ts, and ConfNode_::val.

Referenced by RunModeShutDown().

Here is the call graph for this function:

Here is the caller graph for this function:

SC_ATOMIC_DECLARE ( unsigned  int,
g_file_store_id   
)

Referenced by OutputRegisterFiledataLogger().

Here is the caller graph for this function: