logo

oasis-root

Compiled tree of Oasis Linux based on own branch at <https://hacktivis.me/git/oasis/> git clone https://anongit.hacktivis.me/git/oasis-root.git

if_indextoname.3p (2510B)


  1. '\" et
  2. .TH IF_INDEXTONAME "3P" 2017 "IEEE/The Open Group" "POSIX Programmer's Manual"
  3. .\"
  4. .SH PROLOG
  5. This manual page is part of the POSIX Programmer's Manual.
  6. The Linux implementation of this interface may differ (consult
  7. the corresponding Linux manual page for details of Linux behavior),
  8. or the interface may not be implemented on Linux.
  9. .\"
  10. .SH NAME
  11. if_indextoname
  12. \(em map a network interface index to its corresponding name
  13. .SH SYNOPSIS
  14. .LP
  15. .nf
  16. #include <net/if.h>
  17. .P
  18. char *if_indextoname(unsigned \fIifindex\fP, char *\fIifname\fP);
  19. .fi
  20. .SH DESCRIPTION
  21. The
  22. \fIif_indextoname\fR()
  23. function shall map an interface index to its corresponding name.
  24. .P
  25. When this function is called,
  26. .IR ifname
  27. shall point to a buffer of at least
  28. {IF_NAMESIZE}
  29. bytes. The function shall place in this buffer the name of the interface
  30. with index
  31. .IR ifindex .
  32. .SH "RETURN VALUE"
  33. If
  34. .IR ifindex
  35. is an interface index, then the function shall return the value supplied in
  36. .IR ifname ,
  37. which points to a buffer now containing the interface name. Otherwise,
  38. the function shall return a null pointer and set
  39. .IR errno
  40. to indicate the error.
  41. .SH ERRORS
  42. The
  43. \fIif_indextoname\fR()
  44. function shall fail if:
  45. .TP
  46. .BR ENXIO
  47. The interface does not exist.
  48. .LP
  49. .IR "The following sections are informative."
  50. .SH "EXAMPLES"
  51. None.
  52. .SH "APPLICATION USAGE"
  53. None.
  54. .SH "RATIONALE"
  55. None.
  56. .SH "FUTURE DIRECTIONS"
  57. None.
  58. .SH "SEE ALSO"
  59. .IR "\fIgetsockopt\fR\^(\|)",
  60. .IR "\fIif_freenameindex\fR\^(\|)",
  61. .IR "\fIif_nameindex\fR\^(\|)",
  62. .IR "\fIif_nametoindex\fR\^(\|)",
  63. .IR "\fIsetsockopt\fR\^(\|)"
  64. .P
  65. The Base Definitions volume of POSIX.1\(hy2017,
  66. .IR "\fB<net_if.h>\fP"
  67. .\"
  68. .SH COPYRIGHT
  69. Portions of this text are reprinted and reproduced in electronic form
  70. from IEEE Std 1003.1-2017, Standard for Information Technology
  71. -- Portable Operating System Interface (POSIX), The Open Group Base
  72. Specifications Issue 7, 2018 Edition,
  73. Copyright (C) 2018 by the Institute of
  74. Electrical and Electronics Engineers, Inc and The Open Group.
  75. In the event of any discrepancy between this version and the original IEEE and
  76. The Open Group Standard, the original IEEE and The Open Group Standard
  77. is the referee document. The original Standard can be obtained online at
  78. http://www.opengroup.org/unix/online.html .
  79. .PP
  80. Any typographical or formatting errors that appear
  81. in this page are most likely
  82. to have been introduced during the conversion of the source files to
  83. man page format. To report such errors, see
  84. https://www.kernel.org/doc/man-pages/reporting_bugs.html .