1252 the socket function clients and servers use the

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: me of the properties of the DNS mapping with the hostinfo program in Figure 12.12, which reads a domain name or dotted-decimal address from the command line and displays the corresponding host entry. ( We are actually calling error handling wrappers, which were introduced in Section 8.3 and described in detail in Appendix A.) Each Internet host has the locally-defined domain name localhost, which always maps to the loopback address unix> ./hostinfo localhost official hostname: localhost alias: localhost.localdomain address: The localhost name provides a convenient and portable way to reference clients and servers that are running on the same machine, which can be especially useful for debugging. We can use HOSTNAME to determine the real domain name of our local host: unix> hostname kittyhawk.cmcl.cs.cmu.edu In the simplest case there is a one-to-one mapping between a domain name and an IP address: unix> ./hostinfo kittyhawk.cmcl.cs.cmu.edu official hostname: kittyhawk.cmcl.cs.cmu.edu address: However, in some cases, multiple domain names are mapped to the same IP address: unix...
View Full Document

This note was uploaded on 09/02/2010 for the course ELECTRICAL 360 taught by Professor Schultz during the Spring '10 term at BYU.

Ask a homework question - tutors are online