#[non_exhaustive]pub struct TcpFingerprint {Show 13 fields
pub direction: TcpDirection,
pub ip_version: u8,
pub observed_ttl: u8,
pub guessed_initial_ttl: u8,
pub options_length: u8,
pub df: bool,
pub window_size: u16,
pub mss: Option<u16>,
pub window_scale: Option<u8>,
pub sack_permitted: bool,
pub timestamps: bool,
pub option_layout: String,
pub quirks: Quirks,
}tcp_fingerprint only.Expand description
One passive TCP/IP fingerprint capture.
Pre-formatted accessors stay in plain types so consumers can match / index without parsing the p0f signature string.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.direction: TcpDirectionWhether this is the client’s SYN or the server’s SYN+ACK.
ip_version: u8IP version (4 or 6).
observed_ttl: u8Observed TTL / hop-limit on the wire.
guessed_initial_ttl: u8p0f-3 guessed initial TTL — observed_ttl rounded up to
the next of {32, 64, 128, 255}. The number of hops the
packet traversed is guessed - observed.
options_length: u8Length of TCP options in bytes (post fixed 20-byte header). 0 when no options.
df: boolIPv4 Don’t-Fragment bit (false for IPv6 — DF doesn’t
exist there).
window_size: u16TCP advertised window size.
mss: Option<u16>MSS from option 2 if present.
window_scale: Option<u8>Window-scale shift from option 3 if present.
sack_permitted: boolSACK-Permitted (option 4) was sent.
timestamps: boolTCP timestamps (option 8) were sent.
option_layout: StringCompact p0f-3 option layout — comma-separated tokens
preserving wire order. Tokens: mss, nop, ws,
sok, sack, ts, eol+N (N pad bytes after EOL),
?KIND for unknown kinds.
quirks: QuirksQuirk bits — see Quirks.
Implementations§
Source§impl TcpFingerprint
impl TcpFingerprint
Sourcepub fn to_p0f_signature(&self) -> String
pub fn to_p0f_signature(&self) -> String
Format as a p0f-3 signature string:
ver:ittl:olen:mss:wsize,scale:olayout:quirks:pclass.
ver= 4 or 6.ittl= guessed initial TTL.olen= options length in bytes.mss= MSS, or*when absent.wsize= literal window when scale present, else*.scale= window-scale shift, or*when absent.olayout= comma-separated option-token list.quirks= comma-separated quirk slugs.pclass=0(SYN has no payload by definition).
Trait Implementations§
Source§impl Clone for TcpFingerprint
impl Clone for TcpFingerprint
Source§fn clone(&self) -> TcpFingerprint
fn clone(&self) -> TcpFingerprint
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for TcpFingerprint
impl Debug for TcpFingerprint
Source§impl<'de> Deserialize<'de> for TcpFingerprint
impl<'de> Deserialize<'de> for TcpFingerprint
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for TcpFingerprint
Source§impl PartialEq for TcpFingerprint
impl PartialEq for TcpFingerprint
Source§fn eq(&self, other: &TcpFingerprint) -> bool
fn eq(&self, other: &TcpFingerprint) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for TcpFingerprint
impl Serialize for TcpFingerprint
impl StructuralPartialEq for TcpFingerprint
Auto Trait Implementations§
impl Freeze for TcpFingerprint
impl RefUnwindSafe for TcpFingerprint
impl Send for TcpFingerprint
impl Sync for TcpFingerprint
impl Unpin for TcpFingerprint
impl UnsafeUnpin for TcpFingerprint
impl UnwindSafe for TcpFingerprint
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.