xref: /csrg-svn/sys/net/netisr.h (revision 8973)
1*8973Sroot /*	netisr.h	4.2	82/10/31	*/
28387Swnj 
38387Swnj /*
48387Swnj  * The networking code runs off software interrupts.
58387Swnj  *
68387Swnj  * You can switch into the network by doing splnet() and return by splx().
78387Swnj  * The software interrupt level for the network is higher than the software
88387Swnj  * level for the clock (so you can enter the network in routines called
98387Swnj  * at timeout time).
108387Swnj  */
11*8973Sroot #if sun
12*8973Sroot #include "../sun/sir.h"
13*8973Sroot #define	setsoftnet()	siron(SIR_NET)
14*8973Sroot #else
15*8973Sroot /* #include "../vax/mtpr.h" */
168387Swnj #define	setsoftnet()	mtpr(SIRR, 12)
17*8973Sroot #endif
188387Swnj 
198387Swnj /*
208387Swnj  * Each ``pup-level-1'' input queue has a bit in a ``netisr'' status
218387Swnj  * word which is used to de-multiplex a single software
228387Swnj  * interrupt used for scheduling the network code to calls
238387Swnj  * on the lowest level routine of each protocol.
248387Swnj  */
258387Swnj #define	NETISR_RAW	0		/* same as AF_UNSPEC */
268387Swnj #define	NETISR_IP	2		/* same as AF_INET */
278387Swnj #define	NETISR_NS	6		/* same as AF_NS */
288387Swnj 
298387Swnj #define	schednetisr(anisr)	{ netisr |= 1<<(anisr); setsoftnet(); }
308387Swnj 
318387Swnj #ifndef LOCORE
328387Swnj #ifdef KERNEL
338387Swnj int	netisr;				/* scheduling bits for network */
348387Swnj #endif
358387Swnj #endif
36