Skip to main content

interfaces

Function interfaces 

Source
pub fn interfaces() -> Vec<Interface>
Expand description

The Ethernet interfaces, physical and up first, then by name.

Examples found in repository?
examples/link_power.rs (line 6)
5fn main() {
6    for interface in raw_ether::interfaces() {
7        if let Ok(power) = raw_ether::interfaces::link_power(&interface.name) {
8            let vlans = raw_ether::interfaces::filters_vlans(&interface.name);
9            println!(
10                "{}: EEE {}, PAUSE {}, VLAN filter {:?}",
11                interface.name, power.eee, power.pause, vlans
12            );
13        }
14    }
15}