aboutsummaryrefslogtreecommitdiffstats
path: root/src/utils
diff options
context:
space:
mode:
authorAnton Nayshtut <qca_antonn@qca.qualcomm.com>2015-01-27 14:30:08 (GMT)
committerJouni Malinen <j@w1.fi>2015-07-16 09:33:29 (GMT)
commit36209df93ad9569a86305ac101e4699c9af84655 (patch)
treeddd9e579e766ad7dc20176bee75d5e6645b40333 /src/utils
parentee1e3f57b58498882adbfa75633b0931000f5264 (diff)
downloadhostap-36209df93ad9569a86305ac101e4699c9af84655.zip
hostap-36209df93ad9569a86305ac101e4699c9af84655.tar.gz
hostap-36209df93ad9569a86305ac101e4699c9af84655.tar.bz2
Add is_multicast_ether_addr()
This helper function can be used to check whether a MAC address is a multicast (including broadcast) address. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
Diffstat (limited to 'src/utils')
-rw-r--r--src/utils/common.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/utils/common.h b/src/utils/common.h
index 651ce2e..6f2cfba 100644
--- a/src/utils/common.h
+++ b/src/utils/common.h
@@ -518,6 +518,11 @@ static inline int is_broadcast_ether_addr(const u8 *a)
return (a[0] & a[1] & a[2] & a[3] & a[4] & a[5]) == 0xff;
}
+static inline int is_multicast_ether_addr(const u8 *a)
+{
+ return a[0] & 0x01;
+}
+
#define broadcast_ether_addr (const u8 *) "\xff\xff\xff\xff\xff\xff"
#include "wpa_debug.h"