NDIS 6.0 Filter Driver 开发资料- 01

NDIS 6.0 Filter Driver(>下载地址<)是一个NDIS轻量级的过滤驱动(NDIS Lightweight filter driver),用来替换NDIS 5示例中间层驱动中的Passthru,适用的操作系统是Windows 8 和Windows Server 2012。

微软新出的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进行编译。

关于编译部分,以后再详细写。

Ndislwf驱动分析:

1. DriverEntry中,ndislwf驱动注册为NDIS 6过滤驱动。

2. 之后,NDIS为每一个底层的NDIS适配器配置连接,调用Ndislwf FilterAttach 句柄,

3. 在FilterAttach句柄的上下文环境中,Filter驱动调用NdisFAttribute来注册Filter模块,Filter驱动可以使用NdisOpenConfigurationEx来读取自己的设置,并调用NdisXXX函数。

4. FilterAttach成功返回后,NDIS使用FilterRestart句柄重启Filter,FilterRestart准备接受、发送数据的句柄。重启成功后,filter驱动应该能够启用发送、接收进程。

5. 如果必要,Ndislwf过滤驱动发送或者接收的数据包都会重新打包并发送给NDIS,交付给底层的NDIS驱动。

6. 所有发给底层NDIS驱动的数据都转发给Ndislwf过滤驱动。

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

驱动开发资料汇总:

http://yexin218.iteye.com/category/73148

http://yexin218.iteye.com/blog/557454


转载于:https://my.oschina.net/u/1054556/blog/137804

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值