More cleanup.

This commit is contained in:
Adam Ierymenko 2022-09-13 17:34:39 -04:00
parent 2649ce7571
commit 115c1c6c56
No known key found for this signature in database
GPG key ID: C8877CF2D7A5D7F3
6 changed files with 6 additions and 14 deletions

View file

@ -16,7 +16,6 @@ async-trait = "^0"
base64 = "^0" base64 = "^0"
lz4_flex = { version = "^0", features = ["safe-encode", "safe-decode", "checked-decode"] } lz4_flex = { version = "^0", features = ["safe-encode", "safe-decode", "checked-decode"] }
parking_lot = { version = "^0", features = [], default-features = false } parking_lot = { version = "^0", features = [], default-features = false }
lazy_static = "^1"
serde = { version = "^1", features = ["derive"], default-features = false } serde = { version = "^1", features = ["derive"], default-features = false }
[dev-dependencies] [dev-dependencies]

View file

@ -5,7 +5,6 @@ mod dictionary;
mod endpoint; mod endpoint;
mod fragmentedpacket; mod fragmentedpacket;
mod identity; mod identity;
mod inetaddress;
mod mac; mod mac;
mod path; mod path;
mod peer; mod peer;
@ -17,11 +16,13 @@ pub(crate) mod node;
#[allow(unused)] #[allow(unused)]
pub(crate) mod protocol; pub(crate) mod protocol;
pub mod inetaddress;
pub use address::Address; pub use address::Address;
pub use dictionary::Dictionary; pub use dictionary::Dictionary;
pub use endpoint::Endpoint; pub use endpoint::Endpoint;
pub use identity::*; pub use identity::*;
pub use inetaddress::{AddressFamilyType, InetAddress, IpScope, AF_INET, AF_INET6}; pub use inetaddress::InetAddress;
pub use mac::MAC; pub use mac::MAC;
pub use node::SystemInterface; pub use node::SystemInterface;
pub use path::Path; pub use path::Path;

View file

@ -19,7 +19,6 @@ tokio = { version = "^1", features = ["fs", "io-util", "io-std", "net", "parking
serde = { version = "^1", features = ["derive"], default-features = false } serde = { version = "^1", features = ["derive"], default-features = false }
serde_json = { version = "^1", features = ["std"], default-features = false } serde_json = { version = "^1", features = ["std"], default-features = false }
parking_lot = { version = "^0", features = [], default-features = false } parking_lot = { version = "^0", features = [], default-features = false }
lazy_static = "^1"
clap = { version = "^3", features = ["std", "suggestions"], default-features = false } clap = { version = "^3", features = ["std", "suggestions"], default-features = false }
log = "^0" log = "^0"

View file

@ -5,15 +5,12 @@ use zerotier_network_hypervisor::vl1::InetAddress;
#[cfg(any(target_os = "macos", target_os = "ios", target_os = "freebsd", target_os = "darwin"))] #[cfg(any(target_os = "macos", target_os = "ios", target_os = "freebsd", target_os = "darwin"))]
mod freebsd_like { mod freebsd_like {
use lazy_static::lazy_static;
use num_traits::AsPrimitive; use num_traits::AsPrimitive;
use parking_lot::Mutex; use parking_lot::Mutex;
use std::mem::size_of; use std::mem::size_of;
use zerotier_network_hypervisor::vl1::InetAddress; use zerotier_network_hypervisor::vl1::InetAddress;
lazy_static! { static INFO_SOCKET: Mutex<i32> = Mutex::new(-1);
static ref INFO_SOCKET: Mutex<i32> = Mutex::new(-1);
}
#[allow(unused)] #[allow(unused)]
const SIZE_OF_IN6_IFREQ: usize = 288; const SIZE_OF_IN6_IFREQ: usize = 288;

View file

@ -6,11 +6,7 @@ use std::sync::{Arc, Weak};
use crate::udp::BoundUdpSocket; use crate::udp::BoundUdpSocket;
use lazy_static::lazy_static; static LOCAL_SOCKET_UNIQUE_ID_COUNTER: AtomicUsize = AtomicUsize::new(0);
lazy_static! {
static ref LOCAL_SOCKET_UNIQUE_ID_COUNTER: AtomicUsize = AtomicUsize::new(0);
}
/// Local socket wrapper to provide to the core. /// Local socket wrapper to provide to the core.
/// ///

View file

@ -19,7 +19,7 @@ use crate::localinterface::LocalInterface;
#[allow(unused_imports)] #[allow(unused_imports)]
use num_traits::AsPrimitive; 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. /// A local port to which one or more UDP sockets is bound.
/// ///