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

Go to the source code of this file.

Functions

int StreamTcpSackUpdatePacket (TcpStream *, Packet *)
 Update stream with SACK records from a TCP packet. More...
 
bool StreamTcpSackPacketIsOutdated (TcpStream *stream, Packet *p)
 
void StreamTcpSackPruneList (TcpStream *)
 
void StreamTcpSackFreeList (TcpStream *)
 Free SACK tree from a stream. More...
 
void StreamTcpSackRegisterTests (void)
 

Detailed Description

Function Documentation

◆ StreamTcpSackFreeList()

void StreamTcpSackFreeList ( TcpStream stream)

Free SACK tree from a stream.

Parameters
streamStream to cleanup

Definition at line 436 of file stream-tcp-sack.c.

References StreamTcpSackRecord::le, RB_FOREACH_SAFE, StreamTcpSackRecord::re, TcpStream_::sack_size, TcpStream_::sack_tree, and SCEnter.

Referenced by StreamTcpStreamCleanup().

Here is the caller graph for this function:

◆ StreamTcpSackPacketIsOutdated()

◆ StreamTcpSackPruneList()

◆ StreamTcpSackRegisterTests()

void StreamTcpSackRegisterTests ( void  )

Definition at line 908 of file stream-tcp-sack.c.

References UtRegisterTest().

Here is the call graph for this function:

◆ StreamTcpSackUpdatePacket()

int StreamTcpSackUpdatePacket ( TcpStream stream,
Packet p 
)

Update stream with SACK records from a TCP packet.

Parameters
streamThe stream to update.
ppacket to get the SACK records from
Return values
-1error
0ok

Definition at line 249 of file stream-tcp-sack.c.

References TcpStream_::last_ack, StreamTcpSackRecord::le, TCPOptSackRecord_::le, next, TcpStream_::next_win, Packet_::pcap_cnt, StreamTcpSackRecord::re, TCPOptSackRecord_::re, SCEnter, SCLogDebug, SCNtohl, SCReturnInt, SEQ_GEQ, SEQ_GT, SEQ_LEQ, SEQ_LT, STREAM_PKT_FLAG_DSACK, STREAM_PKT_FLAG_SET, TCP_GET_ACK, TCP_GET_SACK_CNT, and TCP_GET_SACK_PTR.