4.2BSD/usr/man/man4/inet.4f

.TH INET 4F "19 March 1982"
.UC  4
.SH NAME
inet \- Internet protocol family
.SH SYNOPSIS
.B #include <sys/types.h>
.br
.B #include <netinet/in.h>
.SH DESCRIPTION
.de _d
.if t .ta .6i 2.1i 2.6i
.\" 2.94 went to 2.6, 3.64 to 3.30
.if n .ta .84i 2.6i 3.30i
..
.de _f
.if t .ta .5i 1.25i 2.5i
.\" 3.5i went to 3.8i
.if n .ta .7i 1.75i 3.8i
..
The Internet protocol family is a collection of protocols
layered atop the
.I 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 interface provides access to the IP protocol.
.SH ADDRESSING
Internet addresses are four byte quantities, stored in
network standard format (on the VAX these are word and byte
reversed).  The include file
.RI < netinet/in.h >
defines this address
as a discriminated union.
.PP
Sockets bound to the Internet protocol family utilize
the following addressing structure,
.sp 1
.nf
._f
struct sockaddr_in {
	short	sin_family;
	u_short	sin_port;
	struct	in_addr sin_addr;
	char	sin_zero[8];
};
.sp 1
.fi
Sockets may be created with the address INADDR_ANY
to effect \*(lqwildcard\*(rq matching on incoming messages. 
.SH PROTOCOLS
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.  A raw interface to IP is available
by creating an Internet socket of type SOCK_RAW.
The ICMP message protocol is not directly accessible.
.SH SEE ALSO
tcp(4P), udp(4P), ip(4P)
.SH CAVEAT
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.