suricata
output-flow.c File Reference
#include "suricata-common.h"
#include "tm-modules.h"
#include "output-flow.h"
#include "util-profiling.h"
#include "util-validate.h"
Include dependency graph for output-flow.c:

Go to the source code of this file.

Data Structures

struct  OutputLoggerThreadStore_
 
struct  OutputLoggerThreadData_
 
struct  OutputFlowLogger_
 

Typedefs

typedef struct OutputLoggerThreadStore_ OutputLoggerThreadStore
 
typedef struct OutputLoggerThreadData_ OutputLoggerThreadData
 
typedef struct OutputFlowLogger_ OutputFlowLogger
 

Functions

int OutputRegisterFlowLogger (const char *name, FlowLogger LogFunc, OutputCtx *output_ctx, ThreadInitFunc ThreadInit, ThreadDeinitFunc ThreadDeinit, ThreadExitPrintStatsFunc ThreadExitPrintStats)
 
TmEcode OutputFlowLog (ThreadVars *tv, void *thread_data, Flow *f)
 Run flow logger(s) More...
 
TmEcode OutputFlowLogThreadInit (ThreadVars *tv, void *initdata, void **data)
 thread init for the flow logger This will run the thread init functions for the individual registered loggers More...
 
TmEcode OutputFlowLogThreadDeinit (ThreadVars *tv, void *thread_data)
 
void OutputFlowLogExitPrintStats (ThreadVars *tv, void *thread_data)
 
void OutputFlowShutdown (void)
 

Detailed Description

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

Flow Logger Output registration functions

Definition in file output-flow.c.

Typedef Documentation

◆ OutputFlowLogger

◆ OutputLoggerThreadData

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

◆ OutputLoggerThreadStore

Function Documentation

◆ OutputFlowLog()

TmEcode OutputFlowLog ( ThreadVars tv,
void *  thread_data,
Flow f 
)

Run flow logger(s)

Note
flow is already write locked

Definition at line 91 of file output-flow.c.

References DEBUG_VALIDATE_BUG_ON.

◆ OutputFlowLogExitPrintStats()

void OutputFlowLogExitPrintStats ( ThreadVars tv,
void *  thread_data 
)

Definition at line 192 of file output-flow.c.

References OutputLoggerThreadData_::store.

◆ OutputFlowLogThreadDeinit()

TmEcode OutputFlowLogThreadDeinit ( ThreadVars tv,
void *  thread_data 
)

Definition at line 171 of file output-flow.c.

References OutputLoggerThreadData_::store.

Referenced by DecodeThreadVarsFree().

Here is the caller graph for this function:

◆ OutputFlowLogThreadInit()

TmEcode OutputFlowLogThreadInit ( ThreadVars tv,
void *  initdata,
void **  data 
)

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

Definition at line 129 of file output-flow.c.

References SCLogDebug, SCMalloc, and TM_ECODE_FAILED.

Referenced by DecodeThreadVarsAlloc().

Here is the caller graph for this function:

◆ OutputFlowShutdown()

void OutputFlowShutdown ( void  )

Definition at line 208 of file output-flow.c.

◆ OutputRegisterFlowLogger()

int OutputRegisterFlowLogger ( const char *  name,
FlowLogger  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 58 of file output-flow.c.

References OutputFlowLogger_::LogFunc, OutputFlowLogger_::name, OutputFlowLogger_::output_ctx, SCMalloc, OutputFlowLogger_::ThreadDeinit, OutputFlowLogger_::ThreadExitPrintStats, and OutputFlowLogger_::ThreadInit.