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

endhostent.3p (3574B)


  1. '\" et
  2. .TH ENDHOSTENT "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. endhostent,
  12. gethostent,
  13. sethostent
  14. \(em network host database functions
  15. .SH SYNOPSIS
  16. .LP
  17. .nf
  18. #include <netdb.h>
  19. .P
  20. void endhostent(void);
  21. struct hostent *gethostent(void);
  22. void sethostent(int \fIstayopen\fP);
  23. .fi
  24. .SH DESCRIPTION
  25. These functions shall retrieve information about hosts. This
  26. information is considered to be stored in a database that can be
  27. accessed sequentially or randomly. The implementation of this database
  28. is unspecified.
  29. .TP 10
  30. .BR Note:
  31. In many cases this database is implemented by the Domain Name System,
  32. as documented in RFC\ 1034, RFC\ 1035, and RFC\ 1886.
  33. .P
  34. .P
  35. The
  36. \fIsethostent\fR()
  37. function shall open a connection to the database and set the next entry
  38. for retrieval to the first entry in the database. If the
  39. .IR stayopen
  40. argument is non-zero, the connection shall not be closed by a call to
  41. \fIgethostent\fR(),
  42. and the implementation may maintain an open file descriptor.
  43. .P
  44. The
  45. \fIgethostent\fR()
  46. function shall read the next entry in the database, opening and closing
  47. a connection to the database as necessary.
  48. .P
  49. Entries shall be returned in
  50. .BR hostent
  51. structures.
  52. .P
  53. The
  54. \fIendhostent\fR()
  55. function shall close the connection to the database, releasing any open
  56. file descriptor.
  57. .P
  58. These functions need not be thread-safe.
  59. .SH "RETURN VALUE"
  60. Upon successful completion, the
  61. \fIgethostent\fR()
  62. function shall return a pointer to a
  63. .BR hostent
  64. structure if the requested entry was found, and a null pointer if the
  65. end of the database was reached or the requested entry was not found.
  66. .P
  67. The application shall not modify the structure to which the return
  68. value points, nor any storage areas pointed to by pointers within the
  69. structure. The returned pointer, and pointers within the structure,
  70. might be invalidated or the structure or the storage areas might be
  71. overwritten by a subsequent call to
  72. \fIgethostent\fR().
  73. The returned pointer, and pointers within the structure, might also
  74. be invalidated if the calling thread is terminated.
  75. .SH ERRORS
  76. No errors are defined for
  77. \fIendhostent\fR(),
  78. \fIgethostent\fR(),
  79. and
  80. \fIsethostent\fR().
  81. .LP
  82. .IR "The following sections are informative."
  83. .SH "EXAMPLES"
  84. None.
  85. .SH "APPLICATION USAGE"
  86. None.
  87. .SH "RATIONALE"
  88. None.
  89. .SH "FUTURE DIRECTIONS"
  90. None.
  91. .SH "SEE ALSO"
  92. .IR "\fIendservent\fR\^(\|)"
  93. .P
  94. The Base Definitions volume of POSIX.1\(hy2017,
  95. .IR "\fB<netdb.h>\fP"
  96. .\"
  97. .SH COPYRIGHT
  98. Portions of this text are reprinted and reproduced in electronic form
  99. from IEEE Std 1003.1-2017, Standard for Information Technology
  100. -- Portable Operating System Interface (POSIX), The Open Group Base
  101. Specifications Issue 7, 2018 Edition,
  102. Copyright (C) 2018 by the Institute of
  103. Electrical and Electronics Engineers, Inc and The Open Group.
  104. In the event of any discrepancy between this version and the original IEEE and
  105. The Open Group Standard, the original IEEE and The Open Group Standard
  106. is the referee document. The original Standard can be obtained online at
  107. http://www.opengroup.org/unix/online.html .
  108. .PP
  109. Any typographical or formatting errors that appear
  110. in this page are most likely
  111. to have been introduced during the conversion of the source files to
  112. man page format. To report such errors, see
  113. https://www.kernel.org/doc/man-pages/reporting_bugs.html .