<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=big5">
<META content="MSHTML 6.00.6000.16825" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>I don't think there is a way to get to the front of
the queue to get the latest packet. You have to sequentially read through
the queue.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Can you explain what your application is
doing? When you say you want the newest packet, what does that mean
(i.e. each packet received is the newest packet at that moment in
time)?</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>DC</FONT></DIV>
<BLOCKQUOTE
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV
style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B>
<A title=slash@realscene.com.tw href="mailto:slash@realscene.com.tw">rst</A>
</DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A title=winpcap-users@winpcap.org
href="mailto:winpcap-users@winpcap.org">winpcap-users@winpcap.org</A> </DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Monday, May 25, 2009 10:17 PM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> Re: [Winpcap-users] How can i
get the new-est packet frombuffer?HELPPLEASE~!</DIV>
<DIV><BR></DIV>
<DIV><FONT size=2>Sorry, does it has another way to do this?</FONT></DIV>
<DIV><FONT size=2>my application do lots works,</FONT></DIV>
<DIV><FONT size=2>it can't get pakcets so fast.</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>i hope i can only get the new-est packet,</FONT></DIV>
<DIV><FONT size=2>and others old packets not need.</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>Thanks for your help.</FONT></DIV>
<BLOCKQUOTE
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt 新細明體">----- Original Message ----- </DIV>
<DIV
style="BACKGROUND: #e4e4e4; FONT: 10pt 新細明體; font-color: black"><B>From:</B>
<A title=dchang@fsautomation.com href="mailto:dchang@fsautomation.com">David
Chang</A> </DIV>
<DIV style="FONT: 10pt 新細明體"><B>To:</B> <A title=winpcap-users@winpcap.org
href="mailto:winpcap-users@winpcap.org">winpcap-users@winpcap.org</A> </DIV>
<DIV style="FONT: 10pt 新細明體"><B>Sent:</B> Tuesday, May 26, 2009 12:52
PM</DIV>
<DIV style="FONT: 10pt 新細明體"><B>Subject:</B> Re: [Winpcap-users] How can i
get the new-est packet from buffer?HELPPLEASE~!</DIV>
<DIV><BR></DIV>
<DIV><FONT face=Arial size=2>Just keep calling pcap_next_ex. It's a
circular queue. That is, new data is constantly being put in the
queue. Your application has to get the data out of the queue fast
enough so that it doesn't drop packets. If you don't take the data out
of the queue fast enough (by calling pcap_next_ex), then it overwrites the
oldest data.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>DC</FONT></DIV></BLOCKQUOTE>
<P>
<HR>
<P></P>_______________________________________________<BR>Winpcap-users
mailing
list<BR>Winpcap-users@winpcap.org<BR>https://www.winpcap.org/mailman/listinfo/winpcap-users<BR></BLOCKQUOTE></BODY></HTML>