Ethernet Info
The crate provides a way to get the link information of the interface, including the port type, supported modes. The crate is based on the ioctl command, so it can only be used on Linux.
Examples
List all the interfaces' ethtool related information.
use get_ethernet_info;
let interfaces_eth_info = get_ethernet_info;
for interface_info in interfaces_eth_info
Get the ethtool related information of the specified interface.
use get_ethernet_info;
let interfaces_eth_info = get_ethernet_info;
for interface_info in interfaces_eth_info
Get the ethtool related of the specified interface by EthernetInfo.
use EthernetInfo;
if let Ok = try_from
Test
This crate depends on hardware, some tests may not be passed on every machine. Please change the test option on your own.