Introduce ether_addr_equal()
This makes a code more readable for the large number of cases that use os_memcmp() to check whether two ethernet addresses are equal. Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
76616a46b9
commit
95123ab3b3
1 changed files with 5 additions and 0 deletions
|
@ -543,6 +543,11 @@ static inline int is_multicast_ether_addr(const u8 *a)
|
|||
return a[0] & 0x01;
|
||||
}
|
||||
|
||||
static inline bool ether_addr_equal(const u8 *a, const u8 *b)
|
||||
{
|
||||
return os_memcmp(a, b, ETH_ALEN) == 0;
|
||||
}
|
||||
|
||||
#define broadcast_ether_addr (const u8 *) "\xff\xff\xff\xff\xff\xff"
|
||||
|
||||
#include "wpa_debug.h"
|
||||
|
|
Loading…
Reference in a new issue