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