diff options
author | thompsa <thompsa@FreeBSD.org> | 2007-03-09 19:34:55 +0000 |
---|---|---|
committer | thompsa <thompsa@FreeBSD.org> | 2007-03-09 19:34:55 +0000 |
commit | 8841e4c9635cf64e7bdc0feb3f8a682c6dfa4536 (patch) | |
tree | 26e0ee62cc6087ebb2074c06a93ea57a62c6d0ef /sys/net/if_bridge.c | |
parent | 7ed96d1442476c9354d0d2bdb16e62654dd1d0e2 (diff) | |
download | FreeBSD-src-8841e4c9635cf64e7bdc0feb3f8a682c6dfa4536.zip FreeBSD-src-8841e4c9635cf64e7bdc0feb3f8a682c6dfa4536.tar.gz |
Change the passing of callbacks to a struct in case this needs to be extended in the future.
Diffstat (limited to 'sys/net/if_bridge.c')
-rw-r--r-- | sys/net/if_bridge.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/net/if_bridge.c b/sys/net/if_bridge.c index 5615a5b..dff6832 100644 --- a/sys/net/if_bridge.c +++ b/sys/net/if_bridge.c @@ -318,6 +318,11 @@ static int bridge_ip6_checkbasic(struct mbuf **mp); static int bridge_fragment(struct ifnet *, struct mbuf *, struct ether_header *, int, struct llc *); +static struct bstp_cb_ops bridge_ops = { + .bcb_state = bridge_state_change, + .bcb_rtage = bridge_rtable_expire +}; + SYSCTL_DECL(_net_link); SYSCTL_NODE(_net_link, IFT_BRIDGE, bridge, CTLFLAG_RW, 0, "Bridge"); @@ -583,7 +588,7 @@ bridge_clone_create(struct if_clone *ifc, int unit, caddr_t params) mtx_unlock(&bridge_list_mtx); } - bstp_attach(&sc->sc_stp, bridge_state_change, bridge_rtable_expire); + bstp_attach(&sc->sc_stp, &bridge_ops); ether_ifattach(ifp, eaddr); /* Now undo some of the damage... */ ifp->if_baudrate = 0; |