机器上的MAC地址/过滤掉即插即用设备的MAC地址

我有以下代码运行,并在Windows机器上最多可以使用3个WiFi和以太网适配器MAC地址填充字符数组:

IP_ADAPTER_INFO *info = NULL, *pos; DWORD size = 0; if (GetAdaptersInfo(info, &size) != ERROR_BUFFER_OVERFLOW) return; info = (IP_ADAPTER_INFO *)malloc(size); if (GetAdaptersInfo(info, &size) != ERROR_SUCCESS) return; char addresses[1024]; char buffer[1024]; memset(addresses, 0, sizeof(addresses)); memset(buffer, 0, sizeof(buffer)); int recordedAddresses = 0; for (pos = info; pos != NULL; pos = pos->Next) { if (pos->Type != IF_TYPE_IEEE80211 && pos->Type != MIB_IF_TYPE_ETHERNET) continue; if (recordedAddresses > 0) strcat_s<sizeof(addresses)>(addresses, " "); for (int i = 0; i < pos->AddressLength; i++) { sprintf_s<sizeof(buffer)>(buffer, i == 0 ? "%2.2x" : ":%2.2x", pos->Address[i]); strcat_s<sizeof(addresses)>(addresses, buffer); } recordedAddresses++; if (recordedAddresses >= 3) break; } free(info); // The array called 'addresses' now contains something like this: a0:b1:c2:d3:e4:f5 0a:1b:2c:3d:4e:5f 00:01:02:03:04:05 

我该如何检测这些IP_ADAPTER_INFO结构是否涉及即插即用设备? 有没有这样做的标准方式? 我一直在寻找一个解决scheme。 理想情况下,我希望从我的addresses列表中筛选出即插即用的WiFiencryption狗,这种encryption狗具有USB接口,并允许您通过USBencryption狗(如果可能)在Windows计算机上运行WiFi连接。

Solutions Collecting From Web of "机器上的MAC地址/过滤掉即插即用设备的MAC地址"