Re: Re: Developping a forwarding application

Home Forums Discussions Support Portal Developing a forwarding application Re: Re: Developping a forwarding application


Vadim Smirnov

if (packet.source == x.x.x.x || packet.destination == y.y.y.y) then forward(packet, ipdest).

Is that possible to define this kind of rules with the WinpkFilter framework ?

Yes, this is possible. However you have to write the forwarding code by yourself.

I noticed that some virtual interfaces don’t appear in the adapters list (such as ms loopback adapters). In spite of it, could I be able to forward packets to a virtual interface ?

WInpkFilter NDIS IM driver binds only to ethernet and wan media (defined by FilterMediaTypse in INF files). Probably Microsoft Loopback adapter specifies his media as nolower. It is possible to change WInpkFilter INF files to bind to this type of network interfaces, although I find this unsafe (as you may bind to intarfaces you don’t need at all). The safer way is using different virtual network interface like VirtNet available on this web-site. VirtNet declares itself as ethernet interface.

Finally, I already have an application that should integrate this new functionnality. Is there a difference in terms of performance between kernel or user mode for this kind of application ?

Of course kernel mode implementation is faster. You don’t have to waste processor cycles for transition packets from user to kernel and back. However, CPU on desktop computers these days are powerful enough to smooth the difference.