pub struct ARPScannerBuilder { /* private fields */ }Expand description
Builder for ARPScanner.
Implementations§
Source§impl ARPScannerBuilder
impl ARPScannerBuilder
Sourcepub fn interface<VALUE: Into<Arc<NetworkInterface>>>(self, value: VALUE) -> Self
pub fn interface<VALUE: Into<Arc<NetworkInterface>>>(self, value: VALUE) -> Self
Network interface to use for scanning
Sourcepub fn wire<VALUE: Into<Wire>>(self, value: VALUE) -> Self
pub fn wire<VALUE: Into<Wire>>(self, value: VALUE) -> Self
Wire for reading and sending packets on the wire
Sourcepub fn source_port<VALUE: Into<u16>>(self, value: VALUE) -> Self
pub fn source_port<VALUE: Into<u16>>(self, value: VALUE) -> Self
Source port for packet listener and incoming packet identification
Sourcepub fn include_vendor<VALUE: Into<bool>>(self, value: VALUE) -> Self
pub fn include_vendor<VALUE: Into<bool>>(self, value: VALUE) -> Self
Whether to include vendor lookups for discovered devices
Sourcepub fn include_host_names<VALUE: Into<bool>>(self, value: VALUE) -> Self
pub fn include_host_names<VALUE: Into<bool>>(self, value: VALUE) -> Self
Whether to include hostname lookups for discovered devices
Sourcepub fn idle_timeout<VALUE: Into<Duration>>(self, value: VALUE) -> Self
pub fn idle_timeout<VALUE: Into<Duration>>(self, value: VALUE) -> Self
Duration to wait for responses after scanning completes
Sourcepub fn notifier<VALUE: Into<Sender<ScanMessage>>>(self, value: VALUE) -> Self
pub fn notifier<VALUE: Into<Sender<ScanMessage>>>(self, value: VALUE) -> Self
Channel for sending scan results and status messages
Sourcepub fn throttle<VALUE: Into<Duration>>(self, value: VALUE) -> Self
pub fn throttle<VALUE: Into<Duration>>(self, value: VALUE) -> Self
Throttles speed at which packets are sent. Higher throttles result in more accurate scans
Sourcepub fn gateway<VALUE: Into<Option<Ipv4Addr>>>(self, value: VALUE) -> Self
pub fn gateway<VALUE: Into<Option<Ipv4Addr>>>(self, value: VALUE) -> Self
Default gateway IP, used to mark the gateway device in scan results
Sourcepub fn oui<VALUE: Into<Option<Arc<dyn Oui>>>>(self, value: VALUE) -> Self
pub fn oui<VALUE: Into<Option<Arc<dyn Oui>>>>(self, value: VALUE) -> Self
Used to lookup vendor info for mac addresses
Sourcepub fn send_times<VALUE: Into<Arc<Mutex<HashMap<Ipv4Addr, SystemTime>>>>>(
self,
value: VALUE,
) -> Self
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).
Sourcepub fn build(self) -> Result<ARPScanner, ARPScannerBuilderError>
pub fn build(self) -> Result<ARPScanner, ARPScannerBuilderError>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ARPScannerBuilder
impl !RefUnwindSafe for ARPScannerBuilder
impl Send for ARPScannerBuilder
impl Sync for ARPScannerBuilder
impl Unpin for ARPScannerBuilder
impl UnsafeUnpin for ARPScannerBuilder
impl !UnwindSafe for ARPScannerBuilder
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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