Click here to Skip to main content
15,884,628 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I need to develop an application to count the total volume of downloaded and uploaded data. Does anybody know how to get these details from my system's nic and how to go about implementing such an application?

Thanks in advance,

Libin Jose
Posted
Updated 7-Dec-10 23:29pm
v6
Comments
Dave Kreskowiak 6-Dec-10 10:19am    
You can't get that information from the NIC stats. It'll be mixed in with all the other network traffic that is not Internet related.

You'd have to implement a proxy server of sorts to get Internet only statistics.

Go through the below CP Article..,

This will give an IDEA

Internet Download Limiter[^]
 
Share this answer
 
Comments
LloydA111 8-Dec-10 13:37pm    
I don't know why you were downvoted for giving them the solution, so I voted you a 5 to bring it up a bit.
fjdiewornncalwe 8-Dec-10 14:52pm    
I'll second Lloyd's comment. I think it's a great answer.
Dalek Dave 27-Dec-10 18:34pm    
Great link. CP Rides to the rescue again!
You can run a capture using a sniffer program, for example: Windump) You can then monitor the output stream of the program, or write to a file and later analyze it. Some sniffers let you generate a filter so you only capture Internet data, though. This will depend on the actual sniffer used, so check their documentation.

These CP projects may help you:
A Network Sniffer in C#[^]
Internet Traffic Firewall and Sniffer[^]
 
Share this answer
 
v8
Comments
[no name] 8-Dec-10 5:02am    
Then I have a doubt,How the sniffer program captures those details..?
wizardzz 8-Dec-10 9:54am    
Sniffers capture every single packet and record the data to a stream or a file.
Dalek Dave 27-Dec-10 18:35pm    
I have used sniffers, they work but can take a while.
Still, good answer.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900