流量监控和整形 (C\C++)
我想编写一个库(C\C++),它能够监视网络流量(TCP 和 UDP)以及限制特定网络区域的带宽(对不同的网络区域应用不同的流量整形规则)。该库应该在 Windows 7(64 位)上运行。如果这种库可以完全编写为用户模式,我会很高兴。现在我正在学习Windows Filtering Platform。这似乎是我所需要的,但网上缺乏示例,而且我以前从未编写过驱动程序。如果有人能将我推向正确的方向,或者给我一个关于如何实现此类库的概述,我将非常感激。
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 overview of how such kind of library can be implemented.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您查看过 winpcap 库吗?它本质上是 Unix 世界中广泛使用的 libpcap 库的 Windows 版本。其来源可用此处。这将帮助您开始。
不过,我不确定您所说的限制特定网络区域的带宽是什么意思。
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.
此外,结合使用 WinPCap 库,您可以查看 PeerGuardian,其中包含用于过滤对等点的驱动程序IP 地址。
希望这有帮助,
此致,
汤姆.
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.