#include <dnsif.h>
Data Fields | |
char * | h_name |
This is the official name / Fully Qualified Domain Name (FQDN) of the host. | |
int | h_addrtype |
This indicates the address family of the IP address that maps to the given hostname. The values it takes are AF_INET (v4) / AF_INET6 (v6). | |
int | h_length |
This indicates the length (in bytes) of the IP address that follows. For IPv4 address it is set to 4, and for IPv6 address set to 16 bytes. | |
int | h_addrcnt |
This is the number of IP addresses returned for the given hostname. | |
IPN | h_addr [MAXIPADDR] |
List of upto MAXIPADDR IPv4 addresses (Network format) that map to the given hostname. | |
char * | h_addr_list [MAXIPADDR] |
List of upto MAXIPADDR IPv4/IPv6 addresses that map to given hostname. |
The HOSTENT structure holds information such as IPv4/v6 address, host name mappings for a given host. It is used by the DNS resolver in conveying such HostName - IP Address mappings to a user application.