I'm building an application that needs to charge users based on the exact bandwidth used by their connections.
I could of course keep track of how many bytes i pass to/from send/receive but that doesn't include IP packet overhead which i'd very much like to include since we're talking lots of small packets of varying size.
I could estimate it, but i'm curious if there is a relatively simple cheep way of knowing.
For instance, in windows server 2008 there is a dialog that shows bandwidth usage pr. connection; perhaps it's possible to access this information?