if_nametoindex.3: Add ENODEV error for if_nametoindex()

Checked against glibc and kernel code: when given name isn't
a valid interface, kernel returns ENODEV and glibc just
forwards it.

Signed-off-by: Douglas Caetano dos Santos <douglascs@taghos.com.br>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Douglas Caetano dos Santos 2017-05-09 11:45:17 -03:00 committed by Michael Kerrisk
parent d0cdb0ef0a
commit 1187f16f2d
1 changed files with 8 additions and 0 deletions

View File

@ -67,6 +67,14 @@ on error, NULL is returned and
.I errno
is set appropriately.
.SH ERRORS
.BR if_nametoindex ()
may fail and set
.I errno
if:
.TP
.B ENODEV
No interface found with given name.
.PP
.BR if_indextoname ()
may fail and set
.I errno