mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager
synced 2024-10-14 20:18:39 +00:00
shared: add nm_ether_addr_cmp()/nm_ether_addr_equal() helpers
This commit is contained in:
parent
f37dd5d394
commit
d9ca728005
|
@ -96,6 +96,22 @@ typedef struct {
|
|||
.ether_addr_octet = {__VA_ARGS__}, \
|
||||
}
|
||||
|
||||
static inline int
|
||||
nm_ether_addr_cmp(const NMEtherAddr *a, const NMEtherAddr *b)
|
||||
{
|
||||
NM_CMP_SELF(a, b);
|
||||
NM_CMP_DIRECT_MEMCMP(a, b, sizeof(NMEtherAddr));
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline gboolean
|
||||
nm_ether_addr_equal(const NMEtherAddr *a, const NMEtherAddr *b)
|
||||
{
|
||||
return nm_ether_addr_cmp(a, b) == 0;
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
typedef struct {
|
||||
union {
|
||||
guint8 addr_ptr[1];
|
||||
|
|
Loading…
Reference in a new issue