From: Ben Pfaff Date: Mon, 14 Jul 2008 20:54:13 +0000 (-0700) Subject: packets: Make Ethernet broadcast address available as a global object. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=49d9301d467b0c1cc2aebfb86c4b38386ec5161e;p=openvswitch packets: Make Ethernet broadcast address available as a global object. --- 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;