When if_nametoindex() fails, errno can be set to one of the following:
[ENXIO]
The specified interface name does not exist.
[EFAULT]
The buffer pointed to by ifname can not be accessed.
Usage Notes
The interface (line description) name found at ifname is assumed to
be in the default coded character set identifier (CCSID) currently in effect
for the job.
It is important to note that the term "Interface" refers to the name on a line
description (i.e. a physical interface) for this API. Other parts of the
operating system, when refering to "Interface," mean an IP address.