diff --git a/Cargo.toml b/Cargo.toml index acfbf35..c11a2b2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -22,7 +22,11 @@ ipnet = "2.3.1" log = "0.4.14" [target.'cfg(target_os = "linux")'.dependencies] -rtnetlink = { version = "0.10.0", default-features = false } +netlink-sys = { version = "0.8.0", default-features = false } +netlink-packet-core = { version = "0.7.0", default-features = false } +netlink-packet-route = { version = "0.17.0", default-features = false } +netlink-proto = { version = "0.11.0", default-features = false } +rtnetlink = { version = "0.13.0", default-features = false } [target.'cfg(any(target_os = "macos", target_os = "ios"))'.dependencies] core-foundation = "0.9.2" diff --git a/src/linux.rs b/src/linux.rs index 6684a79..933165f 100644 --- a/src/linux.rs +++ b/src/linux.rs @@ -3,11 +3,12 @@ use fnv::FnvHashSet; use futures::ready; use futures::stream::{FusedStream, Stream, TryStreamExt}; use futures::StreamExt; +use netlink_packet_core::NetlinkPayload; +use netlink_packet_route::rtnl::address::nlas::Nla; +use netlink_packet_route::rtnl::{AddressMessage, RtnlMessage}; +use netlink_proto::Connection; +use netlink_sys::{AsyncSocket, SocketAddr}; use rtnetlink::constants::{RTMGRP_IPV4_IFADDR, RTMGRP_IPV6_IFADDR}; -use rtnetlink::packet::address::nlas::Nla; -use rtnetlink::packet::{AddressMessage, RtnlMessage}; -use rtnetlink::proto::{Connection, NetlinkPayload}; -use rtnetlink::sys::{AsyncSocket, SocketAddr}; use std::collections::VecDeque; use std::future::Future; use std::io::{Error, ErrorKind, Result}; @@ -17,8 +18,8 @@ use std::task::{Context, Poll}; #[cfg(feature = "tokio")] pub mod tokio { - //! An interface watcher that uses `rtnetlink`'s [`TokioSocket`](rtnetlink::sys::TokioSocket) - use rtnetlink::sys::TokioSocket; + //! An interface watcher that uses `netlink`'s [`TokioSocket`](netlink_sys::TokioSocket) + use netlink_sys::TokioSocket; /// Watches for interface changes. pub type IfWatcher = super::IfWatcher; @@ -26,8 +27,8 @@ pub mod tokio { #[cfg(feature = "smol")] pub mod smol { - //! An interface watcher that uses `rtnetlink`'s [`SmolSocket`](rtnetlink::sys::SmolSocket) - use rtnetlink::sys::SmolSocket; + //! An interface watcher that uses `netlink`'s [`SmolSocket`](netlink_sys::SmolSocket) + use netlink_sys::SmolSocket; /// Watches for interface changes. pub type IfWatcher = super::IfWatcher;