From f81c152daf2cb3eeb9d2d30d267ed52adfed5bb5 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Wed, 16 Jul 2008 13:22:11 -0700 Subject: [PATCH] New function eth_addr_is_zero(). --- include/packets.h | 4 ++++ 1 file changed, 4 insertions(+) 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]) { -- 2.30.2