[Winpcap-users] PacketReceivePacket is returning less than MinToCopy bytes
shrinivas balulad
shrinivas_balulad at yahoo.co.in
Tue Mar 24 03:53:09 PDT 2009
Hi all,
I am using winpcap 4.0.0.901.
I am trying to capture traffic @ 270mbps.
OS - WindowsXP
machine - Intel Core 2 Quad CPU 2.4GHz, 4GB RAM
NIC - Intel(R) 82566DC-2 Gigabit Network
for winpcap I have set PacketSetMinToCopy as 256k and PacketSetReadTimeout is 1 sec.
from mailing list and user manuals I learnt that PacketReceivePacket() should return if either of below conditions is met
- MinToCopy bytes have been copied
- ReadTimeout expires
I am just checking lpPacket->ulBytesReceived after every read and I found that PacketReceivePacket() is returning bytes that ranges from 1k to more than 256k.
At 270mbps traffic, we can not expect ReadTimeout expiry. So only condition for PacketReceivePacket() to return is 'MinToCopy bytes have been copied'. But what I observed is only 1% of time it has returned 256k rest 99% of attempts have returned values ranging from 1k to more than 256k (2%). What I expect here is PacketReceivePacket() should return 256k in most cases @270mbps traffic as per above conditions.
And NIC stats show that OID_GEN_RCV_NO_BUFFER is zero and winpcap stats also say that no dropped frames.
Let me know whether my understanding of PacketReceivePacket is wrong? or In what conditions PacketReceivePacket() can return less than mintocopy bytes even though there is no readtimeout expiry?
Thanks in advance for any help.
Regards,
Shrinivas
Add more friends to your messenger and enjoy! Go to http://messenger.yahoo.com/invite/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.winpcap.org/pipermail/winpcap-users/attachments/20090324/66399a3e/attachment.htm
More information about the Winpcap-users
mailing list