1 /* in_systm.h 4.7 81/11/29 */ 2 3 /* 4 * Miscellaneous internetwork 5 * definitions for kernel. 6 */ 7 8 /* 9 * Network types. 10 * 11 * Internally the system keeps counters in the headers with the bytes 12 * swapped so that VAX instructions will work on them. It reverses 13 * the bytes before transmission at each protocol level. The n_ types 14 * represent the types with the bytes in ``high-ender'' order. 15 */ 16 typedef u_short n_short; /* short as received from the net */ 17 typedef u_long n_long; /* long as received from the net */ 18 19 typedef u_long n_time; /* ms since 00:00 GMT, byte rev */ 20 21 /* 22 * The internet code runs off software interrupts. 23 * There is one software interrupt level for each IP layer protocol 24 * (e.g. IP, PUP, etc), and each such interrupt traps to the lowest 25 * level routine for that protocol. 26 * 27 * You can switch into the network by doing splnet() and return by splx(). 28 * The software interrupt level for the network is higher than the software 29 * level for the clock (so you can enter the network in routines called 30 * at timeout time). Splimp is an ipl high enough to block all imps. 31 * While manipulating the mbuf buffer pool you have to block imps. 32 */ 33 #define splimp spl5 34 #define setipintr() mtpr(SIRR, 12) 35 #define setrawintr() mtpr(SIRR, 13) 36 /* splnet is defined in ../sys/asm.sed */ 37 38 #ifdef KERNEL 39 n_time iptime(); 40 #endif 41 42 #ifdef KPROF 43 #include "../inet/count.h" 44 #define COUNT(i) nrcount[i]++ 45 int nrcount[NCOUNTERS+1]; 46 #else 47 #define COUNT(i) 48 #endif 49