[Winpcap-users] Transmitting Packets During Receive

jklein at rockwellcollins.com jklein at rockwellcollins.com
Thu Jul 15 14:27:10 PDT 2010


Grr.. Nevermind.. The timing of this happening each time a received packet 
happened appears to be just a coincidence.. I'm more amazed now at this 
crazy coincidence then the bug causing the packets to get delayed.. :)

Thanks,
John



jklein at rockwellcollins.com 
Sent by: winpcap-users-bounces at winpcap.org
07/15/2010 03:44 PM
Please respond to
winpcap-users at winpcap.org


To
winpcap-users at winpcap.org
cc

Subject
[Winpcap-users] Transmitting Packets During Receive







Howdy, 

I have requirements to create a Traffic Generator that pushes/receives raw 
Ethernet Packets with a special EtherType. WinPcap seems to be the perfect 
tool for the job... But I have run into the following issue. 

My initial attempt had me create one pcap_t with a filter for the specific 
EtherType that was not sourced from my IP address. 

I call pcap_sendpacket on one thread and pcap_next_ex with a 20ms timeout 
on another thread. 

At first everything looked great.. Until I noticed what as I increased my 
transmit, things began to go bad. I noticed that as I increased my 
transmit, a LOT of my packets didn't make it to the destination. I sniffed 
the ethernet with a second PC and noticed that every time any packet was 
received on the transmitting PC, I didn't see any of my transmitted 
packets for several hundred milliseconds. 

It seems that there is a period of time that when a packet is received, 
that calling pcap_sendpacket is stopped? 

I thought that maybe this was due to having one pcap_t used by both the 
transmit and receive threads.. So I opened two separate pcap_t and only 
assigned the filter to the one that received packets. I got the exact same 
behavior.. 

I then completely removed the receiving thread and did not set any filter. 
All I was doing is calling pcap_sendpacket.. Still the same behavior!?! 

So again, every time my PC receives a packet, there is several hundred 
milliseconds where pcap_sendpacket is unresponsive.. What would cause 
this? 

Thanks, 
John_______________________________________________
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/20100715/b7fe5c3d/attachment.htm 


More information about the Winpcap-users mailing list