20 unstable releases (7 breaking)

0.13.3 Aug 19, 2024
0.13.1 Jul 19, 2024
0.11.1 Mar 12, 2024
0.11.0 Dec 5, 2023
0.6.5 Oct 28, 2020

#23 in Network programming

Download history 68484/week @ 2024-07-27 72536/week @ 2024-08-03 84672/week @ 2024-08-10 68972/week @ 2024-08-17 73140/week @ 2024-08-24 80683/week @ 2024-08-31 79679/week @ 2024-09-07 78286/week @ 2024-09-14 85197/week @ 2024-09-21 79499/week @ 2024-09-28 90573/week @ 2024-10-05 90935/week @ 2024-10-12 96347/week @ 2024-10-19 87814/week @ 2024-10-26 95406/week @ 2024-11-02 88596/week @ 2024-11-09

382,233 downloads per month
Used in 477 crates (47 directly)

MIT OR BSD-3-Clause

48KB
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–7.5MB
~59K SLoC