Struct netscan_os::Fingerprinter
source · pub struct Fingerprinter {
pub if_index: u32,
pub if_name: String,
pub src_mac: String,
pub dst_mac: String,
pub src_ip: IpAddr,
pub src_port: u16,
pub probe_targets: Vec<ProbeTarget>,
pub probe_types: Vec<ProbeType>,
pub timeout: Duration,
pub wait_time: Duration,
pub send_rate: Duration,
pub probe_results: Vec<ProbeResult>,
}Expand description
Struct for fingerprint probe
Fields
if_index: u32Index of network interface
if_name: StringName of network interface
src_mac: StringSource MAC Address
dst_mac: StringDestination MAC Address (Gateway)
src_ip: IpAddrSource IP Address
src_port: u16Source port
probe_targets: Vec<ProbeTarget>Probe Targets
probe_types: Vec<ProbeType>Probe Types
timeout: DurationTimeout setting
wait_time: DurationWait time after send task is finished
send_rate: DurationPacket send rate
probe_results: Vec<ProbeResult>Result of probes
Implementations
sourceimpl 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_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 add_probe_target(&mut self, dst_info: ProbeTarget)
pub fn add_probe_target(&mut self, dst_info: ProbeTarget)
Add probe target (IP address and tcp/udp port)
sourcepub fn set_probe_targets(&mut self, probe_targets: Vec<ProbeTarget>)
pub fn set_probe_targets(&mut self, probe_targets: Vec<ProbeTarget>)
Set probe targets
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_results(&self) -> Vec<ProbeResult>
pub fn get_probe_results(&self) -> Vec<ProbeResult>
Get probe result
sourcepub fn probe(&mut self) -> Vec<ProbeResult>
pub fn probe(&mut self) -> Vec<ProbeResult>
Run probe and return result
Auto Trait Implementations
impl RefUnwindSafe for Fingerprinter
impl Send for Fingerprinter
impl Sync for Fingerprinter
impl Unpin for Fingerprinter
impl UnwindSafe for Fingerprinter
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more