开发者

C#/C++ Capture local machine ip packet and drop it

开发者 https://www.devze.com 2023-01-24 06:40 出处:网络
I am working on a firewall project. So far I succeed to block packets by ip basis which is I done by windows filtering platform. But my customer does not want to block the 开发者_如何学JAVAwhole ip. H

I am working on a firewall project. So far I succeed to block packets by ip basis which is I done by windows filtering platform. But my customer does not want to block the 开发者_如何学JAVAwhole ip. He wants to block specific url. So now I need to capture each packet and read it. So far I can do that by C# raw socket. But I dont know how to drop that specific packet. Please help me out on that.


Does this help you?

http://www.osix.net/modules/article/?id=824

In this article the author reads packets in raw format and then sends them on. I think you can probably use this as a basis for what you want to do.

0

精彩评论

暂无评论...
验证码 换一张
取 消