Noam,

I may go about doing it like this -

Create 2 threads - one to alloc and fill up sendqueues (as many as
required to accomodate the 400MB file); the second to transmit the
sendqueues prepared by the first thread, one immediately after the
other. When transmit of a sendqueue is finished, the second thread
signals the first that has finished with a particular sendqueue and
the first thread may destroy it.

This of course assumes that time required to fill up a sendqueue is
less than the time required to transmit it so that the second thread
never has to wait - which may or may not always be the case.

This is the scheme I had in mind when I suggested the
feature/workaround of having a special last pkt of length 0 to
maintain timing across sendqueues.

Please note that I'm a developer "using" WinPcap, not a contributing
WinPcap developer. GV or someone else may have a better solution to
your problem.

Good Luck!

Adagio

On Tue, Nov 10, 2009 at 1:30 AM,  <[email protected]> wrote:
> Date: Sun, 8 Nov 2009 12:42:01 -0800
> From: Noam Cohen <[email protected]>
> Subject: [Winpcap-users] open question: exact timing with
>        pcap_sendqueue_transmit
> To: "[email protected]" <[email protected]>
> Message-ID:
>        <[email protected]>
> Content-Type: text/plain; charset="us-ascii"
>
> Hi
> Somehow my question was left unanswered. Can anyone from the developers 
> relate to it ?(and to the PS below)
> Thanks
> Noam Cohen
>
> -----Original Message-----
> From: Noam Cohen
> Sent: Sunday, November 01, 2009 9:24 AM
> To: '[email protected]'
> Subject: RE: Winpcap-users Digest, Vol 55, Issue 22
>
> Adding a (special) packet to the first call of pcap_sendqueue_transmit() in 
> order to 'link' the time with the second call is problematic
> since not always the caller can know the required transmission time of the 
> second call during the first call.
>
> Why not adding a flag that will say "use same time base since first call": 
> pcap_sendqueue_transmit(... , bool usePreviousTimeBase = false),
>  or even better: add a new function pcap_set_sendqueue_time_base(timeval* 
> origin). If this function is called, all transmissions will use this time 
> base.
>
> PS: how do people transmit long files? Use your own busy loop?
>
> Noam
_______________________________________________
Winpcap-users mailing list
[email protected]
https://www.winpcap.org/mailman/listinfo/winpcap-users

Reply via email to