correct attribution
[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.\"
91020c73
KB
4.\" Redistribution and use in source and binary forms are permitted
5.\" provided that the above copyright notice and this paragraph are
6.\" duplicated in all such forms and that any documentation,
7.\" advertising materials, and other materials related to such
8.\" distribution and use acknowledge that the software was developed
9.\" by the University of California, Berkeley. The name of the
10.\" University may not be used to endorse or promote products derived
11.\" from this software without specific prior written permission.
12.\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
13.\" IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
14.\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
15.\"
16.\" @(#)4.t 6.4 (Berkeley) %G%
04d55378
KM
17.\"
18.nr H2 1
820fca5e 19.\".ds RH "Address representation
95c3c83a
MK
20.br
21.ne 2i
04d55378
KM
22.NH
23\s+2Internal address representation\s0
24.PP
25Common to all portions of the system are two data structures.
26These structures are used to represent
27addresses and various data objects.
28Addresses, internally are described by the \fIsockaddr\fP structure,
29.DS
30._f
31struct sockaddr {
32 short sa_family; /* data format identifier */
33 char sa_data[14]; /* address */
34};
35.DE
36All addresses belong to one or more \fIaddress families\fP
37which define their format and interpretation.
820fca5e
MK
38The \fIsa_family\fP field indicates the address family to which the address
39belongs, and the \fIsa_data\fP field contains the actual data value.
04d55378 40The size of the data field, 14 bytes, was selected based on a study
820fca5e
MK
41of current address formats.*
42Specific address formats use private structure definitions
43that define the format of the data field.
44The system interface supports larger address structures,
45although address-family-independent support facilities, for example routing
46and raw socket interfaces, provide only 14 bytes for address storage.
47Protocols that do not use those facilities (e.g, the current Unix domain)
48may use larger data areas.
04d55378 49.FS
820fca5e 50* Later versions of the system may support variable length addresses.
04d55378 51.FE