remove netlink fork
This commit is contained in:
@@ -15,8 +15,8 @@ crypto-test = ["enable-crypto-vld0", "enable-crypto-none"]
|
||||
crypto-test-none = ["enable-crypto-none"]
|
||||
enable-crypto-vld0 = []
|
||||
enable-crypto-none = []
|
||||
rt-async-std = ["async-std", "async-std-resolver", "async_executors/async_std", "rtnetlink?/smol_socket", "veilid-tools/rt-async-std"]
|
||||
rt-tokio = ["tokio", "tokio-util", "tokio-stream", "trust-dns-resolver/tokio-runtime", "async_executors/tokio_tp", "async_executors/tokio_io", "async_executors/tokio_timer", "rtnetlink?/tokio_socket", "veilid-tools/rt-tokio"]
|
||||
rt-async-std = ["async-std", "async-std-resolver", "async_executors/async_std", "rtnetlink/smol_socket", "veilid-tools/rt-async-std"]
|
||||
rt-tokio = ["tokio", "tokio-util", "tokio-stream", "trust-dns-resolver/tokio-runtime", "async_executors/tokio_tp", "async_executors/tokio_io", "async_executors/tokio_timer", "rtnetlink/tokio_socket", "veilid-tools/rt-tokio"]
|
||||
rt-wasm-bindgen = ["veilid-tools/rt-wasm-bindgen", "async_executors/bindgen"]
|
||||
|
||||
veilid_core_android_tests = ["dep:paranoid-android"]
|
||||
@@ -54,15 +54,19 @@ enumset = { version= "^1", features = ["serde"] }
|
||||
backtrace = { version = "^0" }
|
||||
owo-colors = "^3"
|
||||
stop-token = { version = "^0", default-features = false }
|
||||
|
||||
ed25519-dalek = { version = "^1", default_features = false, features = ["alloc", "u64_backend"] }
|
||||
x25519-dalek = { version = "^1", default_features = false, features = ["u64_backend"] }
|
||||
curve25519-dalek = { version = "^3", default_features = false, features = ["alloc", "u64_backend"] }
|
||||
blake3 = { version = "^1" }
|
||||
rtnetlink = { version = "^0", default-features = false, optional = true }
|
||||
|
||||
|
||||
async-std-resolver = { version = "^0", optional = true }
|
||||
trust-dns-resolver = { version = "^0", optional = true }
|
||||
enum-as-inner = "=0.5.1" # temporary fix for trust-dns-resolver v0.22.0
|
||||
|
||||
keyvaluedb = { path = "../external/keyvaluedb/keyvaluedb" }
|
||||
|
||||
rkyv = { version = "^0", default_features = false, features = ["std", "alloc", "strict", "size_32", "validation"] }
|
||||
data-encoding = { version = "^2" }
|
||||
weak-table = "0.3.2"
|
||||
@@ -138,8 +142,10 @@ paranoid-android = { version = "^0", optional = true }
|
||||
ifstructs = "^0"
|
||||
|
||||
# Dependencies for Linux or Android
|
||||
[target.'cfg(any(target_os = "android",target_os = "linux"))'.dependencies]
|
||||
rtnetlink = { version = "^0", default-features = false }
|
||||
[target.'cfg(any(target_os = "android", target_os = "linux"))'.dependencies]
|
||||
rtnetlink = { version = "^0", default-features = false}
|
||||
netlink-sys = { version = "0.8" }
|
||||
netlink-packet-route = { version = "0.15" }
|
||||
|
||||
# Dependencies for Windows
|
||||
[target.'cfg(target_os = "windows")'.dependencies]
|
||||
|
||||
@@ -7,15 +7,16 @@ use libc::{
|
||||
close, if_indextoname, ioctl, socket, IFF_LOOPBACK, IFF_RUNNING, IF_NAMESIZE, SIOCGIFFLAGS,
|
||||
SOCK_DGRAM,
|
||||
};
|
||||
use rtnetlink::packet::{
|
||||
use netlink_packet_route::{
|
||||
nlas::address::Nla, AddressMessage, AF_INET, AF_INET6, IFA_F_DADFAILED, IFA_F_DEPRECATED,
|
||||
IFA_F_OPTIMISTIC, IFA_F_PERMANENT, IFA_F_TEMPORARY, IFA_F_TENTATIVE,
|
||||
};
|
||||
use rtnetlink::{new_connection_with_socket, Handle, IpVersion};
|
||||
cfg_if! {
|
||||
if #[cfg(feature="rt-async-std")] {
|
||||
use rtnetlink::{new_connection_with_socket, sys::SmolSocket as RTNetLinkSocket, Handle, IpVersion};
|
||||
use netlink_sys::{SmolSocket as RTNetLinkSocket};
|
||||
} else if #[cfg(feature="rt-tokio")] {
|
||||
use rtnetlink::{new_connection_with_socket, sys::TokioSocket as RTNetLinkSocket, Handle, IpVersion};
|
||||
use netlink_sys::{TokioSocket as RTNetLinkSocket};
|
||||
}
|
||||
}
|
||||
use std::convert::TryInto;
|
||||
|
||||
Reference in New Issue
Block a user