[Winpcap-users] Efficient sending huge number of UDP packets at a fixed specified rate

Сергей Мещерин sergey.metcherin at gmail.com
Fri Apr 8 05:47:28 PDT 2011


Good day, colleagues!

Do you know efficient way of sending UDP packets at a fixed rate
efficiently?

As far as I know, there are 2 functions for packets sending -
pcap_sendpacket and pcap_sendqueue_transmit. Regarding the first, it's easy
to realize this pseudocode:

while (true) {
    pcap_send_packet(...);
    delay (...);
}

But, as said in WinPcap tutorial, pcap_send_packet is inefficient if you
need high performance (and I need it).

pcap_sendqueue_transmit is optimized efficient way to send packets, but as I
can see, there is no way to specify sending rate in pcap_sendqueue_transmit,
i. e. pcap_sendqueue_transmit will send packets as fast as possible which is
not suitable in my situation.

Can you give any recommendations?

-- 
Best regards, Metcherin Sergey.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winpcap.org/pipermail/winpcap-users/attachments/20110408/85dc2d16/attachment.html>


More information about the Winpcap-users mailing list