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:
Jouni Malinen 2024-01-13 23:05:52 +02:00
parent 76616a46b9
commit 95123ab3b3

View file

@ -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"