Name and address resolution

The gethostbyname and gethostbyaddr subroutines in the libc library provide support for Domain Name Service, Network Information Services (NIS, formerly called Yellow Pages), and the /etc/hosts database.

If the /etc/resolv.conf file exists, the name server is always checked first. If the name is not resolved and NIS is running, NIS is checked. If NIS is not running, the /etc/hosts file is checked.