#[non_exhaustive]pub enum InterfaceOperationalState {
Up = 1,
Down = 2,
Testing = 3,
Unknown = 4,
Dormant = 5,
NotPresent = 6,
LowerLayerDown = 7,
}Expand description
The operational state of some interface based on IfOperStatus
from RFC2863.
Not all states are supported by all systems.
If you want to only distinguish between potentially operational and not operational you likely want to:
- treat
Up,DormantandUnknownas potentially operational - treat
Down,Testing,NotPresentandLowerLayerDownas not operational
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Up = 1
The interface is able to pass packets.
Down = 2
The interface is unable to pass packets.
§Examples
- an error condition has occurred
- the interface is disabled
Testing = 3
The interface is unable to pass packets. The interface is performing some test(s). Presumably it will change into another appropriate state once testing completes.
§Examples
- driver self-test
- media (e.g. cable) test
Unknown = 4
The state of the interface is unknown. The interface may or may not be usable.
§Examples
- on linux the loopback interface (localhost, 127.0.0.1/8, ::1/128) typically has this state
Dormant = 5
The interface is unable to pass packets. It is in a “pending state” waiting for some external event. When the event occurs the interface will prusumably change into the `Up`` state.
§Examples
- an “on-demand” interface might be waiting for a package in the transmit queue to establish a connection.
- an interface might be waiting for the remote system to establish a connection
- waiting for 802.1X protocol to establish a connection
NotPresent = 6
The interface is unable to pass packets. A (hardware) component is not present.
This is a refinement on Down.
§Examples
- hot-swap module is currently not installed
- pre-configured interface is not yet installed
- an interface has been removed but is still configured
LowerLayerDown = 7
The interface is unable to pass packets.
This interface depends on one or more interfaces and at least one of these interfaces prevents this interface from being Up.
This is a refinement on Down.
§Examples
- a VPN interface depends on any physical interface being up but the physical interface is testing the cable to determine the available speed
- a single virtual interface that aggregates multiple physical interfaces but all physical interfaces are down
Trait Implementations§
Source§impl Clone for InterfaceOperationalState
impl Clone for InterfaceOperationalState
Source§fn clone(&self) -> InterfaceOperationalState
fn clone(&self) -> InterfaceOperationalState
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more