This preview shows page 1. Sign up to view the full content.
Unformatted text preview: ure 12.12: HOSTINFO : Retrieves and prints a DNS host entry. 618
official hostname: aol.com alias: www.aol.com address: 188.8.131.52 address: 184.108.40.206 address: 220.127.116.11 CHAPTER 12. NETWORK PROGRAMMING Finally, we notice that some valid domain names are not mapped to any IP address:
unix> ./hostinfo edu Gethostbyname error: No address associated with name unix> ./hostinfo cmcl.cs.cmu.edu Gethostbyname error: No address associated with name Practice Problem 12.4:
Compile the HOSTINFO program from Figure 12.12. Then run hostinfo aol.com three times in a row on your system. A. What do you notice about the ordering of the IP addresses in the three host entries? B. How might this ordering be useful? 12.3.3 Internet Connections
Internet clients and servers communicate by sending and receiving streams of bytes over connections. A connection is point-to-point in the sense that it connects a pair of processes. It is full-duplex in the sense that data can ﬂow in both directions at the same time. And it is reliable in the sense that — barring some catastrophic failure such as a cable cu...
View Full Document
- Spring '10
- The American