summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--proto_ethernet.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/proto_ethernet.c b/proto_ethernet.c
index 9bb0042..bd84acc 100644
--- a/proto_ethernet.c
+++ b/proto_ethernet.c
@@ -25,6 +25,11 @@ static inline bool is_broadcast_ether_addr(const uint8_t *mac)
return (mac[0] & mac[1] & mac[2] & mac[3] & mac[4] & mac[5]) == 0xff;
}
+static inline bool is_local_ether_addr(const u8 *mac)
+{
+ return 0x02 & mac[0];
+}
+
static const char *ether_lookup_addr(const uint8_t *mac)
{
if (is_multicast_ether_addr(mac)) {
@@ -32,6 +37,8 @@ static const char *ether_lookup_addr(const uint8_t *mac)
return "Broadcast";
else
return "Multicast";
+ } else if (is_local_ether_addr(mac)) {
+ return "Locally Administered";
}
/* found no matching address, so look up the vendor from OUI */