minor addendum from Guy Harris
[unix-history] / usr / src / share / man / man4 / inet.4
CommitLineData
97ee408e
KM
1.\" Copyright (c) 1983 Regents of the University of California.
2.\" All rights reserved. The Berkeley software License Agreement
3.\" specifies the terms and conditions for redistribution.
4.\"
5d512b67 5.\" @(#)inet.4 6.1 (Berkeley) %G%
97ee408e 6.\"
5d512b67 7.TH INET 4F ""
97ee408e
KM
8.UC 5
9.SH NAME
10inet \- Internet protocol family
11.SH SYNOPSIS
12.B #include <sys/types.h>
13.br
14.B #include <netinet/in.h>
15.SH DESCRIPTION
16.de _d
17.if t .ta .6i 2.1i 2.6i
18.\" 2.94 went to 2.6, 3.64 to 3.30
19.if n .ta .84i 2.6i 3.30i
20..
21.de _f
22.if t .ta .5i 1.25i 2.5i
23.\" 3.5i went to 3.8i
24.if n .ta .7i 1.75i 3.8i
25..
26The Internet protocol family is a collection of protocols
27layered atop the
28.I Internet Protocol
29(IP) transport layer, and utilizing the Internet address format.
30The Internet family provides protocol support for the
31SOCK_STREAM, SOCK_DGRAM, and SOCK_RAW socket types; the
32SOCK_RAW interface provides access to the IP protocol.
33.SH ADDRESSING
34Internet addresses are four byte quantities, stored in
35network standard format (on the VAX these are word and byte
36reversed). The include file
37.RI < netinet/in.h >
38defines this address
39as a discriminated union.
40.PP
41Sockets bound to the Internet protocol family utilize
42the following addressing structure,
43.sp 1
44.nf
45._f
46struct sockaddr_in {
47 short sin_family;
48 u_short sin_port;
49 struct in_addr sin_addr;
50 char sin_zero[8];
51};
52.sp 1
53.fi
54Sockets may be created with the address INADDR_ANY
55to effect \*(lqwildcard\*(rq matching on incoming messages.
56.SH PROTOCOLS
57The Internet protocol family is comprised of
58the IP transport protocol, Internet Control
59Message Protocol (ICMP), Transmission Control
60Protocol (TCP), and User Datagram Protocol (UDP).
61TCP is used to support the SOCK_STREAM
62abstraction while UDP is used to support the SOCK_DGRAM
63abstraction. A raw interface to IP is available
64by creating an Internet socket of type SOCK_RAW.
65The ICMP message protocol is not directly accessible.
66.SH SEE ALSO
67tcp(4P), udp(4P), ip(4P)
68.SH CAVEAT
69The Internet protocol support is subject to change as
70the Internet protocols develop. Users should not depend
71on details of the current implementation, but rather
72the services exported.