[Winpcap-users] Transmitting Packets During Receive
    jklein at rockwellcollins.com 
    jklein at rockwellcollins.com
       
    Thu Jul 15 13:44:19 PDT 2010
    
    
  
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.winpcap.org/pipermail/winpcap-users/attachments/20100715/3e1a2830/attachment.htm 
    
    
More information about the Winpcap-users
mailing list