check in temporary version with compatibility hacks
[unix-history] / usr / src / sys / net / netisr.h
CommitLineData
cb1c44c2 1/*
b72a6efb 2 * Copyright (c) 1980, 1986, 1989 Regents of the University of California.
5b519e94 3 * All rights reserved.
cb1c44c2 4 *
dbf0c423 5 * %sccs.include.redist.c%
5b519e94 6 *
38733e70 7 * @(#)netisr.h 7.9 (Berkeley) %G%
cb1c44c2 8 */
a9f97ede
BJ
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 */
2e62d00d 18#if defined(vax) || defined(tahoe)
a9f97ede 19#define setsoftnet() mtpr(SIRR, 12)
ddccffcc 20#endif
a9f97ede
BJ
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 */
e3d5e8b3 30#define NETISR_IMP 3 /* same as AF_IMPLINK */
a9f97ede 31#define NETISR_NS 6 /* same as AF_NS */
b72a6efb 32#define NETISR_ISO 7 /* same as AF_ISO */
3ded831e 33#define NETISR_CCITT 10 /* same as AF_CCITT */
38733e70 34#define NETISR_ARP 18 /* same as AF_LINK */
a9f97ede
BJ
35
36#define schednetisr(anisr) { netisr |= 1<<(anisr); setsoftnet(); }
37
bd104333
WN
38#ifdef i386
39/* XXX Temporary -- soon to vanish - wfj */
40#define NETISR_SCLK 11 /* softclock */
41#define NETISR_AST 12 /* ast -- resched */
42
43#undef schednetisr
44#define schednetisr(anisr) {\
45 if(netisr == 0) { \
46 softem++; \
47 } \
48 netisr |= 1<<(anisr); \
49}
50#ifndef LOCORE
51#ifdef KERNEL
52int softem;
53#endif
54#endif
55#endif /* i386 */
56
a9f97ede
BJ
57#ifndef LOCORE
58#ifdef KERNEL
59int netisr; /* scheduling bits for network */
60#endif
61#endif