ipconfig/lib.rs
1//! Get network adapters information for windows.
2//!
3//!
4//! # Examples
5//!
6//! ```rust
7//! # fn foo() -> ipconfig::error::Result<()> {
8//! // Print the ip addresses and dns servers of all adapters:
9//! for adapter in ipconfig::get_adapters()? {
10//! println!("Ip addresses: {:#?}", adapter.ip_addresses());
11//! println!("Dns servers: {:#?}", adapter.dns_servers());
12//! }
13//! # Ok(())
14//! # }
15//! # fn main() {
16//! # foo().unwrap();
17//! # }
18//! ```
19
20#![cfg(windows)]
21#![doc(html_root_url = "https://docs.rs/ipconfig/0.3.4/x86_64-pc-windows-msvc/ipconfig/")]
22
23extern crate widestring;
24extern crate windows_sys;
25mod adapter;
26mod bindings;
27
28#[cfg(feature = "computer")]
29pub mod computer;
30pub mod error;
31
32pub use adapter::{get_adapters, Adapter, IfType, OperStatus};