Enabling NDIS Debug Tracing
NDIS debug tracing is the primary method for debugging NDIS drivers. When you set up NDIS debug tracing, you are actually enabling one or more levels of DbgPrint statements with NDIS. The resulting information is sufficient for debugging most network driver problems.
Enabling NDIS Debug Tracing By Setting Registry Values
You can enable different levels of debug tracing in various NDIS components by editing the registry. Typically, you should add the following entries and values to the HKLM\SYSTEM\CurrentControlSet\Services\NDIS\Parameters registry key:
"DebugLevel"=dword:00000000
"DebugSystems"=dword:000030F3
"DebugBreakPoint"=dword:00000001
The following values are acceptable for DebugBreakPoint, DebugLevel and DebugSystems:
DebugBreakPoint
Controls whether an NDIS driver will automatically break into the debugger. If this value is set to 1, NDIS will break into the debugger when a driver enters Ndis.sys's DriverEntry function.
DebugLevel
Selects the level or amount of debug tracing in the NDIS components that you select with the DebugSystems value. The following values specify levels that you can select:
Level | Description | Value |
---|---|---|
DBG_LEVEL_INFO |
All available debug information. This is the highest level of trace. |
0x00000000 |
DBG_LEVEL_LOG |
Log information. |
0x00000800 |
DBG_LEVEL_WARN |
Warnings. |
0x00001000 |
DBG_LEVEL_ERR |
Errors. |
0x00002000 |
DBG_LEVEL_FATAL |
Fatal errors, which can cause the operating system to crash. This is the lowest level of trace. |
0x00003000 |
DebugSystems
Enables debug tracing for specified NDIS components. This corresponds to using the !ndiskd.dbgsystems extension. The following values specify the NDIS components that you can select:
Component | Description | Value |
---|---|---|
DBG_COMP_INIT |
Handles adapter initialization. |
0x00000001 |
DBG_COMP_CONFIG |
Handles adapter configuration. |
0x00000002 |
DBG_COMP_SEND |
Handles sending data over the network. |
0x00000004 |
DBG_COMP_RECV |
Handles receiving data from the network. |
0x00000008 |
DBG_COMP_PROTOCOL |
Handles protocol operations. |
0x00000010 |
DBG_COMP_BIND |
Handles binding operations. |
0x00000020 |
DBG_COMP_BUSINFO |
Handles bus queries. |
0x00000040 |
DBG_COMP_REG |
Handles registry operations. |
0x00000080 |
DBG_COMP_MEMORY |
Handles memory management. |
0x00000100 |
DBG_COMP_FILTER |
Handles filter operations. |
0x00000200 |
DBG_COMP_REQUEST |
Handles requests. |
0x00000400 |
DBG_COMP_WORK_ITEM |
Handles work-item operations. |
0x00000800 |
DBG_COMP_PNP |
Handles Plug and Play operations. |
0x00001000 |
DBG_COMP_PM |
Handles power management operations. |
0x00002000 |
DBG_COMP_OPENREF |
Handles operations that open reference objects. |
0x00004000 |
DBG_COMP_LOCKS |
Handles locking operations. |
0x00008000 |
DBG_COMP_RESET |
Handles resetting operations. |
0x00010000 |
DBG_COMP_WMI |
Handles Windows Management Instrumentation operations. |
0x00020000 |
DBG_COMP_CO |
Handles Connection-Oriented NDIS. |
0x00040000 |
DBG_COMP_REF |
Handles reference operations. |
0x00080000 |
DBG_COMP_ALL |
Handles all NDIS components. |
0xFFFFFFFF |
You can select more than one NDIS component. If more than one component is selected, combine the data values with an OR operator. For example, to select DBG_COMP_PNP, DBG_COMP_PM, DBG_COMP_INIT and DBG_COMP_CONFIG, you would combine the corresponding values (0x1000, 0x2000, 0x1, and 0x2) to obtain the value 0x3003, and then set it in the registry thus:
"DebugSystems"=dword:00003003
Whenever you change registry values for debug tracing, you must restart your computer for the new settings to take effect.
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for