Address Lookup Address lookup is done using the resolver library (-lresolv on the link command). The system's config determines which protocol is used to perform the actual lookup (NIS, DNS, /etc/hosts, etc.). Here is a code snippet: /* Description of data base entry for a single host. */ struct hostent { char *h_name; /* Official name of host. */ char **h_aliases; /* Alias list. */ int h_addrtype; /* Host address type. */ int h_length; /* Length of address. */ char **h_addr_list; /* List of addresses from name server. */ };