Traffic monitoring and shaping (C\C++)
I want to write a library (C\C++) which would be able to monitor network traffic (TCP and UDP) as well as limit bandwidth to a particular network area (apply different traffic shaping rules to different network zones). This library should work on Windows 7 (64-bit). I would be glad if this kind of library can be written as entirely user-mode. Right now I'm learning about Windows Filtering Platform. It seems like what I need, but there's lack of samples on the net and I've never written drivers before. I will really appreciate if someone will just nudge me in the right direction or give me an o开发者_如何学Pythonverview of how such kind of library can be implemented.
Did you take a look at the winpcap library? It's essentially the Windows version of the libpcap library widely used in the Unix world. The source of the same is available here. That'll help you get started.
I am not sure about what you mean by limiting bandwidth to a particular network area, though.
Also, in conjunction to using the WinPCap library, you can have a peek at PeerGuardian which includes a driver for filtering out peer IP addresses.
Hope this helps, Best regards, Tom.
精彩评论