From 49d9301d467b0c1cc2aebfb86c4b38386ec5161e Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Mon, 14 Jul 2008 13:54:13 -0700 Subject: [PATCH] packets: Make Ethernet broadcast address available as a global object. --- include/packets.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/packets.h b/include/packets.h index f1abcae1..cd782952 100644 --- a/include/packets.h +++ b/include/packets.h @@ -35,11 +35,15 @@ #include #include +#include "compiler.h" #include "random.h" #include "util.h" #define ETH_ADDR_LEN 6 +static const uint8_t eth_addr_broadcast[ETH_ADDR_LEN] UNUSED + = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }; + static inline bool eth_addr_is_broadcast(const uint8_t ea[6]) { return (ea[0] & ea[1] & ea[2] & ea[3] & ea[4] & ea[5]) == 0xff; -- 2.30.2