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/bridgestp.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/bridgestp.c')
-rw-r--r-- | sys/net/bridgestp.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sys/net/bridgestp.c b/sys/net/bridgestp.c index c00a82b..7d92b2b 100644 --- a/sys/net/bridgestp.c +++ b/sys/net/bridgestp.c @@ -2087,8 +2087,7 @@ DECLARE_MODULE(bridgestp, bstp_mod, SI_SUB_PSEUDO, SI_ORDER_ANY); MODULE_VERSION(bridgestp, 1); void -bstp_attach(struct bstp_state *bs, bstp_state_cb_t state_callback, - bstp_rtage_cb_t rtage_callback) +bstp_attach(struct bstp_state *bs, struct bstp_cb_ops *cb) { BSTP_LOCK_INIT(bs); callout_init_mtx(&bs->bs_bstpcallout, &bs->bs_mtx, 0); @@ -2102,8 +2101,8 @@ bstp_attach(struct bstp_state *bs, bstp_state_cb_t state_callback, bs->bs_migration_delay = BSTP_DEFAULT_MIGRATE_DELAY; bs->bs_txholdcount = BSTP_DEFAULT_HOLD_COUNT; bs->bs_protover = BSTP_PROTO_RSTP; - bs->bs_state_cb = state_callback; - bs->bs_rtage_cb = rtage_callback; + bs->bs_state_cb = cb->bcb_state; + bs->bs_rtage_cb = cb->bcb_rtage; getmicrotime(&bs->bs_last_tc_time); |