pub struct NetworkDevice {
pub path: String,
pub interface: String,
pub kind: NetworkKind,
pub state: NetworkState,
pub connection: String,
pub connection_uuid: String,
pub hw_address: String,
pub ipv4_address: String,
pub fail_reason: Option<ConnectionFailReason>,
pub wifi_mode: WifiMode,
pub link_speed: u32,
pub has_link: bool,
}Expand description
A network device NetworkManager manages, other than loopback.
Fields§
§path: StringNetworkManager’s object path for it, which names it while it exists.
interface: StringIts interface, such as wlan0.
kind: NetworkKindWhat it is.
state: NetworkStateHow it is doing.
connection: StringThe name of its active connection, or "".
connection_uuid: StringThe uuid of its active connection’s saved one, as
SavedConnection::uuid, or "".
hw_address: StringIts hardware address, such as 52:54:00:12:34:56, or "".
ipv4_address: StringIts first IPv4 address, such as 192.168.1.5, or "" while it has
none.
fail_reason: Option<ConnectionFailReason>Why its last try to connect failed, kept until it tries again.
None if it hasn’t failed since the shell started following it.
wifi_mode: WifiModeWhat it does, for a Wi-Fi device; Unknown for any other.
link_speed: u32For a wired device, its link’s speed in Mb/s; 0 when not known, and for any other device.
has_link: boolFor a wired device, whether a cable is in, from the carrier bit of
InterfaceFlags, or Carrier before NetworkManager 1.22; false
for any other.