diff --git a/network-hypervisor/Cargo.toml b/network-hypervisor/Cargo.toml index c64019212..98af897b6 100644 --- a/network-hypervisor/Cargo.toml +++ b/network-hypervisor/Cargo.toml @@ -16,7 +16,6 @@ async-trait = "^0" base64 = "^0" lz4_flex = { version = "^0", features = ["safe-encode", "safe-decode", "checked-decode"] } parking_lot = { version = "^0", features = [], default-features = false } -lazy_static = "^1" serde = { version = "^1", features = ["derive"], default-features = false } [dev-dependencies] diff --git a/network-hypervisor/src/vl1/mod.rs b/network-hypervisor/src/vl1/mod.rs index 80c9409e0..f306c2f17 100644 --- a/network-hypervisor/src/vl1/mod.rs +++ b/network-hypervisor/src/vl1/mod.rs @@ -5,7 +5,6 @@ mod dictionary; mod endpoint; mod fragmentedpacket; mod identity; -mod inetaddress; mod mac; mod path; mod peer; @@ -17,11 +16,13 @@ pub(crate) mod node; #[allow(unused)] pub(crate) mod protocol; +pub mod inetaddress; + pub use address::Address; pub use dictionary::Dictionary; pub use endpoint::Endpoint; pub use identity::*; -pub use inetaddress::{AddressFamilyType, InetAddress, IpScope, AF_INET, AF_INET6}; +pub use inetaddress::InetAddress; pub use mac::MAC; pub use node::SystemInterface; pub use path::Path; diff --git a/system-service/Cargo.toml b/system-service/Cargo.toml index 5f2e679b4..766d9faec 100644 --- a/system-service/Cargo.toml +++ b/system-service/Cargo.toml @@ -19,7 +19,6 @@ tokio = { version = "^1", features = ["fs", "io-util", "io-std", "net", "parking serde = { version = "^1", features = ["derive"], default-features = false } serde_json = { version = "^1", features = ["std"], default-features = false } parking_lot = { version = "^0", features = [], default-features = false } -lazy_static = "^1" clap = { version = "^3", features = ["std", "suggestions"], default-features = false } log = "^0" diff --git a/system-service/src/ipv6.rs b/system-service/src/ipv6.rs index ce7c49976..b0542f78c 100644 --- a/system-service/src/ipv6.rs +++ b/system-service/src/ipv6.rs @@ -5,15 +5,12 @@ use zerotier_network_hypervisor::vl1::InetAddress; #[cfg(any(target_os = "macos", target_os = "ios", target_os = "freebsd", target_os = "darwin"))] mod freebsd_like { - use lazy_static::lazy_static; use num_traits::AsPrimitive; use parking_lot::Mutex; use std::mem::size_of; use zerotier_network_hypervisor::vl1::InetAddress; - lazy_static! { - static ref INFO_SOCKET: Mutex = Mutex::new(-1); - } + static INFO_SOCKET: Mutex = Mutex::new(-1); #[allow(unused)] const SIZE_OF_IN6_IFREQ: usize = 288; diff --git a/system-service/src/localsocket.rs b/system-service/src/localsocket.rs index b1d0a9335..4f3cf911d 100644 --- a/system-service/src/localsocket.rs +++ b/system-service/src/localsocket.rs @@ -6,11 +6,7 @@ use std::sync::{Arc, Weak}; use crate::udp::BoundUdpSocket; -use lazy_static::lazy_static; - -lazy_static! { - static ref LOCAL_SOCKET_UNIQUE_ID_COUNTER: AtomicUsize = AtomicUsize::new(0); -} +static LOCAL_SOCKET_UNIQUE_ID_COUNTER: AtomicUsize = AtomicUsize::new(0); /// Local socket wrapper to provide to the core. /// diff --git a/system-service/src/udp.rs b/system-service/src/udp.rs index 7dc238462..531ae325a 100644 --- a/system-service/src/udp.rs +++ b/system-service/src/udp.rs @@ -19,7 +19,7 @@ use crate::localinterface::LocalInterface; #[allow(unused_imports)] use num_traits::AsPrimitive; -use zerotier_network_hypervisor::vl1::{InetAddress, IpScope, AF_INET, AF_INET6}; +use zerotier_network_hypervisor::vl1::inetaddress::*; /// A local port to which one or more UDP sockets is bound. ///