1*8407Swnj /* dn_systm.h 1.3 82/10/09 */ 26824Ssam 36824Ssam /* 46824Ssam * Miscellaneous DECnet definitions for kernel 56824Ssam */ 66824Ssam 76824Ssam /* 86824Ssam * Network types. 96824Ssam * 106824Ssam * The DECnet protocols often use unaligned 16 bit fields 116824Ssam * as integers. The d_short type represents such a field 126824Ssam * in a protocol structure definition and the D_SHORT macro 136824Ssam * extracts such a field given a pointer to the first byte. 146824Ssam * The AD_SHORT macro assigns to such a field. 156824Ssam * On the VAX it's easy since unaligned references are 166824Ssam * allowed, on the 11 it would be a bit harder. 176824Ssam */ 186824Ssam typedef char d_short[2]; 196824Ssam 206824Ssam #if vax 216824Ssam #define D_SHORT(x) (*((u_short *)(x))) 226824Ssam #define AD_SHORT(x, v) (*((u_short *)(x))) = (v) 236824Ssam #endif 246824Ssam 256824Ssam /* 266824Ssam * The DECnet code, like the Internet code, runs off software 276824Ssam * interrupts. At present there is only a software interrupt 286824Ssam * for the NSP layer, which will hand the data to the socket. 296824Ssam */ 306824Ssam #define setnspintr() mtpr(SIRR, 14) 316824Ssam #define splimp spl5 32