Function name_to_index

Source
pub fn name_to_index(fd: impl AsFd, if_name: &str) -> Result<u32>
Available on crate feature net only.
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