diff options
author | Garrett Wollman <wollman@FreeBSD.org> | 1995-05-11 00:13:26 +0000 |
---|---|---|
committer | Garrett Wollman <wollman@FreeBSD.org> | 1995-05-11 00:13:26 +0000 |
commit | 748e0b0accfecc7d90f16a3fc05b9c4502112625 (patch) | |
tree | 300274f99668c935a329a2380c568f8de35d4eb3 | |
parent | c904a246d26ffde849a50c5eba13fe84a755330c (diff) | |
download | src-test2-748e0b0accfecc7d90f16a3fc05b9c4502112625.tar.gz src-test2-748e0b0accfecc7d90f16a3fc05b9c4502112625.zip |
Notes
-rw-r--r-- | sys/amd64/amd64/machdep.c | 38 | ||||
-rw-r--r-- | sys/i386/i386/machdep.c | 38 | ||||
-rw-r--r-- | sys/i386/include/spl.h | 3 | ||||
-rw-r--r-- | sys/kern/uipc_domain.c | 46 | ||||
-rw-r--r-- | sys/kern/uipc_proto.c | 18 | ||||
-rw-r--r-- | sys/kern/uipc_usrreq.c | 10 | ||||
-rw-r--r-- | sys/net/netisr.h | 16 | ||||
-rw-r--r-- | sys/net/rtsock.c | 2 | ||||
-rw-r--r-- | sys/netccitt/ccitt_proto.c | 5 | ||||
-rw-r--r-- | sys/netccitt/pk_input.c | 6 | ||||
-rw-r--r-- | sys/netinet/if_ether.c | 7 | ||||
-rw-r--r-- | sys/netinet/in_proto.c | 12 | ||||
-rw-r--r-- | sys/netinet/ip_input.c | 7 | ||||
-rw-r--r-- | sys/netiso/clnp_input.c | 10 | ||||
-rw-r--r-- | sys/netiso/iso_proto.c | 7 | ||||
-rw-r--r-- | sys/netns/ns_input.c | 7 | ||||
-rw-r--r-- | sys/netns/ns_proto.c | 6 | ||||
-rw-r--r-- | sys/sys/domain.h | 9 |
18 files changed, 147 insertions, 100 deletions
diff --git a/sys/amd64/amd64/machdep.c b/sys/amd64/amd64/machdep.c index 87c0ff9ed17c..b3a98118a96c 100644 --- a/sys/amd64/amd64/machdep.c +++ b/sys/amd64/amd64/machdep.c @@ -35,7 +35,7 @@ * SUCH DAMAGE. * * from: @(#)machdep.c 7.4 (Berkeley) 6/3/91 - * $Id: machdep.c,v 1.121 1995/04/18 23:55:26 rgrimes Exp $ + * $Id: machdep.c,v 1.122 1995/04/22 03:58:46 wpaul Exp $ */ #include "npx.h" @@ -184,10 +184,13 @@ vm_offset_t phys_avail[6]; int cpu_class; void dumpsys __P((void)); +void setup_netisrs __P((struct linker_set *)); /* XXX declare elsewhere */ + vm_offset_t buffer_sva, buffer_eva; vm_offset_t clean_sva, clean_eva; vm_offset_t pager_sva, pager_eva; extern int pager_map_size; +extern struct linker_set netisr_set; #define offsetof(type, member) ((size_t)(&((type *)0)->member)) @@ -228,26 +231,13 @@ cpu_startup() /* * Quickly wire in netisrs. */ -#define DONET(isr, n) do { netisrs[n] = isr; } while(0) -#ifdef INET -#if NETHER > 0 - DONET(arpintr, NETISR_ARP); -#endif - DONET(ipintr, NETISR_IP); -#endif -#ifdef NS - DONET(nsintr, NETISR_NS); -#endif -#ifdef ISO - DONET(clnlintr, NETISR_ISO); -#endif -#ifdef CCITT - DONET(ccittintr, NETISR_CCITT); -#endif + setup_netisrs(&netisr_set); + +/* #ifdef ISDN DONET(isdnintr, NETISR_ISDN); #endif -#undef DONET +*/ /* * Allocate space for system data structures. @@ -405,6 +395,18 @@ again: } } +void +setup_netisrs(struct linker_set *ls) +{ + int i; + const struct netisrtab *nit; + + for(i = 0; ls->ls_items[i]; i++) { + nit = (const struct netisrtab *)ls->ls_items[i]; + printf("setup_netisrs %d\n", nit->nit_num); + netisrs[nit->nit_num] = nit->nit_isr; + } +} struct cpu_nameclass i386_cpus[] = { { "Intel 80286", CPUCLASS_286 }, /* CPU_286 */ diff --git a/sys/i386/i386/machdep.c b/sys/i386/i386/machdep.c index 87c0ff9ed17c..b3a98118a96c 100644 --- a/sys/i386/i386/machdep.c +++ b/sys/i386/i386/machdep.c @@ -35,7 +35,7 @@ * SUCH DAMAGE. * * from: @(#)machdep.c 7.4 (Berkeley) 6/3/91 - * $Id: machdep.c,v 1.121 1995/04/18 23:55:26 rgrimes Exp $ + * $Id: machdep.c,v 1.122 1995/04/22 03:58:46 wpaul Exp $ */ #include "npx.h" @@ -184,10 +184,13 @@ vm_offset_t phys_avail[6]; int cpu_class; void dumpsys __P((void)); +void setup_netisrs __P((struct linker_set *)); /* XXX declare elsewhere */ + vm_offset_t buffer_sva, buffer_eva; vm_offset_t clean_sva, clean_eva; vm_offset_t pager_sva, pager_eva; extern int pager_map_size; +extern struct linker_set netisr_set; #define offsetof(type, member) ((size_t)(&((type *)0)->member)) @@ -228,26 +231,13 @@ cpu_startup() /* * Quickly wire in netisrs. */ -#define DONET(isr, n) do { netisrs[n] = isr; } while(0) -#ifdef INET -#if NETHER > 0 - DONET(arpintr, NETISR_ARP); -#endif - DONET(ipintr, NETISR_IP); -#endif -#ifdef NS - DONET(nsintr, NETISR_NS); -#endif -#ifdef ISO - DONET(clnlintr, NETISR_ISO); -#endif -#ifdef CCITT - DONET(ccittintr, NETISR_CCITT); -#endif + setup_netisrs(&netisr_set); + +/* #ifdef ISDN DONET(isdnintr, NETISR_ISDN); #endif -#undef DONET +*/ /* * Allocate space for system data structures. @@ -405,6 +395,18 @@ again: } } +void +setup_netisrs(struct linker_set *ls) +{ + int i; + const struct netisrtab *nit; + + for(i = 0; ls->ls_items[i]; i++) { + nit = (const struct netisrtab *)ls->ls_items[i]; + printf("setup_netisrs %d\n", nit->nit_num); + netisrs[nit->nit_num] = nit->nit_isr; + } +} struct cpu_nameclass i386_cpus[] = { { "Intel 80286", CPUCLASS_286 }, /* CPU_286 */ diff --git a/sys/i386/include/spl.h b/sys/i386/include/spl.h index f3f2658cc201..3ffc50fd1bbd 100644 --- a/sys/i386/include/spl.h +++ b/sys/i386/include/spl.h @@ -30,7 +30,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: spl.h,v 1.5 1994/09/20 05:07:32 bde Exp $ + * $Id: spl.h,v 1.6 1994/12/30 12:42:15 bde Exp $ */ #ifndef _MACHINE_IPL_H_ @@ -76,7 +76,6 @@ extern unsigned bio_imask; /* group of interrupts masked with splbio() */ extern unsigned cpl; /* current priority level mask */ extern volatile unsigned ipending; /* active interrupts masked by cpl */ extern unsigned net_imask; /* group of interrupts masked with splimp() */ -extern volatile unsigned netisr; extern unsigned stat_imask; /* interrupts masked with splstatclock() */ extern unsigned tty_imask; /* group of interrupts masked with spltty() */ diff --git a/sys/kern/uipc_domain.c b/sys/kern/uipc_domain.c index b2bec712ebcc..9768cbe01a6d 100644 --- a/sys/kern/uipc_domain.c +++ b/sys/kern/uipc_domain.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)uipc_domain.c 8.2 (Berkeley) 10/18/93 - * $Id: uipc_domain.c,v 1.3 1994/08/02 07:43:00 davidg Exp $ + * $Id: uipc_domain.c,v 1.4 1995/01/05 19:51:43 se Exp $ */ #include <sys/param.h> @@ -49,42 +49,38 @@ void pffasttimo __P((void *)); void pfslowtimo __P((void *)); +struct domain *domains; + #define ADDDOMAIN(x) { \ extern struct domain __CONCAT(x,domain); \ __CONCAT(x,domain.dom_next) = domains; \ domains = &__CONCAT(x,domain); \ } +extern struct linker_set domain_set; + void domaininit() { - register struct domain *dp; + register struct domain *dp, **dpp; register struct protosw *pr; -#undef unix -#ifndef lint - ADDDOMAIN(unix); - ADDDOMAIN(route); -#ifdef INET - ADDDOMAIN(inet); -#endif -#ifdef NS - ADDDOMAIN(ns); -#endif -#ifdef ISO - ADDDOMAIN(iso); -#endif -#ifdef CCITT - ADDDOMAIN(ccitt); -#endif + /* + * NB - local domain is always present. + */ + ADDDOMAIN(local); + + for (dpp = (struct domain **)domain_set.ls_items; *dpp; dpp++) { + printf("domaininit %s\n", (**dpp).dom_name); + (**dpp).dom_next = domains; + domains = *dpp; + } + +/* - not in our sources #ifdef ISDN ADDDOMAIN(isdn); #endif -#include "imp.h" -#if NIMP > 0 - ADDDOMAIN(imp); -#endif -#endif +*/ for (dp = domains; dp; dp = dp->dom_next) { if (dp->dom_init) @@ -94,8 +90,8 @@ domaininit() (*pr->pr_init)(); } -if (max_linkhdr < 16) /* XXX */ -max_linkhdr = 16; + if (max_linkhdr < 16) /* XXX */ + max_linkhdr = 16; max_hdr = max_linkhdr + max_protohdr; max_datalen = MHLEN - max_hdr; timeout(pffasttimo, (void *)0, 1); diff --git a/sys/kern/uipc_proto.c b/sys/kern/uipc_proto.c index b484737e5459..0b72465d1d6c 100644 --- a/sys/kern/uipc_proto.c +++ b/sys/kern/uipc_proto.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)uipc_proto.c 8.1 (Berkeley) 6/10/93 - * $Id$ + * $Id: uipc_proto.c,v 1.2 1994/08/02 07:43:04 davidg Exp $ */ #include <sys/param.h> @@ -41,20 +41,20 @@ #include <sys/mbuf.h> /* - * Definitions of protocols supported in the UNIX domain. + * Definitions of protocols supported in the LOCAL domain. */ int uipc_usrreq(), raw_usrreq(); void raw_init(),raw_input(),raw_ctlinput(); -extern struct domain unixdomain; /* or at least forward */ +extern struct domain localdomain; /* or at least forward */ -struct protosw unixsw[] = { -{ SOCK_STREAM, &unixdomain, 0, PR_CONNREQUIRED|PR_WANTRCVD|PR_RIGHTS, +struct protosw localsw[] = { +{ SOCK_STREAM, &localdomain, 0, PR_CONNREQUIRED|PR_WANTRCVD|PR_RIGHTS, 0, 0, 0, 0, uipc_usrreq, 0, 0, 0, 0, }, -{ SOCK_DGRAM, &unixdomain, 0, PR_ATOMIC|PR_ADDR|PR_RIGHTS, +{ SOCK_DGRAM, &localdomain, 0, PR_ATOMIC|PR_ADDR|PR_RIGHTS, 0, 0, 0, 0, uipc_usrreq, 0, 0, 0, 0, @@ -68,6 +68,6 @@ struct protosw unixsw[] = { int unp_externalize(), unp_dispose(); -struct domain unixdomain = - { AF_UNIX, "unix", 0, unp_externalize, unp_dispose, - unixsw, &unixsw[sizeof(unixsw)/sizeof(unixsw[0])] }; +struct domain localdomain = + { AF_LOCAL, "local", 0, unp_externalize, unp_dispose, + localsw, &localsw[sizeof(localsw)/sizeof(localsw[0])] }; diff --git a/sys/kern/uipc_usrreq.c b/sys/kern/uipc_usrreq.c index 41116de01505..f4255265d496 100644 --- a/sys/kern/uipc_usrreq.c +++ b/sys/kern/uipc_usrreq.c @@ -30,8 +30,8 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * @(#)uipc_usrreq.c 8.3 (Berkeley) 1/4/94 - * $Id: uipc_usrreq.c,v 1.6 1995/02/07 02:01:16 wollman Exp $ + * From: @(#)uipc_usrreq.c 8.3 (Berkeley) 1/4/94 + * $Id: uipc_usrreq.c,v 1.7 1995/02/15 11:30:35 davidg Exp $ */ #include <sys/param.h> @@ -59,7 +59,7 @@ * rethink name space problems * need a proper out-of-band */ -struct sockaddr sun_noname = { sizeof(sun_noname), AF_UNIX }; +struct sockaddr sun_noname = { sizeof(sun_noname), AF_LOCAL }; ino_t unp_ino; /* prototype for fake inode numbers */ /*ARGSUSED*/ @@ -696,7 +696,7 @@ unp_internalize(control, p) } int unp_defer, unp_gcing; -extern struct domain unixdomain; +extern struct domain localdomain; void unp_gc() @@ -729,7 +729,7 @@ unp_gc() if (fp->f_type != DTYPE_SOCKET || (so = (struct socket *)fp->f_data) == 0) continue; - if (so->so_proto->pr_domain != &unixdomain || + if (so->so_proto->pr_domain != &localdomain || (so->so_proto->pr_flags&PR_RIGHTS) == 0) continue; #ifdef notdef diff --git a/sys/net/netisr.h b/sys/net/netisr.h index fb8c97e74b02..35583483ce8f 100644 --- a/sys/net/netisr.h +++ b/sys/net/netisr.h @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)netisr.h 8.1 (Berkeley) 6/10/93 - * $Id: netisr.h,v 1.4 1994/08/21 05:11:44 paul Exp $ + * $Id: netisr.h,v 1.5 1995/01/05 19:51:47 se Exp $ */ #ifndef _NET_NETISR_H_ @@ -68,7 +68,19 @@ #ifndef LOCORE #ifdef KERNEL -volatile unsigned int netisr; /* scheduling bits for network */ +extern volatile unsigned int netisr; /* scheduling bits for network */ + +typedef void netisr_t(void); + +struct netisrtab { + int nit_num; + netisr_t *nit_isr; +}; + +#define NETISR_SET(num, isr) \ + static struct netisrtab mod_nit = { num, isr }; \ + DATA_SET(netisr_set, mod_nit); + #endif #endif diff --git a/sys/net/rtsock.c b/sys/net/rtsock.c index ea651d5b148f..dc3b3fb80743 100644 --- a/sys/net/rtsock.c +++ b/sys/net/rtsock.c @@ -36,6 +36,7 @@ #include <sys/param.h> #include <sys/systm.h> +#include <sys/kernel.h> #include <sys/proc.h> #include <sys/mbuf.h> #include <sys/socket.h> @@ -793,3 +794,4 @@ struct domain routedomain = { PF_ROUTE, "route", route_init, 0, 0, routesw, &routesw[sizeof(routesw)/sizeof(routesw[0])] }; +DOMAIN_SET(route); diff --git a/sys/netccitt/ccitt_proto.c b/sys/netccitt/ccitt_proto.c index 6204dcd89c30..b6b49b4579d8 100644 --- a/sys/netccitt/ccitt_proto.c +++ b/sys/netccitt/ccitt_proto.c @@ -36,10 +36,11 @@ * SUCH DAMAGE. * * @(#)ccitt_proto.c 8.1 (Berkeley) 6/10/93 - * $Id$ + * $Id: ccitt_proto.c,v 1.2 1994/08/02 07:46:54 davidg Exp $ */ #include <sys/param.h> +#include <sys/kernel.h> #include <sys/socket.h> #include <sys/protosw.h> #include <sys/domain.h> @@ -92,3 +93,5 @@ struct domain ccittdomain = { AF_CCITT, "ccitt", 0, 0, 0, ccittsw, &ccittsw[sizeof(ccittsw)/sizeof(ccittsw[0])], 0, rn_inithead, 32, sizeof (struct sockaddr_x25) }; + +DOMAIN_SET(ccitt); diff --git a/sys/netccitt/pk_input.c b/sys/netccitt/pk_input.c index ae110835f234..9f24c3d66650 100644 --- a/sys/netccitt/pk_input.c +++ b/sys/netccitt/pk_input.c @@ -39,7 +39,7 @@ * SUCH DAMAGE. * * @(#)pk_input.c 8.1 (Berkeley) 6/10/93 - * $Id: pk_input.c,v 1.2 1994/08/02 07:47:35 davidg Exp $ + * $Id: pk_input.c,v 1.3 1994/12/13 22:32:15 wollman Exp $ */ #include <sys/param.h> @@ -69,7 +69,7 @@ struct pkcb_q pkcb_q = {&pkcb_q, &pkcb_q}; * employ boards that do all the stuff themselves, e.g. ADAX X.25 or TPS ISDN.) */ void -ccittintr () +ccittintr (void) { extern struct ifqueue pkintrq; extern struct ifqueue hdintrq; @@ -87,6 +87,8 @@ ccittintr () pkintr (); } +NETISR_SET(NETISR_CCITT, ccittintr); + struct pkcb * pk_newlink (ia, llnext) struct x25_ifaddr *ia; diff --git a/sys/netinet/if_ether.c b/sys/netinet/if_ether.c index 02fa2b8ccf19..cc1611f2e5fc 100644 --- a/sys/netinet/if_ether.c +++ b/sys/netinet/if_ether.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)if_ether.c 8.1 (Berkeley) 6/10/93 - * $Id: if_ether.c,v 1.14 1995/04/26 18:10:52 pst Exp $ + * $Id: if_ether.c,v 1.15 1995/05/09 13:35:44 davidg Exp $ */ /* @@ -54,6 +54,7 @@ #include <net/if.h> #include <net/if_dl.h> #include <net/route.h> +#include <net/netisr.h> #include <netinet/in.h> #include <netinet/in_systm.h> @@ -367,7 +368,7 @@ arpresolve(ac, rt, m, dst, desten, rt0) * then the protocol-specific routine is called. */ void -arpintr() +arpintr(void) { register struct mbuf *m; register struct arphdr *ar; @@ -396,6 +397,8 @@ arpintr() } } +NETISR_SET(NETISR_ARP, arpintr); + /* * ARP for Internet protocols on 10 Mb/s Ethernet. * Algorithm is that given in RFC 826. diff --git a/sys/netinet/in_proto.c b/sys/netinet/in_proto.c index 54eb8cd7f13b..82fcde27e998 100644 --- a/sys/netinet/in_proto.c +++ b/sys/netinet/in_proto.c @@ -30,11 +30,12 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * @(#)in_proto.c 8.1 (Berkeley) 6/10/93 - * $Id: in_proto.c,v 1.12 1995/02/16 00:55:38 wollman Exp $ + * From: @(#)in_proto.c 8.1 (Berkeley) 6/10/93 + * $Id: in_proto.c,v 1.13 1995/04/09 01:29:20 davidg Exp $ */ #include <sys/param.h> +#include <sys/kernel.h> #include <sys/socket.h> #include <sys/protosw.h> #include <sys/domain.h> @@ -164,6 +165,8 @@ struct domain inetdomain = in_inithead, 32, sizeof(struct sockaddr_in) }; +DOMAIN_SET(inet); + #include "imp.h" #if NIMP > 0 extern struct domain impdomain; @@ -180,6 +183,9 @@ struct protosw impsw[] = { struct domain impdomain = { AF_IMPLINK, "imp", 0, 0, 0, impsw, &impsw[sizeof (impsw)/sizeof(impsw[0])] }; + +DOMAIN_SET(imp); + #endif #if 0 @@ -201,5 +207,7 @@ struct protosw hysw[] = { struct domain hydomain = { AF_HYLINK, "hy", 0, 0, 0, hysw, &hysw[sizeof (hysw)/sizeof(hysw[0])] }; + +DOMAIN_SET(hy); #endif #endif diff --git a/sys/netinet/ip_input.c b/sys/netinet/ip_input.c index 0cccc099f3e7..89498b9b7494 100644 --- a/sys/netinet/ip_input.c +++ b/sys/netinet/ip_input.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)ip_input.c 8.2 (Berkeley) 1/4/94 - * $Id: ip_input.c,v 1.19 1995/03/16 18:22:28 wollman Exp $ + * $Id: ip_input.c,v 1.20 1995/05/09 13:35:45 davidg Exp $ */ #include <sys/param.h> @@ -51,6 +51,7 @@ #include <net/if.h> #include <net/route.h> +#include <net/netisr.h> #include <netinet/in.h> #include <netinet/in_systm.h> @@ -143,7 +144,7 @@ struct route ipforward_rt; * try to reassemble. Process options. Pass to next level. */ void -ipintr() +ipintr(void) { register struct ip *ip; register struct mbuf *m; @@ -432,6 +433,8 @@ bad: goto next; } +NETISR_SET(NETISR_IP, ipintr); + /* * Take incoming datagram fragment and try to * reassemble it into whole datagram. If a chain for diff --git a/sys/netiso/clnp_input.c b/sys/netiso/clnp_input.c index 300f8de60466..b04ba3b07db7 100644 --- a/sys/netiso/clnp_input.c +++ b/sys/netiso/clnp_input.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)clnp_input.c 8.1 (Berkeley) 6/10/93 - * $Id: clnp_input.c,v 1.3 1994/11/15 14:26:11 bde Exp $ + * $Id: clnp_input.c,v 1.4 1995/03/16 18:15:20 bde Exp $ */ /*********************************************************** @@ -60,8 +60,8 @@ SOFTWARE. /* * ARGO Project, Computer Sciences Dept., University of Wisconsin - Madison */ -/* $Header: /home/ncvs/src/sys/netiso/clnp_input.c,v 1.3 1994/11/15 14:26:11 bde Exp $ */ -/* $Source: /home/ncvs/src/sys/netiso/clnp_input.c,v $ */ +/* $Header: /a/ncvs/src/sys/netiso/clnp_input.c,v 1.4 1995/03/16 18:15:20 bde Exp $ */ +/* $Source: /a/ncvs/src/sys/netiso/clnp_input.c,v $ */ #include <sys/param.h> #include <sys/systm.h> @@ -153,7 +153,7 @@ clnp_init() * NOTES: */ void -clnlintr() +clnlintr(void) { register struct mbuf *m; /* ptr to first mbuf of pkt */ register struct clnl_fixed *clnl; /* ptr to fixed part of clnl hdr */ @@ -269,6 +269,8 @@ next: goto next; } +NETISR_SET(NETISR_ISO, clnlintr); + /* * FUNCTION: clnp_input * diff --git a/sys/netiso/iso_proto.c b/sys/netiso/iso_proto.c index 6706e570a652..17afcc0981dc 100644 --- a/sys/netiso/iso_proto.c +++ b/sys/netiso/iso_proto.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)iso_proto.c 8.1 (Berkeley) 6/10/93 - * $Id$ + * $Id: iso_proto.c,v 1.2 1994/08/02 07:50:42 davidg Exp $ */ /*********************************************************** @@ -60,7 +60,7 @@ SOFTWARE. /* * ARGO Project, Computer Sciences Dept., University of Wisconsin - Madison */ -/* $Header: /home/ncvs/src/sys/netiso/iso_proto.c,v 1.1.1.1 1994/05/24 10:07:09 rgrimes Exp $ +/* $Header: /home/ncvs/src/sys/netiso/iso_proto.c,v 1.2 1994/08/02 07:50:42 davidg Exp $ * $Source: /home/ncvs/src/sys/netiso/iso_proto.c,v $ * * iso_proto.c : protocol switch tables in the ISO domain @@ -71,6 +71,7 @@ SOFTWARE. #ifdef ISO #include <sys/param.h> +#include <sys/kernel.h> #include <sys/socket.h> #include <sys/protosw.h> #include <sys/domain.h> @@ -195,4 +196,6 @@ struct domain isodomain = { 48, /* rtoffset */ sizeof(struct sockaddr_iso) /* maxkeylen */ }; + +DOMAIN_SET(iso); #endif /* ISO */ diff --git a/sys/netns/ns_input.c b/sys/netns/ns_input.c index a50c121ac0cb..83b02818897c 100644 --- a/sys/netns/ns_input.c +++ b/sys/netns/ns_input.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)ns_input.c 8.1 (Berkeley) 6/10/93 - * $Id: ns_input.c,v 1.2 1994/08/02 07:51:49 davidg Exp $ + * $Id: ns_input.c,v 1.3 1995/03/16 18:15:28 bde Exp $ */ #include <sys/param.h> @@ -49,6 +49,7 @@ #include <net/if.h> #include <net/route.h> #include <net/raw_cb.h> +#include <net/netisr.h> #include <netns/ns.h> #include <netns/ns_if.h> @@ -101,7 +102,7 @@ ns_init() int nsintr_getpck = 0; int nsintr_swtch = 0; void -nsintr() +nsintr(void) { register struct idp *idp; register struct mbuf *m; @@ -236,6 +237,8 @@ bad: goto next; } +NETISR_SET(NETISR_NS, nsintr); + u_char nsctlerrmap[PRC_NCMDS] = { ECONNABORTED, ECONNABORTED, 0, 0, 0, 0, EHOSTDOWN, EHOSTUNREACH, diff --git a/sys/netns/ns_proto.c b/sys/netns/ns_proto.c index a19e8cbc4202..ff26004e88f7 100644 --- a/sys/netns/ns_proto.c +++ b/sys/netns/ns_proto.c @@ -30,11 +30,12 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * @(#)ns_proto.c 8.1 (Berkeley) 6/10/93 - * $Id$ + * From: @(#)ns_proto.c 8.1 (Berkeley) 6/10/93 + * $Id: ns_proto.c,v 1.2 1994/08/02 07:51:54 davidg Exp $ */ #include <sys/param.h> +#include <sys/kernel.h> #include <sys/socket.h> #include <sys/protosw.h> #include <sys/domain.h> @@ -95,3 +96,4 @@ struct domain nsdomain = nssw, &nssw[sizeof(nssw)/sizeof(nssw[0])], 0, rn_inithead, 16, sizeof(struct sockaddr_ns)}; +DOMAIN_SET(ns); diff --git a/sys/sys/domain.h b/sys/sys/domain.h index dbafc9d13c6d..8a4a0f42d776 100644 --- a/sys/sys/domain.h +++ b/sys/sys/domain.h @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)domain.h 8.1 (Berkeley) 6/2/93 - * $Id: domain.h,v 1.2 1994/08/02 07:52:53 davidg Exp $ + * $Id: domain.h,v 1.3 1994/08/21 04:41:41 paul Exp $ */ #ifndef _SYS_DOMAIN_H_ @@ -64,7 +64,12 @@ struct domain { }; #ifdef KERNEL -struct domain *domains; +extern struct domain *domains; + +#define DOMAIN_SET(name) \ + extern struct domain name ## domain; \ + DATA_SET(domain_set, name ## domain); + #endif #endif |