Registry / networking / if-addrs

if-addrs

JSON →
library0.15.0rscratesunverified

Return interface IP addresses on Posix and Windows systems, providing cross-platform network interface enumeration.

# Cargo.toml [dependencies] if-addrs = "0.15.0"
INSTALL
IMPORT
SIG · IF-ADDRS
I
if-addrs
networkingrustv0.15.0
harness data pending
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.

get_if_addrs
use if_addrs::get_if_addrs;

Retrieves and prints all network interface IP addresses.

use if_addrs::get_if_addrs; fn main() -> Result<(), Box<dyn std::error::Error>> { let ifaces = get_if_addrs()?; for iface in ifaces { println!("{}: {}", iface.name, iface.ip()); } Ok(()) }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
0.15.0latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
6 hits · last 30 days
node
6
Resources
if-addrs — cargo add if-addrs · libregistry