pub struct Scanner { /* private fields */ }Expand description
Main network scanner struct.
The scanner coordinates network discovery and monitoring operations including ARP scanning, packet capture, and host detection.
Implementations§
Source§impl Scanner
impl Scanner
Sourcepub fn new(
scanner_outputs: Sender<Event>,
interface_name: String,
backend_type: BackendType,
) -> AppResult<Self>
pub fn new( scanner_outputs: Sender<Event>, interface_name: String, backend_type: BackendType, ) -> AppResult<Self>
Sourcepub fn send_arp_packets(&self)
pub fn send_arp_packets(&self)
Send ARP packets to discover hosts on the network.
This triggers an ARP scan of the network range(s) configured on the selected interface.
Sourcepub fn gateway_ip(&self) -> Option<Ipv4Addr>
pub fn gateway_ip(&self) -> Option<Ipv4Addr>
Get the detected default gateway IP address.
Returns None if no gateway was detected or if detection failed.
Sourcepub fn local_ips(&self) -> &HashSet<Ipv4Addr>
pub fn local_ips(&self) -> &HashSet<Ipv4Addr>
Get the set of detected local IP addresses.
Returns the set of IPs on the local interfaces that were detected during startup.
Sourcepub fn remove_discovered_hosts(&self, ips: &[Ipv4Addr])
pub fn remove_discovered_hosts(&self, ips: &[Ipv4Addr])
Remove hosts from the discovered set, allowing them to be re-discovered.
This should be called when hosts are cleared/deleted from the UI.
§Arguments
ips- Slice of IP addresses to remove from the discovered set
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Scanner
impl RefUnwindSafe for Scanner
impl Send for Scanner
impl Sync for Scanner
impl Unpin for Scanner
impl UnsafeUnpin for Scanner
impl UnwindSafe for Scanner
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