NDIS 6.0 Filter Driver(>下载地址<)是一个NDIS轻量级的过滤驱动(NDIS Lightweight filter driver),用来替换NDIS 5示例中间层驱动中的Passthru,适用的操做系统是Windows 8 和Windows Server 2012。 html
微软新出的WDK 8包含了NDIS 6.0的开发包,与Microsoft Visual Studio Ultimate 2012彻底整合,你能够使用Visual Studio开发环境编译驱动,或者使用 Windows Build Utility(MSBuild) 。若是开发Windows 8, Windows 7或者 Windows Vista的驱动程序,你能够使用Visual Studio或MSBuild进行编译;若是开发Windows XP的驱动程序,你只能使用WDK 7配套的MSBuild进行编译。 windows
关于编译部分,之后再详细写。 并发
Ndislwf驱动分析: ide
1. DriverEntry中,ndislwf驱动注册为NDIS 6过滤驱动。 函数
2. 以后,NDIS为每个底层的NDIS适配器配置链接,调用Ndislwf FilterAttach 句柄, ui
3. 在FilterAttach句柄的上下文环境中,Filter驱动调用NdisFAttribute来注册Filter模块,Filter驱动能够使用NdisOpenConfigurationEx来读取本身的设置,并调用NdisXXX函数。 spa
4. FilterAttach成功返回后,NDIS使用FilterRestart句柄重启Filter,FilterRestart准备接受、发送数据的句柄。重启成功后,filter驱动应该可以启用发送、接收进程。 操作系统
5. 若是必要,Ndislwf过滤驱动发送或者接收的数据包都会从新打包并发送给NDIS,交付给底层的NDIS驱动。 code
6. 全部发给底层NDIS驱动的数据都转发给Ndislwf过滤驱动。 htm
7. NDIS calls FilterPause handler when NDIS needs to detach the filter from the stack or there is some configuration changes in the stack. In processing the pause request from NDIS, the Ndislwf driver waits for all its own outstanding requests to be completed before it completes the pause request.
8. NDIS calls the Ndislwf driver’s FilterDetach entry point when NDIS needs to detach a filter module from NDIS stack. FilterDetach handler should free all the memory allocation done in FilterAttach, and undo the operations it did in FilterAttach Handler.
一些资料:
Passthru例程说明_licyh:http://wenku.baidu.com/view/cc3f57343968011ca3009111.html
NDIS 中间层驱动程序(IMD)开发人员指南ndis_devguide:http://wenku.baidu.com/view/55a10838376baf1ffc4fad6b.html
驱动开发资料汇总: