suricata
output-flow.h File Reference
#include "decode.h"
#include "tm-modules.h"
#include "flow.h"
Include dependency graph for output-flow.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Typedefs

typedef int(* FlowLogger) (ThreadVars *, void *thread_data, Flow *f)
 Flow logger function pointer type. More...
 

Functions

int SCOutputRegisterFlowLogger (const char *name, FlowLogger LogFunc, void *initdata, ThreadInitFunc ThreadInit, ThreadDeinitFunc ThreadDeinit)
 Register a flow logger. More...
 
void OutputFlowShutdown (void)
 
TmEcode OutputFlowLog (ThreadVars *tv, void *thread_data, Flow *f)
 Run flow logger(s) More...
 
TmEcode OutputFlowLogThreadInit (ThreadVars *tv, 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)
 

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.h.

Typedef Documentation

◆ FlowLogger

typedef int(* FlowLogger) (ThreadVars *, void *thread_data, Flow *f)

Flow logger function pointer type.

Definition at line 36 of file output-flow.h.

Function Documentation

◆ OutputFlowLog()

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

Run flow logger(s)

Internal function: private API.

Note
flow is already write locked

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

References DEBUG_VALIDATE_BUG_ON.

◆ OutputFlowLogThreadDeinit()

TmEcode OutputFlowLogThreadDeinit ( ThreadVars tv,
void *  thread_data 
)

Internal function: private API.

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

References OutputFlowLoggerThreadData_::store, and TM_ECODE_OK.

Referenced by DecodeThreadVarsFree().

Here is the caller graph for this function:

◆ OutputFlowLogThreadInit()

TmEcode OutputFlowLogThreadInit ( ThreadVars tv,
void **  data 
)

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

Internal function: private API.

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

References SCCalloc, SCLogDebug, and TM_ECODE_FAILED.

Referenced by DecodeThreadVarsAlloc().

Here is the caller graph for this function:

◆ OutputFlowShutdown()

void OutputFlowShutdown ( void  )

Internal function: private API.

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

◆ SCOutputRegisterFlowLogger()

int SCOutputRegisterFlowLogger ( const char *  name,
FlowLogger  LogFunc,
void *  initdata,
ThreadInitFunc  ThreadInit,
ThreadDeinitFunc  ThreadDeinit 
)

Register a flow logger.

Parameters
nameAn informational name for this logger. Used only for debugging.
LogFuncA function that will be called to log each flow.
initdataA pointer to initialization data that will be passed the ThreadInit.
ThreadInitThread initialization callback.
ThreadDeinitThread de-initialization callback.
Return values
0on success, -1 on failure.

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