Tue Dec 7 20:39:07 2010 UTC ()
Support bridging.  As usual, it would be nice if this could be a
separate component, but King Ifdef doesn't let us.


(pooka)
diff -r1.8 -r1.9 src/sys/rump/net/lib/libnet/Makefile
diff -r1.5 -r1.6 src/sys/rump/net/lib/libnet/component.c
diff -r1.1 -r1.2 src/sys/rump/net/lib/libnet/opt/bridge.h

cvs diff -r1.8 -r1.9 src/sys/rump/net/lib/libnet/Makefile (expand / switch to unified diff)

--- src/sys/rump/net/lib/libnet/Makefile 2010/11/07 19:47:18 1.8
+++ src/sys/rump/net/lib/libnet/Makefile 2010/12/07 20:39:07 1.9
@@ -1,20 +1,21 @@ @@ -1,20 +1,21 @@
1# $NetBSD: Makefile,v 1.8 2010/11/07 19:47:18 pooka Exp $ 1# $NetBSD: Makefile,v 1.9 2010/12/07 20:39:07 pooka Exp $
2# 2#
3 3
4.PATH: ${.CURDIR}/../../../../net ${.CURDIR}/../../../../compat/common 4.PATH: ${.CURDIR}/../../../../net ${.CURDIR}/../../../../compat/common
5 5
6LIB= rumpnet_net 6LIB= rumpnet_net
7 7
8# iffy stuff 8# iffy stuff
9SRCS= if.c if_loop.c route.c rtsock.c raw_usrreq.c raw_cb.c \ 9SRCS= if.c if_bridge.c if_loop.c route.c rtsock.c raw_usrreq.c \
10 if_media.c link_proto.c net_stats.c if_ethersubr.c 10 raw_cb.c if_media.c link_proto.c net_stats.c if_ethersubr.c
 11SRCS+= bridgestp.c
11SRCS+= if_43.c uipc_syscalls_50.c 12SRCS+= if_43.c uipc_syscalls_50.c
12SRCS+= component.c 13SRCS+= component.c
13 14
14CPPFLAGS+= -I${.CURDIR}/opt -I${.CURDIR}/../libnetinet/opt 15CPPFLAGS+= -I${.CURDIR}/opt -I${.CURDIR}/../libnetinet/opt
15CPPFLAGS+= -DCOMPAT_OIFREQ -DCOMPAT_OIFDATA 16CPPFLAGS+= -DCOMPAT_OIFREQ -DCOMPAT_OIFDATA
16 17
17.include "${.CURDIR}/../libnetinet/Makefile.inc" 18.include "${.CURDIR}/../libnetinet/Makefile.inc"
18 19
19.include <bsd.lib.mk> 20.include <bsd.lib.mk>
20.include <bsd.klinks.mk> 21.include <bsd.klinks.mk>

cvs diff -r1.5 -r1.6 src/sys/rump/net/lib/libnet/Attic/component.c (expand / switch to unified diff)

--- src/sys/rump/net/lib/libnet/Attic/component.c 2010/10/19 15:40:15 1.5
+++ src/sys/rump/net/lib/libnet/Attic/component.c 2010/12/07 20:39:07 1.6
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: component.c,v 1.5 2010/10/19 15:40:15 pooka Exp $ */ 1/* $NetBSD: component.c,v 1.6 2010/12/07 20:39:07 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,35 +18,38 @@ @@ -18,35 +18,38 @@
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: component.c,v 1.5 2010/10/19 15:40:15 pooka Exp $"); 31__KERNEL_RCSID(0, "$NetBSD: component.c,v 1.6 2010/12/07 20:39:07 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
 43extern void bridgeattach(int);
 44
43RUMP_COMPONENT(RUMP_COMPONENT_NET_ROUTE) 45RUMP_COMPONENT(RUMP_COMPONENT_NET_ROUTE)
44{ 46{
45 extern struct domain routedomain, linkdomain; 47 extern struct domain routedomain, linkdomain;
46 48
47 ifinit1(); 49 ifinit1();
48 ifinit(); 50 ifinit();
49 loopattach(1); 51 loopattach(1);
 52 bridgeattach(1);
50 DOMAINADD(linkdomain); 53 DOMAINADD(linkdomain);
51 DOMAINADD(routedomain); 54 DOMAINADD(routedomain);
52} 55}

cvs diff -r1.1 -r1.2 src/sys/rump/net/lib/libnet/opt/Attic/bridge.h (expand / switch to unified diff)

--- src/sys/rump/net/lib/libnet/opt/Attic/bridge.h 2008/10/06 00:27:06 1.1
+++ src/sys/rump/net/lib/libnet/opt/Attic/bridge.h 2010/12/07 20:39:07 1.2
@@ -1,3 +1,3 @@ @@ -1,3 +1,3 @@
1/* $NetBSD: bridge.h,v 1.1 2008/10/06 00:27:06 pooka Exp $ */ 1/* $NetBSD: bridge.h,v 1.2 2010/12/07 20:39:07 pooka Exp $ */
2 2
3/* dummy */ 3#define NBRIDGE 1