new copyright; att/bsd/shared
[unix-history] / usr / src / share / doc / smm / 18.net / 4.t
... / ...
CommitLineData
1.\" Copyright (c) 1983, 1986 The Regents of the University of California.
2.\" All rights reserved.
3.\"
4.\" %sccs.include.redist.roff%
5.\"
6.\" @(#)4.t 6.5 (Berkeley) %G%
7.\"
8.nr H2 1
9.\".ds RH "Address representation
10.br
11.ne 2i
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.
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.
30The size of the data field, 14 bytes, was selected based on a study
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.
39.FS
40* Later versions of the system may support variable length addresses.
41.FE