Merge branch 'sigar-1.6'

This commit is contained in:
Doug MacEachern 2010-02-05 14:41:45 -08:00
commit 6193cb516f
1 changed files with 8 additions and 1 deletions

View File

@ -2631,6 +2631,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)
@ -2673,7 +2678,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 {