Skip to main content

link_power

Function link_power 

Source
pub fn link_power(name: &str) -> Result<LinkPower>
Expand description

What the interface named name does about EEE and PAUSE, read without privileges. What the driver does not support reads as off.

Examples found in repository?
examples/link_power.rs (line 7)
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}