Muokkaa

Jaa


NDIS Extensions (Ndiskd.dll)

This section describes commands available in !ndiskd, a debugger extension that is useful for debugging NDIS (Network Device Interface Specification) drivers. These commands enable network driver developers to see a bigger picture of the Windows networking stack and how their drivers interact with it. With !ndiskd, you can see the state of all network adapters (!ndiskd.netadapter), a visual diagram of the computer's network stack (!ndiskd.netreport), a log of traffic on the network adapters(!ndiskd.nbllog), or a list of all pending OID requests (!ndiskd.oid).

The commands can be found in Ndiskd.dll. To load the symbols, enter .reload /f ndis.sys in the debugger command window. To confirm the symbols loaded successfully, use the !lmi ndis extension and look for the phrase "Symbols loaded successfully" toward the bottom. Your output should look similar to the following example:

0: kd> !lmi ndis
Loaded Module Info: [ndis] 
         Module: ndis
   Base Address: fffff80174570000
     Image Name: ndis.sys
   Machine Type: 34404 (X64)
     Time Stamp: 938f9f4e (This is a reproducible build file hash, not a true timestamp)
           Size: 16f000
       CheckSum: 167a05
Characteristics: 22  
Debug Data Dirs: Type  Size     VA  Pointer
             CODEVIEW    21, d4060,   d2c60 RSDS - GUID: {9CC82DBE-96A0-773D-29E0-62B698C4C3A8}
               Age: 1, Pdb: ndis.pdb
                 POGO   988, d4084,   d2c84 [Data not mapped]
                REPRO    24, d4a0c,   d360c Reproducible build[Data not mapped]
     Image Type: MEMORY   - Image read successfully from loaded memory.
    Symbol Type: PDB      - Symbols loaded successfully from symbol server.
                 C:\ProgramData\Dbg\sym\ndis.pdb\9CC82DBE96A0773D29E062B698C4C3A81\ndis.pdb
    Load Report: public symbols , not source indexed 
                 C:\ProgramData\Dbg\sym\ndis.pdb\9CC82DBE96A0773D29E062B698C4C3A81\ndis.pdb

Many of the extension commands in !ndiskd present you with hyperlinks in the results they display in the debugger window. The text for these hyperlinks has been left in the samples provided to illustrate the exact format of what you will see when you run the command on your debugee machine. Some of the examples also refer explicitly to clicking on these links so you can understand typical usage flows, though the examples also provide the alternate command line forms of each command.

Common Parameters

All !ndiskd commands support the following generic parameters.

-verbose
Shows additional details.

-terse
Suppresses some boilerplate output.

-static
Suppresses some interactive output.

-dml 0|1
Controls whether DML (debugger markup language) output is enabled.

-unicode 0|1
Controls whether Unicode character output is allowed.

-indent N
Uses N spaces per level of indent.

-force
Overrides some safety checks on remote data sanity.

-tracedata
Shows verbose trace messages to debug !ndiskd itself.

Net Adapter, NDIS Driver, and General Commands

The following commands display information about the machine's network adapters, network drivers, and general commands associated with the network stack (such as rcvqueues, opens, filters, OIDs, and RW locks).

NET_BUFFER_LIST and NET_BUFFER Commands

The following commands display information relating to NET_BUFFER_LIST and NET_BUFFER structures.

NetAdapterCx Commands

The following commands display information relating to the Network Adapter WDF Class Extension NetAdapterCx and its associated structures, NET_RING_BUFFER and NET_PACKET.

Network Interface Commands

The following commands display information relating to network interfaces.

NDIS_PACKET Commands

The following commands display information about NDIS_PACKET structures. These extensions are for legacy NDIS 5.x drivers. The NDIS_PACKET structure and its associated architecture have been deprecated.

CoNDIS Commands

The following commands display information about Connection-Oriented NDIS connections.

NDIS Debugging Commands

The following commands display information relating to NDIS refcounts, event logs, stack traces, and debug traces.

WDI Commands

The following commands display information about WDI Miniport Drivers.

NDIS and !ndiskd Information Commands

The following commands display information about NDIS.sys and ndiskd.dll.

Miscellaneous Commands

For more information about designing NDIS drivers for Windows Vista and later, see the Network Driver Design Guide.

For more information about reference for NDIS drivers for Windows Vista and later, see Windows Vista and Later Networking Reference.

For a demonstration of using the !ndiskd debugger commands to debug the network stack, see the Debugging the Network Stack channel 9 video.