4.3BSD release version
[unix-history] / usr / src / share / doc / smm / 18.net / 4.t
CommitLineData
820fca5e 1.\" Copyright (c) 1983,1986 Regents of the University of California.
04d55378
KM
2.\" All rights reserved. The Berkeley software License Agreement
3.\" specifies the terms and conditions for redistribution.
4.\"
820fca5e 5.\" @(#)4.t 6.2 (Berkeley) %G%
04d55378
KM
6.\"
7.nr H2 1
820fca5e 8.\".ds RH "Address representation
04d55378
KM
9.NH
10\s+2Internal address representation\s0
11.PP
12Common to all portions of the system are two data structures.
13These structures are used to represent
14addresses and various data objects.
15Addresses, internally are described by the \fIsockaddr\fP structure,
16.DS
17._f
18struct sockaddr {
19 short sa_family; /* data format identifier */
20 char sa_data[14]; /* address */
21};
22.DE
23All addresses belong to one or more \fIaddress families\fP
24which define their format and interpretation.
820fca5e
MK
25The \fIsa_family\fP field indicates the address family to which the address
26belongs, and the \fIsa_data\fP field contains the actual data value.
04d55378 27The size of the data field, 14 bytes, was selected based on a study
820fca5e
MK
28of current address formats.*
29Specific address formats use private structure definitions
30that define the format of the data field.
31The system interface supports larger address structures,
32although address-family-independent support facilities, for example routing
33and raw socket interfaces, provide only 14 bytes for address storage.
34Protocols that do not use those facilities (e.g, the current Unix domain)
35may use larger data areas.
04d55378 36.FS
820fca5e 37* Later versions of the system may support variable length addresses.
04d55378 38.FE
820fca5e 39'ne 2i