chore: more output

This commit is contained in:
Patrick 2025-01-01 21:08:02 +01:00
parent ad21b8b1ba
commit 57585faa7b
Signed by: patrick
GPG key ID: 451F95EFB8BECD0F

View file

@ -86,6 +86,7 @@ fn main() -> Result<()> {
socket.join_multicast_v4(&ADDR, &Ipv4Addr::UNSPECIFIED)?; socket.join_multicast_v4(&ADDR, &Ipv4Addr::UNSPECIFIED)?;
let interfaces = interfaces(); let interfaces = interfaces();
debug!("Found interface: {:?}", interfaces);
let interfaces = interfaces let interfaces = interfaces
.iter() .iter()
.filter(|x| { .filter(|x| {
@ -110,7 +111,7 @@ fn main() -> Result<()> {
}) })
}) })
.collect::<Result<Vec<_>>>()?; .collect::<Result<Vec<_>>>()?;
debug!("{:?}", interfaces); debug!("Filtered interfaces: {:?}", interfaces);
let mut buf = [0u8; 4096]; let mut buf = [0u8; 4096];
let socket: UdpSocket = socket.into(); let socket: UdpSocket = socket.into();
loop { loop {
@ -125,7 +126,7 @@ fn main() -> Result<()> {
let packet = Packet::parse(&buf)?; let packet = Packet::parse(&buf)?;
let iface = match get_iface(&from, &interfaces) { let iface = match get_iface(&from, &interfaces) {
Err(_) => { Err(_) => {
error!("Invalid packet received from {}", from); error!("No interface found for packet received from {}", from);
continue; continue;
} }
Ok(name) => name, Ok(name) => name,