Support bridging. As usual, it would be nice if this could be a

separate component, but King Ifdef doesn't let us.
This commit is contained in:
pooka 2010-12-07 20:39:07 +00:00
parent 55fde99bfe
commit 9b108f4af3
3 changed files with 11 additions and 7 deletions

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.8 2010/11/07 19:47:18 pooka Exp $
# $NetBSD: Makefile,v 1.9 2010/12/07 20:39:07 pooka Exp $
#
.PATH: ${.CURDIR}/../../../../net ${.CURDIR}/../../../../compat/common
@ -6,8 +6,9 @@
LIB= rumpnet_net
# iffy stuff
SRCS= if.c if_loop.c route.c rtsock.c raw_usrreq.c raw_cb.c \
if_media.c link_proto.c net_stats.c if_ethersubr.c
SRCS= if.c if_bridge.c if_loop.c route.c rtsock.c raw_usrreq.c \
raw_cb.c if_media.c link_proto.c net_stats.c if_ethersubr.c
SRCS+= bridgestp.c
SRCS+= if_43.c uipc_syscalls_50.c
SRCS+= component.c

View File

@ -1,4 +1,4 @@
/* $NetBSD: component.c,v 1.5 2010/10/19 15:40:15 pooka Exp $ */
/* $NetBSD: component.c,v 1.6 2010/12/07 20:39:07 pooka Exp $ */
/*
* Copyright (c) 2009 Antti Kantee. All Rights Reserved.
@ -28,7 +28,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: component.c,v 1.5 2010/10/19 15:40:15 pooka Exp $");
__KERNEL_RCSID(0, "$NetBSD: component.c,v 1.6 2010/12/07 20:39:07 pooka Exp $");
#include <sys/param.h>
#include <sys/domain.h>
@ -40,6 +40,8 @@ __KERNEL_RCSID(0, "$NetBSD: component.c,v 1.5 2010/10/19 15:40:15 pooka Exp $");
#include "rump_private.h"
#include "rump_net_private.h"
extern void bridgeattach(int);
RUMP_COMPONENT(RUMP_COMPONENT_NET_ROUTE)
{
extern struct domain routedomain, linkdomain;
@ -47,6 +49,7 @@ RUMP_COMPONENT(RUMP_COMPONENT_NET_ROUTE)
ifinit1();
ifinit();
loopattach(1);
bridgeattach(1);
DOMAINADD(linkdomain);
DOMAINADD(routedomain);
}

View File

@ -1,3 +1,3 @@
/* $NetBSD: bridge.h,v 1.1 2008/10/06 00:27:06 pooka Exp $ */
/* $NetBSD: bridge.h,v 1.2 2010/12/07 20:39:07 pooka Exp $ */
/* dummy */
#define NBRIDGE 1