Module tcp

Source
Expand description

Parsing and serialization of TCP segments.

The TCP segment format is defined in [RFC 791 Section 3.3].

Modules§

options
Parsing and serialization of TCP options.

Structs§

TcpFlowAndSeqNum
Contains the TCP flow info and its sequence number.
TcpFlowHeader
The minimal information required from a TCP segment header.
TcpOptionsTooLongError
Options provided to TcpSegmentBuilderWithOptions::new exceed MAX_OPTIONS_LEN when serialized.
TcpParseArgs
Arguments required to parse a TCP segment.
TcpSegment
A TCP segment.
TcpSegmentBuilder
A builder for TCP segments.
TcpSegmentBuilderWithOptions
A builder for TCP segments with options
TcpSegmentRaw
A partially-parsed and not yet validated TCP segment.

Constants§

HDR_PREFIX_LEN
The length of the fixed prefix of a TCP header (preceding the options).
MAX_HDR_LEN
The maximum length of a TCP header.
MAX_OPTIONS_LEN
The maximum length of the options in a TCP header.

Functions§

aligned_options_length
Calculates the total aligned length of a collection of options in a TCP header.