[Winpcap-users] opening more than one adapters..

Guybrush . vga_planets at hotmail.com
Thu Dec 14 15:23:00 GMT 2006


Hi jimmy
 
I've had some experience with winpcap and threading. Both opening several adapters at once and even trying opening more pcap handles to the same adapter.
 
Program is very stable now, but I have found out that its best if you place critical sections around pcap calls like
 
pcap_open_live and pcap_findalldevs in particular.
 
Even if you are opening 2 different adapters, calling pcap_open_live from 2 threads may cause a problem I cannot explain, I havent tried to debug it any further than to place critical sections around those calls so that there can be only thread inside these functions at a time.
 
I did the same with pcap_lookupnet, pcap_compile and pcap_setfilter.
 
In my program however I use pcap_loop to fetch packets, which works without critical sections.I've used this with winpcap 3.1.
 
 


From: jimmy_2000 at naver.comDate: Thu, 14 Dec 2006 20:34:16 +0900To: winpcap-users at winpcap.orgSubject: [Winpcap-users] opening more than one adapters..




is it possibe to open several adapters simutaneously in an process??(my application has 4 threads for each adapter)
i'm developing some sniffing tools and my machine has 4 ethernet adapters.
so i want to open all of adapters.
i want to capture packets from each adapter.
 
but on windows 2000 server, it shows critical fault and then my machine had been rebooted.
i wonder whether my code is stupid or opening more than one adapter is impossible.
 
is there anybody who has same experience ??
 
 
best regrads, jimmy.
 
 
  









새로운 기부문화의 씨앗, 해피빈!







-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.winpcap.org/pipermail/winpcap-users/attachments/20061214/6d1a0bd0/attachment.htm


More information about the Winpcap-users mailing list