xref: /csrg-svn/sys/net/netisr.h (revision 13803)
1*13803Ssam /*	netisr.h	4.4	83/07/06	*/
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*13803Ssam #ifdef vax
128387Swnj #define	setsoftnet()	mtpr(SIRR, 12)
138973Sroot #endif
148387Swnj 
158387Swnj /*
168387Swnj  * Each ``pup-level-1'' input queue has a bit in a ``netisr'' status
178387Swnj  * word which is used to de-multiplex a single software
188387Swnj  * interrupt used for scheduling the network code to calls
198387Swnj  * on the lowest level routine of each protocol.
208387Swnj  */
218387Swnj #define	NETISR_RAW	0		/* same as AF_UNSPEC */
228387Swnj #define	NETISR_IP	2		/* same as AF_INET */
238387Swnj #define	NETISR_NS	6		/* same as AF_NS */
2410385Ssam #define	NETISR_ND	7		/* network disk protocol */
258387Swnj 
268387Swnj #define	schednetisr(anisr)	{ netisr |= 1<<(anisr); setsoftnet(); }
278387Swnj 
288387Swnj #ifndef LOCORE
298387Swnj #ifdef KERNEL
308387Swnj int	netisr;				/* scheduling bits for network */
318387Swnj #endif
328387Swnj #endif
33