get_interface_mac

Function get_interface_mac 

Source
pub fn get_interface_mac(iface: &str) -> Result<MacAddr>
Expand description

Query the hardware (MAC) address of iface via SIOCGIFHWADDR.

Returns an error if the interface does not exist or if the process lacks the necessary permissions to open a raw socket for the ioctl.