中间层驱动需要注意的地方

来源:互联网 发布:学生空间-七天网络查分 编辑:程序博客网 时间:2024/06/18 15:13

基于passthru的中间层驱动,当修改了原始的packet之后,记得这句话:

 

 NOTE on OID_TCP_TASK_OFFLOAD - if this IM driver modifies the contents
    of data it passes through such that a lower miniport may not be able
    to perform TCP task offload, then it should not forward this OID down,
    but fail it here with the status NDIS_STATUS_NOT_SUPPORTED. This is to
    avoid performing incorrect transformations on data.

 

大意是说 当查询OID_TCP_TASK_OFFLOAD时,不能向下传递OID_TCP_TASK_OFFLOAD,屏蔽网卡的TCP_TASK_OFFLOAD功能。

MPQueryInformation函数的注释中有。

 

否则:

 

 即使最简单的tcp 3次握手都不能完成。

 

切记。!