Читаем Windows® Internals, Sixth Edition, Part 1 полностью

The Ndiskd kernel debugger extension library includes the !miniports and !miniport commands, which let you list the loaded miniports using a kernel debugger and, given the address of a miniport block (a data structure Windows uses to track miniports), see detailed information about the miniport driver. The following example shows the !miniports and !miniport commands being used to list all the miniports and then specifics about the miniport responsible for interfacing the system to a PCI Ethernet adapter. (Note that WAN miniport drivers work with dial-up connections.)lkd> .load ndiskd Loaded ndiskd extension DLL lkd> !miniports NDIS Driver verifier level: 0 NDIS Failed allocations : 0 Miniport Driver Block: 86880d78, Version 0.0 Miniport: 868cf0e8, NetLuidIndex: 1, IfIndex: 9, RAS Async Adapter Miniport Driver Block: 84c3be60, Version 4.0 Miniport: 84c3c0e8, NetLuidIndex: 3, IfIndex: 15, VMware Virtual Ethernet Adapter Miniport Driver Block: 84c29240, Version 0.0 Miniport: 84c2b438, NetLuidIndex: 0, IfIndex: 2, WAN Miniport (SSTP) ... lkd> !miniport 84bcc0e8 Miniport 84bcc0e8 : Broadcom NetXtreme 57xx Gigabit Controller, v6.0 AdapterContext : 85f6b000 Flags : 0c452218 BUS_MASTER, 64BIT_DMA, IGNORE_TOKEN_RING_ERRORS DESERIALIZED, RESOURCES_AVAILABLE, SUPPORTS_MEDIA_SENSE DOES_NOT_DO_LOOPBACK, SG_DMA, NOT_MEDIA_CONNECTED, PnPFlags : 00610021 PM_SUPPORTED, DEVICE_POWER_ENABLED, RECEIVED_START HARDWARE_DEVICE, NDIS_WDM_DRIVER, MiniportState : STATE_RUNNING IfIndex : 10 Ndis5MiniportInNdis6Mode : 0 InternalResetCount : 0000 MiniportResetCount : 0000 References : 5 UserModeOpenReferences: 0 PnPDeviceState : PNP_DEVICE_STARTED CurrentDevicePowerState : PowerDeviceD0 Bus PM capabilities DeviceD1: 0 DeviceD2: 0 WakeFromD0: 0 WakeFromD1: 0 WakeFromD2: 0 WakeFromD3: 1 SystemState DeviceState PowerSystemUnspecified PowerDeviceUnspecified S0 D0 S1 PowerDeviceUnspecified S2 PowerDeviceUnspecified S3 D3 S4 D3 S5 D3 SystemWake: S5 DeviceWake: D3 WakeupMethods Enabled 2: WAKE_UP_PATTERN_MATCH WakeUpCapabilities: MinMagicPacketWakeUp: 4 MinPatternWakeUp: 4 MinLinkChangeWakeUp: 0 Current PnP and PM Settings: : 00000030 DISABLE_WAKE_UP, DISABLE_WAKE_ON_RECONNECT, Translated Allocated Resources: Memory: ecef0000, Length: 10000 Interrupt Level: 9, Vector: a8 MediaType : 802.3 DeviceObject : 84bcc030, PhysDO : 848fd6b0 Next DO: 848fc7b0 MapRegisters : 00000000 FirstPendingPkt: 00000000 DriverVerifyFlags : 00000000 Miniport Interrupt : 85f72000 Miniport version 6.0 Miniport Filter List: Miniport Open Block Queue: 8669bad0: Protocol 86699530 = NDISUIO, ProtocolBindingContext 8669be88, v6.0 86690008: Protocol 86691008 = VMNETBRIDGE, ProtocolBindingContext 866919b8, v5.0 84f81c50: Protocol 849fb918 = TCPIP6, ProtocolBindingContext 84f7b930, v6.1 84f7b230: Protocol 849f43c8 = TCPIP, ProtocolBindingContext 84f7b5e8, v6.1

The Flags field for the miniport that was examined indicates that the miniport supports 64-bit direct memory access operation (64BIT_DMA), that the media is currently not active (NOT_MEDIA_CONNECTED), and that it can dynamically detect whether the media is connected or disconnected (SUPPORTS_MEDIA_SENSE). Also listed are the adapter’s system-to-device power-state mappings and the bus resources that the Plug and Play manager assigned to the adapter. (See the section “The Power Manager” in Chapter 8 in Part 2 for more information on power-state mappings.)

Variations on the NDIS Miniport

Перейти на страницу:

Похожие книги