ndis - A driver has enumerated two child PDO's that returned identical Device ID's

I have a kmdf bus driver PCI\VEN_XXXX&DEV_XXXX that creates two statically enumerated PDOs with serial numbers: 217 and 218; one for each Ethernet port. The PDO hardware id is ROOT\MY_NIC_PORT so I can install a NDIS Miniport driver on them.The bus driver passes SDV and Verifier; but, on reboot two more PDOs get enumerated. On the next reboot I get a duplicate pdo crash.The toaster example used the device class guid as part of the hardware id. When I tried that my NIC ports no longer showed up in device manager.Any debug suggestion or wo...Read more

How to call an KMDF WDF interface from NDIS Miniport?

I have a Bus Driver that creates a PDO for each physical port of a custom Ethernet card. I also have an NDIS Miniport Driver that installs onto each PDO.The Bus Driver is based on the static Toaster example.The NDIS Miniport is based on the Netvmini modified to match the hardware.ToasterInterface.InterfaceHeader.InterfaceReference = WdfDeviceInterfaceReferenceNoOp;ToasterInterface.InterfaceHeader.InterfaceDereference = WdfDeviceInterfaceDereferenceNoOp;ToasterInterface.GetCrispinessLevel = Bus_GetCrispinessLevel;ToasterInterface.SetCris...Read more

ndis - Filter Drive is not loaded - Startup

I have configured my filter driver start type as SERVICE_SYSTEM_START in .inf file, Installed the filter driver manually using the instructions on the Light weight filter driver sample, rebooted the virtual machine to know if my driver is loaded. in the ntbtlog.txt which has all the driver information it says "Did not load driver "....Read more

ndis - Network Layer address - in LWF

I need to know the Network Address of the NIC in Light Weight Filter Driver, I find "OID_GEN_NETWORK_LAYER_ADDRESSES" that gives Network Layer Address, but MSDN documentation says it is Miniport Driver, Is there a way we can retrieve the Network Layer address in the Light Weight Filter Driver....Read more

ndis - LWF status when LAN Wire disconnected or re-connected

In Miniport drivers we have two status indications(NDIS_STATUS_MEDIA_CONNECT/NDIS_STATUS_MEDIA_DISCONNECT) to know whether LAN is disconnected or not.Can we use the same indications in LWF to know the status of Media associated with LAN. I have two scenarios that I want get the indications or handles for.When Wire connected to NIC is pulled and re-connected.When two PC's are connected through a wire, I will power down the other PC where LWF is not running.Appreciate your help.Thanks...Read more

ndis - BSOD due to DRIVER_POWER_STATE_FAILURE (9f) with virtual NIC driver

I am working on a NDIS 6 miniport virtual NIC driver which does not handle IRP_MJ_POWER or IRP_MN_SET_POWER. The driver does not register in DispatchPower function for IRP_MJ_POWER. It sets this as NULL. The driver does power management using OID_PNP_CAPABILITIES and OID_PNP_SET_POWER.Recently I observed a crash on Windows 7 machine with code DRIVER_POWER_STATE_FAILURE (9f). After doing some analysis, I observed that the crash happened because the driver did not process the Power IRP (IRP_MJ_POWER) for more than 10 minutes. This is the first ti...Read more

ndis - Mux Intermediate Driver vs Filter Driver

We have Filter Intermediate Driver implemented in NDIS 5.x (Miniport, Protocol), Since support for this has been removed in NDIS 6.x. I am planning to covert my filter intermediate driver to Mux Intermediate driver with 1 to 1 relationship.I wanted to take this approach to minimize the cost and schedule while moving to NDIS 6.x, even though NDIS 6.x introduced Light weight Filter Driver. is there guidence available for Mux Intermediate driver to have 1 to 1 relationship....Read more

What caused my NDIS miniport driver crashed on XP OS

I wrote a simple packet filter driver based on the example 'passthru' of the Windows DDK, when I turned on the filter function, the OS is crashed and I got the following message from the WinDbg: Microsoft (R) Windows Debugger Version 6.12.0002.633 X86 Copyright (c) Microsoft Corporation. All rights reserved. Loading Dump File [D:\iCheckTool\dump\MEMORY.DMP] Kernel Summary Dump File: Only kernel address space is available WARNING: Whitespace at start of path element Symbol search path is: D:\iCheckTool\dump; SRV*E:\DebuggingSymbols*ht...Read more

How to avoid data copy in NDIS filter driver

I am working on a NDIS filter driver which actually copies data from NET_BUFFERs to driver allocated buffers in the Send path and push these driver allocated buffers into a internal queue. Later on, the data is copied again from these driver allocated buffers in the queue to IRP buffers. I want to avoid this copy of data. In Linux, we can create a clone of skbuff and the cloned skbuff can be queued for later use. Is there a similar option available in Windows as well? If there a way to clone the NET_BUFFER, we can simply avoid the first copy th...Read more

ndis - How to retrieve the network adpater link speed?

I want to determine the link speed of a Ethernet adapter in a Windows CE environment. The acutal version of the OS is WEC2013 supporting NDIS6.The miniport driver provides the OID_GET_LINK_SPEED at the MiniportQueryInformation function. But I can't directly open the driver from a user-mode program.How can I query information from a miniport driver in a normal program?...Read more

Two binaries in one INF file for NDIS 6 LWF

In previous times with NDIS 5.1 we managed to make one inf file that installed the respectie 32 or 64 bit sys file binary, depending on the OS where it was installed.We are trying now the same thing with a NDIS 6 LWF INF file, and have no idea how we could duplicate the [Install.Services] section, so the OS will choose automatically which binary to pick up, the 32 or the 64-bit one.This basically brings us down to the following INF file sections:[Install.Services]; You may also want to add the SPSVCINST_STARTSERVICE flag, like this:; AddSer...Read more

How to prepend headers to a NetBuffer in NDIS 6?

We are upgrading our NDIS 5.1 Intermediate Miniport driver to NDIS 6.We need to prepend some header information to a packet that is goind to be sent. In 5.1 we used NdisChainBufferAtFront().We already did the entire kitchen to traverse and clone the entire NetBufferLists structure, we are down to preparing each cloned NetBuffer.What is the correct way to prepend (means, at front!) a 22-byte header to a packet (NetBuffer) that is going to be sent? (We would prefer a method that avoids copying original MDL data)...Read more