Crate ipconfig

source ·
Expand description

Get network adapters information for windows.

Examples

// Print the ip addresses and dns servers of all adapters:
for adapter in ipconfig::get_adapters()? {
    println!("Ip addresses: {:#?}", adapter.ip_addresses());
    println!("Dns servers: {:#?}", adapter.dns_servers());
}

Modules

  • This module implements things that are related to the computer, rather than a specific adapter.

Structs

Enums

  • Represent an interface type See IANA docs on iftype for more details https://www.iana.org/assignments/ianaiftype-mib/ianaiftype-mib Note that we only support a subset of the IANA interface types and in case the adapter has an unsupported type, IfType::Unsupported is used. IfType::Other is different from IfType::Unsupported, as the former one is defined by the IANA itself.
  • Represent an operational status of the adapter See IP_ADAPTER_ADDRESSES docs for more details

Functions