#ip-address-lookup #network-interfaces

if-addrs

Return interface IP addresses on Posix and windows systems

12 unstable releases (4 breaking)

0.10.1 Feb 28, 2023
0.9.0 Feb 24, 2023
0.7.0 Dec 14, 2021
0.6.7 Nov 7, 2021
0.6.5 Oct 28, 2020

#239 in Rust patterns

Download history 40157/week @ 2023-06-05 45024/week @ 2023-06-12 45140/week @ 2023-06-19 45703/week @ 2023-06-26 45952/week @ 2023-07-03 39969/week @ 2023-07-10 47667/week @ 2023-07-17 47634/week @ 2023-07-24 43430/week @ 2023-07-31 44393/week @ 2023-08-07 47885/week @ 2023-08-14 48841/week @ 2023-08-21 64729/week @ 2023-08-28 53293/week @ 2023-09-04 52446/week @ 2023-09-11 46993/week @ 2023-09-18

220,158 downloads per month
Used in 373 crates (37 directly)

MIT OR BSD-3-Clause

33KB
714 lines

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);
}

Todo Items

  • Create an API for responding to changes in network interfaces.

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–14MB
~122K SLoC