xref: /csrg-svn/sys/net/netisr.h (revision 29922)
1 /*
2  * Copyright (c) 1980, 1986 Regents of the University of California.
3  * All rights reserved.  The Berkeley software License Agreement
4  * specifies the terms and conditions for redistribution.
5  *
6  *	@(#)netisr.h	7.2 (Berkeley) 10/28/86
7  */
8 
9 /*
10  * The networking code runs off software interrupts.
11  *
12  * You can switch into the network by doing splnet() and return by splx().
13  * The software interrupt level for the network is higher than the software
14  * level for the clock (so you can enter the network in routines called
15  * at timeout time).
16  */
17 #if defined(vax) || defined(tahoe)
18 #define	setsoftnet()	mtpr(SIRR, 12)
19 #endif
20 
21 /*
22  * Each ``pup-level-1'' input queue has a bit in a ``netisr'' status
23  * word which is used to de-multiplex a single software
24  * interrupt used for scheduling the network code to calls
25  * on the lowest level routine of each protocol.
26  */
27 #define	NETISR_RAW	0		/* same as AF_UNSPEC */
28 #define	NETISR_IP	2		/* same as AF_INET */
29 #define	NETISR_IMP	3		/* same as AF_IMPLINK */
30 #define	NETISR_NS	6		/* same as AF_NS */
31 
32 #define	schednetisr(anisr)	{ netisr |= 1<<(anisr); setsoftnet(); }
33 
34 #ifndef LOCORE
35 #ifdef KERNEL
36 int	netisr;				/* scheduling bits for network */
37 #endif
38 #endif
39