diff options
author | luigi <luigi@FreeBSD.org> | 2004-04-24 22:11:13 +0000 |
---|---|---|
committer | luigi <luigi@FreeBSD.org> | 2004-04-24 22:11:13 +0000 |
commit | 3a8abc28c71571f64f0c8f164fc61607842587d0 (patch) | |
tree | f7c378b78b00db54f66e294835ed53044c6bdb7d /sys | |
parent | 2bf1ef1335a66dc8c323492d7487fc8572002511 (diff) | |
download | FreeBSD-src-3a8abc28c71571f64f0c8f164fc61607842587d0.zip FreeBSD-src-3a8abc28c71571f64f0c8f164fc61607842587d0.tar.gz |
arpcom untangling:
do not use struct arpcom directly, rather use IFP2AC(ifp).
Diffstat (limited to 'sys')
-rw-r--r-- | sys/net/bridge.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/sys/net/bridge.c b/sys/net/bridge.c index 74f6f00..5aa72ea 100644 --- a/sys/net/bridge.c +++ b/sys/net/bridge.c @@ -99,15 +99,16 @@ #include <sys/kernel.h> #include <sys/sysctl.h> +#include <net/ethernet.h> #include <net/if.h> +#include <net/if_arp.h> /* for struct arpcom */ #include <net/if_types.h> #include <net/if_var.h> -#include <netinet/in.h> /* for struct arpcom */ +#include <netinet/in.h> #include <netinet/in_systm.h> #include <netinet/in_var.h> #include <netinet/ip.h> -#include <netinet/if_ether.h> /* for struct arpcom */ #ifdef PFIL_HOOKS #include <net/pfil.h> @@ -299,7 +300,7 @@ static struct callout bdg_callout; * updating pointers in ifp2sc. */ static struct cluster_softc * -add_cluster(u_int16_t cluster_id, struct arpcom *ac) +add_cluster(u_int16_t cluster_id, struct ifnet *ifp) { struct cluster_softc *c = NULL; int i; @@ -353,7 +354,7 @@ add_cluster(u_int16_t cluster_id, struct arpcom *ac) n_clusters++; found: c = clusters + i; /* the right cluster ... */ - ETHER_ADDR_COPY(c->my_macs[c->ports].etheraddr, ac->ac_enaddr); + ETHER_ADDR_COPY(c->my_macs[c->ports].etheraddr, IFP2AC(ifp)->ac_enaddr); c->ports++; return c; bad: @@ -532,7 +533,7 @@ parse_bdg_cfg(void) printf("%s already used, skipping\n", ifp->if_xname); break; } - b->cluster = add_cluster(htons(cluster), (struct arpcom *)ifp); + b->cluster = add_cluster(htons(cluster), ifp); b->flags |= IFF_USED ; snprintf(bdg_stats.s[ifp->if_index].name, sizeof(bdg_stats.s[ifp->if_index].name), |