[Winpcap-users] packet redirection

Guy Harris guy at alum.mit.edu
Tue Sep 13 23:32:19 GMT 2005


On Sep 13, 2005, at 8:16 AM, Mohammad Ali Agheli wrote:

> I use winpcap in an application fir sniffing packets
> and filter HTTP packets. I want redirect bad http
> packets to x URL. How can I do it?

WinPcap lets you see packets received by the machine running your  
application, and lets you send packets from that machine.

It does not, however, let you *intercept* packets received by that  
machine.  A WinPcap-based application cannot see those packets before  
the rest of the networking stack sees the packets, and cannot prevent  
the rest of the network stack from seeing the packet as received, and  
cannot inject its own modified version of the packet.

So you can't arrange that HTTP packets sent to the machine, or from  
the machine, get redirected to another URL.

> If winpcap didnt it, where find my answer?

There *might* be a way to do this with an NDIS intermediate driver,  
but I know very little about NDIS, so I can't suggest how this would  
be done if it can be done.


More information about the Winpcap-users mailing list