New function eth_addr_is_zero().
authorBen Pfaff <blp@nicira.com>
Wed, 16 Jul 2008 20:22:11 +0000 (13:22 -0700)
committerBen Pfaff <blp@nicira.com>
Fri, 18 Jul 2008 20:23:23 +0000 (13:23 -0700)
include/packets.h

index 9ba55314b7e50c75da08ecb38c9565a0f64eb89b..f1abcae181d7ebfbf7170a18f76a3db6dbac3e78 100644 (file)
@@ -52,6 +52,10 @@ static inline bool eth_addr_is_local(const uint8_t ea[6])
 {
     return ea[0] & 2;
 }
 {
     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]) 
 {
 static inline bool eth_addr_equals(const uint8_t a[ETH_ADDR_LEN],
                                    const uint8_t b[ETH_ADDR_LEN]) 
 {