inet(7) CLIX inet(7)
NAME
inet - Internet protocol family
SYNOPSIS
#include <sys/types.h>
#include <netinet/in.h>
DESCRIPTION
The Internet protocol family is a collection of protocols layered on top
of the Internet Protocol (IP) transport layer using the Internet address
format. The Internet family provides protocol support for the sock_stream
and sock_dgram socket types.
Internet addresses are four-byte quantities, stored in network standard
format. (The CLIPPER standard representation of a 32-bit quantity is
short-word and byte reversed from network order.) The include file
<netinet/in.h> defines this address as a discriminated union.
Sockets bound to the Internet protocol family use 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 INADDR_ANY to effect
``wildcard'' matching on incoming messages. The address in a connect() or
sendto() function may be given as INADDR_ANY to mean ``this host.'' The
distinguished address INADDR_BROADCAST 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 IP transport protocol,
Internet Control Message Protocol (ICMP), Transmission Control Protocol
(TCP), and User Datagram Protocol (UDP). TCP is used to support the
sock_stream abstraction while UDP is used to support the sock_dgram
abstraction. IP and ICMP are not currently supported.
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 Defense Advanced Research Project Agency (DARPA)
2/94 - Intergraph Corporation 1
inet(7) CLIX inet(7)
Internet may choose 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.
NOTES
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.
RELATED INFORMATION
Functions: socket(2)
Files: intro(7), tcp(7), udp(7)
CLIX Programming Guide
2 Intergraph Corporation - 2/94