pub enum WindowSize {
Mss(u8),
Mtu(u8),
Value(u16),
Mod(u16),
Any,
}
Expand description
TCP Window Size representation used for fingerprinting different TCP stacks
Variants§
Mss(u8)
Window size is a multiple of MSS (Maximum Segment Size) The u8 value represents the multiplier (e.g., Mss(4) means window = MSS * 4)
Mtu(u8)
Window size is a multiple of MTU (Maximum Transmission Unit) The u8 value represents the multiplier (e.g., Mtu(4) means window = MTU * 4)
Value(u16)
Raw window size value when it doesn’t match any pattern Contains the actual window size value from the TCP header
Mod(u16)
Window size follows a modulo pattern The u16 value represents the modulo base (e.g., Mod(1024) means window % 1024 == 0)
Any
Represents any window size (wildcard matcher)
Implementations§
Source§impl WindowSize
impl WindowSize
pub fn distance_window_size( &self, other: &WindowSize, mss: Option<u16>, ) -> Option<u32>
Trait Implementations§
Source§impl Clone for WindowSize
impl Clone for WindowSize
Source§fn clone(&self) -> WindowSize
fn clone(&self) -> WindowSize
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 WindowSize
impl Debug for WindowSize
Source§impl Display for WindowSize
impl Display for WindowSize
Source§impl FromStr for WindowSize
impl FromStr for WindowSize
Source§impl PartialEq for WindowSize
impl PartialEq for WindowSize
impl StructuralPartialEq for WindowSize
Auto Trait Implementations§
impl Freeze for WindowSize
impl RefUnwindSafe for WindowSize
impl Send for WindowSize
impl Sync for WindowSize
impl Unpin for WindowSize
impl UnwindSafe for WindowSize
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