Closing a closed descriptor is an error but

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: dresses is mapped to a set of identifiers called Internet domain names. A process on one host communicates with a process on another host over a connection. The next three sections discuss these fundamental ideas in more detail. 12.3.1 IP Addresses An IP address is an unsigned 32-bit integer. Network programs store IP addresses in the IP address structure shown in Figure 12.9. netinet/in.h /* Internet address structure */ struct in_addr { unsigned int s_addr; /* network byte order (big-endian) */ }; netinet/in.h Figure 12.9: IP address structure. Aside: Why store the scalar IP address in a structure? Storing a scalar address in a structure is an unfortunate historical artifact from the early Berkeley 4.xBSD implementations of the sockets interface. It would make more sense to define a scalar type for IP addresses, but it is too late to change now because of the enormous installed base of applications. End Aside. Because Internet hosts can have different host byte orders, TCP/IP defines a...
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