This commit is contained in:
Birunthan Mohanathas 2012-06-26 20:41:40 +03:00
parent cfd2a7e0ed
commit d245e552f0

View File

@ -105,36 +105,33 @@ void CMeasureNet::UpdateIFTable()
for (size_t i = 0; i < c_NumOfTables; ++i) for (size_t i = 0; i < c_NumOfTables; ++i)
{ {
std::wstring type; const WCHAR* type = L"Other";
switch (ifTable->Table[i].Type) switch (ifTable->Table[i].Type)
{ {
case IF_TYPE_ETHERNET_CSMACD: case IF_TYPE_ETHERNET_CSMACD:
type += L"Ethernet"; type = L"Ethernet";
break; break;
case IF_TYPE_PPP: case IF_TYPE_PPP:
type += L"PPP"; type = L"PPP";
break; break;
case IF_TYPE_SOFTWARE_LOOPBACK: case IF_TYPE_SOFTWARE_LOOPBACK:
type += L"Loopback"; type = L"Loopback";
break; break;
case IF_TYPE_IEEE80211: case IF_TYPE_IEEE80211:
type += L"IEEE802.11"; type = L"IEEE802.11";
break; break;
case IF_TYPE_TUNNEL: case IF_TYPE_TUNNEL:
type += L"Tunnel"; type = L"Tunnel";
break; break;
case IF_TYPE_IEEE1394: case IF_TYPE_IEEE1394:
type += L"IEEE1394"; type = L"IEEE1394";
break;
default:
type += L"Other";
break; break;
} }
LogWithArgs(LOG_DEBUG, L"%i: %s", (int)i + 1, ifTable->Table[i].Description); LogWithArgs(LOG_DEBUG, L"%i: %s", (int)i + 1, ifTable->Table[i].Description);
LogWithArgs(LOG_DEBUG, L" Alias: %s", ifTable->Table[i].Alias); LogWithArgs(LOG_DEBUG, L" Alias: %s", ifTable->Table[i].Alias);
LogWithArgs(LOG_DEBUG, L" Type=%s(%i), Hardware=%s, Filter=%s", LogWithArgs(LOG_DEBUG, L" Type=%s(%i), Hardware=%s, Filter=%s",
type.c_str(), ifTable->Table[i].Type, type, ifTable->Table[i].Type,
(ifTable->Table[i].InterfaceAndOperStatusFlags.HardwareInterface == 1) ? L"Yes" : L"No", (ifTable->Table[i].InterfaceAndOperStatusFlags.HardwareInterface == 1) ? L"Yes" : L"No",
(ifTable->Table[i].InterfaceAndOperStatusFlags.FilterInterface == 1) ? L"Yes" : L"No"); (ifTable->Table[i].InterfaceAndOperStatusFlags.FilterInterface == 1) ? L"Yes" : L"No");
} }