[Winpcap-users] pcap_findalldevs Hangs when called in
Windowsservice
Richard Bellengere
RichardB at thoroughtec.com
Thu Aug 10 08:06:53 GMT 2006
Hi
Sorry - my sample app depends on way too much for me to quickly zip it
up and post it.
I'm using 3.1. I will try 4.0 and let you know what happens.
I'm using Visual C++ 2005 Express. I will try Visual Studio 2003 for
size too.
Some more information that may be of interest.
My service is compiled as a console application. When running it (in
debug mode) as a console app and not a service, pcap_findalldevs is
successful only if run from the main thread. pcap_loop can be run from
the new thread no problem. When I do the same thing in a windowed
application I can call pcap_findalldevs from the new thread without
issue.
It really smacks of a thread permissions issue. I've tried making sure
the apps and services are running as admin (because of npf and nm), but
that does not seem to help. Right now I'm trying to find out what the
difference is between a console thread and a Window thread.
Regards
RichardB
________________________________
From: winpcap-users-bounces at winpcap.org
[mailto:winpcap-users-bounces at winpcap.org] On Behalf Of Gianluca Varenni
Sent: 09 August 2006 19:15
To: winpcap-users at winpcap.org
Subject: Re: [Winpcap-users] pcap_findalldevs Hangs when called in
Windowsservice
Richard,
can you please provide a sample app showing the problem?
Which version of WinPcap are you using? WinPcap 3.1 has a known bug that
affects services based on WinPcap, bug that has been fixed in the newer
versions of WinPcap like 4.0alpha1.
Have a nice day
GV
----- Original Message -----
From: Richard Bellengere <mailto:RichardB at thoroughtec.com>
To: winpcap-users at winpcap.org
Sent: Tuesday, August 08, 2006 5:44 AM
Subject: [Winpcap-users] pcap_findalldevs Hangs when called in
Windows service
Hi.
I'm getting exactly the same thing. Did you ever get a solution
to this problem?
It seems to have something to do with findalldevs being called
from a new thread and not the process's main thread.
Thanks
RichardB
________________________________
_______________________________________________
Winpcap-users mailing list
Winpcap-users at winpcap.org
https://www.winpcap.org/mailman/listinfo/winpcap-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.winpcap.org/pipermail/winpcap-users/attachments/20060810/ffac90e5/attachment.htm
More information about the Winpcap-users
mailing list