X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvnet%2Fethernet%2Fethernet.h;h=9a97817262c82f8bb8cbbe067701a61285dca0d6;hb=2df39094d20ae60d2e04316f4ec058f81778cf64;hp=2a3383a9eaacfac72c3c5e83d06139f59eea8a5d;hpb=20ec7165007bd38359ea516fe5389e9e828a9d62;p=vpp.git diff --git a/src/vnet/ethernet/ethernet.h b/src/vnet/ethernet/ethernet.h index 2a3383a9eaa..9a97817262c 100644 --- a/src/vnet/ethernet/ethernet.h +++ b/src/vnet/ethernet/ethernet.h @@ -61,6 +61,12 @@ ethernet_mac_address_is_multicast_u64 (u64 a) return (a & (1ULL << (5 * 8))) != 0; } +static inline int +ethernet_mac_address_is_zero (u8 * mac) +{ + return ((*((u32 *) mac) == 0) && (*((u16 *) (mac + 4)) == 0)); +} + static_always_inline int ethernet_frame_is_tagged (u16 type) {