network traffic

  • Thread starter Thread starter cl
  • Start date Start date
C

cl

Hello,

Does anyone know how to get number of bytes received and sent for a
machine with the IP addresses of the senders and receivers?

I have tried using System.Diagnostics.PerformanceCounter("Network
Interface", "Bytes Received/sec");

But this only gives the number of bytes received and sent, not the IP
addresses of the senders or receivers.

Thank you.
 
From my understanding this can't be done natively. You'll need to install a
separate network driver to capture this information. One of the more popular
ones is WinPcap. It's used by quite a few open source and commercial network
monitoring applications.

http://www.winpcap.org/default.htm

Andrew Faust
 
Back
Top