Manage Learn to apply best practices and optimize your operations.

Which is the best language to use to develop a bandwidth management application?

I'd like to develop a little application for the bandwidth management under Windows XP. Which is the best language to do it?
Managing bandwidth can mean several things. If you merely want to report on the bandwidth being used, then there are free tools available. The most popular tool is MRTG, which is released under the GPL. It uses SNMP to query metrics off just about any networked computer. MRTG produces all sorts of graphs and is highly configurable. It has been around for a while and is used by system administrators all over the world. The source code (in C and Perl) is freely available, so it is a great place to start.

If you want to perform rate shaping or rate limiting to control bandwidth usage on your Windows XP computer, there are several low-cost products (FlowPatrol, for example) that classify application traffic on-the-fly. You can prioritize different traffic classes and dictate an upper bound on how much of your network link can be used by each class.

If your goal is to write your own rate shaping/limiting engine, you will need to write a network packet filter, and you'll want to do this in C/C++. I'd recommend checking out the Winsock Layered Service Provider (LSP). It is possible to call the kernel-mode TCP/IP driver from the Transport Data Interface (TDI), but if your product needs to manipulate and inspect all packets, it cannot rely on Winsock LSP. Instead, implement it with a Kernel-Mode Network Filter, which is a filter driver right above the kernel-mode TCP/IP driver. (Winsock LSP and TDI are available in the Microsoft Platform SDK that is available from the Microsoft website.) Be warned that development at either of these layers requires a thorough understanding of device driver programming.

This was last published in December 2005

Dig Deeper on Network Infrastructure

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.