[Winpcap-users] Efficient sending huge number of UDP packets at afixed specified rate
Сергей Мещерин
sergey.metcherin at gmail.com
Fri Apr 8 08:30:36 PDT 2011
Great thanks, I'll try to play with npackets.
2011/4/8 Mark Pizzolato - WinPCap-Users <
winpcap-users-20040408 at subscriptions.pizzolato.net>
> If you want to send them precisely evenly spaced, then you have to do what
> your pseudo code suggests and suffer the consequences. You may find that
> achieving fine grained delay and high packets rates could be hard.
>
>
>
> Meanwhile, if you realize that there will be buffering in various places no
> matter what you do, you might get the same results with much lower overhead
> by sending a series of short bursts of n packets and delay between the
> bursts:
>
> While (true) {
>
> Pcap_sendqueue_transmit (npackets);
>
> Delay (…);
>
> }
>
>
>
> When n is 2 or greater the kernel transitions will be reduced accordingly.
> The right choice for n will likely depend on link speed, packet size, and
> receive buffer capacity of the where you are sending to.
>
>
>
> *From:* winpcap-users-bounces at winpcap.org [mailto:
> winpcap-users-bounces at winpcap.org] *On Behalf Of *?????? ???????
> *Sent:* Friday, April 08, 2011 5:47 AM
> *To:* winpcap-users at winpcap.org
> *Subject:* [Winpcap-users] Efficient sending huge number of UDP packets at
> afixed specified rate
>
>
>
> 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.
>
> _______________________________________________
> Winpcap-users mailing list
> Winpcap-users at winpcap.org
> https://www.winpcap.org/mailman/listinfo/winpcap-users
>
>
--
Best regards, Metcherin Sergey.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winpcap.org/pipermail/winpcap-users/attachments/20110408/b4f74175/attachment.html>
More information about the Winpcap-users
mailing list