| | |
| | | #include <iphlpapi.h> |
| | | #include <unordered_map> |
| | | #include <stdio.h> |
| | | #pragma comment(lib, "IPHLPAPI.lib") |
| | | //#pragma comment(lib, "IPHLPAPI.lib") |
| | | |
| | | #include "../../base/StringUtils.h" |
| | | #include "../../base/logger.h" |
| | |
| | | while (pAdapter) { |
| | | OsAdapterInfo ai = {}; |
| | | strncpy(ai.description, pAdapter->Description, |
| | | min(sizeof(ai.description), MAX_ADAPTER_DESCRIPTION_LENGTH)); |
| | | min((int)sizeof(ai.description), MAX_ADAPTER_DESCRIPTION_LENGTH)); |
| | | memcpy(ai.mac_address, pAdapter->Address, 8); |
| | | translate(pAdapter->IpAddressList.IpAddress.String, ai.ipv4_address); |
| | | ai.type = IFACE_TYPE_ETHERNET; |