xref: /csrg-svn/sys/net/netisr.h (revision 44465)
123159Smckusick /*
237472Ssklower  * Copyright (c) 1980, 1986, 1989 Regents of the University of California.
333183Sbostic  * All rights reserved.
423159Smckusick  *
5*44465Sbostic  * %sccs.include.redist.c%
633183Sbostic  *
7*44465Sbostic  *	@(#)netisr.h	7.6 (Berkeley) 06/28/90
823159Smckusick  */
98387Swnj 
108387Swnj /*
118387Swnj  * The networking code runs off software interrupts.
128387Swnj  *
138387Swnj  * You can switch into the network by doing splnet() and return by splx().
148387Swnj  * The software interrupt level for the network is higher than the software
158387Swnj  * level for the clock (so you can enter the network in routines called
168387Swnj  * at timeout time).
178387Swnj  */
1829922Skarels #if defined(vax) || defined(tahoe)
198387Swnj #define	setsoftnet()	mtpr(SIRR, 12)
208973Sroot #endif
218387Swnj 
228387Swnj /*
238387Swnj  * Each ``pup-level-1'' input queue has a bit in a ``netisr'' status
248387Swnj  * word which is used to de-multiplex a single software
258387Swnj  * interrupt used for scheduling the network code to calls
268387Swnj  * on the lowest level routine of each protocol.
278387Swnj  */
288387Swnj #define	NETISR_RAW	0		/* same as AF_UNSPEC */
298387Swnj #define	NETISR_IP	2		/* same as AF_INET */
3024146Skarels #define	NETISR_IMP	3		/* same as AF_IMPLINK */
318387Swnj #define	NETISR_NS	6		/* same as AF_NS */
3237472Ssklower #define	NETISR_ISO	7		/* same as AF_ISO */
338387Swnj 
348387Swnj #define	schednetisr(anisr)	{ netisr |= 1<<(anisr); setsoftnet(); }
358387Swnj 
368387Swnj #ifndef LOCORE
378387Swnj #ifdef KERNEL
388387Swnj int	netisr;				/* scheduling bits for network */
398387Swnj #endif
408387Swnj #endif
41