Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 21 additions & 15 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion netwatch/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ tracing = "0.1"
[target.'cfg(not(all(target_family = "wasm", target_os = "unknown")))'.dependencies]
quinn-udp = { package = "iroh-quinn-udp", version = "0.5.5" }
libc = "0.2.139"
netdev = "0.37.3"
netdev = "0.38.1"
socket2 = { version = "0.6", features = ["all"] }
tokio = { version = "1", features = [
"io-util",
Expand Down
11 changes: 7 additions & 4 deletions netwatch/src/interfaces.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ use crate::netmon::is_interesting_interface;
/// Represents a network interface.
#[derive(Debug, Clone)]
pub struct Interface {
iface: netdev::interface::Interface,
iface: netdev::Interface,
}

impl fmt::Display for Interface {
Expand Down Expand Up @@ -90,7 +90,10 @@ impl Interface {
pub(crate) fn fake() -> Self {
use std::net::Ipv4Addr;

use netdev::{NetworkDevice, interface::InterfaceType, mac::MacAddr};
use netdev::{
NetworkDevice,
prelude::{InterfaceType, MacAddr, OperState},
};

Self {
iface: netdev::Interface {
Expand All @@ -115,7 +118,7 @@ impl Interface {
ipv6_scope_ids: vec![],
stats: None,
mtu: None,
oper_state: netdev::interface::OperState::Up,
oper_state: OperState::Up,
},
}
}
Expand Down Expand Up @@ -371,7 +374,7 @@ impl HomeRouter {
/// This is used as the destination for UPnP, NAT-PMP, PCP, etc queries.
pub fn new() -> Option<Self> {
let gateway = Self::get_default_gateway()?;
let my_ip = netdev::interface::get_local_ipaddr();
let my_ip = netdev::net::ip::get_local_ipaddr();

Some(HomeRouter { gateway, my_ip })
}
Expand Down
Loading