pub struct Signature {
pub version: IpVersion,
pub ittl: Ttl,
pub olen: u8,
pub mss: Option<u16>,
pub wsize: WindowSize,
pub wscale: Option<u8>,
pub olayout: Vec<TcpOption>,
pub quirks: Vec<Quirk>,
pub pclass: PayloadSize,
}
Fields§
§version: IpVersion
§ittl: Ttl
initial TTL used by the OS.
olen: u8
length of IPv4 options or IPv6 extension headers.
mss: Option<u16>
maximum segment size, if specified in TCP options.
wsize: WindowSize
window size.
wscale: Option<u8>
window scaling factor, if specified in TCP options.
olayout: Vec<TcpOption>
layout and ordering of TCP options, if any.
quirks: Vec<Quirk>
properties and quirks observed in IP or TCP headers.
pclass: PayloadSize
payload size classification
Trait Implementations§
Source§impl DatabaseSignature<ObservableTcp> for Signature
impl DatabaseSignature<ObservableTcp> for Signature
Source§fn get_quality_score(&self, distance: u32) -> f32
fn get_quality_score(&self, distance: u32) -> f32
Returns the quality score based on the distance.
The score is a value between 0.0 and 1.0, where 1.0 is a perfect match.
The score is calculated based on the distance of the observed signal to the database signature. The distance is a value between 0 and 18, where 0 is a perfect match and 18 is the maximum possible distance.
Source§fn calculate_distance(&self, observed: &ObservableTcp) -> Option<u32>
fn calculate_distance(&self, observed: &ObservableTcp) -> Option<u32>
Calculates a distance or dissimilarity score. Lower is better.
Source§fn generate_index_keys_for_db_entry(&self) -> Vec<TcpIndexKey>
fn generate_index_keys_for_db_entry(&self) -> Vec<TcpIndexKey>
Generates index keys from this database signature.
It’s a Vec because some DB signatures (like IpVersion::Any) might map to multiple keys.
The OptionOF::Key in the Vec allows for cases where a specific DB sig might not produce a key
for a certain specific version (e.g. an IpVersion::Any sig, when asked to produce a V4 key, will).
impl StructuralPartialEq for Signature
Auto Trait Implementations§
impl Freeze for Signature
impl RefUnwindSafe for Signature
impl Send for Signature
impl Sync for Signature
impl Unpin for Signature
impl UnwindSafe for Signature
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