suricata
stream.h File Reference
#include "decode.h"
#include "stream-tcp-private.h"
Include dependency graph for stream.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define STREAM_FLAGS_FOR_PACKET(p)   (PKT_IS_TOSERVER((p)) ? STREAM_TOSERVER : STREAM_TOCLIENT)
 
#define STREAM_DUMP_TOCLIENT   BIT_U8(1)
 
#define STREAM_DUMP_TOSERVER   BIT_U8(2)
 
#define STREAM_DUMP_HEADERS   BIT_U8(3)
 

Typedefs

typedef int(* StreamSegmentCallback) (const Packet *, TcpSegment *, void *, const uint8_t *, uint32_t)
 

Functions

int StreamSegmentForEach (const Packet *p, uint8_t flag, StreamSegmentCallback CallbackFunc, void *data)
 
int StreamSegmentForSession (const Packet *p, uint8_t flag, StreamSegmentCallback CallbackFunc, void *data)
 Run callback for all segments on both directions of the session. More...
 

Detailed Description

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

Definition in file stream.h.

Macro Definition Documentation

◆ STREAM_DUMP_HEADERS

#define STREAM_DUMP_HEADERS   BIT_U8(3)

Definition at line 35 of file stream.h.

◆ STREAM_DUMP_TOCLIENT

#define STREAM_DUMP_TOCLIENT   BIT_U8(1)

Definition at line 33 of file stream.h.

◆ STREAM_DUMP_TOSERVER

#define STREAM_DUMP_TOSERVER   BIT_U8(2)

Definition at line 34 of file stream.h.

◆ STREAM_FLAGS_FOR_PACKET

#define STREAM_FLAGS_FOR_PACKET (   p)    (PKT_IS_TOSERVER((p)) ? STREAM_TOSERVER : STREAM_TOCLIENT)

Definition at line 31 of file stream.h.

Typedef Documentation

◆ StreamSegmentCallback

typedef int(* StreamSegmentCallback) (const Packet *, TcpSegment *, void *, const uint8_t *, uint32_t)

Definition at line 36 of file stream.h.

Function Documentation

◆ StreamSegmentForEach()

int StreamSegmentForEach ( const Packet p,
uint8_t  flag,
StreamSegmentCallback  CallbackFunc,
void *  data 
)

Definition at line 40 of file stream.c.

References Packet_::proto, SCLogWarning, and StreamTcpSegmentForEach().

Here is the call graph for this function:

◆ StreamSegmentForSession()

int StreamSegmentForSession ( const Packet p,
uint8_t  flag,
StreamSegmentCallback  CallbackFunc,
void *  data 
)

Run callback for all segments on both directions of the session.

Must be called under flow lock.

Returns
-1 in case of error, the number of segments in case of success.

Definition at line 64 of file stream.c.

References Packet_::proto, SCLogWarning, and StreamTcpSegmentForSession().

Here is the call graph for this function: