I am thinking of desgning my first network program that would calculate bandwidth usage for hosts. Basically i think i should do this:
Since I have never worked with networking, I have no idea what headers or functions i would use. Guide me to the right direction please (even if it is google) :DCode:
monitor incommig and outgoing packets.
see where does the packet point to (ie: mydomain1.com or mydomain2.com).
store the packet size.
sum up the size of the packets to calculate total bandwidth used during that session and log it.