Previous section.

Networking Services (XNS) Issue 5
Copyright © 1997 The Open Group

The Internet Protocols

The Internet Protocol (IP) family is a collection of protocols designed for use in the Internet and using the Internet address format. The Internet family provides protocol support for the SOCK_STREAM and SOCK_DGRAM socket types.

Internet addresses are 4-byte quantities, stored in network byte order (on "little-endian" machines, these are word and byte reversed). The <netinet/in.h> header defines this address as a discriminated union.

The address INADDR_ANY can be given in a bind() call on a socket that uses the TCP or UDP protocol. For TCP, this lets the socket accept connections targeted at any of the host's IP addresses. For UDP, it lets the socket accept packets addressed to any of the host's IP addresses. The address INADDR_BROADCAST is the IP broadcast address. If INADDR_BROADCAST is used in a sendto() call on a UDP socket, and the host has one or more network interfaces that support the broadcast feature, a broadcast packet will be sent via one or more of those interfaces.

The Internet protocol family includes the following protocols:

TCP is used to support the SOCK_STREAM abstraction while UDP is used to support the SOCK_DGRAM abstraction.

The 32-bit Internet address contains both network and host parts. It is frequency-encoded; the most-significant bit is clear in Class A addresses, in which the high-order 8 bits are the network number. Class B addresses use the high-order 16 bits as the network field, and Class C addresses have a 24-bit network part. Sites with a cluster of local networks and a connection to the Internet may choose to use a single network number for cluster; this is done by using subnet addressing. The local (host) portion of the address is further subdivided into subnet and host parts. Within a subnet, each subnet appears to be an individual network; externally, the entire cluster appears to be a single, uniform network requiring only a single routing entry. The above description of classes of addresses need not apply in a network where the (relatively recent) Classless Internet Domain Routing (CIDR) described in RFC1517-RFC1518 is deployed.


Why not acquire a nicely bound hard copy?
Click here to return to the publication details or order a copy of this publication.

Contents Next section Index