xref: /original-bsd/sys/net/netisr.h (revision 92c664ec)
1 /*
2  * Copyright (c) 1980, 1986 Regents of the University of California.
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms are permitted
6  * provided that this notice is preserved and that due credit is given
7  * to the University of California at Berkeley. The name of the University
8  * may not be used to endorse or promote products derived from this
9  * software without specific prior written permission. This software
10  * is provided ``as is'' without express or implied warranty.
11  *
12  *	@(#)netisr.h	7.3 (Berkeley) 12/30/87
13  */
14 
15 /*
16  * The networking code runs off software interrupts.
17  *
18  * You can switch into the network by doing splnet() and return by splx().
19  * The software interrupt level for the network is higher than the software
20  * level for the clock (so you can enter the network in routines called
21  * at timeout time).
22  */
23 #if defined(vax) || defined(tahoe)
24 #define	setsoftnet()	mtpr(SIRR, 12)
25 #endif
26 
27 /*
28  * Each ``pup-level-1'' input queue has a bit in a ``netisr'' status
29  * word which is used to de-multiplex a single software
30  * interrupt used for scheduling the network code to calls
31  * on the lowest level routine of each protocol.
32  */
33 #define	NETISR_RAW	0		/* same as AF_UNSPEC */
34 #define	NETISR_IP	2		/* same as AF_INET */
35 #define	NETISR_IMP	3		/* same as AF_IMPLINK */
36 #define	NETISR_NS	6		/* same as AF_NS */
37 
38 #define	schednetisr(anisr)	{ netisr |= 1<<(anisr); setsoftnet(); }
39 
40 #ifndef LOCORE
41 #ifdef KERNEL
42 int	netisr;				/* scheduling bits for network */
43 #endif
44 #endif
45