We are doing QoS (traffic control) for our server application. This server provides file download service for users and we want to give different users different priority and bandwith. Suppose the Linux server gives our applicaton a bandwith of 1M, then we will give the user who has highest priority the most bandwith.
I am going to use the Token and Token Bucket concepts to achieve this, but I don't know how to use Timer and Measurement skills to control the rate of generating Tokens, so I decide to learn from existing sw source code. Can anyone recommend some traffic control software/tools?
[update]
I want to know how to use timers to generate tokens by rate (because the tokens are generated at some rate, so we can consider the thread who gets the tokens will send the data to network interface at the same rate with that tokens being generated).