all: remove use of struct ether_addr / ether_aton()

Lots of old code used struct ether_addr to store hardware addresses,
and ether_aton() to parse them, but more recent code generally uses
guint8 arrays, and the nm_utils_hwaddr_* methods, to be able to share
code between ETH_ALEN and INFINIBAND_ALEN cases. So update the old
code to match the new. (In many places, this ends up getting rid of
casts between struct ether_addr and guint8* anyway.)

(Also, in some places, variables were switched from struct ether_addr
to guint8[] a while back, but some code still used "&" when referring
to them even though that's unnecessary now. Clean that up.)
This commit is contained in:
Dan Winship
2014-07-07 12:04:14 -04:00
parent 0dcba8a9a0
commit ea456aaa81
28 changed files with 124 additions and 154 deletions

View File

@@ -29,7 +29,7 @@
#include "nm-connection.h"
#include "nm-platform.h"
gboolean nm_ethernet_address_is_valid (const struct ether_addr *test_addr);
gboolean nm_ethernet_address_is_valid (const guint8 *test_addr);
in_addr_t nm_utils_ip4_address_clear_host_address (in_addr_t addr, guint8 plen);
void nm_utils_ip6_address_clear_host_address (struct in6_addr *dst, const struct in6_addr *src, guint8 plen);