this so the app runs on router reboot
This commit is contained in:
@@ -7,6 +7,7 @@ pub fn get_dev() -> HashSet<String> {
|
||||
if e.file_type()
|
||||
.map(|ft| {
|
||||
if ft.is_symlink() {
|
||||
// true
|
||||
fs::metadata(e.path()).map(|m| m.is_dir()).unwrap_or(false)
|
||||
} else {
|
||||
ft.is_dir()
|
||||
|
||||
@@ -81,7 +81,7 @@ pub async fn get_macs(
|
||||
state: Option<NUDState>,
|
||||
) -> Result<Vec<IpNeighLine>> {
|
||||
let ip_list: Option<Vec<IpAddr>> =
|
||||
ips.map(|slice| slice.iter().copied().map(|ip| ip.to_canonical()).collect());
|
||||
ips.map(|slice| slice.iter().map(|ip| ip.to_canonical()).collect());
|
||||
let ip_list = match (ip_list, machine_name) {
|
||||
(Some(list), _) => list,
|
||||
(None, Some(name)) => get_ips(name).await?.collect(),
|
||||
@@ -136,7 +136,9 @@ pub async fn get_mac(
|
||||
Ok(rows)
|
||||
}
|
||||
|
||||
/* pub async fn _get_macs_good(
|
||||
/*
|
||||
/// get macs where you just run ip neigh then rust handles the filtering (faster than get mac)
|
||||
pub async fn get_macs_rust(
|
||||
machine_names: Option<&str>,
|
||||
ips: Option<&[IpAddr]>,
|
||||
devs: Option<&[&str]>,
|
||||
|
||||
Reference in New Issue
Block a user