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