Commit | Line | Data |
---|---|---|
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 | |
25 | Common to all portions of the system are two data structures. | |
26 | These structures are used to represent | |
27 | addresses and various data objects. | |
28 | Addresses, internally are described by the \fIsockaddr\fP structure, | |
29 | .DS | |
30 | ._f | |
31 | struct sockaddr { | |
32 | short sa_family; /* data format identifier */ | |
33 | char sa_data[14]; /* address */ | |
34 | }; | |
35 | .DE | |
36 | All addresses belong to one or more \fIaddress families\fP | |
37 | which define their format and interpretation. | |
820fca5e MK |
38 | The \fIsa_family\fP field indicates the address family to which the address |
39 | belongs, and the \fIsa_data\fP field contains the actual data value. | |
04d55378 | 40 | The size of the data field, 14 bytes, was selected based on a study |
820fca5e MK |
41 | of current address formats.* |
42 | Specific address formats use private structure definitions | |
43 | that define the format of the data field. | |
44 | The system interface supports larger address structures, | |
45 | although address-family-independent support facilities, for example routing | |
46 | and raw socket interfaces, provide only 14 bytes for address storage. | |
47 | Protocols that do not use those facilities (e.g, the current Unix domain) | |
48 | may use larger data areas. | |
04d55378 | 49 | .FS |
820fca5e | 50 | * Later versions of the system may support variable length addresses. |
04d55378 | 51 | .FE |