[Winpcap-users] WinPcap and Vista p"cap_findalldevs" Problem

Petter Gustavsson pettor at gmail.com
Mon Aug 9 06:50:28 PDT 2010


Hi,

I use WinPcap to capture packets through an application written in C. The
application is used to run on Vista, but has been used on Windows XP without
any similar problem. For most time everything works fine for me and the
other users, but sometimes there will be an error where the application will
"fail to bind to servers". This message is basically just an translation
from a problem that occur when Pcap fails to find devices (using
pcap_findalldevs(...) ) on the system. Well not entirely true, devices are
found (Ms Loopback) but the "addr" "sockaddr*" field doesn't any
information. So the pcap_if_t container that should contain all devices
recognize "MS Loopback Driver" but no valid addresses can be found, even if
there are plenty available on the system.

Netsh is used to add ip-addresses to the Vista system using script with
information like:

"netsh interface ipv4 add address name=Loopback addr=192.168.254.1
mask=255.255.128.0"
"netsh interface ipv4 add address name=Loopback addr=192.168.254.2
mask=255.255.128.0"
etc. ...

Removing these addresses and then adding them again can sometimes fix the
problem, temporarily. Is this a Vista + WinPcap problem? Really seems so.

Anyone who recognize this problem?

Best regards,
Petter Gustavsson
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.winpcap.org/pipermail/winpcap-users/attachments/20100809/32003a3b/attachment.html 


More information about the Winpcap-users mailing list