Table of Contents
The Internet
protocol family is a collection of protocols layered atop the transport
layer, and utilizing the Internet address format. The Internet family provides
protocol support for the and socket types; the interface provides access
to the protocol.
Internet addresses are four byte quantities,
stored in network standard format (on the these are word and byte reversed).
The include file defines this address as a discriminated union. Sockets
bound to the Internet protocol family utilize the following addressing
structure, struct sockaddr_in { short sin_family;
u_short sin_port;
struct in_addr sin_addr;
char sin_zero[8];
}; Sockets may be created with the local address to effect matching
on incoming messages. The address in a or call may be given as to mean
The distinguished address is allowed as a shorthand for the broadcast
address on the primary network if the first network configured supports
broadcast.
The Internet protocol family is comprised of the transport
protocol, Internet Control Message Protocol Transmission Control Protocol
and User Datagram Protocol is used to support the abstraction while
is used to support the abstraction. A raw interface to is available
by creating an Internet socket of type The message protocol is accessible
from a raw socket. 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 chose to use a single network number
for the 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. Subnet addressing is enabled and examined by the
following commands on a datagram socket in the Internet domain; they have
the same form as the command (see Set interface network mask. The network
mask defines the network part of the address; if it contains more of the
address than the address type would indicate, then subnets are in use.
Get interface network mask.
The Internet
protocol support is subject to change as the Internet protocols develop.
Users should not depend on details of the current implementation, but
rather the services exported.
The protocol interface appeared in
Table of Contents