read the next line of the host database file
#include <netdb.h> struct hostent *gethostent( void );
The gethostent() routine reads the next line in the host database file.
A pointer to a valid hostent structure, or NULL if an error occurs.
POSIX 1003.1g (draft)
Safety: | |
---|---|
Interrupt handler | No |
Signal handler | No |
Thread | No |
This function uses static data storage; if the data is needed for future use, it should be copied before any subsequent calls overwrite it. Currently, only the Internet address format is understood.
endhostent(), gethostbyaddr() gethostbyname() hostent, sethostent()
/etc/hosts, named, /etc/resolv.conf in the TCP/IP User's Guide