pub fn name_to_index(fd: impl AsFd, if_name: &str) -> Result<u32>
Expand description

ioctl(fd, SIOCGIFINDEX, ifreq)—Returns the interface index for a given name.

See the module-level documentation for information about fd usage.

References