1 /* in_systm.h 4.5 81/11/20 */ 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 typedef u_long seq_t; /* sequence number */ 19 20 typedef u_long n_time; /* ms since 00:00 GMT, byte rev */ 21 22 /* 23 * The network runs as a software interrupt process. 24 * You can switch into the network by doing splnet() and return by splx(). 25 * The software interrupt level for the network is higher than the software 26 * level for the clock (so you can enter the network in routines called 27 * at timeout time). Splimp is an ipl high enough to block all imps. 28 * While manipulating the mbuf buffer pool you have to block imps. 29 */ 30 #define splimp spl5 31 #define setsoftnet() mtpr(SIRR, 12) 32 /* splnet is defined in ../sys/asm.sed */ 33 34 #ifdef KERNEL 35 n_time iptime(); 36 #endif 37 38 #ifdef KPROF 39 #include "../inet/count.h" 40 #define COUNT(i) nrcount[i]++ 41 int nrcount[NCOUNTERS+1]; 42 #else 43 #define COUNT(i) 44 #endif 45