packets: Make Ethernet broadcast address available as a global object.
authorBen Pfaff <blp@nicira.com>
Mon, 14 Jul 2008 20:54:13 +0000 (13:54 -0700)
committerBen Pfaff <blp@nicira.com>
Fri, 18 Jul 2008 20:42:37 +0000 (13:42 -0700)
include/packets.h

index f1abcae..cd78295 100644 (file)
 
 #include <stdint.h>
 #include <string.h>
+#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;