Compartir a través de


Enabling the NDIS Verifier

This topic explains how to enable the NDIS Verifier.

To enable the NDIS Verifier

  1. Install a checked version of Ndis.sys to the %SystemRoot%\System32\Drivers directory on the target computer.

    Note  

    Instead of installing an entire checked-build operating system, just copy the checked version of Ndis.sys onto an otherwise free-build operating system.

    Because Windows File Protection (WFP) protects against the replacement of any system files, you must start the operating system in safe mode.

     

  2. Enable the network driver that is to be verified in the input/output (I/O) manager's Driver Verifier. For more information, see Driver Verifier.

  3. Enable different levels for NDIS Verifier by adding the following Flags entry and value to the HKLM\System\CurrentControlSet\Services\NDIS\Parameters key in the registry:

    "Flags":dword:0x00000FFF
    

    The following table indicates acceptable values to set for Flags:

    Flag Bit Value

    NDIS_GFLAG_INIT_TIME

    0x00000001

    NDIS_GFLAG_TRACK_PKTS

    0x00000002

    NDIS_GFLAG_INJECT_ALLOCATION_FAILURE

    0x00000004

    NDIS_GFLAG_SPECIAL_POOL_ALLOCATION

    0x00000008

    NDIS_GFLAG_DONT_VERIFY

    0x00000100

    NDIS_GFLAG_BREAK_ON_WARNING

    0x00000200

    NDIS_GFLAG_WARNING_LEVEL_MASK

    0x00000030

    NDIS_GFLAG_WARN_LEVEL_0

    0x00000000

    NDIS_GFLAG_WARN_LEVEL_1

    0x00000010

    NDIS_GFLAG_WARN_LEVEL_2

    0x00000020

    NDIS_GFLAG_WARN_LEVEL_3

    0x00000030

     

    You can select more than one Flags bit. If more than one bit is selected, OR the values together.

    Note   Along with enabling the network driver in the Driver Verifier, you should enable NDIS debug tracing to let the Ndis.sys driver perform most of the debugging work on behalf of the network driver.

     

    By setting bits for the Flags entry, you can control how the NDIS Verifier behaves. For example, if you set the NDIS_GFLAG_BREAK_ON_WARNING bit, the debugger breaks on every warning. In addition, the various warning level bits let you specify how strictly you want NDIS to verify. The higher you set the level, the stricter NDIS Verifier is as indicated in the following examples:

    • Warning level 0 breaks on outright bugs only. For example, indicating packets before you set the filter or not registering a MiniportShutdown function.
    • Warning level 1 warns you that your driver called a function that is obsolete for Windows 2000 and later operating systems. For example, the NdisOverrideBusNumber function.
    • Warning level 2 warns you about actions that you should not implement in your driver. For example, if you wrote your driver to call the NdisReadConfiguration function instead of the NdisMQueryAdapterResources function to get the standard resources.
    • Warning level 3 warns you that your driver called a function that is obsolete for Windows XP and later operating systems. For example, the immediate functions such as NdisImmediateRead/WritePciSlotInformation. Typically, you should set the level to "Warning level 3" to detect everything.

 

 

Send comments about this topic to Microsoft