xref: /csrg-svn/sys/net/netisr.h (revision 45655)
123159Smckusick /*
237472Ssklower  * Copyright (c) 1980, 1986, 1989 Regents of the University of California.
333183Sbostic  * All rights reserved.
423159Smckusick  *
544465Sbostic  * %sccs.include.redist.c%
633183Sbostic  *
7*45655Ssklower  *	@(#)netisr.h	7.7 (Berkeley) 11/29/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 */
33*45655Ssklower #define	NETISR_CCITT	10		/* same as AF_CCITT */
348387Swnj 
358387Swnj #define	schednetisr(anisr)	{ netisr |= 1<<(anisr); setsoftnet(); }
368387Swnj 
378387Swnj #ifndef LOCORE
388387Swnj #ifdef KERNEL
398387Swnj int	netisr;				/* scheduling bits for network */
408387Swnj #endif
418387Swnj #endif
42