diff options
author | mdodd <mdodd@FreeBSD.org> | 2003-03-21 17:53:16 +0000 |
---|---|---|
committer | mdodd <mdodd@FreeBSD.org> | 2003-03-21 17:53:16 +0000 |
commit | cda1ad1e064fd4783b1518baa707b19bd947e746 (patch) | |
tree | c9d7c27b0ae3e258aa728bc72628c7cd24b17f63 /sys/net | |
parent | 2ead165b2523224693a1fe5664761073185728e2 (diff) | |
download | FreeBSD-src-cda1ad1e064fd4783b1518baa707b19bd947e746.zip FreeBSD-src-cda1ad1e064fd4783b1518baa707b19bd947e746.tar.gz |
- Use if_broadcastaddr from struct ifnet rather than relying on
extern 'etherbroadcastaddr'.
- Make 'etherbroadcastaddr' static.
Reviewed by: imp
Diffstat (limited to 'sys/net')
-rw-r--r-- | sys/net/if_arp.h | 2 | ||||
-rw-r--r-- | sys/net/if_ethersubr.c | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/sys/net/if_arp.h b/sys/net/if_arp.h index 227a7d2..1eb8cd8 100644 --- a/sys/net/if_arp.h +++ b/sys/net/if_arp.h @@ -114,8 +114,6 @@ struct arpcom { int ac_multicnt; /* length of ac_multiaddrs list */ void *ac_netgraph; /* ng_ether(4) netgraph node info */ }; - -extern u_char etherbroadcastaddr[6]; #endif #endif /* !_NET_IF_ARP_H_ */ diff --git a/sys/net/if_ethersubr.c b/sys/net/if_ethersubr.c index b3751a9..8dfb5fb 100644 --- a/sys/net/if_ethersubr.c +++ b/sys/net/if_ethersubr.c @@ -111,9 +111,12 @@ bdg_forward_t *bdg_forward_ptr; bdgtakeifaces_t *bdgtakeifaces_ptr; struct bdg_softc *ifp2sc; +static u_char etherbroadcastaddr[ETHER_ADDR_LEN] = + { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }; + static int ether_resolvemulti(struct ifnet *, struct sockaddr **, struct sockaddr *); -u_char etherbroadcastaddr[6] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }; + #define senderr(e) do { error = (e); goto bad;} while (0) #define IFP2AC(IFP) ((struct arpcom *)IFP) |