sethostent()

The sethostent() call opens and caches the local host table contents for gethostent() calls. The sethostent() call is available only when RESOLVE_VIA_LOOKUP is defined before MANIFEST.H is included. See z/OS Communications Server: IP Configuration Guide for information about using local host tables.

#include <manifest.h>
#include <socket.h>
 
int sethostent(int stayopen)
Parameter
Description
stayopen
A nonzero flag value prevents the cached local host table contents from being freed after an endhostent().

Return values

The value 0 indicates success. The value -1 indicates an error. Errno identifies the specific error, returning the errno value of the fopen() call.

Related calls

endhostent(), endnetent(), gethostbyaddr(), gethostbyname(), gethostent()