mirror of
https://github.com/rzuasti/oott.git
synced 2026-07-08 19:21:54 +02:00
Removed compiler warnings (unused imports)
This commit is contained in:
@@ -7,7 +7,7 @@ use pnet::{
|
|||||||
datalink::{self, Channel, NetworkInterface},
|
datalink::{self, Channel, NetworkInterface},
|
||||||
ipnetwork::IpNetwork,
|
ipnetwork::IpNetwork,
|
||||||
};
|
};
|
||||||
use tokio::time::{Duration, Instant, timeout};
|
use tokio::time::{Duration, timeout};
|
||||||
|
|
||||||
const DEFAULT_SENDER_TIMEOUT: u64 = 60; // 1 minute to send all packets - good for a class C network
|
const DEFAULT_SENDER_TIMEOUT: u64 = 60; // 1 minute to send all packets - good for a class C network
|
||||||
const DEFAULT_SCAN_DURATION: u64 = 300; // 5 minutes to wait per round to receive responses
|
const DEFAULT_SCAN_DURATION: u64 = 300; // 5 minutes to wait per round to receive responses
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
use crate::device_finders::Device;
|
use crate::device_finders::Device;
|
||||||
use log::{debug, info, warn};
|
use log::{debug, info};
|
||||||
use pnet::datalink::{DataLinkReceiver, DataLinkSender, NetworkInterface};
|
use pnet::datalink::{DataLinkReceiver, DataLinkSender, NetworkInterface};
|
||||||
use pnet::ipnetwork::Ipv4Network;
|
use pnet::ipnetwork::Ipv4Network;
|
||||||
use pnet::packet::arp::{ArpHardwareTypes, ArpOperations, ArpPacket, MutableArpPacket};
|
use pnet::packet::arp::{ArpHardwareTypes, ArpOperations, ArpPacket, MutableArpPacket};
|
||||||
@@ -100,7 +100,7 @@ pub async fn listen_for_packets(
|
|||||||
sleep(Duration::from_millis(1)).await;
|
sleep(Duration::from_millis(1)).await;
|
||||||
}
|
}
|
||||||
info!(
|
info!(
|
||||||
"ARP receiver run for {} secs",
|
"ARP receiver ran for {} secs",
|
||||||
(Instant::now() - start_time).as_secs()
|
(Instant::now() - start_time).as_secs()
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
use log::{debug, info};
|
use log::info;
|
||||||
mod config;
|
mod config;
|
||||||
mod device_finders;
|
mod device_finders;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user