From: Ben Pfaff Date: Wed, 16 Jul 2008 20:22:11 +0000 (-0700) Subject: New function eth_addr_is_zero(). X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f81c152daf2cb3eeb9d2d30d267ed52adfed5bb5;p=openvswitch New function eth_addr_is_zero(). --- diff --git a/include/packets.h b/include/packets.h index 9ba55314..f1abcae1 100644 --- a/include/packets.h +++ b/include/packets.h @@ -52,6 +52,10 @@ static inline bool eth_addr_is_local(const uint8_t ea[6]) { return ea[0] & 2; } +static inline bool eth_addr_is_zero(const uint8_t ea[6]) +{ + return !(ea[0] | ea[1] | ea[2] | ea[3] | ea[4] | ea[5]); +} static inline bool eth_addr_equals(const uint8_t a[ETH_ADDR_LEN], const uint8_t b[ETH_ADDR_LEN]) {