suricata
|
#include "suricata-common.h"
#include "stream-tcp.h"
#include "stream-tcp-private.h"
#include "stream-tcp-sack.h"
#include "util-unittest.h"
Go to the source code of this file.
Functions | |
RB_GENERATE (TCPSACK, StreamTcpSackRecord, rb, TcpSackCompare) | |
int | TcpSackCompare (struct StreamTcpSackRecord *a, struct StreamTcpSackRecord *b) |
int | StreamTcpSackUpdatePacket (TcpStream *stream, Packet *p) |
Update stream with SACK records from a TCP packet. More... | |
bool | StreamTcpSackPacketIsOutdated (TcpStream *stream, Packet *p) |
void | StreamTcpSackPruneList (TcpStream *stream) |
void | StreamTcpSackFreeList (TcpStream *stream) |
Free SACK tree from a stream. More... | |
void | StreamTcpSackRegisterTests (void) |
Stream engine TCP SACK handling.
Definition in file stream-tcp-sack.c.
RB_GENERATE | ( | TCPSACK | , |
StreamTcpSackRecord | , | ||
rb | , | ||
TcpSackCompare | |||
) |
void StreamTcpSackFreeList | ( | TcpStream * | stream | ) |
Free SACK tree from a stream.
stream | Stream to cleanup |
Definition at line 438 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().
Definition at line 357 of file stream-tcp-sack.c.
void StreamTcpSackPruneList | ( | TcpStream * | stream | ) |
Definition at line 403 of file stream-tcp-sack.c.
References TcpStream_::last_ack, StreamTcpSackRecord::le, RB_FOREACH_SAFE, StreamTcpSackRecord::re, TcpStream_::sack_size, TcpStream_::sack_tree, SCEnter, SCLogDebug, and SEQ_LT.
void StreamTcpSackRegisterTests | ( | void | ) |
Definition at line 910 of file stream-tcp-sack.c.
References UtRegisterTest().
Update stream with SACK records from a TCP packet.
stream | The stream to update. |
p | packet to get the SACK records from |
-1 | error |
0 | ok |
Definition at line 249 of file stream-tcp-sack.c.
References SCEnter.
int TcpSackCompare | ( | struct StreamTcpSackRecord * | a, |
struct StreamTcpSackRecord * | b | ||
) |
Definition at line 34 of file stream-tcp-sack.c.
References StreamTcpSackRecord::le, StreamTcpSackRecord::re, SEQ_EQ, SEQ_GT, and SEQ_LT.