Tech Support > Microsoft Windows > Drivers > Need help on a Ndis 6.0 Filter Driver for vista
Need help on a Ndis 6.0 Filter Driver for vista
Posted by Jean on March 22nd, 2007


Hi,

I'm new to Ndis driver development so please don't be to rude with me.
I'm currently writing a filter driver Ndis 6.0 as I don't need backward
compatibility in order to block/accept what comes in and out network cards. I
used the sample from WDK and things seem to work pretty well.
One problem arises when I mount a Virtual Interface like for a exemple when
using a VPN as I don't see the packets that are coming to and from that new
Virtual Interface. It also seems impossible to install my filter driver on
that new interface in the same way as I did it before (inf file...)
I heard that until Ndis 5 it was mandatory to hook functions into protocol
drivers in order to capture what was coming from the virtual adapter as it
did'nt use the same driver stack.
Is it still possible with Ndis 6 and maybe better is there a more "legal"
solution like for exemple creating a mux driver (n->1) ?

Thanks in advance

Jean

Posted by Anton Bassov on March 23rd, 2007


1.What is NDIS version of the target virtual adapter?

2. If it is below 6, what is the target media that virtual miniport
emulates? Vista does not support FDDI and Arcnet at all, and support for TR
and ATM is provided only for NDIS 5 miniports. To be honest, I really don't
know what happens if you try to bind LWF to NDIS 5 miniport that supports
"legacy" media....


I thought that LWFs are much easier to write properly, compared to NDIS 5 IM
filter.
Judging from your post, I was much too optimistic.....

Anton Bassov



"Jean" wrote:

Posted by Jean on March 28th, 2007


Hi,

Thanks for your answer.

The driver of the virtual adapter is using NdisMRegisterMiniport so I'm
assuming it is using Ndis 5.X but my filter should also work for Ndis 6.0
virtual adapters and I'm nearly sure that the same problem will arise.

I don't know how to check wich media the driver can support. The goal is to
put the filter driver on top of the virtual adapter and if it works only for
a simple ethernet connection it would already be a great start. As you
suggested maybe the fact that the 5.X driver support more media make it not
compatible for 6.X drivers. It would really be too bad.

Maybe one first step would be to detect that a new Virtual Adapter as been
created (I don't know how to do that maybe by sending OIDs to the physical
adapter ?) as I did'nt see any callback that is called when the VPN interface
is created.
Another step would be to bind on that virtual adapter (maybe it's not
possible and hooking upper driver like protocol driver would maybe be the
only solution).

Do you have an opinion on what I should do next as MSDN seems not to speak
at all about that problem (as a non native english-speaker MSDN for NDIS is
really an ugly thing).

Thank you

"Anton Bassov" wrote:


Similar Posts