Structure that describes an Internet host
#include <netdb.h>
struct hostent {
char * h_name;
char ** h_aliases;
int h_addrtype;
int h_length;
char ** h_addr_list;
};
#define h_addr h_addr_list[0]
This structure describes an Internet host. It contains either the information obtained from the name server, named, or broken-out fields from a line in /etc/hosts.
The members of this structure are:
A #define statement is used to define the following:
POSIX 1003.1g (draft)
endhostent(), gethostbyaddr(), gethostbyname(), gethostent(), sethostent()
/etc/hosts, named, /etc/resolv.conf in the TCP/IP User's Guide