If you all were to go about implementing an NDIS v6.x miniport with KMDF lower edge, where would you start these days?
I ask this because there used to be very useful reference samples in the older WDKs: network\ndis\ndiswdm
and kmdf\ndisedge
- but I do not know why MS decided to remove these from the current WDK (10.0.19030.100).
If I was forced to stay with only current WDK sample, one approach might be to start with network\ndis\netvmini
- but this seems like much more complexity than required.
I do have access to the mentioned “older” samples (from WDK 6777), and I think a better approach might be to leverage these to create NDIS v6.x-coompliant version. I just do not know why these would be removed from sample distribution of recent WDK, and it gives me concern that perhaps these are no longer recommended?? I dunno.
What would you folks out here suggest? Where would you start?
Thanks in advance.
Is this relevant?
https://docs.microsoft.com/en-us/windows-hardware/drivers/netcx/
It looks like you can replace a WDF lower edge driver with a WDF driver that uses NetAdapterCx.
It looks like you can replace a WDF lower edge driver with a WDF driver that uses NetAdapterCx.
I looked at NetAdapterCx, and it did look promising. However, that requires Windows 10 version 2004, and we may have to be able to target earlier versions of Windows 10. We are in the early design stages, and if this requirement changes, I agree that would be the way to go. So in the meantime, I have to consider other options.
You can use KMDF with NDIS, but you have to use it in “miniport mode” (WdfDriverInitNonPnpDriver
). There’s plenty written on that topic on this forum already. The punchline is that you won’t get to enjoy much of KMDF – most of it is disabled when in miniport mode.
As glewis9999 pointed out, NetAdapter is our successor to NDIS6 that lets you use all of KMDF, along with a simpler datapath. But as you pointed out, NetAdapter’s crippling weakness is that it’s only available in very recent OSes.
netvmini6 is our most recent sample driver for NDIS6 miniports; it’s probably the best starting place that Microsoft has to offer. You might find something better-written on github… but you might also find some garbage. I don’t think I can make any specific commentary or suggestions about non-Microsoft code.
If you delete all the VMQ stuff from netvmini6, it simplifies down a lot.
Sorry… making updated and cleaner sample drivers is on my wishlist, but I never seem to get around to it.