Click to See Complete Forum and Search --> : IP performance counter in .NET


princedom
February 13th, 2003, 08:16 AM
What I want to do is get a number of packets just like the number of send/received packet that can be found in the Status windows, if you click at the bottom right of your screen to your network connection icon (the two small in/out screens flashing the network activity).

The Received Datagrams/sec decription goes like that:
Datagrams Received/sec is the rate, in incidents per second, at which IP datagrams are received from the interfaces, including those in error. Datagrams Received/sec is a subset of Datagrams/sec.

But I want PACKETS not RATE. Is there any way I could somehow use this rate to get packets?

I want to start my application, get the counter data, do somethings, get the counter again and found the number of packets received through the use of my application.

I could also do the following: Run my application and while running it, I can have a Timer in another thread getting the values of the counter each sec. So each second I pick a value-rate of the connection, just like the Performance monitor in Administrative Tools (control panel) works. But even then I don't get packets.

Is there perhaps a calulation I have to do to get this?

Sure there must be a way since the network activity on the Network Status in the right bottom on Windows can do it.

BTW, I also run into this counter: Network Interface, counter:Packets Received/sec with the following description:
Packets Received/sec is the rate at which packets are received on the network interface.

Same here; rate.

Please help me if possible. This has become a nightmare for me.

Thank you,
Stefanos