title: Error getting WinPcap address information
body: <p>Hello i am having some problem getting network card address information from the WinPcap driver. I have noticed that whenever IPv6 is enabled for a particular NIC, the address information for it becomes 0.0.0.0. How can i fix this?</p>
  
  <pre><code>pcap_addr* address = GetDeviceAddress(1);
  
  cout&lt;&lt;"IP address "&lt;&lt;iptos(((struct sockaddr_in *)address-&gt;addr)-&gt;sin_addr.s_addr)&lt;&lt;endl;
  /////////////
  
  pcap_addr* GetDeviceAddress(int index)//Gets the name of a device using the zero based index of its location in the list
      {
          int i=0;
              if(pcap_findalldevs_ex(PCAP_SRC_IF_STRING,NULL,&amp;AllDevices,errbuf) != -1)
                  for(Iterator=AllDevices;Iterator!=NULL;Iterator=Iterator-&gt;next)
                  {
                      if(i==index)
                      {
                          return Iterator-&gt;addresses;
                      }
                  i++;
                  }
                  return NULL;
      }
  </code></pre>