hostent displays the hostent system structure for the given hostname or dotted quad IP number. It uses the system call gethostbyname(3) or gethostbyaddr(3) to fill the hostent structure. Hostent was written to be used as a tool to help debug name resolving issues. The interface that hostent uses is exactly the same interface that utilities such as telnet and ftp use to resolve IP numbers and names. It is especially useful if your system uses multi-tier resolving (NIS, /etc/hosts, BIND). resolving
example% hostent ucbvax.berkeley.edu Cannonical (Official) hostname = ucbvax.berkeley.edu List of aliases: <NONE EXIST> List of IP addresses: address# 0 = 128.32.133.1 address# 1 = 128.32.130.12 address# 2 = 128.32.149.36
displays the contents of the hostent structure for ucbvax.berkeley.edu on the standard output.
example% hostent 128.32.133.1 Cannonical (Official) hostname = ucbvax.Berkeley.EDU List of aliases: <NONE EXIST> List of IP addresses: address# 0 = 128.32.133.1 address# 1 = 128.32.130.12 address# 2 = 128.32.149.36