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§
Sourcefn window_scale(&self) -> Option<u8>
fn window_scale(&self) -> Option<u8>
Access the Window Scale option, if present.
Sourcefn sack_permitted(&self) -> bool
fn sack_permitted(&self) -> bool
Access the SACK Permitted option, if present.
Sourcefn sack_blocks(&self) -> Option<&[TcpSackBlock]>
fn sack_blocks(&self) -> Option<&[TcpSackBlock]>
Access the SACK option, if present.
Sourcefn timestamp(&self) -> Option<&TimestampOption>
fn timestamp(&self) -> Option<&TimestampOption>
Access the timestamp option, if present.