The UNIX Resolver
The UNIX resolver implements a number of API calls, the most frequently used of which are gethostbyname and gethostbyaddr . These calls are available in most programming languages on the UNIX platform in some form.
gethostbyname and gethostbyaddr
gethostbyname and gethostbyaddr are probably the most frequently used calls in the UNIX resolver library. They work the same for both IPv4 and IPv6 and provide the basic functions of looking up the A or AAAA record of a host (gethostbyname) and looking up the PTR record of an IP address (gethostbyaddr). Complete descriptions of these calls are found in your OS man pages, as well as in network programming texts such as UNIX Network Programming .
The data types involved in ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access