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



[email protected] 
Sent by: [email protected]
07/15/2010 03:44 PM
Please respond to
[email protected]


To
[email protected]
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
[email protected]
https://www.winpcap.org/mailman/listinfo/winpcap-users

_______________________________________________
Winpcap-users mailing list
[email protected]
https://www.winpcap.org/mailman/listinfo/winpcap-users

Reply via email to