Commit | Line | Data |
---|---|---|
251ef5bb | 1 | /* in_local.h 4.2 83/03/13 */ |
c9e39370 SL |
2 | |
3 | /* | |
4 | * Internet definitions and variables | |
5 | * specific to installation at Berkeley. | |
6 | */ | |
7 | ||
8 | /* | |
9 | * Local subnetwork address mapping. | |
10 | * The standard scheme is: | |
11 | * internet address = network.local-part | |
12 | * where | |
13 | * network is between 8 and 34 bits | |
14 | * local-part is between 8 and 24 bits | |
15 | * | |
16 | * This is modified by interpreting network as 32 bits | |
17 | * and local-part as something between 8 and 23 bits | |
18 | * depending on the high bit in the local-part. When | |
19 | * the high bit in the local-part is a 1, the upper byte | |
20 | * is interpreted as a local network extension, and used | |
21 | * as the high byte in the network (extending it to 32 bits). | |
22 | * The additional 8 bits of network number are administered | |
23 | * locally and are not visible outside Berkeley, since | |
24 | * they're part of the local-part. | |
25 | */ | |
26 | /* network mappings */ | |
27 | #define CLASSA_LOCALNETMAP(n, in) \ | |
28 | (in) & 0x800000 ? (n) | (((in) & 0xef0000) << 8) : (n) | |
29 | #define CLASSB_LOCALNETMAP(n, in) \ | |
30 | (in) & 0x8000 ? (n) | (((in) & 0xef00) << 16) : (n) | |
31 | #define CLASSC_LOCALNETMAP(n, in) (n) | |
32 | ||
33 | /* local-part mappings */ | |
34 | #define CLASSA_LOCALHOSTMAP(h, in) \ | |
35 | (in) & 0x800000 ? (h) & ~0xef0000 : (h) | |
36 | #define CLASSB_LOCALHOSTMAP(h, in) \ | |
251ef5bb | 37 | (in) & 0x8000 ? (h) & ~0xef00 : (h) |
c9e39370 | 38 | #define CLASSC_LOCALHOSTMAP(h, in) (h) |