An application program must include the netdb.h file when using any of the network library subroutines. The process of obtaining an Internet address from a host name is known as name resolution and is done by the gethostbyname subroutine. The process of translating an Internet address into a host name is known as reverse name resolution and is done by the gethostbyaddr subroutine. When a process receives a symbolic host name and needs to resolve it into an address, it calls a resolver routine. To resolve a name in a domain network, the resolver routine first queries the domain name server database, which may be local if the host is a domain name server or may be on a foreign host.
Name servers translate domain names into Internet addresses.
The group of names for which a name server is responsible is its zone of authority. By default, resolver routines attempt to resolve names using the above resources. The order is specifed on one line with values separated by commas. White spaces are permitted between the commas and the equal sign. The values specified and their ordering depends on the network configuration.