From a210aa7e235f176441637544e9456a80da2cf2b0 Mon Sep 17 00:00:00 2001 From: Doug MacEachern Date: Fri, 5 Feb 2010 14:41:35 -0800 Subject: [PATCH] (SIGAR-205) Vista and higher changed wireless card type to IF_TYPE_IEEE80211 --- src/os/win32/win32_sigar.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/os/win32/win32_sigar.c b/src/os/win32/win32_sigar.c index bbca0321..d029d4d0 100755 --- a/src/os/win32/win32_sigar.c +++ b/src/os/win32/win32_sigar.c @@ -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 {