[Winpcap-users] Using (Win)Pcap to calculate Throughput

Isara Anantavrasilp isara.a at gmail.com
Thu Jul 28 14:03:13 GMT 2005


Thanks a lot for the tip.
When I meant "flow", I meant both TCP and UDP.
However, I dont think that matters, does it?
I think using time stamp would be the way to calculate the average 
throughput.

However, I would like to go a little further by calculate peak throughput.

I might do with quite the same idea though.
By running through the captured packets, I can figure in each second, how 
many packets went through.
With this, I can calculate peak bandwidth or the connection.

Does anyone have any suggestion?

-- Isara

On 7/27/05, Guy Harris <guy at alum.mit.edu> wrote:
> 
> Isara Anantavrasilp wrote:
> 
> > Plus, what I really like to know is how to calculate t-put of each
> > "flow" (i.e. each connection).
> > As I read the WinPcap manual, I understand that one cannot distinguish
> > the "flow" from just raw packet data.
> > (At least WinPcap wont do this for us.)
> 
> WinPcap is libpcap for Windows, and determining flows isn't libpcap's
> job - that's the job of the application using WinPcap.
> 
> If by "flow" you mean TCP connection, you'd identify the flow to which a
> packet belongs by checking
> 
> 1) whether the packet is a TCP packet at all;
> 
> 2) if it is, checking the source and destination IPv4/IPv6 addresses
> and TCP port numbers.
> 
> > Therefore I would like to ask if someone has any idea how to calculate
> > flow t-put?
> 
> You'd use the sizes of all packets in the flow (or of the payload of all
> packets in the flow, if that's the throughput you want) and the time
> stamps of the first and last packets in the flow to determine the
> throughput of the flow (or of each side of the flow).
> _______________________________________________
> Winpcap-users mailing list
> Winpcap-users at winpcap.org
> https://www.winpcap.org/mailman/listinfo/winpcap-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.winpcap.org/pipermail/winpcap-users/attachments/20050728/13e557f9/attachment.html


More information about the Winpcap-users mailing list