(SIGAR-205) Vista and higher changed wireless card type to IF_TYPE_IEEE80211
This commit is contained in:
parent
feabd736de
commit
a210aa7e23
|
@ -2630,6 +2630,11 @@ static int netif_hash(char *s)
|
|||
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_net_interface_list_get(sigar_t *sigar,
|
||||
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) {
|
||||
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++);
|
||||
}
|
||||
else {
|
||||
|
|
Loading…
Reference in New Issue