packets: Make Ethernet broadcast address available as a global object.

This commit is contained in:
Ben Pfaff
2008-07-14 13:54:13 -07:00
parent 0ad4720dc6
commit 49d9301d46
+4
View File
@@ -35,11 +35,15 @@
#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;