![]() |
![]() |
![]() |
Read the next line of the host database file
#include <netdb.h> struct hostent* gethostent( void );
libsocket
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.
Standard Unix, POSIX 1003.1g (draft)
Safety: | |
---|---|
Cancellation point | Yes |
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(), gethostent_r(), hostent, sethostent()
/etc/hosts, /etc/resolv.conf in the Utilities reference
![]() |
![]() |
![]() |