<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
<tt>if ps_drop=0, then the *driver* hasn´t lost packets (see Re:
[Winpcap-users] Question about the struct type pcap_t. from 28.10!)<br>
Most likely your app looses packets... <br>
...try to implement a ringbuffer in the following way: one thread just
fills the pre-allocated FIFO, another thread processes the buffer<br>
<br>
Regards<br>
Helmut<br>
</tt><br>
yulou liu schrieb:
<blockquote cite="mid:-3903147086001883442@unknownmsgid" type="cite">
<div><br>
<br>
<span class="Apple-style-span" style="font-size: medium;"><br>
</span><span class="Apple-style-span" style="font-size: medium;"><font
color="blue" face="Calibri" size="2">I have made these experiments :</font></span><span
class="Apple-style-span" style="font-size: medium;"> </span><span
class="Apple-style-span" style="font-size: medium;"><br>
</span><span class="Apple-style-span" style="font-size: medium;"><br>
</span><span class="Apple-style-span" style="font-size: medium;"><font
color="blue" face="Calibri" size="2">PC captures data packets from a
FPGA board. </font></span><span class="Apple-style-span"
style="font-size: medium;"><br>
</span><span class="Apple-style-span" style="font-size: medium;"><font
color="blue" face="Calibri" size="2"> </font></span><span
class="Apple-style-span" style="font-size: medium;"> </span><span
class="Apple-style-span" style="font-size: medium;"><br>
</span><span class="Apple-style-span" style="font-size: medium;"><font
color="blue" face="Calibri" size="2">1, I made a Loop back test that
can verify there is no packet drops between FPGA TO FPGA.</font></span><span
class="Apple-style-span" style="font-size: medium;"> </span><span
class="Apple-style-span" style="font-size: medium;"><br>
</span><span class="Apple-style-span" style="font-size: medium;"><font
face="宋体" size="2"> </font></span><span class="Apple-style-span"
style="font-size: medium;"> </span><span class="Apple-style-span"
style="font-size: medium;"><br>
</span><span class="Apple-style-span" style="font-size: medium;"><font
color="blue" face="Calibri" size="2">2Each data packets from FPGA
board has a sequence number. Then PC can figure that there are
packets drops. (the packets number that pc gets does not match the
sequence of the packets).</font></span><span class="Apple-style-span"
style="font-size: medium;"> </span><span class="Apple-style-span"
style="font-size: medium;"><br>
</span><span class="Apple-style-span" style="font-size: medium;"><font
color="blue" face="Calibri" size="2"> </font></span><span
class="Apple-style-span" style="font-size: medium;"> </span><span
class="Apple-style-span" style="font-size: medium;"><br>
</span><span class="Apple-style-span" style="font-size: medium;"><font
color="blue" face="Calibri" size="2">3, call the pcap_stats_ex() ,
the result is : ps_drop=0 . That means there is no packets drops
between the kernel buffer to user buffer. </font></span><span
class="Apple-style-span" style="font-size: medium;"><br>
</span><span class="Apple-style-span" style="font-size: medium;"><font
color="blue" face="Calibri" size="2"> </font></span><span
class="Apple-style-span" style="font-size: medium;"> </span><span
class="Apple-style-span" style="font-size: medium;"><br>
</span><span class="Apple-style-span" style="font-size: medium;"><font
color="blue" face="Calibri" size="2"> </font></span><span
class="Apple-style-span" style="font-size: medium;"> </span><span
class="Apple-style-span" style="font-size: medium;"><br>
</span><span class="Apple-style-span" style="font-size: medium;"><font
color="blue" face="Calibri" size="2">According to above , Packet
drops could occur in the system netcard to winPcap kernel
driver. Is this conclusion right ?</font></span><span
class="Apple-style-span" style="font-size: medium;"> </span><span
class="Apple-style-span" style="font-size: medium;"><br>
</span><span class="Apple-style-span" style="font-size: medium;"><font
color="blue" face="Calibri" size="2">Is it is right , what is the
suggestion ? Can it be improved to use a more professional net card
? </font></span><span class="Apple-style-span"
style="font-size: medium;"><font face="sans-serif" size="2"><br>
</font></span><span class="Apple-style-span"
style="font-size: medium;"><br>
</span><span class="Apple-style-span" style="font-size: medium;">
<pre>
</pre>
</span>
<div><br>
</div>
<div>Liuyulou</div>
</div>
<pre wrap="">
<hr size="4" width="90%">
_______________________________________________
Winpcap-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Winpcap-users@winpcap.org">Winpcap-users@winpcap.org</a>
<a class="moz-txt-link-freetext" href="https://www.winpcap.org/mailman/listinfo/winpcap-users">https://www.winpcap.org/mailman/listinfo/winpcap-users</a>
</pre>
</blockquote>
<br>
<pre class="moz-signature" cols="172">--
----------------------------------------------------------------
Ing. Helmut Vaupotitsch Phone: +43 (0)3133 3780 16
ITEC Tontechnik und Fax: +43 (0)3133 3780 9
Industrieelektronik GmbH E-mail: <a class="moz-txt-link-abbreviated" href="mailto:hv@itec-audio.com">hv@itec-audio.com</a>
A-8200 Lassnitzthal 300 URL: <a class="moz-txt-link-freetext" href="http://www.itec-audio.com">http://www.itec-audio.com</a>
----------------------------------------------------------------</pre>
</body>
</html>