Skip to main content

ScanOptions

Struct ScanOptions 

Source
pub struct ScanOptions {
Show 20 fields pub interface_name: Option<String>, pub interface_index: Option<u32>, pub network_range: Option<Vec<IpNetwork>>, pub timeout_ms: u64, pub resolve_hostname: bool, pub source_ipv4: Option<Ipv4Addr>, pub source_mac: Option<MacAddr>, pub destination_mac: Option<MacAddr>, pub vlan_id: Option<u16>, pub retry_count: usize, pub scan_timing: ScanTiming, pub randomize_targets: bool, pub output: OutputFormat, pub oui_file: String, pub hw_type: Option<ArpHardwareType>, pub hw_addr: Option<u8>, pub proto_type: Option<EtherType>, pub proto_addr: Option<u8>, pub arp_operation: Option<ArpOperation>, pub packet_help: bool,
}
Expand description

Immutable options used throughout one scan invocation.

Fields§

§interface_name: Option<String>

Interface name selected by the caller.

§interface_index: Option<u32>

Interface index selected by the caller.

§network_range: Option<Vec<IpNetwork>>

Explicit IPv4 ranges to scan.

§timeout_ms: u64

Minimum response collection time, in milliseconds.

§resolve_hostname: bool

Whether reverse-DNS lookup is enabled.

§source_ipv4: Option<Ipv4Addr>

Optional source IPv4 address for crafted ARP requests.

§source_mac: Option<MacAddr>

Optional source hardware address for crafted Ethernet frames.

§destination_mac: Option<MacAddr>

Optional destination hardware address for crafted frames.

§vlan_id: Option<u16>

Optional 802.1Q VLAN identifier.

§retry_count: usize

Number of request passes over the target set.

§scan_timing: ScanTiming

Request pacing mode.

§randomize_targets: bool

Whether target addresses should be randomized.

§output: OutputFormat

Selected output representation.

§oui_file: String

Path to the optional IEEE OUI database.

§hw_type: Option<ArpHardwareType>

Optional ARP hardware type override.

§hw_addr: Option<u8>

Optional ARP hardware-address length override.

§proto_type: Option<EtherType>

Optional ARP protocol type override.

§proto_addr: Option<u8>

Optional ARP protocol-address length override.

§arp_operation: Option<ArpOperation>

Optional ARP operation override.

§packet_help: bool

Whether the packet-layout help should be printed.

Implementations§

Source§

impl ScanOptions

Source

pub fn is_plain_output(&self) -> bool

Return true when the selected output is the terminal table.

Source

pub fn has_vlan(&self) -> bool

Return true when VLAN framing changes the packet size.

Source

pub fn request_protocol_print(&self) -> bool

Return true when the packet-layout help path was requested.

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.
§

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

§

fn vzip(self) -> V