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

Go to the source code of this file.

Data Structures

struct  OutputPacketLoggerThreadData_
 
struct  OutputPacketLogger_
 

Typedefs

typedef struct OutputPacketLoggerThreadData_ OutputPacketLoggerThreadData
 
typedef struct OutputPacketLogger_ OutputPacketLogger
 

Functions

int SCOutputRegisterPacketLogger (LoggerId logger_id, const char *name, PacketLogger LogFunc, PacketLogCondition ConditionFunc, void *initdata, ThreadInitFunc ThreadInit, ThreadDeinitFunc ThreadDeinit)
 Register a packet logger. More...
 
void OutputPacketLoggerRegister (void)
 
void OutputPacketShutdown (void)
 

Detailed Description

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

Packet Logger Output registration functions

Definition in file output-packet.c.

Typedef Documentation

◆ OutputPacketLogger

◆ OutputPacketLoggerThreadData

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

Function Documentation

◆ OutputPacketLoggerRegister()

void OutputPacketLoggerRegister ( void  )

Internal function: private API.

Definition at line 194 of file output-packet.c.

References OutputRegisterRootLogger().

Here is the call graph for this function:

◆ OutputPacketShutdown()

void OutputPacketShutdown ( void  )

Internal function: private API.

Definition at line 200 of file output-packet.c.

◆ SCOutputRegisterPacketLogger()

int SCOutputRegisterPacketLogger ( LoggerId  logger_id,
const char *  name,
PacketLogger  LogFunc,
PacketLogCondition  ConditionFunc,
void *  initdata,
ThreadInitFunc  ,
ThreadDeinitFunc   
)

Register a packet logger.

Parameters
logger_idAn ID used to distinguish this logger from others while profiling.
nameAn informational name for this logger. Used only for debugging.
LogFuncA function that will be called to log each packet that passes the condition test.
ConditionFuncA function to test if the packet should be passed to the logging function.
initdataInitialization data that will pass to the ThreadInitFunc.
ThreadInitFuncThread initialization function.
ThreadDeinitFuncThread de-initialization function.
Return values
0on success, -1 on failure.

Definition at line 55 of file output-packet.c.