Crates.io | libiw-async |
lib.rs | libiw-async |
version | 0.3.0 |
source | src |
created_at | 2024-10-27 14:18:06.044769 |
updated_at | 2024-10-27 15:05:50.755765 |
description | linux iw command wrapper for async |
homepage | |
repository | https://gitee.com/zr233/libiw |
max_upload_size | |
id | 1424667 |
size | 103,419 |
use libiw_async::*;
let iw = IW::new().await.unwrap();
let mut list = iw.interface_list().await.expect("no nic");
for card in &list {
println!("ifname: {}", card);
}
let interface = list.remove(0);
println!("scan ...");
let mut ap_list = iw.scan(&interface).await.unwrap();
if let Some(ssid) = args.ssid {
ap_list.retain(|one| one.ssid.contains(&ssid));
}
for one in ap_list {
println!("{}", one);
}