devela::_dep::rustix::net::netdevice

Function name_to_index

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