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_nameindex.3p (2504B)


  1. '\" et
  2. .TH IF_NAMEINDEX "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_nameindex
  12. \(em return all network interface names and indexes
  13. .SH SYNOPSIS
  14. .LP
  15. .nf
  16. #include <net/if.h>
  17. .P
  18. struct if_nameindex *\fIif_nameindex\fP(void);
  19. .fi
  20. .SH DESCRIPTION
  21. The
  22. \fIif_nameindex\fR()
  23. function shall return an array of
  24. .IR if_nameindex
  25. structures, one structure per interface. The end of the array is
  26. indicated by a structure with an
  27. .IR if_index
  28. field of zero and an
  29. .IR if_name
  30. field of NULL.
  31. .P
  32. Applications should call
  33. \fIif_freenameindex\fR()
  34. to release the memory that may be dynamically allocated by this
  35. function, after they have finished using it.
  36. .SH "RETURN VALUE"
  37. An array of structures identifying local interfaces. A null pointer is
  38. returned upon an error, with
  39. .IR errno
  40. set to indicate the error.
  41. .SH ERRORS
  42. The
  43. \fIif_nameindex\fR()
  44. function may fail if:
  45. .TP
  46. .BR ENOBUFS
  47. Insufficient resources are available to complete the function.
  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_indextoname\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 .