xref: /csrg-svn/sys/net/netisr.h (revision 24146)
123159Smckusick /*
223159Smckusick  * Copyright (c) 1980 Regents of the University of California.
323159Smckusick  * All rights reserved.  The Berkeley software License Agreement
423159Smckusick  * specifies the terms and conditions for redistribution.
523159Smckusick  *
6*24146Skarels  *	@(#)netisr.h	6.3 (Berkeley) 08/02/85
723159Smckusick  */
88387Swnj 
98387Swnj /*
108387Swnj  * The networking code runs off software interrupts.
118387Swnj  *
128387Swnj  * You can switch into the network by doing splnet() and return by splx().
138387Swnj  * The software interrupt level for the network is higher than the software
148387Swnj  * level for the clock (so you can enter the network in routines called
158387Swnj  * at timeout time).
168387Swnj  */
1713803Ssam #ifdef vax
188387Swnj #define	setsoftnet()	mtpr(SIRR, 12)
198973Sroot #endif
208387Swnj 
218387Swnj /*
228387Swnj  * Each ``pup-level-1'' input queue has a bit in a ``netisr'' status
238387Swnj  * word which is used to de-multiplex a single software
248387Swnj  * interrupt used for scheduling the network code to calls
258387Swnj  * on the lowest level routine of each protocol.
268387Swnj  */
278387Swnj #define	NETISR_RAW	0		/* same as AF_UNSPEC */
288387Swnj #define	NETISR_IP	2		/* same as AF_INET */
29*24146Skarels #define	NETISR_IMP	3		/* same as AF_IMPLINK */
308387Swnj #define	NETISR_NS	6		/* same as AF_NS */
318387Swnj 
328387Swnj #define	schednetisr(anisr)	{ netisr |= 1<<(anisr); setsoftnet(); }
338387Swnj 
348387Swnj #ifndef LOCORE
358387Swnj #ifdef KERNEL
368387Swnj int	netisr;				/* scheduling bits for network */
378387Swnj #endif
388387Swnj #endif
39