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.h | |
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.h')
-rw-r--r-- | sys/net/bridgestp.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/net/bridgestp.h b/sys/net/bridgestp.h index 8bd7319..0f00311 100644 --- a/sys/net/bridgestp.h +++ b/sys/net/bridgestp.h @@ -185,6 +185,10 @@ */ typedef void (*bstp_state_cb_t)(struct ifnet *, int); typedef void (*bstp_rtage_cb_t)(struct ifnet *, int); +struct bstp_cb_ops { + bstp_state_cb_t bcb_state; + bstp_rtage_cb_t bcb_rtage; +}; /* * Because BPDU's do not make nicely aligned structures, two different @@ -365,7 +369,7 @@ extern const uint8_t bstp_etheraddr[]; extern void (*bstp_linkstate_p)(struct ifnet *ifp, int state); -void bstp_attach(struct bstp_state *, bstp_state_cb_t, bstp_rtage_cb_t); +void bstp_attach(struct bstp_state *, struct bstp_cb_ops *); void bstp_detach(struct bstp_state *); void bstp_init(struct bstp_state *); void bstp_stop(struct bstp_state *); |