22 releases

0.14.0 Jul 9, 2025
0.13.4 Mar 20, 2025
0.13.3 Aug 19, 2024
0.13.1 Jul 19, 2024
0.6.5 Oct 28, 2020

#83 in Network programming

Download history 102324/week @ 2025-07-19 104776/week @ 2025-07-26 111980/week @ 2025-08-02 119272/week @ 2025-08-09 127807/week @ 2025-08-16 165184/week @ 2025-08-23 160904/week @ 2025-08-30 341098/week @ 2025-09-06 149495/week @ 2025-09-13 152029/week @ 2025-09-20 154103/week @ 2025-09-27 159702/week @ 2025-10-04 134150/week @ 2025-10-11 156119/week @ 2025-10-18 172370/week @ 2025-10-25 136175/week @ 2025-11-01

627,229 downloads per month
Used in 658 crates (66 directly)

MIT OR BSD-3-Clause

55KB
1K SLoC

if-addrs

https://crates.io/crates/if-addrs

Overview

Retrieve network interface info for all interfaces on the system:

// List all of the machine's network interfaces
for iface in if_addrs::get_if_addrs().unwrap() {
    println!("{:#?}", iface);
}

Get notifications for changes in network interfaces:

let mut notifier = if_addrs::IfChangeNotifier::new().unwrap();
loop {
    if let Ok(details) = notifier.wait(None) {
        println!("{:#?}", details);
    }
}

License

This SAFE Network library is dual-licensed under the Modified BSD (LICENSE-BSD https://opensource.org/licenses/BSD-3-Clause) or the MIT license (LICENSE-MIT http://opensource.org/licenses/MIT) at your option.

Contribution

Copyrights in the SAFE Network are retained by their contributors. No copyright assignment is required to contribute to this project.

Dependencies

~0–12MB
~80K SLoC