getifaddrs
A cross-platform library for retrieving network interface information.
This crate provides a simple and consistent API for querying network interface details across different operating systems. It supports Unix-like systems (Linux, macOS, *BSD) and Windows.
Features
- Retrieve network interface information (name, IP address, netmask, flags, etc.)
- Filter interfaces based on various criteria (loopback, IPv4/IPv6, name, index)
- Cross-platform support (Unix-like systems and Windows)
- Provides a cross-platform implementation of
if_indextonameandif_nametoindex
Usage
Add this to your Cargo.toml:
[]
= "0.1"
Example
use ;
License
This project is licensed under the MIT License.