endhostent()--Close Local Host Table
Syntax
#include <netdb.h> void endhostent()
Service Program Name: QSOSRV2
Default Public Authority: *USE
Threadsafe: No; see Usage Notes.
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()).
Authorities
No authorization is required.
Usage Notes
- 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"
- ADDTCPHTE (Add TCP/IP Host Table Entry)
- 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
- gethostbyname()--Get Host Information for Host
Name
- gethostbyaddr()--Get Host Information for IP
Address
- sethostent()--Open Local Host Table
API introduced: V3R1