mirror of
https://git.sr.ht/~thestr4ng3r/chiaki
synced 2025-08-21 14:03:11 -07:00
Add HostMAC in Discovery
This commit is contained in:
parent
875e8b413e
commit
1a4634f3c2
4 changed files with 14 additions and 1 deletions
|
@ -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; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue