<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<STYLE type=text/css>DIV {
        MARGIN: 0px
}
</STYLE>
<META content="MSHTML 6.00.2900.5726" name=GENERATOR></HEAD>
<BODY bgColor=#ffffff>
<DIV> </DIV>
<DIV style="FONT: 10pt arial">----- Original Message -----
<DIV style="BACKGROUND: #e4e4e4; font-color: black"><B>From:</B> <A
title=gianluca.varenni@gmail.com
href="mailto:gianluca.varenni@gmail.com">Gianluca Varenni</A> </DIV>
<DIV><B>To:</B> <A title=drewcrewof2@yahoo.com
href="mailto:drewcrewof2@yahoo.com">Dennis Drew</A> </DIV>
<DIV><B>Cc:</B> <A title=winpcap-users@winpcap.org
href="mailto:winpcap-users@winpcap.org">winpcap-users@winpcap.org</A> </DIV>
<DIV><B>Sent:</B> Monday, August 10, 2009 3:55 PM</DIV>
<DIV><B>Subject:</B> Re: Please take a look</DIV></DIV>
<DIV><BR></DIV>
<DIV>----- Original Message ----- </DIV>
<BLOCKQUOTE dir=ltr
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV
style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B>
<A title=drewcrewof2@yahoo.com href="mailto:drewcrewof2@yahoo.com">Dennis
Drew</A> </DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A title=gianluca.varenni@gmail.com
href="mailto:gianluca.varenni@gmail.com">Gianluca Varenni</A> </DIV>
<DIV style="FONT: 10pt arial"><B>Cc:</B> <A title=drewcrewof2@yahoo.com
href="mailto:drewcrewof2@yahoo.com">Dennis Drew</A> </DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Monday, August 10, 2009 3:29
PM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> Please take a look</DIV>
<DIV><FONT size=2></FONT><FONT size=2></FONT><BR></DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: arial, helvetica, sans-serif"><FONT
face="Courier New" size=2></FONT> </DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: arial, helvetica, sans-serif">I took
the code from this page in the second section in this page</DIV>
<DIV
style="FONT-SIZE: 12pt; FONT-FAMILY: arial, helvetica, sans-serif"> <A
href="http://www.winpcap.org/docs/docs_41b5/html/group__wpcap__tut8.html"><FONT
color=#810081>http://www.winpcap.org/docs/docs_41b5/html/group__wpcap__tut8.html</FONT></A></DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: arial, helvetica, sans-serif"><FONT
face="Courier New" size=2></FONT> </DIV>
<DIV style="FONT-SIZE: 12pt; FONT-FAMILY: arial, helvetica, sans-serif">
<P><B>Send queues</B>
<P>While <A class=el title="Send a raw packet."
href="http://www.winpcap.org/docs/docs_41b5/html/group__wpcapfunc.html#g51dbda0f1ab9da2cfe49d657486d50b2"><FONT
color=#0000ff>pcap_sendpacket()</FONT></A> offers a simple and immediate way
to send a single packet, <B>send queues </B>provides an advanced, powerful and
optimized mechanism to send a collection of packets. A send queue is a
container for a variable number of packets that will be sent to the network.
It has a size, that represents the maximum amount of bytes it can store.</P>
<P> </P>
<P>and made the attached file "SendPackets.cpp" out of the code from
the html page. I couldn't find the source in the download WinPacap
projects anywhere.</P></DIV></BLOCKQUOTE>
<P dir=ltr><FONT face="Courier New" size=2>The sample
"WpdPack\Examples-remote\sendcap" shows how to use the send queues.</FONT></P>
<BLOCKQUOTE dir=ltr
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<P style="FONT-SIZE: 12pt; FONT-FAMILY: arial, helvetica, sans-serif">See the
breakpoint in this code in my running program in the attached jpeg. The dot
pcap file I have has 234844 packets in it. I sent the 's' character to honor
the timings and it took up 98 percent of my cpu and ran for 15 mins before I
killed the debugger to get my system back.</P></BLOCKQUOTE>
<P dir=ltr
style="FONT-SIZE: 12pt; FONT-FAMILY: arial, helvetica, sans-serif"><FONT
face="Courier New" size=2>When the sync option is used, the driver uses a busy
wait loop to send the packet trying to respect the timestamps. Since we do not
have any facility to send packets at a specified time from the hardware, we
emulate it in software </FONT><FONT face="Courier New" size=2>with a busy wait
loop. This option was mainly introduced for some specific testing scenarios in
which you want to create a precise timed packet generator.</FONT></P>
<P dir=ltr
style="FONT-SIZE: 12pt; FONT-FAMILY: arial, helvetica, sans-serif"><FONT
face="Courier New" size=2>Let me know if this answers your question.<BR>Have a
nice day<BR>GV</FONT></P>
<P dir=ltr
style="FONT-SIZE: 12pt; FONT-FAMILY: arial, helvetica, sans-serif"><FONT
face="Courier New" size=2>PS: Please, do not send your emails directly to me,
please send them to the winpcap-users mailing list (that I've put in
CC).</FONT></P>
<BLOCKQUOTE dir=ltr
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<P style="FONT-SIZE: 12pt; FONT-FAMILY: arial, helvetica, sans-serif">Looks
like good code as if there were any memory leaks it would have crashed a long
time ago.</P>
<P
style="FONT-SIZE: 12pt; FONT-FAMILY: arial, helvetica, sans-serif"> </P>
<P style="FONT-SIZE: 12pt; FONT-FAMILY: arial, helvetica, sans-serif">Having
fun with winpcap!</P>
<P
style="FONT-SIZE: 12pt; FONT-FAMILY: arial, helvetica, sans-serif"> </P>
<P
style="FONT-SIZE: 12pt; FONT-FAMILY: arial, helvetica, sans-serif">Thanks,</P>
<P
style="FONT-SIZE: 12pt; FONT-FAMILY: arial, helvetica, sans-serif">Dennis</P></BLOCKQUOTE></BODY></HTML>