<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.6000.16762" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT size=2>If you set the timeout to 0 (infinite timeout), mintocopy is
the factor affecting the reception.</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>pcap_next_ex (or any other WinPcap receive function) will
return</FONT></DIV>
<DIV><FONT size=2>- after the timeout (unless you used 0)</FONT></DIV>
<DIV><FONT size=2>- when at least mintocopy bytes are stored in the kernel
buffer</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>(whatever happens first).</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>It's not a bug in WinPcap, this is by design. Why are you
using an infinite timeout?</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>Have a nice day</FONT></DIV>
<DIV><FONT size=2>GV</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=mailinglists+winpcap@oliverzheng.com
href="mailto:mailinglists+winpcap@oliverzheng.com">Oliver Zheng</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> Wednesday, December 10, 2008 3:28
PM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> [Winpcap-users] Captured packets
buffered and not returned to theapplication immediately</DIV>
<DIV><BR></DIV>Hi,<BR><BR>I'm using WinPcap in an application to capture
packets, but it seems that calls made to pcap_next() do not return immediately
when a packet is received. The timeout is set to 0 (blocking indefinitely).
The packets seem to be buffered in some location, so that in order to see a
packet that just arrived, I have to capture a lot more packets for that packet
to be flushed to my application. I am comparing my results to that of
Wireshark, which seems to display packets immediately as they are
received.<BR><BR>Does anyone know what could be causing it and how it can be
fixed? I'm on Windows XP SP3, using WinPcap 4.0.2, pre-built.<BR><BR>Thanks in
advance,<BR>Oliver<BR>
<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>