summaryrefslogtreecommitdiffstats
path: root/sys/netinet/ip_dummynet.c
diff options
context:
space:
mode:
authorthompsa <thompsa@FreeBSD.org>2005-06-10 01:25:22 +0000
committerthompsa <thompsa@FreeBSD.org>2005-06-10 01:25:22 +0000
commitaa4ecbabe57f2faf89abfd7436f8cb2f52fd8f65 (patch)
treef5d6c3b67b4928c88f5b8229b734c605185dc4b9 /sys/netinet/ip_dummynet.c
parent7a16f375cc9af23759563f66f0ac975df581d877 (diff)
downloadFreeBSD-src-aa4ecbabe57f2faf89abfd7436f8cb2f52fd8f65.zip
FreeBSD-src-aa4ecbabe57f2faf89abfd7436f8cb2f52fd8f65.tar.gz
Add dummynet(4) support to if_bridge, this code is largely based on bridge.c.
This is the final piece to match bridge.c in functionality, we can now be a drop-in replacement. Approved by: mlaier (mentor)
Diffstat (limited to 'sys/netinet/ip_dummynet.c')
-rw-r--r--sys/netinet/ip_dummynet.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/sys/netinet/ip_dummynet.c b/sys/netinet/ip_dummynet.c
index 63a57e3..3c2aa70 100644
--- a/sys/netinet/ip_dummynet.c
+++ b/sys/netinet/ip_dummynet.c
@@ -128,6 +128,8 @@ static struct dn_flow_set *all_flow_sets = NULL ;/* list of all flow_sets */
static struct callout dn_timeout;
+extern void (*bridge_dn_p)(struct mbuf *, struct ifnet *);
+
#ifdef SYSCTL_NODE
SYSCTL_NODE(_net_inet_ip, OID_AUTO, dummynet,
CTLFLAG_RW, 0, "Dummynet");
@@ -478,6 +480,14 @@ transmit_event(struct dn_pipe *pipe)
break ;
#endif
+ case DN_TO_IFB_FWD:
+ if (bridge_dn_p != NULL)
+ ((*bridge_dn_p)(m, pkt->ifp));
+ else
+ printf("dummynet: if_bridge not loaded\n");
+
+ break;
+
case DN_TO_BDG_FWD :
/*
* The bridge requires/assumes the Ethernet header is
OpenPOWER on IntegriCloud