network-interface 2.0.5

Retrieve system's Network Interfaces on Linux, FreeBSD, macOS and Windows on a standarized manner
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use libc::ifaddrs;

#[cfg(any(
    target_os = "macos",
    target_os = "ios",
    target_os = "tvos",
    target_os = "freebsd",
    target_os = "openbsd",
    target_os = "netbsd",
    target_os = "dragonfly",
    target_os = "illumos",
))]
extern "C" {
    pub fn lladdr(ptr: *mut ifaddrs) -> *const u8;
}