The endhostent() function is used to close the local host table.
The table is opened by those functions that retrieve information about a host
(for example, gethostent()).
When the _XOPEN_SOURCE
macro defined to the value 520 or greater, the host table is always closed. When
the _XOPEN_SOURCE macro is not so defined, the host table is not closed if a sethostent() with a
nonzero parameter value was previously completed.
System i® Navigator or the
following CL commands can be used to access the local host table:
ADDTCPHTE (Add TCP/IP Host Table Entry)
RMVTCPHTE (Remove TCP/IP Host Table Entry)
CHGTCPHTE (Change TCP/IP Host Table Entry)
RNMTCPHTE (Rename TCP/IP Host Table Entry)
MRGTCPHT (Merge TCP/IP Host Tables)
CFGTCP (Configure TCP/IP), option "10. Work with TCP/IP host table entries"
Do not use the endhostent() function in a multithreaded
environment. See the multithread alternative endhostent_r()
function.
When you develop in C-based
languages and an application is compiled with the _XOPEN_SOURCE macro defined
to the value 520 or greater, the endhostent() API is mapped to
qso_endhostent98().
Related Information
_XOPEN_SOURCE--Using _XOPEN_SOURCE for the UNIX® 98
compatible interface
gethostent()--Get Next Entry from Local Host Table