[Winpcap-users] Multi-threaded application with mutiple pcap instances

Tal Cohen talc10 at hotmail.com
Sun Oct 22 12:06:02 GMT 2006



Hi,

(it seems that my previous question was discarded ... HTML...)

I'm new with pcap (C++, windows server 2003, pcap ver 3.1) and I would like 
to get some tips about a real-time appication that I have written:
1. The application create 2 threads. Each thread using its' own pcap 
instance, where each thread reads a packet, manipuilates it and then sends 
it (using the pcap instance. Read, manipulte and send are implemented on 
each pcap handler).
2. Each thread is handling different traffic (different pcap filters).
3. The 2 pcap instances share the same NIC.
4. I get a little pcap send packets errors.

Do I have to use critical sections / synchronization objects with the above? 
As I wrote, I use 2 differnet pcap instances but they share the same 
physical NIC.
What can be the reason for the pcap send packet errors? I get only a generic 
error ("send error: PacketSendPacket failed").

Thanks for the help,
Tal

_________________________________________________________________
Stay in touch with old friends and meet new ones with Windows Live Spaces 
http://clk.atdmt.com/MSN/go/msnnkwsp0070000001msn/direct/01/?href=http://spaces.live.com/spacesapi.aspx?wx_action=create&wx_url=/friends.aspx&mkt=en-us



More information about the Winpcap-users mailing list