pub fn interface_id(interface: &str) -> Result<i32, Error>
Expand description

Converts an interface name into the identifier used by the kernel.

This can also be retrieved via sysfs, if mounted to /sys:

$ cat /sys/class/net/eth0/ifindex
1