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

endnetent.3p (4424B)


  1. '\" et
  2. .TH ENDNETENT "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. endnetent,
  12. getnetbyaddr,
  13. getnetbyname,
  14. getnetent,
  15. setnetent
  16. \(em network database functions
  17. .SH SYNOPSIS
  18. .LP
  19. .nf
  20. #include <netdb.h>
  21. .P
  22. void endnetent(void);
  23. struct netent *getnetbyaddr(uint32_t \fInet\fP, int \fItype\fP);
  24. struct netent *getnetbyname(const char *\fIname\fP);
  25. struct netent *getnetent(void);
  26. void setnetent(int \fIstayopen\fP);
  27. .fi
  28. .SH DESCRIPTION
  29. These functions shall retrieve information about networks. This
  30. information is considered to be stored in a database that can be
  31. accessed sequentially or randomly. The implementation of this database
  32. is unspecified.
  33. .P
  34. The
  35. \fIsetnetent\fR()
  36. function shall open and rewind the database. If the
  37. .IR stayopen
  38. argument is non-zero, the connection to the
  39. .IR net
  40. database shall not be closed after each call to
  41. \fIgetnetent\fR()
  42. (either directly, or indirectly through one of the other
  43. .IR getnet* (\|)
  44. functions), and the implementation may maintain an open file descriptor
  45. to the database.
  46. .P
  47. The
  48. \fIgetnetent\fR()
  49. function shall read the next entry of the database, opening and
  50. closing a connection to the database as necessary.
  51. .P
  52. The
  53. \fIgetnetbyaddr\fR()
  54. function shall search the database from the beginning, and find the
  55. first entry for which the address family specified by
  56. .IR type
  57. matches the
  58. .IR n_addrtype
  59. member and the network number
  60. .IR net
  61. matches the
  62. .IR n_net
  63. member, opening and closing a connection to the database as necessary.
  64. The
  65. .IR net
  66. argument shall be the network number in host byte order.
  67. .P
  68. The
  69. \fIgetnetbyname\fR()
  70. function shall search the database from the beginning and find the
  71. first entry for which the network name specified by
  72. .IR name
  73. matches the
  74. .IR n_name
  75. member, opening and closing a connection to the database as necessary.
  76. .P
  77. The
  78. \fIgetnetbyaddr\fR(),
  79. \fIgetnetbyname\fR(),
  80. and
  81. \fIgetnetent\fR()
  82. functions shall each return a pointer to a
  83. .BR netent
  84. structure, the members of which shall contain the fields of an entry in
  85. the network database.
  86. .P
  87. The
  88. \fIendnetent\fR()
  89. function shall close the database, releasing any open file descriptor.
  90. .P
  91. These functions need not be thread-safe.
  92. .SH "RETURN VALUE"
  93. Upon successful completion,
  94. \fIgetnetbyaddr\fR(),
  95. \fIgetnetbyname\fR(),
  96. and
  97. \fIgetnetent\fR()
  98. shall return a pointer to a
  99. .BR netent
  100. structure if the requested entry was found, and a null pointer if the
  101. end of the database was reached or the requested entry was not found.
  102. Otherwise, a null pointer shall be returned.
  103. .P
  104. The application shall not modify the structure to which the return
  105. value points, nor any storage areas pointed to by pointers within the
  106. structure. The returned pointer, and pointers within the structure,
  107. might be invalidated or the structure or the storage areas might be
  108. overwritten by a subsequent call to
  109. \fIgetnetbyaddr\fR(),
  110. \fIgetnetbyname\fR(),
  111. or
  112. \fIgetnetent\fR().
  113. The returned pointer, and pointers within the structure, might also be
  114. invalidated if the calling thread is terminated.
  115. .SH ERRORS
  116. No errors are defined.
  117. .LP
  118. .IR "The following sections are informative."
  119. .SH "EXAMPLES"
  120. None.
  121. .SH "APPLICATION USAGE"
  122. None.
  123. .SH "RATIONALE"
  124. None.
  125. .SH "FUTURE DIRECTIONS"
  126. None.
  127. .SH "SEE ALSO"
  128. The Base Definitions volume of POSIX.1\(hy2017,
  129. .IR "\fB<netdb.h>\fP"
  130. .\"
  131. .SH COPYRIGHT
  132. Portions of this text are reprinted and reproduced in electronic form
  133. from IEEE Std 1003.1-2017, Standard for Information Technology
  134. -- Portable Operating System Interface (POSIX), The Open Group Base
  135. Specifications Issue 7, 2018 Edition,
  136. Copyright (C) 2018 by the Institute of
  137. Electrical and Electronics Engineers, Inc and The Open Group.
  138. In the event of any discrepancy between this version and the original IEEE and
  139. The Open Group Standard, the original IEEE and The Open Group Standard
  140. is the referee document. The original Standard can be obtained online at
  141. http://www.opengroup.org/unix/online.html .
  142. .PP
  143. Any typographical or formatting errors that appear
  144. in this page are most likely
  145. to have been introduced during the conversion of the source files to
  146. man page format. To report such errors, see
  147. https://www.kernel.org/doc/man-pages/reporting_bugs.html .