title: NetworkInterface.NetworkInterfaceType determines Wireless interface as Ethernet type in Windows 8
body: <p>I have following code for determining IPv4 for Wireless interfaces on local machine</p>
  
  <pre><code>private List&lt;IPAddressInformation&gt; GetWifiIPAddresses()
  {
      var list = new List&lt;IPAddressInformation&gt;();
      var networkInterfaces = NetworkInterface.GetAllNetworkInterfaces();
  
      foreach (var networkInterface in networkInterfaces)
      {
          if (networkInterface.NetworkInterfaceType == NetworkInterfaceType.Wireless80211)
          {
              var interfaceAddressList = networkInterface.GetIPProperties().UnicastAddresses;
              list.AddRange(interfaceAddressList.Where(interfaceIp =&gt; interfaceIp.Address.AddressFamily == AddressFamily.InterNetwork));
          }
      }
  
      return list;
  }
  </code></pre>
  
  <p>Everything works like a charm in Windows 7, however in Windows 8 my WLAN interface is determined as Ethernet adapter. (NetworkInterfaceType == NetworkInterfaceType.Ethernet instead of NetworkInterfaceType.Wireless80211)</p>
  
  <p>Here is a ipconfig screen for my WLAN
  <img src="https://i.stack.imgur.com/WELxM.png" alt="enter image description here"></p>
  
  <p>But it's a Wireless adapter, and in Windows 7 ipconfig shows it as a wireless interface.</p>
  
  <p>Any clue on how can I solve it? Is it a driver problem or a Windows 8 specifications?
  How else can I determine WLAN IP addresses on local machine?</p>
  
  <p>Thanks!</p>
  
  <p><strong>EDIT</strong>:</p>
  
  <p>It was because of Hyper-V Virtual Switch. Hyper-V Virtual Switch covers real physical adapter so .NET is unable to determine it as WiFi adapter.</p>
  
  <p>When I removed switch in "Hyper-V Virtual Switch Manager" from my physical wireless adapter to vEthernet it works fine like in Windows 7.</p>
  
  <p>But that turned virtual switch might be big problem of determining proper IP for actual physical devices.</p>