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.
Dig Deeper on Network Infrastructure
Related Q&A from Karl Triebes
Have you done any analysis of the relationship between application errors and network performance and, if so, what are your conclusions? When setting... Continue Reading
What effects will IPv6 have on managing network applications? Continue Reading
Can you recommend good network analysis and diagnostic tools that diagnose at the application layer?
To diagnose the application layer, network application expert Karl Triebes recommends these network analysis and diagnostic tools. Continue Reading