Manual Page Result
0
Command: inet | Section: 7 | Source: Digital UNIX | File: inet.7.gz
inet(7) Miscellaneous Information Manual 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 atop
the Internet Protocol (IP) transport layer, and utilizing the Internet
address format. The Internet family provides protocol support for the
SOCK_STREAM, SOCK_DGRAM, and SOCK_RAW socket types; the SOCK_RAW inter-
face provides access to the IP protocol.
Internet addresses are 4-byte quantities, stored in network standard
format (on the VAX and other machines, these are word and byte re-
versed). The netinet/in.h include file defines this address as a dis-
criminated union.
Sockets bound to the Internet protocol family utilize an addressing
structure sockaddr_in, whose format is dependent on whether _SOCK-
ADDR_LEN has been defined prior to including the netinet/in.h header
file. If _SOCKADDR_LEN is defined, the sockaddr_in structure takes
4.4BSD behavior, with a separate field for specifying the length of the
address; otherwise, the default 4.3BSD behavior is used.
Sockets may be created with the local address INADDR_ANY to effect
wildcard matching on incoming messages. The address in a connect() or
sendto() call 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 con-
figured 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 ab-
straction. A raw interface to IP is available by creating an Internet
socket of type SOCK_RAW. The ICMP 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 ad-
dresses, 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 DARPA Internet may chose to use a sin-
gle network number for the cluster; this is done by using subnet ad-
dressing. The local (host) portion of the address is further subdi-
vided 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 ioctl() com-
mands on a datagram socket in the Internet domain; they have the same
form as the SIOCSIFADDR command (see the reference page for the net-
intro function).
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.
NOTES
The Internet protocol support is subject to change as the Internet pro-
tocols develop. Users should not depend on details of the current im-
plementation, but rather the services exported.
RELATED INFORMATION
Functions: ioctl(2), socket(2)
Network Information: netintro(7), tcp(7), udp(7), ip(7), icmp(7)
Technical Overview delim off
inet(7)