pub struct TcpOptions {
pub options: Vec<TcpOption>,
}Expand description
Collection of TCP options.
Fields§
§options: Vec<TcpOption>Implementations§
Source§impl TcpOptions
impl TcpOptions
Sourcepub fn padded_len(&self) -> usize
pub fn padded_len(&self) -> usize
Get the padded length (aligned to 4 bytes).
Sourcepub fn get(&self, kind: TcpOptionKind) -> Option<&TcpOption>
pub fn get(&self, kind: TcpOptionKind) -> Option<&TcpOption>
Get an option by kind.
Sourcepub fn timestamp(&self) -> Option<TcpTimestamp>
pub fn timestamp(&self) -> Option<TcpTimestamp>
Get the Timestamp if present.
Sourcepub fn sack_permitted(&self) -> bool
pub fn sack_permitted(&self) -> bool
Check if SACK is permitted.
Sourcepub fn sack_blocks(&self) -> Option<&[TcpSackBlock]>
pub fn sack_blocks(&self) -> Option<&[TcpSackBlock]>
Get the SACK blocks if present.
Sourcepub fn ao(&self) -> Option<&TcpAoValue>
pub fn ao(&self) -> Option<&TcpAoValue>
Get the Authentication Option if present.
Get the TFO cookie if present.
Sourcepub fn to_bytes_unpadded(&self) -> Vec<u8> ⓘ
pub fn to_bytes_unpadded(&self) -> Vec<u8> ⓘ
Serialize to bytes without padding.
Trait Implementations§
Source§impl Clone for TcpOptions
impl Clone for TcpOptions
Source§fn clone(&self) -> TcpOptions
fn clone(&self) -> TcpOptions
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TcpOptions
impl Debug for TcpOptions
Source§impl Default for TcpOptions
impl Default for TcpOptions
Source§fn default() -> TcpOptions
fn default() -> TcpOptions
Returns the “default value” for a type. Read more
Source§impl<'a> IntoIterator for &'a TcpOptions
impl<'a> IntoIterator for &'a TcpOptions
Source§impl IntoIterator for TcpOptions
impl IntoIterator for TcpOptions
Source§impl PartialEq for TcpOptions
impl PartialEq for TcpOptions
impl Eq for TcpOptions
impl StructuralPartialEq for TcpOptions
Auto Trait Implementations§
impl Freeze for TcpOptions
impl RefUnwindSafe for TcpOptions
impl Send for TcpOptions
impl Sync for TcpOptions
impl Unpin for TcpOptions
impl UnsafeUnpin for TcpOptions
impl UnwindSafe for TcpOptions
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more