Add HostMAC in Discovery

This commit is contained in:
Florian Märkl 2019-08-15 22:14:24 +02:00
commit 1a4634f3c2
No known key found for this signature in database
GPG key ID: 125BC8A5A6A1E857
4 changed files with 14 additions and 1 deletions

View file

@ -32,6 +32,7 @@ class HostMAC
HostMAC() { memset(mac, 0, sizeof(mac)); }
explicit HostMAC(const uint8_t mac[6]) { memcpy(this->mac, mac, sizeof(this->mac)); }
const uint8_t *GetMAC() const { return mac; }
QString ToString() const { return QByteArray((const char *)mac, sizeof(mac)).toHex(); }
};
static bool operator==(const HostMAC &a, const HostMAC &b) { return memcmp(a.GetMAC(), b.GetMAC(), 6) == 0; }