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
impl Fingerprinter
Sourcepub fn new(src_ip: IpAddr) -> Result<Fingerprinter, String>
pub fn new(src_ip: IpAddr) -> Result<Fingerprinter, String>
Create new fingerprinter with Interfece IP
Sourcepub fn new_with_index(if_index: u32) -> Result<Fingerprinter, String>
pub fn new_with_index(if_index: u32) -> Result<Fingerprinter, String>
Create new fingerprinter with Interfece Index
Sourcepub fn new_with_name(if_name: String) -> Result<Fingerprinter, String>
pub fn new_with_name(if_name: String) -> Result<Fingerprinter, String>
Create new fingerprinter with Interfece Name
Sourcepub fn new_with_gateway_ip(
src_ip: IpAddr,
gateway_ip: IpAddr,
) -> Result<Fingerprinter, String>
pub fn new_with_gateway_ip( src_ip: IpAddr, gateway_ip: IpAddr, ) -> Result<Fingerprinter, String>
Create new fingerprinter with interfece IP and gateway IP
Sourcepub fn set_src_port(&mut self, src_port: u16)
pub fn set_src_port(&mut self, src_port: u16)
Set source port number
Sourcepub fn set_probe_target(&mut self, probe_target: ProbeTarget)
pub fn set_probe_target(&mut self, probe_target: ProbeTarget)
Set probe target (IP address and tcp/udp port)
Sourcepub fn add_probe_type(&mut self, probe_type: ProbeType)
pub fn add_probe_type(&mut self, probe_type: ProbeType)
Add probe type
Sourcepub fn set_probe_types(&mut self, probe_types: Vec<ProbeType>)
pub fn set_probe_types(&mut self, probe_types: Vec<ProbeType>)
Set probe types
Sourcepub fn set_full_probe(&mut self)
pub fn set_full_probe(&mut self)
Set all probe types
Sourcepub fn set_timeout(&mut self, timeout: Duration)
pub fn set_timeout(&mut self, timeout: Duration)
Set probe timeout
Sourcepub fn set_wait_time(&mut self, wait_time: Duration)
pub fn set_wait_time(&mut self, wait_time: Duration)
Set wait-time after the sending task is completed
Sourcepub fn set_send_rate(&mut self, send_rate: Duration)
pub fn set_send_rate(&mut self, send_rate: Duration)
Set packet send rate
Sourcepub fn get_probe_result(&self) -> ProbeResult
pub fn get_probe_result(&self) -> ProbeResult
Get probe result
Sourcepub fn probe(&mut self) -> ProbeResult
pub fn probe(&mut self) -> ProbeResult
Run probe and return result
Auto Trait Implementations§
impl Freeze for Fingerprinter
impl RefUnwindSafe for Fingerprinter
impl Send for Fingerprinter
impl Sync for Fingerprinter
impl Unpin for Fingerprinter
impl UnwindSafe for Fingerprinter
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