diff options
author | Timo Teräs <timo.teras@iki.fi> | 2016-01-15 17:36:33 +0200 |
---|---|---|
committer | Paul Jakma <paul.jakma@hpe.com> | 2016-02-26 14:11:46 +0000 |
commit | 954c7d6bcd04c2cf037965adda0f9d11afdcd165 (patch) | |
tree | 707ba870b0989d08a98e6b969fc1e2388f09e1c0 /zebra/interface.h | |
parent | 4d3ae716ce86c28e3979c9ae57c4e717ac5e27e4 (diff) | |
download | quagga-954c7d6bcd04c2cf037965adda0f9d11afdcd165.tar.bz2 quagga-954c7d6bcd04c2cf037965adda0f9d11afdcd165.tar.xz |
lib, zebra: unify link layer type and hardware address handling
This removes the BSD specific usage of struct sockaddr_dl
hardware address. This unifies to use explict hw_addr member for
the address, and zebra specific enumeration for the link layer
type.
Additionally the zapi is updated to never send platform specific
structures over the wire, but the ll_type along with hw_addr_len
and hw_addr are now sent for all platforms.
Based on initial work by Paul Jakma.
Signed-off-by: Timo Teräs <timo.teras@iki.fi>
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'zebra/interface.h')
-rw-r--r-- | zebra/interface.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/zebra/interface.h b/zebra/interface.h index 936156eb..dbb33c55 100644 --- a/zebra/interface.h +++ b/zebra/interface.h @@ -196,6 +196,16 @@ struct zebra_if struct irdp_interface irdp; #endif +#ifdef HAVE_STRUCT_SOCKADDR_DL + union { + /* note that sdl_storage is never accessed, it only exists to make space. + * all actual uses refer to sdl - but use sizeof(sdl_storage)! this fits + * best with C aliasing rules. */ + struct sockaddr_dl sdl; + struct sockaddr_storage sdl_storage; + }; +#endif + #ifdef SUNOS_5 /* the real IFF_UP state of the primary interface. * need this to differentiate between all interfaces being |