xref: /csrg-svn/sys/net/netisr.h (revision 8387)
1*8387Swnj /*	netisr.h	4.1	82/10/09	*/
2*8387Swnj 
3*8387Swnj /*
4*8387Swnj  * The networking code runs off software interrupts.
5*8387Swnj  *
6*8387Swnj  * You can switch into the network by doing splnet() and return by splx().
7*8387Swnj  * The software interrupt level for the network is higher than the software
8*8387Swnj  * level for the clock (so you can enter the network in routines called
9*8387Swnj  * at timeout time).
10*8387Swnj  */
11*8387Swnj #define	setsoftnet()	mtpr(SIRR, 12)
12*8387Swnj 
13*8387Swnj /*
14*8387Swnj  * Each ``pup-level-1'' input queue has a bit in a ``netisr'' status
15*8387Swnj  * word which is used to de-multiplex a single software
16*8387Swnj  * interrupt used for scheduling the network code to calls
17*8387Swnj  * on the lowest level routine of each protocol.
18*8387Swnj  */
19*8387Swnj #define	NETISR_RAW	0		/* same as AF_UNSPEC */
20*8387Swnj #define	NETISR_IP	2		/* same as AF_INET */
21*8387Swnj #define	NETISR_NS	6		/* same as AF_NS */
22*8387Swnj 
23*8387Swnj #define	schednetisr(anisr)	{ netisr |= 1<<(anisr); setsoftnet(); }
24*8387Swnj 
25*8387Swnj #ifndef LOCORE
26*8387Swnj #ifdef KERNEL
27*8387Swnj int	netisr;				/* scheduling bits for network */
28*8387Swnj #endif
29*8387Swnj #endif
30