Registry / networking / default-net

default-net

JSON →
library0.22.0rscratesunverified

Cross-platform library for network interface and gateway information.

networking
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

use default_net::get_default_gateway;

Retrieve the default network gateway.

use default_net::get_default_gateway; fn main() { match get_default_gateway() { Ok(gateway) => println!("Default gateway: {}", gateway.ip_addr), Err(e) => eprintln!("Error: {}", e), } }
Debug
Known footguns
gotchaOn Linux, requires root or CAP_NET_ADMIN to access some network information.
Upgrade
Version history

Breaking-change detection hasn't run for this library yet.

Audit
Security & dependencies

CVE tracking and dependency tree are planned for a later release.

Agent activity
0 hits · last 30 days

No traffic data recorded yet.

Resources