How to retrieve number of bytes sent
I was wondering if anyone knew how to retrieve the total amount of data sent on a interface (eth0, ppp0 etc.).
I want to do this from a C-program or perhaps from a shell-script.
The quick and dirty way would be to issue ifconfig and then parse out the data needed from the output.
But this solution does not appeal to me at all. After all ifconfig must be able to this by some means.
Are there some ioctl calls (would be super) that I can make?
Sincerly Kristoffer Nordström
Last edited by AzidStar; 02-24-2005 at 03:09 AM.