<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hello, Gianluca!<div><br></div><div>Thanks for reply. Maximum delay, and it's not gone away from test to test, is about 2-5 ms.. within 10000 packets and about ~15 ms maximum</div><div>value within 1000000 packets. And, i guess, very important thing, that is delay present in all of the test, doesn't meter how many times i've</div><div>run the test.&nbsp;</div><div><br></div><div>Many thanks, bye.</div><div><br><div><div>21.09.2010, Χ 3:38, Gianluca Varenni ΞΑΠΙΣΑΜ(Α):</div><br class="Apple-interchange-newline"><blockquote type="cite">
<div style="PADDING-LEFT: 10px; PADDING-RIGHT: 10px; WORD-WRAP: break-word; PADDING-TOP: 15px; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space" id="MailContainerBody" leftmargin="0" topmargin="0" canvastabstop="true" name="Compose message area">
<div><font face="Calibri">Alimjan,</font></div>
<div><font face="Calibri"></font>&nbsp;</div>
<div><font face="Calibri">what is the result that you get with this test? 
</font></div>
<div><font face="Calibri"></font>&nbsp;</div>
<div><font face="Calibri">GV</font></div>
<div style="FONT: 10pt Tahoma">
<div><br></div>
<div style="BACKGROUND: #f5f5f5">
<div style="font-color: black"><b>From:</b> <a title="mailto:alimjankuramshin@gmail.com
CTRL + Click to follow link" href="mailto:alimjankuramshin@gmail.com">Alimjan Kuramshin</a> </div>
<div><b>Sent:</b> Saturday, September 18, 2010 2:32 PM</div>
<div><b>To:</b> <a title="mailto:winpcap-users@winpcap.org
CTRL + Click to follow link" href="mailto:winpcap-users@winpcap.org">winpcap-users@winpcap.org</a> </div>
<div><b>Subject:</b> [Winpcap-users] WinPCAP packets capture 
delay..</div></div></div>
<div><br></div>Hello! 
<div><br></div>
<div>Gianluca, can u run this code on Your machine and running the Wireshark 
save the log and send it to me, please..</div>
<div>Is there any delays, i mean delays between the packets that Wireshark 
(winpcap) capture?</div>
<div><br></div>
<div>P.S. code from WinPcap documentation, sending packets, not one, but 10000 
(or 1000000)..</div>
<div><br></div>
<div><pre class="fragment"><span class="preprocessor">#include &lt;stdlib.h&gt;</span>
<span class="preprocessor">#include &lt;stdio.h&gt;</span>

<span class="preprocessor">#include &lt;pcap.h&gt;</span>


<span class="keywordtype">void</span> main(<span class="keywordtype">int</span> argc, <span class="keywordtype">char</span> **argv)
{
<a class="code" title="Descriptor of an open capture instance. This structure is opaque to the user, that..." href="http://www.winpcap.org/docs/docs_412/html/group__wpcap__def.html#ga4711d025f83503ce692efa5e45ec60a7">pcap_t</a> *fp;
<span class="keywordtype">char</span> errbuf[<a class="code" title="Size to use when allocating the buffer that contains the libpcap errors." href="http://www.winpcap.org/docs/docs_412/html/group__wpcap__def.html#gacd448353957d92c98fccc29e1fc8d927">PCAP_ERRBUF_SIZE</a>];
u_char packet[100];
<span class="keywordtype">int</span> i;</pre><pre class="fragment">volatile int n_pkts = 10000; // 1000000

    <span class="comment">/* Check the validity of the command line */</span>
    <span class="keywordflow">if</span> (argc != 2)
    {
        printf(<span class="stringliteral">"usage: %s interface (e.g. 'rpcap://eth0')"</span>, argv[0]);
        <span class="keywordflow">return</span>;
    }
    
    <span class="comment">/* Open the output device */</span>
    <span class="keywordflow">if</span> ( (fp= <a class="code" title="Open a generic source in order to capture / send (WinPcap only) traffic." href="http://www.winpcap.org/docs/docs_412/html/group__wpcapfunc.html#ga2b64c7b6490090d1d37088794f1f1791">pcap_open</a>(argv[1],            <span class="comment">// name of the device</span>
                        65536,                <span class="comment">// portion of the packet to capture (only the first 100 bytes)</span>
                        <a class="code" title="Defines if the adapter has to go in promiscuous mode." href="http://www.winpcap.org/docs/docs_412/html/group__remote__open__flags.html#ga9134ce51a9a6a7d497c3dee5affdc3b9">PCAP_OPENFLAG_PROMISCUOUS</a>,  <span class="comment">// promiscuous mode</span>
                        1000,               <span class="comment">// read timeout</span>
                        NULL,               <span class="comment">// authentication on the remote machine</span>
                        errbuf              <span class="comment">// error buffer</span>
                        ) ) == NULL)
    {
        fprintf(stderr,<span class="stringliteral">"\nUnable to open the adapter. %s is not supported by WinPcap\n"</span>, argv[1]);
        <span class="keywordflow">return</span>;
    }

    <span class="comment">/* Supposing to be on ethernet, set mac destination to 1:1:1:1:1:1 */</span>
    packet[0]=1;
    packet[1]=1;
    packet[2]=1;
    packet[3]=1;
    packet[4]=1;
    packet[5]=1;
    
    <span class="comment">/* set mac source to 2:2:2:2:2:2 */</span>
    packet[6]=2;
    packet[7]=2;
    packet[8]=2;
    packet[9]=2;
    packet[10]=2;
    packet[11]=2;
    
    <span class="comment">/* Fill the rest of the packet */</span>
    <span class="keywordflow">for</span>(i=12;i&lt;100;i++)
    {
        packet[i]=(u_char)i;
    }
<br></pre><pre class="fragment">    while (n_pkts--)
    <span class="comment">/* Send down the packet */</span>
    <span class="keywordflow">if</span> (<a class="code" title="Send a raw packet." href="http://www.winpcap.org/docs/docs_412/html/group__wpcapfunc.html#ga51dbda0f1ab9da2cfe49d657486d50b2">pcap_sendpacket</a>(fp, packet, 100 <span class="comment">/* size */</span>) != 0)
    {
        fprintf(stderr,<span class="stringliteral">"\nError sending the packet: %s\n"</span>, <a class="code" title="return the error text pertaining to the last pcap library error." href="http://www.winpcap.org/docs/docs_412/html/group__wpcapfunc.html#ga81305cb154e4497e95bbb9b708631a3a">pcap_geterr</a>(fp));
        <span class="keywordflow">return</span>;
    }

    <span class="keywordflow">return</span>;
}
</pre><pre class="fragment">/* EOF */</pre><pre class="fragment">Thanks, bye..</pre><pre class="fragment"><br></pre>
<div><br></div></div><div>
<br class="webkit-block-placeholder"></div><hr><div><br class="webkit-block-placeholder"></div>_______________________________________________<br>Winpcap-users mailing 
list<br><a href="mailto:Winpcap-users@winpcap.org">Winpcap-users@winpcap.org</a><br>https://www.winpcap.org/mailman/listinfo/winpcap-users<br></div>
_______________________________________________<br>Winpcap-users mailing list<br><a href="mailto:Winpcap-users@winpcap.org">Winpcap-users@winpcap.org</a><br>https://www.winpcap.org/mailman/listinfo/winpcap-users<br></blockquote></div><br></div></body></html>