2

i have check IPv4InterfaceStatistics Class of C# and its seems it display all Information of your Network, from bandwidth download / upload, Packet Sent / Rcvd, and Speed of your LAN,

Upon checking the properties, i have found out that all of the properties are GET only.

Is there a way for us to set / limit the bandwidth of download / upload?

thanks in advance.

PS : I need to create an application that will limit the bandwidth of a PC. Thanks

jhaypee
  • 29
  • 2

2 Answers2

2

To do that you will need to create a driver, which is not possible to do in C# (or any other managed language). So at least part of your application will need to be written in C or C++.

Community
  • 1
  • 1
Jon
  • 428,835
  • 81
  • 738
  • 806
  • hi Jon, your telling me it would be impossible to control / limit the current bandwidth of the PC using a c# program. So theres no way for me to manipulate IPv4InterfaceStatistics since its just a information and activity of my NETWORK CARD? thanks jon for the reply – jhaypee Sep 09 '11 at 07:08
  • @jhaypee: Yes, that's what I 'm saying. You can use a C# program as the user interface, but to actually *do* anything you need native code (the C# program would call this code in the driver after receiving input from the user). – Jon Sep 09 '11 at 07:16
0

Maybe TcpDump

will solve you're issue ,learn how to use it than maybe you can control it from C# as a process ,if Tcpdump can't do that ,that give a try with Wireshark i think Wireshark can be implemented within C#

Rosmarine Popcorn
  • 10,761
  • 11
  • 59
  • 89