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

Go to the source code of this file.

Typedefs

typedef int(* PacketLogger) (ThreadVars *, void *thread_data, const Packet *)
 Packet logger function pointer type. More...
 
typedef bool(* PacketLogCondition) (ThreadVars *, void *thread_data, const Packet *)
 Packet logger condition function point type. More...
 

Functions

int SCOutputRegisterPacketLogger (LoggerId logger_id, const char *name, PacketLogger LogFunc, PacketLogCondition ConditionFunc, void *initdata, ThreadInitFunc, ThreadDeinitFunc)
 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.h.

Typedef Documentation

◆ PacketLogCondition

typedef bool(* PacketLogCondition) (ThreadVars *, void *thread_data, const Packet *)

Packet logger condition function point type.

Must return true for the packet to be passed onto the packet logger.

Definition at line 43 of file output-packet.h.

◆ PacketLogger

typedef int(* PacketLogger) (ThreadVars *, void *thread_data, const Packet *)

Packet logger function pointer type.

Definition at line 35 of file output-packet.h.

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.