Commit | Line | Data |
---|---|---|
5e3649c6 | 1 | /* dn_systm.h 1.3 82/10/09 */ |
9cd0498d SL |
2 | |
3 | /* | |
4 | * Miscellaneous DECnet definitions for kernel | |
5 | */ | |
6 | ||
7 | /* | |
8 | * Network types. | |
9 | * | |
10 | * The DECnet protocols often use unaligned 16 bit fields | |
11 | * as integers. The d_short type represents such a field | |
12 | * in a protocol structure definition and the D_SHORT macro | |
13 | * extracts such a field given a pointer to the first byte. | |
14 | * The AD_SHORT macro assigns to such a field. | |
15 | * On the VAX it's easy since unaligned references are | |
16 | * allowed, on the 11 it would be a bit harder. | |
17 | */ | |
18 | typedef char d_short[2]; | |
19 | ||
20 | #if vax | |
21 | #define D_SHORT(x) (*((u_short *)(x))) | |
22 | #define AD_SHORT(x, v) (*((u_short *)(x))) = (v) | |
23 | #endif | |
24 | ||
25 | /* | |
26 | * The DECnet code, like the Internet code, runs off software | |
27 | * interrupts. At present there is only a software interrupt | |
28 | * for the NSP layer, which will hand the data to the socket. | |
29 | */ | |
30 | #define setnspintr() mtpr(SIRR, 14) | |
31 | #define splimp spl5 |