Skip to main content

ARPScannerBuilder

Struct ARPScannerBuilder 

Source
pub struct ARPScannerBuilder { /* private fields */ }
Expand description

Builder for ARPScanner.

Implementations§

Source§

impl ARPScannerBuilder

Source

pub fn interface<VALUE: Into<Arc<NetworkInterface>>>(self, value: VALUE) -> Self

Network interface to use for scanning

Source

pub fn wire<VALUE: Into<Wire>>(self, value: VALUE) -> Self

Wire for reading and sending packets on the wire

Source

pub fn targets<VALUE: Into<Arc<IPTargets>>>(self, value: VALUE) -> Self

IP targets to scan

Source

pub fn source_port<VALUE: Into<u16>>(self, value: VALUE) -> Self

Source port for packet listener and incoming packet identification

Source

pub fn include_vendor<VALUE: Into<bool>>(self, value: VALUE) -> Self

Whether to include vendor lookups for discovered devices

Source

pub fn include_host_names<VALUE: Into<bool>>(self, value: VALUE) -> Self

Whether to include hostname lookups for discovered devices

Source

pub fn idle_timeout<VALUE: Into<Duration>>(self, value: VALUE) -> Self

Duration to wait for responses after scanning completes

Source

pub fn notifier<VALUE: Into<Sender<ScanMessage>>>(self, value: VALUE) -> Self

Channel for sending scan results and status messages

Source

pub fn throttle<VALUE: Into<Duration>>(self, value: VALUE) -> Self

Throttles speed at which packets are sent. Higher throttles result in more accurate scans

Source

pub fn gateway<VALUE: Into<Option<Ipv4Addr>>>(self, value: VALUE) -> Self

Default gateway IP, used to mark the gateway device in scan results

Source

pub fn oui<VALUE: Into<Option<Arc<dyn Oui>>>>(self, value: VALUE) -> Self

Used to lookup vendor info for mac addresses

Source

pub fn send_times<VALUE: Into<Arc<Mutex<HashMap<Ipv4Addr, SystemTime>>>>>( self, value: VALUE, ) -> Self

Tracks the SystemTime at which each ARP request was sent, keyed by target IP. Used to compute RTT from send time to kernel capture of the reply (metadata.timestamp).

Source

pub fn build(self) -> Result<ARPScanner, ARPScannerBuilderError>

Builds a new ARPScanner.

§Errors

If a required field has not been initialized.

Trait Implementations§

Source§

impl Default for ARPScannerBuilder

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
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.