Closed mexmer closed 1 year ago
This looks solid to me.
Merged with 6fcb8794592c8b275e615a6bc863c8c10e978174 (using a better commit message)
@nikias there is still question, what should be actual output. on my computer, it returns VPN virtual adapter mac.
when we enumerating ethernet adapters in our software, we filter them, so only those, that have class ethernet or wifi are present, which removes lot of virtual adapters (not all, but vpn adapters are filtered out).
it would need some research and aditionl coding, if it's possible on cygwin. you replacement method for win32 can do that with simple check when you iterater trough output from GetAdaptersAddresses
if (a->IfType != IF_TYPE_ETHERNET_CSMACD && a->IfType != IF_TYPE_IEEE80211)
continue;
fixed compilation in proper way (handling hw addr according to cygwin socket.h). it does return mac address (tested on msys and cygwin)