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

  1. 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.

  2. System i® Navigator or the following CL commands can be used to access the local host table:

  3. Do not use the endhostent() function in a multithreaded environment. See the multithread alternative endhostent_r() function.

  4. 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



API introduced: V3R1

[ Back to top | UNIX-Type APIs | APIs by category ]