I am trying to make a module for a firewall, that will allow bandwidth limitation for each aplication that has a rule defined for it. The firewall is using
WinPKFilter and LHMON api. Any ideea where should i begin ?
Determine all connections for the application (with LHMON) and limit bandwidth for these connections. Usually bandwidth limit is realized using packets queue and timer. An example, timer triggeres each 100 ms, in the timer routine you calculate how many ms passed since last timer (Windows is not RTOS) and calculate how many bytes you can process from the application associated packets queue. After this you should process as many packets from the queue as covered by these bytes.