我想使用 Winpcap 库过滤(丢弃)传入和传出的数据包。
是否可以使用Winpcap过滤数据包?
最佳答案
编辑:您的意思似乎是要使用 WinPcap 阻止来自主机 TCP/IP 堆栈的传入或传出数据包。 That it cannot do ;
WinPcap receives and sends the packets independently from the host protocols, like TCP-IP. This means that it isn't able to block, filter or manipulate the traffic generated by other programs on the same machine: it simply "sniffs" the packets that transit on the wire. Therefore, it does not provide the appropriate support for applications like traffic shapers, QoS schedulers and personal firewalls.
如果只是过滤您想要捕获/监听的流量,那么是的,the tutorial有一个页面。
关于packet - 是否可以使用 Winpcap 过滤(丢弃)数据包?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16654030/