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