date and time created 82/05/15 21:46:17 by sam
authorSam Leffler <sam@ucbvax.Berkeley.EDU>
Sun, 16 May 1982 12:46:17 +0000 (04:46 -0800)
committerSam Leffler <sam@ucbvax.Berkeley.EDU>
Sun, 16 May 1982 12:46:17 +0000 (04:46 -0800)
SCCS-vsn: sys/deprecated/netdecnet/dn_systm.h 1.1

usr/src/sys/deprecated/netdecnet/dn_systm.h [new file with mode: 0644]

diff --git a/usr/src/sys/deprecated/netdecnet/dn_systm.h b/usr/src/sys/deprecated/netdecnet/dn_systm.h
new file mode 100644 (file)
index 0000000..2a76713
--- /dev/null
@@ -0,0 +1,30 @@
+
+/*
+ * Miscellaneous DECnet definitions for kernel
+ */
+
+/*
+ * Network types.
+ *
+ * The DECnet protocols often use unaligned 16 bit fields
+ * as integers.  The d_short type represents such a field
+ * in a protocol structure definition and the D_SHORT macro
+ * extracts such a field given a pointer to the first byte.
+ * The AD_SHORT macro assigns to such a field.
+ * On the VAX it's easy since unaligned references are
+ * allowed, on the 11 it would be a bit harder.
+ */
+typedef        char    d_short[2];
+
+#if vax
+#define        D_SHORT(x)      (*((u_short *)(x)))
+#define        AD_SHORT(x, v)  (*((u_short *)(x))) = (v)
+#endif
+
+/*
+ * The DECnet code, like the Internet code, runs off software
+ * interrupts.  At present there is only a software interrupt
+ * for the NSP layer, which will hand the data to the socket.
+ */
+#define        setnspintr()    mtpr(SIRR, 14)
+#define        splimp          spl5