[Winpcap-users] Determining packet size in bytes from live capture.
squarerootofeggnog at gmail.com
Mon Jun 9 18:15:26 GMT 2008
I am working on a program to monitor the network and keep track of the total
number of bytes transferred. I have tried using the statistical mode (not
sure if that is the best approach, but it seems correct) and modifying the
Bps.QuadPart for my purposes, but cannot seem to get things working just
right (maybe i am just not understanding how that works). From my
understanding "(((*(LONGLONG*)(pkt_data + 8)) * 1000000) / (delay))" will
give you the average number of bytes per second, but i'm not certain how to
translate that into simply the number of bytes transferred. It seems like it
would be something simple, and perhaps I am just not looking at it the right
So my main question is, how does one determine the size of a packet? I'm not
worried about separating the header from the data, I am simply interested in
determining and keeping track of the overall size of the packet.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Winpcap-users