| Updated: October 28, 2024 |
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 a name server, 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: