-
Notifications
You must be signed in to change notification settings - Fork 29
Expand file tree
/
Copy pathCargo.toml
More file actions
97 lines (81 loc) · 2.6 KB
/
Copy pathCargo.toml
File metadata and controls
97 lines (81 loc) · 2.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
[package]
name = "netdev"
version = "0.45.0"
authors = ["shellrow <shellrow@foctal.com>"]
edition = "2024"
description = "Cross-platform library for enumerating network interfaces with metadata."
repository = "https://github.com/shellrow/netdev"
readme = "README.md"
keywords = ["network"]
categories = ["network-programming"]
license = "MIT"
[dependencies]
mac-addr = { version = "0.3" }
serde = { version = "1", features = ["derive"], optional = true }
ipnet = { version = "2.12" }
[target.'cfg(unix)'.dependencies]
libc = "0.2"
[target.'cfg(any(target_os = "linux", target_os = "android"))'.dependencies]
netlink-packet-core = "0.8"
netlink-packet-route = "0.31"
netlink-sys = "0.8.8"
[target.'cfg(target_os = "android")'.dependencies]
dlopen2 = { version = "0.8.2", default-features = false }
jni = { version = "0.21.1", optional = true }
ndk-context = { version = "0.1.1", optional = true }
once_cell = "1"
[target.'cfg(windows)'.dependencies.windows-sys]
version = "0.61"
features = [
"Win32_Foundation",
"Win32_NetworkManagement_IpHelper",
"Win32_Networking_WinSock",
"Win32_NetworkManagement_Ndis",
]
[target.'cfg(any(target_os = "macos", target_os = "ios"))'.dependencies]
objc2-core-foundation = "0.3"
objc2-system-configuration = { version = "0.3", default-features = false, features = ["SCNetworkConfiguration"] }
plist = "1.8"
[target.'cfg(target_os = "macos")'.dependencies]
objc2 = { version = "0.6" }
objc2-core-wlan = { version = "0.3" }
objc2-foundation = { version = "0.3" }
[target.'cfg(target_os = "ios")'.dependencies]
dispatch2 = "0.3"
block2 = "0.6"
[dev-dependencies]
serde_json = "1.0"
[features]
default = ["gateway", "apple-system-configuration-extra", "android-extra"]
serde = ["dep:serde", "mac-addr/serde", "ipnet/serde"]
gateway = []
android-extra = ["dep:jni", "dep:ndk-context"]
apple-system-configuration-extra = [
"objc2-system-configuration/SCPreferences",
"objc2-system-configuration/SCDynamicStore",
"objc2-system-configuration/SCDynamicStoreKey",
"objc2-system-configuration/SCSchemaDefinitions",
]
[[example]]
name = "list_interfaces"
path = "examples/list_interfaces.rs"
[[example]]
name = "default_interface"
path = "examples/default_interface.rs"
required-features = ["gateway"]
[[example]]
name = "default_gateway"
path = "examples/default_gateway.rs"
required-features = ["gateway"]
[[example]]
name = "serialize"
path = "examples/serialize.rs"
required-features = ["serde", "gateway"]
[[example]]
name = "global_ips"
path = "examples/global_ips.rs"
required-features = ["gateway"]
[[example]]
name = "stats"
path = "examples/stats.rs"
required-features = ["gateway"]