wtf is this

This commit is contained in:
lda committed 2025-10-27 01:43:57 +07:00
1 parent 0d9d800daf
commit efe557a72e
12 files changed
+86 -9

No files matched your search

+2 -2
View File
@@ -1,7 +1,7 @@
//! ts
//!
//!
//! deals with both ip a (addroutput) and ip l (commonoutput)
//!
//!
//! lowk why its free but its indirection and its ass
use macaddr::{MacAddr, MacAddr6};
+1 -1
View File
@@ -1,2 +1,2 @@
pub mod address;
pub mod neighbor;
pub mod address;
+25
View File
@@ -0,0 +1,25 @@
//! idk what to put here
use std::{iter, net::IpAddr};
use anyhow::bail;
use super::{NUDState, NeighborItem};
pub async fn get(
ip: Option<IpAddr>,
dev: Option<&str>,
nud: &[NUDState],
) -> anyhow::Result<Vec<NeighborItem>> {
let output = tokio::process::Command::new("ip")
.args(
(["-j", "neigh", "show"].iter().map(ToString::to_string))
.chain(ip.map(|ip| ip.to_canonical().to_string()))
.chain(dev.map(ToString::to_string))
.chain(nud.iter().map(|f| f.to_string())),
)
.output()
.await?;
bail!("no")
}
+2 -1
View File
@@ -4,6 +4,8 @@
//!
//! yes. this is a real call.
pub mod json;
use crate::utils::serialize::mac::{des_opm, ser_opm};
use std::net::IpAddr;
@@ -60,7 +62,6 @@ pub enum NUDState {
Failed,
}
/// everything i see
#[derive(Debug, PartialEq, Eq, Clone, Hash, Serialize, Deserialize)]
pub struct NeighborItem {