The gethostent() call returns a pointer to the next entry in the ETC\HOSTS file.
Syntax
#include <netdb.h> struct hostent *gethostent()
Description
This call returns a pointer to a hostent structure, which contains the equivalent fields for a host description line in the ETC\HOSTS file. The hostent structure is defined in the <NETDB.H> file.
Return Values
The return value points to static data that subsequent API calls can modify. This call returns a pointer to a hostent structure for the host address specified on the call and indicates success. A NULL pointer indicates an error or EOF.
The <NETDB.H> header file defines the hostent structure and contains the following elements:
Element
Related Calls