Subversion Repositories SvarDOS

Rev

Rev 616 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
207 mateuszvis 1
/*!\file net/netisr.h
2
 *
3
 */
4
 
5
/*      $NetBSD: netisr.h,v 1.15 1997/04/02 21:23:29 christos Exp $     */
6
 
7
/*
8
 * Copyright (c) 1980, 1986, 1989, 1993
9
 *      The Regents of the University of California.  All rights reserved.
10
 *
11
 * Redistribution and use in source and binary forms, with or without
12
 * modification, are permitted provided that the following conditions
13
 * are met:
14
 * 1. Redistributions of source code must retain the above copyright
15
 *    notice, this list of conditions and the following disclaimer.
16
 * 2. Redistributions in binary form must reproduce the above copyright
17
 *    notice, this list of conditions and the following disclaimer in the
18
 *    documentation and/or other materials provided with the distribution.
19
 * 3. All advertising materials mentioning features or use of this software
20
 *    must display the following acknowledgement:
21
 *      This product includes software developed by the University of
22
 *      California, Berkeley and its contributors.
23
 * 4. Neither the name of the University nor the names of its contributors
24
 *    may be used to endorse or promote products derived from this software
25
 *    without specific prior written permission.
26
 *
27
 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
28
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
29
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
30
 * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
31
 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
32
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
33
 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
34
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
35
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
36
 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
37
 * SUCH DAMAGE.
38
 *
39
 *      @(#)netisr.h    8.1 (Berkeley) 6/10/93
40
 */
41
 
42
#ifndef __NET_NETISR_H
43
#define __NET_NETISR_H
44
 
45
/*
46
 * The networking code runs off software interrupts.
47
 *
48
 * You can switch into the network by doing splsoftnet() and return by splx().
49
 * The software interrupt level for the network is higher than the software
50
 * level for the clock (so you can enter the network in routines called
51
 * at timeout time).
52
 *
53
 * The routine to request a network software interrupt, setsoftnet(),
54
 * is defined in the machine-specific include files.
55
 */
56
 
57
/*
58
 * Each ``pup-level-1'' input queue has a bit in a ``netisr'' status
59
 * word which is used to de-multiplex a single software
60
 * interrupt used for scheduling the network code to calls
61
 * on the lowest level routine of each protocol.
62
 */
63
#define NETISR_IP       2               /* same as AF_INET */
64
#define NETISR_IMP      3               /* same as AF_IMPLINK */
65
#define NETISR_NS       6               /* same as AF_NS */
66
#define NETISR_ISO      7               /* same as AF_ISO */
67
#define NETISR_CCITT    10              /* same as AF_CCITT */
68
#define NETISR_ATALK    16              /* same as AF_APPLETALK */
69
#define NETISR_ARP      18              /* same as AF_LINK */
70
#define NETISR_ISDN     26              /* same as AF_E164 */
71
#define NETISR_NATM     27              /* same as AF_NATM */
72
#define NETISR_PPP      28              /* for PPP processing */
73
 
74
#define schednetisr(anisr)      { netisr |= 1<<(anisr); setsoftnet(); }
75
 
76
extern int netisr;         /* scheduling bits for network */
77
 
78
#endif