Skip to main content

netdev/
lib.rs

1//! Cross-platform library for enumerating network interfaces with metadata.
2//!
3//! `netdev` provides a unified API for discovering local network interfaces
4//! and retrieving commonly used metadata across platforms.
5//!
6//! Main entry points:
7//! - [`get_interfaces`] returns a snapshot of all visible interfaces.
8//! - [`Interface`] represents one interface and its collected metadata.
9//! - [`get_default_interface`] and [`get_default_gateway`] are available with the `gateway` feature (default).
10//!
11pub mod interface;
12pub mod net;
13mod os;
14pub mod prelude;
15#[cfg(feature = "gateway")]
16pub mod route;
17pub mod stats;
18
19pub use ipnet;
20
21pub use interface::get_interfaces;
22pub use interface::interface::Interface;
23pub use net::device::NetworkDevice;
24pub use net::mac::MacAddr;
25
26#[cfg(feature = "gateway")]
27pub use interface::get_default_interface;
28#[cfg(feature = "gateway")]
29pub use route::get_default_gateway;