123159Smckusick /* 2*37472Ssklower * Copyright (c) 1980, 1986, 1989 Regents of the University of California. 333183Sbostic * All rights reserved. 423159Smckusick * 533183Sbostic * Redistribution and use in source and binary forms are permitted 634844Sbostic * provided that the above copyright notice and this paragraph are 734844Sbostic * duplicated in all such forms and that any documentation, 834844Sbostic * advertising materials, and other materials related to such 934844Sbostic * distribution and use acknowledge that the software was developed 1034844Sbostic * by the University of California, Berkeley. The name of the 1134844Sbostic * University may not be used to endorse or promote products derived 1234844Sbostic * from this software without specific prior written permission. 1334844Sbostic * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR 1434844Sbostic * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED 1534844Sbostic * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. 1633183Sbostic * 17*37472Ssklower * @(#)netisr.h 7.5 (Berkeley) 04/22/89 1823159Smckusick */ 198387Swnj 208387Swnj /* 218387Swnj * The networking code runs off software interrupts. 228387Swnj * 238387Swnj * You can switch into the network by doing splnet() and return by splx(). 248387Swnj * The software interrupt level for the network is higher than the software 258387Swnj * level for the clock (so you can enter the network in routines called 268387Swnj * at timeout time). 278387Swnj */ 2829922Skarels #if defined(vax) || defined(tahoe) 298387Swnj #define setsoftnet() mtpr(SIRR, 12) 308973Sroot #endif 318387Swnj 328387Swnj /* 338387Swnj * Each ``pup-level-1'' input queue has a bit in a ``netisr'' status 348387Swnj * word which is used to de-multiplex a single software 358387Swnj * interrupt used for scheduling the network code to calls 368387Swnj * on the lowest level routine of each protocol. 378387Swnj */ 388387Swnj #define NETISR_RAW 0 /* same as AF_UNSPEC */ 398387Swnj #define NETISR_IP 2 /* same as AF_INET */ 4024146Skarels #define NETISR_IMP 3 /* same as AF_IMPLINK */ 418387Swnj #define NETISR_NS 6 /* same as AF_NS */ 42*37472Ssklower #define NETISR_ISO 7 /* same as AF_ISO */ 438387Swnj 448387Swnj #define schednetisr(anisr) { netisr |= 1<<(anisr); setsoftnet(); } 458387Swnj 468387Swnj #ifndef LOCORE 478387Swnj #ifdef KERNEL 488387Swnj int netisr; /* scheduling bits for network */ 498387Swnj #endif 508387Swnj #endif 51