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