Nuke the DOMAINADD() macro and just call domain_attach(), now that things work correctly that way.diff -r1.9 -r1.10 src/sys/rump/librump/rumpnet/rump_net_private.h
(pooka)
--- src/sys/rump/librump/rumpnet/rump_net_private.h 2014/02/14 01:43:13 1.9
+++ src/sys/rump/librump/rumpnet/rump_net_private.h 2014/08/22 11:34:28 1.10
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: rump_net_private.h,v 1.9 2014/02/14 01:43:13 pooka Exp $ */ | 1 | /* $NetBSD: rump_net_private.h,v 1.10 2014/08/22 11:34:28 pooka Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright (c) 2008 Antti Kantee. All Rights Reserved. | 4 | * Copyright (c) 2008 Antti Kantee. All Rights Reserved. | |
5 | * | 5 | * | |
6 | * Redistribution and use in source and binary forms, with or without | 6 | * Redistribution and use in source and binary forms, with or without | |
7 | * modification, are permitted provided that the following conditions | 7 | * modification, are permitted provided that the following conditions | |
8 | * are met: | 8 | * are met: | |
9 | * 1. Redistributions of source code must retain the above copyright | 9 | * 1. Redistributions of source code must retain the above copyright | |
10 | * notice, this list of conditions and the following disclaimer. | 10 | * notice, this list of conditions and the following disclaimer. | |
11 | * 2. Redistributions in binary form must reproduce the above copyright | 11 | * 2. Redistributions in binary form must reproduce the above copyright | |
12 | * notice, this list of conditions and the following disclaimer in the | 12 | * notice, this list of conditions and the following disclaimer in the | |
13 | * documentation and/or other materials provided with the distribution. | 13 | * documentation and/or other materials provided with the distribution. | |
14 | * | 14 | * | |
@@ -20,23 +20,16 @@ | @@ -20,23 +20,16 @@ | |||
20 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | 20 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | |
21 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | 21 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
22 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | 22 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
23 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | 23 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
24 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 24 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
25 | * SUCH DAMAGE. | 25 | * SUCH DAMAGE. | |
26 | */ | 26 | */ | |
27 | 27 | |||
28 | #ifndef _SYS_RUMP_NET_PRIVATE_H_ | 28 | #ifndef _SYS_RUMP_NET_PRIVATE_H_ | |
29 | #define _SYS_RUMP_NET_PRIVATE_H_ | 29 | #define _SYS_RUMP_NET_PRIVATE_H_ | |
30 | 30 | |||
31 | void rump_netisr_register(int, void (*)(void)); | 31 | void rump_netisr_register(int, void (*)(void)); | |
32 | 32 | |||
33 | #define DOMAINADD(dom) \ | |||
34 | do { \ | |||
35 | if (!pffinddomain(dom.dom_family)) { \ | |||
36 | domain_attach(&dom); \ | |||
37 | } \ | |||
38 | } while (/*CONSTCOND*/0) | |||
39 | ||||
40 | #include "rumpnet_if_priv.h" | 33 | #include "rumpnet_if_priv.h" | |
41 | 34 | |||
42 | #endif /* _SYS_RUMP_NET_PRIVATE_H_ */ | 35 | #endif /* _SYS_RUMP_NET_PRIVATE_H_ */ |
--- src/sys/rump/net/lib/liblocal/local_component.c 2014/03/13 02:04:59 1.1
+++ src/sys/rump/net/lib/liblocal/local_component.c 2014/08/22 11:34:28 1.2
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: local_component.c,v 1.1 2014/03/13 02:04:59 pooka Exp $ */ | 1 | /* $NetBSD: local_component.c,v 1.2 2014/08/22 11:34:28 pooka Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright (c) 2009 Antti Kantee. All Rights Reserved. | 4 | * Copyright (c) 2009 Antti Kantee. All Rights Reserved. | |
5 | * | 5 | * | |
6 | * Development of this software was supported by The Nokia Foundation | 6 | * Development of this software was supported by The Nokia Foundation | |
7 | * | 7 | * | |
8 | * Redistribution and use in source and binary forms, with or without | 8 | * Redistribution and use in source and binary forms, with or without | |
9 | * modification, are permitted provided that the following conditions | 9 | * modification, are permitted provided that the following conditions | |
10 | * are met: | 10 | * are met: | |
11 | * 1. Redistributions of source code must retain the above copyright | 11 | * 1. Redistributions of source code must retain the above copyright | |
12 | * notice, this list of conditions and the following disclaimer. | 12 | * notice, this list of conditions and the following disclaimer. | |
13 | * 2. Redistributions in binary form must reproduce the above copyright | 13 | * 2. Redistributions in binary form must reproduce the above copyright | |
14 | * notice, this list of conditions and the following disclaimer in the | 14 | * notice, this list of conditions and the following disclaimer in the | |
@@ -18,28 +18,28 @@ | @@ -18,28 +18,28 @@ | |||
18 | * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | 18 | * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | |
19 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | 19 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | |
20 | * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | 20 | * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | |
21 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | 21 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
22 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | 22 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | |
23 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | 23 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
24 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | 24 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
25 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | 25 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
26 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 26 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
27 | * SUCH DAMAGE. | 27 | * SUCH DAMAGE. | |
28 | */ | 28 | */ | |
29 | 29 | |||
30 | #include <sys/cdefs.h> | 30 | #include <sys/cdefs.h> | |
31 | __KERNEL_RCSID(0, "$NetBSD: local_component.c,v 1.1 2014/03/13 02:04:59 pooka Exp $"); | 31 | __KERNEL_RCSID(0, "$NetBSD: local_component.c,v 1.2 2014/08/22 11:34:28 pooka Exp $"); | |
32 | 32 | |||
33 | #include <sys/param.h> | 33 | #include <sys/param.h> | |
34 | #include <sys/domain.h> | 34 | #include <sys/domain.h> | |
35 | #include <sys/protosw.h> | 35 | #include <sys/protosw.h> | |
36 | 36 | |||
37 | #include "rump_private.h" | 37 | #include "rump_private.h" | |
38 | #include "rump_net_private.h" | 38 | #include "rump_net_private.h" | |
39 | 39 | |||
40 | RUMP_COMPONENT(RUMP_COMPONENT_NET) | 40 | RUMP_COMPONENT(RUMP_COMPONENT_NET) | |
41 | { | 41 | { | |
42 | extern struct domain unixdomain; | 42 | extern struct domain unixdomain; | |
43 | 43 | |||
44 | DOMAINADD(unixdomain); | 44 | domain_attach(&unixdomain); | |
45 | } | 45 | } |
--- src/sys/rump/net/lib/libnet/net_component.c 2014/03/13 02:06:32 1.1
+++ src/sys/rump/net/lib/libnet/net_component.c 2014/08/22 11:34:28 1.2
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: net_component.c,v 1.1 2014/03/13 02:06:32 pooka Exp $ */ | 1 | /* $NetBSD: net_component.c,v 1.2 2014/08/22 11:34:28 pooka Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright (c) 2009 Antti Kantee. All Rights Reserved. | 4 | * Copyright (c) 2009 Antti Kantee. All Rights Reserved. | |
5 | * | 5 | * | |
6 | * Development of this software was supported by The Nokia Foundation | 6 | * Development of this software was supported by The Nokia Foundation | |
7 | * | 7 | * | |
8 | * Redistribution and use in source and binary forms, with or without | 8 | * Redistribution and use in source and binary forms, with or without | |
9 | * modification, are permitted provided that the following conditions | 9 | * modification, are permitted provided that the following conditions | |
10 | * are met: | 10 | * are met: | |
11 | * 1. Redistributions of source code must retain the above copyright | 11 | * 1. Redistributions of source code must retain the above copyright | |
12 | * notice, this list of conditions and the following disclaimer. | 12 | * notice, this list of conditions and the following disclaimer. | |
13 | * 2. Redistributions in binary form must reproduce the above copyright | 13 | * 2. Redistributions in binary form must reproduce the above copyright | |
14 | * notice, this list of conditions and the following disclaimer in the | 14 | * notice, this list of conditions and the following disclaimer in the | |
@@ -18,46 +18,46 @@ | @@ -18,46 +18,46 @@ | |||
18 | * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | 18 | * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | |
19 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | 19 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | |
20 | * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | 20 | * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | |
21 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | 21 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
22 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | 22 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | |
23 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | 23 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
24 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | 24 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
25 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | 25 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
26 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 26 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
27 | * SUCH DAMAGE. | 27 | * SUCH DAMAGE. | |
28 | */ | 28 | */ | |
29 | 29 | |||
30 | #include <sys/cdefs.h> | 30 | #include <sys/cdefs.h> | |
31 | __KERNEL_RCSID(0, "$NetBSD: net_component.c,v 1.1 2014/03/13 02:06:32 pooka Exp $"); | 31 | __KERNEL_RCSID(0, "$NetBSD: net_component.c,v 1.2 2014/08/22 11:34:28 pooka Exp $"); | |
32 | 32 | |||
33 | #include <sys/param.h> | 33 | #include <sys/param.h> | |
34 | #include <sys/domain.h> | 34 | #include <sys/domain.h> | |
35 | #include <sys/protosw.h> | 35 | #include <sys/protosw.h> | |
36 | 36 | |||
37 | #include <net/if.h> | 37 | #include <net/if.h> | |
38 | #include <net/route.h> | 38 | #include <net/route.h> | |
39 | 39 | |||
40 | #include "rump_private.h" | 40 | #include "rump_private.h" | |
41 | #include "rump_net_private.h" | 41 | #include "rump_net_private.h" | |
42 | 42 | |||
43 | RUMP_COMPONENT(RUMP_COMPONENT_NET) | 43 | RUMP_COMPONENT(RUMP_COMPONENT_NET) | |
44 | { | 44 | { | |
45 | 45 | |||
46 | ifinit1(); | 46 | ifinit1(); | |
47 | ifinit(); | 47 | ifinit(); | |
48 | } | 48 | } | |
49 | 49 | |||
50 | RUMP_COMPONENT(RUMP_COMPONENT_NET_ROUTE) | 50 | RUMP_COMPONENT(RUMP_COMPONENT_NET_ROUTE) | |
51 | { | 51 | { | |
52 | extern struct domain routedomain, compat_50_routedomain, linkdomain; | 52 | extern struct domain routedomain, compat_50_routedomain, linkdomain; | |
53 | 53 | |||
54 | DOMAINADD(linkdomain); | 54 | domain_attach(&linkdomain); | |
55 | DOMAINADD(routedomain); | 55 | domain_attach(&routedomain); | |
56 | DOMAINADD(compat_50_routedomain); | 56 | domain_attach(&compat_50_routedomain); | |
57 | } | 57 | } | |
58 | 58 | |||
59 | RUMP_COMPONENT(RUMP_COMPONENT_NET_IF) | 59 | RUMP_COMPONENT(RUMP_COMPONENT_NET_IF) | |
60 | { | 60 | { | |
61 | 61 | |||
62 | loopattach(1); | 62 | loopattach(1); | |
63 | } | 63 | } |
--- src/sys/rump/net/lib/libnetbt/netbt_component.c 2014/03/13 02:06:16 1.1
+++ src/sys/rump/net/lib/libnetbt/netbt_component.c 2014/08/22 11:34:28 1.2
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: netbt_component.c,v 1.1 2014/03/13 02:06:16 pooka Exp $ */ | 1 | /* $NetBSD: netbt_component.c,v 1.2 2014/08/22 11:34:28 pooka Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright (c) 2010 Antti Kantee. All Rights Reserved. | 4 | * Copyright (c) 2010 Antti Kantee. All Rights Reserved. | |
5 | * | 5 | * | |
6 | * Redistribution and use in source and binary forms, with or without | 6 | * Redistribution and use in source and binary forms, with or without | |
7 | * modification, are permitted provided that the following conditions | 7 | * modification, are permitted provided that the following conditions | |
8 | * are met: | 8 | * are met: | |
9 | * 1. Redistributions of source code must retain the above copyright | 9 | * 1. Redistributions of source code must retain the above copyright | |
10 | * notice, this list of conditions and the following disclaimer. | 10 | * notice, this list of conditions and the following disclaimer. | |
11 | * 2. Redistributions in binary form must reproduce the above copyright | 11 | * 2. Redistributions in binary form must reproduce the above copyright | |
12 | * notice, this list of conditions and the following disclaimer in the | 12 | * notice, this list of conditions and the following disclaimer in the | |
13 | * documentation and/or other materials provided with the distribution. | 13 | * documentation and/or other materials provided with the distribution. | |
14 | * | 14 | * | |
@@ -16,28 +16,28 @@ | @@ -16,28 +16,28 @@ | |||
16 | * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | 16 | * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | |
17 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | 17 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | |
18 | * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | 18 | * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | |
19 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | 19 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
20 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | 20 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | |
21 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | 21 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
22 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | 22 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
23 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | 23 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
24 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 24 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
25 | * SUCH DAMAGE. | 25 | * SUCH DAMAGE. | |
26 | */ | 26 | */ | |
27 | 27 | |||
28 | #include <sys/cdefs.h> | 28 | #include <sys/cdefs.h> | |
29 | __KERNEL_RCSID(0, "$NetBSD: netbt_component.c,v 1.1 2014/03/13 02:06:16 pooka Exp $"); | 29 | __KERNEL_RCSID(0, "$NetBSD: netbt_component.c,v 1.2 2014/08/22 11:34:28 pooka Exp $"); | |
30 | 30 | |||
31 | #include <sys/param.h> | 31 | #include <sys/param.h> | |
32 | #include <sys/domain.h> | 32 | #include <sys/domain.h> | |
33 | #include <sys/protosw.h> | 33 | #include <sys/protosw.h> | |
34 | 34 | |||
35 | #include "rump_private.h" | 35 | #include "rump_private.h" | |
36 | #include "rump_net_private.h" | 36 | #include "rump_net_private.h" | |
37 | 37 | |||
38 | RUMP_COMPONENT(RUMP_COMPONENT_NET) | 38 | RUMP_COMPONENT(RUMP_COMPONENT_NET) | |
39 | { | 39 | { | |
40 | extern struct domain btdomain; | 40 | extern struct domain btdomain; | |
41 | 41 | |||
42 | DOMAINADD(btdomain); | 42 | domain_attach(&btdomain); | |
43 | } | 43 | } |
--- src/sys/rump/net/lib/libnetinet/netinet_component.c 2014/07/01 05:49:19 1.3
+++ src/sys/rump/net/lib/libnetinet/netinet_component.c 2014/08/22 11:34:28 1.4
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: netinet_component.c,v 1.3 2014/07/01 05:49:19 rtr Exp $ */ | 1 | /* $NetBSD: netinet_component.c,v 1.4 2014/08/22 11:34:28 pooka Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright (c) 2009 Antti Kantee. All Rights Reserved. | 4 | * Copyright (c) 2009 Antti Kantee. All Rights Reserved. | |
5 | * | 5 | * | |
6 | * Development of this software was supported by The Nokia Foundation | 6 | * Development of this software was supported by The Nokia Foundation | |
7 | * | 7 | * | |
8 | * Redistribution and use in source and binary forms, with or without | 8 | * Redistribution and use in source and binary forms, with or without | |
9 | * modification, are permitted provided that the following conditions | 9 | * modification, are permitted provided that the following conditions | |
10 | * are met: | 10 | * are met: | |
11 | * 1. Redistributions of source code must retain the above copyright | 11 | * 1. Redistributions of source code must retain the above copyright | |
12 | * notice, this list of conditions and the following disclaimer. | 12 | * notice, this list of conditions and the following disclaimer. | |
13 | * 2. Redistributions in binary form must reproduce the above copyright | 13 | * 2. Redistributions in binary form must reproduce the above copyright | |
14 | * notice, this list of conditions and the following disclaimer in the | 14 | * notice, this list of conditions and the following disclaimer in the | |
@@ -18,51 +18,51 @@ | @@ -18,51 +18,51 @@ | |||
18 | * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | 18 | * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | |
19 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | 19 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | |
20 | * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | 20 | * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | |
21 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | 21 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
22 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | 22 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | |
23 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | 23 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
24 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | 24 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
25 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | 25 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
26 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 26 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
27 | * SUCH DAMAGE. | 27 | * SUCH DAMAGE. | |
28 | */ | 28 | */ | |
29 | 29 | |||
30 | #include <sys/cdefs.h> | 30 | #include <sys/cdefs.h> | |
31 | __KERNEL_RCSID(0, "$NetBSD: netinet_component.c,v 1.3 2014/07/01 05:49:19 rtr Exp $"); | 31 | __KERNEL_RCSID(0, "$NetBSD: netinet_component.c,v 1.4 2014/08/22 11:34:28 pooka Exp $"); | |
32 | 32 | |||
33 | #include <sys/param.h> | 33 | #include <sys/param.h> | |
34 | #include <sys/domain.h> | 34 | #include <sys/domain.h> | |
35 | #include <sys/protosw.h> | 35 | #include <sys/protosw.h> | |
36 | #include <sys/socketvar.h> | 36 | #include <sys/socketvar.h> | |
37 | 37 | |||
38 | #include <net/if.h> | 38 | #include <net/if.h> | |
39 | #include <net/netisr.h> | 39 | #include <net/netisr.h> | |
40 | #include <netinet/in.h> | 40 | #include <netinet/in.h> | |
41 | #include <netinet/in_var.h> | 41 | #include <netinet/in_var.h> | |
42 | #include <netinet/ip_var.h> | 42 | #include <netinet/ip_var.h> | |
43 | #include <netinet/if_inarp.h> | 43 | #include <netinet/if_inarp.h> | |
44 | 44 | |||
45 | #include "rump_private.h" | 45 | #include "rump_private.h" | |
46 | #include "rump_net_private.h" | 46 | #include "rump_net_private.h" | |
47 | 47 | |||
48 | int carpattach(int); | 48 | int carpattach(int); | |
49 | 49 | |||
50 | RUMP_COMPONENT(RUMP_COMPONENT_NET) | 50 | RUMP_COMPONENT(RUMP_COMPONENT_NET) | |
51 | { | 51 | { | |
52 | extern struct domain arpdomain, inetdomain; | 52 | extern struct domain arpdomain, inetdomain; | |
53 | 53 | |||
54 | DOMAINADD(arpdomain); | 54 | domain_attach(&arpdomain); | |
55 | DOMAINADD(inetdomain); | 55 | domain_attach(&inetdomain); | |
56 | 56 | |||
57 | carpattach(1); | 57 | carpattach(1); | |
58 | 58 | |||
59 | rump_netisr_register(NETISR_ARP, arpintr); | 59 | rump_netisr_register(NETISR_ARP, arpintr); | |
60 | } | 60 | } | |
61 | 61 | |||
62 | RUMP_COMPONENT(RUMP_COMPONENT_NET_IFCFG) | 62 | RUMP_COMPONENT(RUMP_COMPONENT_NET_IFCFG) | |
63 | { | 63 | { | |
64 | struct ifaliasreq ia; | 64 | struct ifaliasreq ia; | |
65 | struct sockaddr_in *sin; | 65 | struct sockaddr_in *sin; | |
66 | struct socket *so; | 66 | struct socket *so; | |
67 | int error; | 67 | int error; | |
68 | 68 |
--- src/sys/rump/net/lib/libnetinet6/netinet6_component.c 2014/06/05 23:48:17 1.2
+++ src/sys/rump/net/lib/libnetinet6/netinet6_component.c 2014/08/22 11:34:28 1.3
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: netinet6_component.c,v 1.2 2014/06/05 23:48:17 rmind Exp $ */ | 1 | /* $NetBSD: netinet6_component.c,v 1.3 2014/08/22 11:34:28 pooka Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright (c) 2013 Antti Kantee. All Rights Reserved. | 4 | * Copyright (c) 2013 Antti Kantee. All Rights Reserved. | |
5 | * | 5 | * | |
6 | * Redistribution and use in source and binary forms, with or without | 6 | * Redistribution and use in source and binary forms, with or without | |
7 | * modification, are permitted provided that the following conditions | 7 | * modification, are permitted provided that the following conditions | |
8 | * are met: | 8 | * are met: | |
9 | * 1. Redistributions of source code must retain the above copyright | 9 | * 1. Redistributions of source code must retain the above copyright | |
10 | * notice, this list of conditions and the following disclaimer. | 10 | * notice, this list of conditions and the following disclaimer. | |
11 | * 2. Redistributions in binary form must reproduce the above copyright | 11 | * 2. Redistributions in binary form must reproduce the above copyright | |
12 | * notice, this list of conditions and the following disclaimer in the | 12 | * notice, this list of conditions and the following disclaimer in the | |
13 | * documentation and/or other materials provided with the distribution. | 13 | * documentation and/or other materials provided with the distribution. | |
14 | * | 14 | * | |
@@ -16,43 +16,43 @@ | @@ -16,43 +16,43 @@ | |||
16 | * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | 16 | * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | |
17 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | 17 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | |
18 | * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | 18 | * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | |
19 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | 19 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
20 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | 20 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | |
21 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | 21 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
22 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | 22 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
23 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | 23 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
24 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 24 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
25 | * SUCH DAMAGE. | 25 | * SUCH DAMAGE. | |
26 | */ | 26 | */ | |
27 | 27 | |||
28 | #include <sys/cdefs.h> | 28 | #include <sys/cdefs.h> | |
29 | __KERNEL_RCSID(0, "$NetBSD: netinet6_component.c,v 1.2 2014/06/05 23:48:17 rmind Exp $"); | 29 | __KERNEL_RCSID(0, "$NetBSD: netinet6_component.c,v 1.3 2014/08/22 11:34:28 pooka Exp $"); | |
30 | 30 | |||
31 | #include <sys/param.h> | 31 | #include <sys/param.h> | |
32 | #include <sys/domain.h> | 32 | #include <sys/domain.h> | |
33 | #include <sys/protosw.h> | 33 | #include <sys/protosw.h> | |
34 | #include <sys/socketvar.h> | 34 | #include <sys/socketvar.h> | |
35 | 35 | |||
36 | #include <net/if.h> | 36 | #include <net/if.h> | |
37 | #include <net/netisr.h> | 37 | #include <net/netisr.h> | |
38 | 38 | |||
39 | #include <netinet/in.h> | 39 | #include <netinet/in.h> | |
40 | #include <netinet/ip_var.h> | 40 | #include <netinet/ip_var.h> | |
41 | #include <netinet/ip6.h> | 41 | #include <netinet/ip6.h> | |
42 | #include <netinet6/ip6_var.h> | 42 | #include <netinet6/ip6_var.h> | |
43 | 43 | |||
44 | #include "rump_private.h" | 44 | #include "rump_private.h" | |
45 | #include "rump_net_private.h" | 45 | #include "rump_net_private.h" | |
46 | 46 | |||
47 | RUMP_COMPONENT(RUMP_COMPONENT_NET) | 47 | RUMP_COMPONENT(RUMP_COMPONENT_NET) | |
48 | { | 48 | { | |
49 | extern struct domain inet6domain; | 49 | extern struct domain inet6domain; | |
50 | 50 | |||
51 | DOMAINADD(inet6domain); | 51 | domain_attach(&inet6domain); | |
52 | } | 52 | } | |
53 | 53 | |||
54 | RUMP_COMPONENT(RUMP_COMPONENT_NET_IFCFG) | 54 | RUMP_COMPONENT(RUMP_COMPONENT_NET_IFCFG) | |
55 | { | 55 | { | |
56 | 56 | |||
57 | if_up(lo0ifp); | 57 | if_up(lo0ifp); | |
58 | } | 58 | } |
--- src/sys/rump/net/lib/libnetmpls/netmpls_component.c 2014/03/13 02:05:29 1.1
+++ src/sys/rump/net/lib/libnetmpls/netmpls_component.c 2014/08/22 11:34:28 1.2
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: netmpls_component.c,v 1.1 2014/03/13 02:05:29 pooka Exp $ */ | 1 | /* $NetBSD: netmpls_component.c,v 1.2 2014/08/22 11:34:28 pooka Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright (c) 2009 Antti Kantee. All Rights Reserved. | 4 | * Copyright (c) 2009 Antti Kantee. All Rights Reserved. | |
5 | * | 5 | * | |
6 | * Development of this software was supported by The Nokia Foundation | 6 | * Development of this software was supported by The Nokia Foundation | |
7 | * | 7 | * | |
8 | * Copyright (c) 2013 The NetBSD Foundation, Inc. | 8 | * Copyright (c) 2013 The NetBSD Foundation, Inc. | |
9 | * All rights reserved. | 9 | * All rights reserved. | |
10 | * | 10 | * | |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without | |
12 | * modification, are permitted provided that the following conditions | 12 | * modification, are permitted provided that the following conditions | |
13 | * are met: | 13 | * are met: | |
14 | * 1. Redistributions of source code must retain the above copyright | 14 | * 1. Redistributions of source code must retain the above copyright | |
@@ -21,44 +21,44 @@ | @@ -21,44 +21,44 @@ | |||
21 | * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | 21 | * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | |
22 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | 22 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | |
23 | * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | 23 | * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | |
24 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | 24 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
25 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | 25 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | |
26 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | 26 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
27 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | 27 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
28 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | 28 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
29 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 29 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
30 | * SUCH DAMAGE. | 30 | * SUCH DAMAGE. | |
31 | */ | 31 | */ | |
32 | 32 | |||
33 | #include <sys/cdefs.h> | 33 | #include <sys/cdefs.h> | |
34 | __KERNEL_RCSID(0, "$NetBSD: netmpls_component.c,v 1.1 2014/03/13 02:05:29 pooka Exp $"); | 34 | __KERNEL_RCSID(0, "$NetBSD: netmpls_component.c,v 1.2 2014/08/22 11:34:28 pooka Exp $"); | |
35 | 35 | |||
36 | #include <sys/param.h> | 36 | #include <sys/param.h> | |
37 | #include <sys/domain.h> | 37 | #include <sys/domain.h> | |
38 | #include <sys/protosw.h> | 38 | #include <sys/protosw.h> | |
39 | 39 | |||
40 | #include <net/if.h> | 40 | #include <net/if.h> | |
41 | #include <net/netisr.h> | 41 | #include <net/netisr.h> | |
42 | #include <net/route.h> | 42 | #include <net/route.h> | |
43 | 43 | |||
44 | #include <netmpls/mpls_var.h> | 44 | #include <netmpls/mpls_var.h> | |
45 | 45 | |||
46 | #include "rump_private.h" | 46 | #include "rump_private.h" | |
47 | #include "rump_net_private.h" | 47 | #include "rump_net_private.h" | |
48 | 48 | |||
49 | void ifmplsattach(int); | 49 | void ifmplsattach(int); | |
50 | 50 | |||
51 | RUMP_COMPONENT(RUMP_COMPONENT_NET) | 51 | RUMP_COMPONENT(RUMP_COMPONENT_NET) | |
52 | { | 52 | { | |
53 | extern struct domain mplsdomain; | 53 | extern struct domain mplsdomain; | |
54 | 54 | |||
55 | DOMAINADD(mplsdomain); | 55 | domain_attach(&mplsdomain); | |
56 | 56 | |||
57 | rump_netisr_register(NETISR_MPLS, mplsintr); | 57 | rump_netisr_register(NETISR_MPLS, mplsintr); | |
58 | } | 58 | } | |
59 | 59 | |||
60 | RUMP_COMPONENT(RUMP_COMPONENT_NET_IF) | 60 | RUMP_COMPONENT(RUMP_COMPONENT_NET_IF) | |
61 | { | 61 | { | |
62 | 62 | |||
63 | ifmplsattach(0); | 63 | ifmplsattach(0); | |
64 | } | 64 | } |
--- src/sys/rump/net/lib/libsockin/sockin_component.c 2014/03/13 02:05:49 1.1
+++ src/sys/rump/net/lib/libsockin/sockin_component.c 2014/08/22 11:34:28 1.2
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: sockin_component.c,v 1.1 2014/03/13 02:05:49 pooka Exp $ */ | 1 | /* $NetBSD: sockin_component.c,v 1.2 2014/08/22 11:34:28 pooka Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright (c) 2009 Antti Kantee. All Rights Reserved. | 4 | * Copyright (c) 2009 Antti Kantee. All Rights Reserved. | |
5 | * | 5 | * | |
6 | * Development of this software was supported by The Nokia Foundation | 6 | * Development of this software was supported by The Nokia Foundation | |
7 | * | 7 | * | |
8 | * Redistribution and use in source and binary forms, with or without | 8 | * Redistribution and use in source and binary forms, with or without | |
9 | * modification, are permitted provided that the following conditions | 9 | * modification, are permitted provided that the following conditions | |
10 | * are met: | 10 | * are met: | |
11 | * 1. Redistributions of source code must retain the above copyright | 11 | * 1. Redistributions of source code must retain the above copyright | |
12 | * notice, this list of conditions and the following disclaimer. | 12 | * notice, this list of conditions and the following disclaimer. | |
13 | * 2. Redistributions in binary form must reproduce the above copyright | 13 | * 2. Redistributions in binary form must reproduce the above copyright | |
14 | * notice, this list of conditions and the following disclaimer in the | 14 | * notice, this list of conditions and the following disclaimer in the | |
@@ -18,30 +18,30 @@ | @@ -18,30 +18,30 @@ | |||
18 | * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | 18 | * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | |
19 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | 19 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | |
20 | * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | 20 | * DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | |
21 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | 21 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | |
22 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | 22 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | |
23 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | 23 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
24 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | 24 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
25 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | 25 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | |
26 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 26 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | |
27 | * SUCH DAMAGE. | 27 | * SUCH DAMAGE. | |
28 | */ | 28 | */ | |
29 | 29 | |||
30 | #include <sys/cdefs.h> | 30 | #include <sys/cdefs.h> | |
31 | __KERNEL_RCSID(0, "$NetBSD: sockin_component.c,v 1.1 2014/03/13 02:05:49 pooka Exp $"); | 31 | __KERNEL_RCSID(0, "$NetBSD: sockin_component.c,v 1.2 2014/08/22 11:34:28 pooka Exp $"); | |
32 | 32 | |||
33 | #include <sys/param.h> | 33 | #include <sys/param.h> | |
34 | #include <sys/domain.h> | 34 | #include <sys/domain.h> | |
35 | #include <sys/protosw.h> | 35 | #include <sys/protosw.h> | |
36 | 36 | |||
37 | #include "rump_private.h" | 37 | #include "rump_private.h" | |
38 | #include "rump_net_private.h" | 38 | #include "rump_net_private.h" | |
39 | 39 | |||
40 | RUMP_COMPONENT(RUMP_COMPONENT_NET) | 40 | RUMP_COMPONENT(RUMP_COMPONENT_NET) | |
41 | { | 41 | { | |
42 | extern struct domain sockindomain; | 42 | extern struct domain sockindomain; | |
43 | extern struct domain sockin6domain; | 43 | extern struct domain sockin6domain; | |
44 | 44 | |||
45 | DOMAINADD(sockindomain); | 45 | domain_attach(&sockindomain); | |
46 | DOMAINADD(sockin6domain); | 46 | domain_attach(&sockin6domain); | |
47 | } | 47 | } |