Detecting the Ndi\Interfaces LowerRange type of the adapter that we are attaching to in NDIS LWF?

87 Views Asked by At

Is there any clean way of detecting what is the type of the Ndi\Interfaces LowerRange of the adapter that we are attaching to in the FilterAttach of NDIS LWF?

I guess one dirty way is using the BaseMiniportInstanceName of AttachParameters in the FilterAttach, and then enumerate keys in SYSTEM\CurrentControlSet\Control\Class\{4D36E972-E325-11CE-BFC1-08002BE10318} and find the one that has the same value in DriverDesc (Or using the BaseMiniportName and comparing it to ndi\linkage\export), afterwards go to xxx\ndi\interfaces and reading the LowerRange value.

But this seems so dirty, there has to be an easier way to finding the type of Ndi\Interfaces LowerRange of the corresponding adapter? Tried looking at different members of AttachParameters but didn't find anything that can help me with this.

I'm asking this because we want to only attach to very specific virtual adapters that have a Nolower LowerRange, and considering that attaching to these type of interfaces is not supported in NDIS LWF, we only want to attach to those that we know will not cause issues, such as Kerio's Virtual Adapter.

So if there's any other way to tell the OS to only attach us to a specific adapters in case it has a nolower LowerRange (maybe by changing our INF file or using a certain API or checking a member of a structure to see if its nolower or..), please let me know.

0

There are 0 best solutions below