⚠️ VeridianOS Kernel Documentation - This is low-level kernel code. All functions are unsafe unless explicitly marked otherwise. no_std

Module tcp_sack

Module tcp_sack 

Source
Expand description

TCP Selective Acknowledgment (SACK) implementation

Implements RFC 2018 TCP SACK option parsing, scoreboard tracking, and selective retransmission hole detection. Enables efficient recovery from multiple segment losses without retransmitting already-received data.

Structs§

SackBlock
A single SACK block representing a contiguous range of received bytes.
SackScoreboard
Tracks selectively acknowledged ranges for a TCP connection.

Constants§

MAX_SACK_BLOCKS
Maximum number of SACK blocks in a single TCP option (limited by option space)
TCP_OPT_SACK
TCP option kind for SACK blocks
TCP_OPT_SACK_PERMITTED
TCP option kind for SACK-Permitted (sent in SYN/SYN-ACK)
TCP_OPT_SACK_PERMITTED_LEN
TCP option length for SACK-Permitted

Functions§

has_sack_permitted
Check if SACK-Permitted option is present in TCP options.
parse_sack_blocks
Parse SACK blocks from TCP options bytes.
seq_ge
Returns true if a >= b in sequence space.
seq_gt
Returns true if a > b in sequence space.
seq_le
Returns true if a <= b in sequence space.
seq_lt
Compare sequence numbers using signed 32-bit difference. Returns true if a is strictly less than b in sequence space.
serialize_sack_blocks
Serialize SACK blocks into TCP option bytes.
serialize_sack_permitted
Serialize SACK-Permitted option (2 bytes, for SYN/SYN-ACK).