[Winpcap-users] How to access IPv6 addrs of interfaces from pcap_findalldevs()?

YG yagibear at gmail.com
Sun May 3 16:49:26 PDT 2009


What is the current way to access IPv6 address information for
interfaces identified with pcap_findalldevs()?

Documentation at
http://www.winpcap.org/docs/docs_40_2/html/group__wpcapfunc.html, and
derived links, suggests that pcap_findalldevs*() only return IPv4
addresses: They return pcap_if_t , which in turn has a list of
addresses in pcap_addr form, which stores addresses as
 as 32b IPv4 sockaddr type.  News
http://www.winpcap.org/misc/changelog.htm from 3 feb 04 claims
"pcap_findalldevs() and pcap_findalldevs_ex() return IPv6 addresses" &
no subsequent news withdraws that claim.  I would expect to see
sockaddr_storage used for IPv6, but in the include files, I can only
see that in inpacket32.h in the context of PacketGetNetInfoEx(), which
I don't know how to access.  The closest that I've felt to a
conclusion is from reading
http://www.winpcap.org/pipermail/winpcap-users/2005-August/000258.html
which suggests sockaddr_storage caused portability problems.

I'm using winpcap 4.0.1 with Windows XP SP3 and Visual Studio 2008.

Thanks for any help you can provide.


More information about the Winpcap-users mailing list