(SIGAR-205) Vista and higher changed wireless card type to IF_TYPE_IEEE80211

This commit is contained in:
Doug MacEachern 2010-02-05 14:41:35 -08:00
parent feabd736de
commit a210aa7e23
1 changed files with 8 additions and 1 deletions

View File

@ -2630,6 +2630,11 @@ static int netif_hash(char *s)
return hash; return hash;
} }
/* Vista and later, wireless network cards are reported as IF_TYPE_IEEE80211 */
#ifndef IF_TYPE_IEEE80211
#define IF_TYPE_IEEE80211 71
#endif
SIGAR_DECLARE(int) SIGAR_DECLARE(int)
sigar_net_interface_list_get(sigar_t *sigar, sigar_net_interface_list_get(sigar_t *sigar,
sigar_net_interface_list_t *iflist) sigar_net_interface_list_t *iflist)
@ -2672,7 +2677,9 @@ sigar_net_interface_list_get(sigar_t *sigar,
else if (ifr->dwType == MIB_IF_TYPE_LOOPBACK) { else if (ifr->dwType == MIB_IF_TYPE_LOOPBACK) {
sprintf(name, "lo%d", lo++); sprintf(name, "lo%d", lo++);
} }
else if (ifr->dwType == MIB_IF_TYPE_ETHERNET) { else if ((ifr->dwType == MIB_IF_TYPE_ETHERNET) ||
(ifr->dwType == IF_TYPE_IEEE80211))
{
sprintf(name, "eth%d", eth++); sprintf(name, "eth%d", eth++);
} }
else { else {