TcpOptions

Trait TcpOptions 

Source
pub trait TcpOptions {
    // Required methods
    fn mss(&self) -> Option<u16>;
    fn window_scale(&self) -> Option<u8>;
    fn sack_permitted(&self) -> bool;
    fn sack_blocks(&self) -> Option<&[TcpSackBlock]>;
    fn timestamp(&self) -> Option<&TimestampOption>;
}
Expand description

An implementation of TCP Options, as defined of RFC 9293 section 3.1

Provides a consistent API for accessing TCP Options across various implementations (e.g. those used for parsing vs serializing).

Required Methods§

Source

fn mss(&self) -> Option<u16>

Access the MSS option, if present.

Source

fn window_scale(&self) -> Option<u8>

Access the Window Scale option, if present.

Source

fn sack_permitted(&self) -> bool

Access the SACK Permitted option, if present.

Source

fn sack_blocks(&self) -> Option<&[TcpSackBlock]>

Access the SACK option, if present.

Source

fn timestamp(&self) -> Option<&TimestampOption>

Access the timestamp option, if present.

Implementors§