none
Implementing a light weight filter driver on NDIS 6.3 RRS feed

  • Question

  • We have a light weight filter driver that runs successfully on Windows 7/ Vista. Now we need to port this driver on NDIS 6.3 Windows 8. The driver has been compiled properly on Windows 8 using Microsoft Visual Studio 2012 without any modifications in the code.

    However as there are many enhancements corresponding to NDIS 6.3, we need to implement our driver for NDIS 6.3.  But as I can see for msdn docs, virtualization & power management enhancements are in miniport drivers. So I am a bit confused as do we need to have changes in filter driver also. I am new to Windows development. So please suggest.

    • Moved by Mike Danes Monday, May 6, 2013 7:08 AM driver related
    Monday, May 6, 2013 6:57 AM

Answers

  • Actually Don, that link is for WFP callouts, which aren't quite related here.

    There are very few changes required for a filter driver to port from 6.20 -> 6.30. Basically you need to implement all the 6.20 requirements, and additionally:

    * Define the preprocessor macro NDIS630, and remove NDIS60 or any other NDIS## definitions (read the top of ndis.h).

    * When calling NdisFRegisterFilterDriver, set NdisMinorVersion to 30 in your filter driver characteristics block. (Or set it to NDIS_FILTER_MINOR_VERSION and it will always be updated automatically).

    * Make sure you're compatibile with No-Pause-On-Suspend.  For a LWF, this means you should not wait on packets in NetEventSetPower.  (Many filters already do not wait, so there is no changes required.  For the remaining filters, it's usually sufficient to just comment out a call to KeWaitForSingleObject.)


    Tuesday, May 14, 2013 7:59 PM

All replies

  • Just like there is a page on msdn that explains Porting of NDIS 6.x filter drivers to NDIS 6.20, is there any guide that helps in porting NDIS 6.x filter drivers to NDIS 6.30 . Please help.
    Monday, May 6, 2013 8:15 AM
  • As I have mentioned earlier, I have got 6.0 filter & I need to port the code to NDIS 6.3 on Windows 8.

    Compilation of filter driver code is successfull on Windows 8. Now I need to know if there is any change that I need to incorporate in the filter driver code as part of new enhancements in NDIS 6.3.

    Tuesday, May 7, 2013 5:12 AM
  • You have read http://msdn.microsoft.com/en-US/library/windows/hardware/hh440297(v=vs.85).aspx  I assume?


    Don Burn Windows Filesystem and Driver Consulting Website: http://www.windrvr.com Blog: http://msmvps.com/blogs/WinDrvr

    Wednesday, May 8, 2013 2:03 PM
  • Actually Don, that link is for WFP callouts, which aren't quite related here.

    There are very few changes required for a filter driver to port from 6.20 -> 6.30. Basically you need to implement all the 6.20 requirements, and additionally:

    * Define the preprocessor macro NDIS630, and remove NDIS60 or any other NDIS## definitions (read the top of ndis.h).

    * When calling NdisFRegisterFilterDriver, set NdisMinorVersion to 30 in your filter driver characteristics block. (Or set it to NDIS_FILTER_MINOR_VERSION and it will always be updated automatically).

    * Make sure you're compatibile with No-Pause-On-Suspend.  For a LWF, this means you should not wait on packets in NetEventSetPower.  (Many filters already do not wait, so there is no changes required.  For the remaining filters, it's usually sufficient to just comment out a call to KeWaitForSingleObject.)


    Tuesday, May 14, 2013 7:59 PM
  • Thanks for the reminder - we have the corresponding MSDN topic published now.

    Thursday, May 23, 2013 10:05 PM
  • @Jeffrey Tippet,

    How about support for 3g / 4g dongles? Would this list ever get updated / improved?


    - a citizen of Microsoft Developer Network.

    Thursday, July 11, 2013 1:43 AM
  • Windows RT devices are designed to be always connected and up-to-date (e.g., your email is already downloaded even before you turn the screen on).  In order to do this without killing battery life, we need the network adapters to support Connected Standby.  Furthermore, we need to carefully measure and tweak the power management of the NIC so that it uses as few milliwatts as possible when powered off.

    For this reason, it's not a good idea to put any off-the-shelf NIC into a Windows RT system, since the NIC will likely have a surprisingly big effect on battery life (cutting it short >1 hour) and breaking the always-connected experience (e.g., it fails to wake up and ring when there's an incoming Skype call).

    The 3G/4G adapters that are built into Windows RT devices have been carefully designed, tested, measured, and tweaked to give great battery life and work well even when the computer is "off".

    Thursday, July 11, 2013 2:05 AM
  • Thanks for your answer Jeffery.

    Firstly, why can't we have certified (NDIS 6.3 specs based) 3g/4g USB dongles? Lack of this option make Surface RT owners feel very unfortunate.

    Windows Server teaches us the difference between preference and policy.

    "The battery-optimized cards should be used with RT devices".

    Or

    "User shouldn't use 3g/4g dongle with RT devices, as they are heavy on battery."

    This is definitely a great "preference" or "recommendation", but certainly not an imposed "policy".

    How about this scenario:

    The dongle driver is built on NDIS 6.3 specifications and plugged into power on sleep enabled USB 3 port in RT device (say non-4g-supporting-nic device or Surface RT)?

    If there is a scenario, where dongle is only the option and you need it badly, RT reject the device because its not good for my batter? How about I needed it for 10 minutes?

    That's very non-Windows like attitude. The idea is to give customer more options and take user consent into consideration. After a fair warning (or recommendation) to avoid use of off-the-shelf NIC, the user may still want to take the action:

    "I understand the risk and I will not make it habit. Now continue."


    - a citizen of Microsoft Developer Network.

    Thursday, July 11, 2013 9:29 AM
  • Hi Jeffrey,

    I have also ported an LWF filter from NDIS 60 to NDIS 630 and made the changes as mentioned by you in one of your post in this thread chain.

    But I am not sure whether my filter is compatibile with No-Pause-On-Suspend as one of the tests is failing during certification of the same filter in Windows 8.

    Test : NDIS 6.5 LWF Logo test (CheckConnectivityStress).

    Please help me to figure out as i am new to the concept of NetBufferList and Ndis.

    Thanks & Regards,

    Priyata 


    priyata

    Thursday, March 20, 2014 7:30 AM