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

Go to the source code of this file.

Functions

int StreamTcpInlineSegmentCompare (const TcpStream *, const Packet *, const TcpSegment *)
 Compare the shared data portion of two segments. More...
 
void StreamTcpInlineSegmentReplacePacket (const TcpStream *, Packet *, const TcpSegment *)
 Replace (part of) the payload portion of a packet by the data in a TCP segment. More...
 
void StreamTcpInlineRegisterTests (void)
 

Detailed Description

Function Documentation

void StreamTcpInlineRegisterTests ( void  )

Definition at line 149 of file stream-tcp-inline.c.

References UtRegisterTest().

Referenced by StreamTcpReassembleRegisterTests().

Here is the call graph for this function:

Here is the caller graph for this function:

int StreamTcpInlineSegmentCompare ( const TcpStream stream,
const Packet p,
const TcpSegment seg 
)

Compare the shared data portion of two segments.

If no data is shared, 0 will be returned.

Parameters
seg1first segment
seg2second segment
Return values
0shared data is the same (or no data is shared)
1shared data is different

Definition at line 47 of file stream-tcp-inline.c.

References BUG_ON, Packet_::payload, Packet_::payload_len, TcpStream_::sb, TcpSegment::sbseg, SCEnter, SCLogDebug, SCMemcmp, SCReturnInt, seq, TcpSegment::seq, SEQ_EQ, SEQ_GT, SEQ_LT, StreamingBufferSegmentGetData(), and TCP_GET_SEQ.

Referenced by TcpSegmentCompare().

Here is the call graph for this function:

Here is the caller graph for this function:

void StreamTcpInlineSegmentReplacePacket ( const TcpStream stream,
Packet p,
const TcpSegment seg 
)

Replace (part of) the payload portion of a packet by the data in a TCP segment.

Parameters
pPacket
segTCP segment
Todo:

What about reassembled fragments?

What about unwrapped tunnel packets?

Definition at line 112 of file stream-tcp-inline.c.

References BUG_ON, Packet_::flags, Packet_::payload, Packet_::payload_len, PKT_STREAM_MODIFIED, TcpStream_::sb, TcpSegment::sbseg, SCEnter, SCLogDebug, SCReturn, seq, TcpSegment::seq, SEQ_GT, SEQ_LT, StreamingBufferSegmentGetData(), TCP_GET_SEQ, and TCP_SEG_LEN.

Referenced by TcpSegmentCompare().

Here is the call graph for this function:

Here is the caller graph for this function: