Struct Fingerprinter

Source
pub struct Fingerprinter {
    pub probe_setting: ProbeSetting,
    pub probe_result: ProbeResult,
}
Expand description

Struct for fingerprint probe

Fields§

§probe_setting: ProbeSetting

Probe setting

§probe_result: ProbeResult

Result of probes

Implementations§

Source§

impl Fingerprinter

Source

pub fn new(src_ip: IpAddr) -> Result<Fingerprinter, String>

Create new fingerprinter with Interfece IP

Source

pub fn new_with_index(if_index: u32) -> Result<Fingerprinter, String>

Create new fingerprinter with Interfece Index

Source

pub fn new_with_name(if_name: String) -> Result<Fingerprinter, String>

Create new fingerprinter with Interfece Name

Source

pub fn new_with_gateway_ip( src_ip: IpAddr, gateway_ip: IpAddr, ) -> Result<Fingerprinter, String>

Create new fingerprinter with interfece IP and gateway IP

Source

pub fn set_src_port(&mut self, src_port: u16)

Set source port number

Source

pub fn set_probe_target(&mut self, probe_target: ProbeTarget)

Set probe target (IP address and tcp/udp port)

Source

pub fn add_probe_type(&mut self, probe_type: ProbeType)

Add probe type

Source

pub fn set_probe_types(&mut self, probe_types: Vec<ProbeType>)

Set probe types

Source

pub fn set_full_probe(&mut self)

Set all probe types

Source

pub fn set_timeout(&mut self, timeout: Duration)

Set probe timeout

Source

pub fn set_wait_time(&mut self, wait_time: Duration)

Set wait-time after the sending task is completed

Source

pub fn set_send_rate(&mut self, send_rate: Duration)

Set packet send rate

Source

pub fn get_probe_result(&self) -> ProbeResult

Get probe result

Source

pub fn run_probe(&mut self)

Run probe with the current settings

Source

pub fn probe(&mut self) -> ProbeResult

Run probe and return result

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V