suricata
stream.h File Reference
#include "flow.h"
Include dependency graph for stream.h:

Go to the source code of this file.

Macros

#define STREAM_START   BIT_U8(0)
 
#define STREAM_EOF   BIT_U8(1)
 
#define STREAM_TOSERVER   BIT_U8(2)
 
#define STREAM_TOCLIENT   BIT_U8(3)
 
#define STREAM_GAP   BIT_U8(4)
 
#define STREAM_DEPTH   BIT_U8(5)
 
#define STREAM_MIDSTREAM   BIT_U8(6)
 
#define STREAM_FLUSH   BIT_U8(7)
 

Typedefs

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

Functions

int StreamSegmentForEach (const Packet *p, uint8_t flag, StreamSegmentCallback CallbackFunc, void *data)
 Run callback for all segments. 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_DEPTH

#define STREAM_DEPTH   BIT_U8(5)

depth reached

Definition at line 35 of file stream.h.

◆ STREAM_EOF

#define STREAM_EOF   BIT_U8(1)

Definition at line 31 of file stream.h.

◆ STREAM_FLUSH

#define STREAM_FLUSH   BIT_U8(7)

Definition at line 37 of file stream.h.

◆ STREAM_GAP

#define STREAM_GAP   BIT_U8(4)

data gap encountered

Definition at line 34 of file stream.h.

◆ STREAM_MIDSTREAM

#define STREAM_MIDSTREAM   BIT_U8(6)

Definition at line 36 of file stream.h.

◆ STREAM_START

#define STREAM_START   BIT_U8(0)

Definition at line 30 of file stream.h.

◆ STREAM_TOCLIENT

#define STREAM_TOCLIENT   BIT_U8(3)

Definition at line 33 of file stream.h.

◆ STREAM_TOSERVER

#define STREAM_TOSERVER   BIT_U8(2)

Definition at line 32 of file stream.h.

Typedef Documentation

◆ StreamSegmentCallback

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

Definition at line 38 of file stream.h.

Function Documentation

◆ StreamSegmentForEach()

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

Run callback for all segments.

Must be called under flow lock.

Returns
-1 in case of error, the number of segment in case of success

Definition at line 39 of file stream.c.

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

Here is the call graph for this function: