Hi,
I am new to Windows Driver Programming.
I need to write a Ndis Miniport Driver for a NIC card with multiple
ethernet ports.
From the examples I got from WDK 7, it only explains for a single ethernet
port.
Can anyone share me some sample code or the steps for writing it.
Thanks
Venkatesh
Hi Venkatesh,
Could you check the number of device objects created
by pci driver . You can see it from Device manager .
On Wed, Oct 9, 2013 at 12:48 PM, Venkatesh P N wrote:
> Hi,
>
> I am new to Windows Driver Programming.
> I need to write a Ndis Miniport Driver for a NIC card with multiple
> ethernet ports.
> From the examples I got from WDK 7, it only explains for a single ethernet
> port.
>
> Can anyone share me some sample code or the steps for writing it.
>
> Thanks
> Venkatesh
> — NTDEV is sponsored by OSR Visit the list at:
> http://www.osronline.com/showlists.cfm?list=ntdev OSR is HIRING!! See
> http://www.osr.com/careers For our schedule of WDF, WDM, debugging and
> other seminars visit: http://www.osr.com/seminars To unsubscribe, visit
> the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
–
Regards
Sachindranath P.V
Hi Sachindranath,
It shows a single device object in the Device Manager. Actually the device
is not a general NIC card. It performs some operations like crypto, packet
process etc and sends through four ethernet ports.
So as it has four ethernet ports, I should distinguish between them from my
Ndis Miniport driver.
Thanks
Venkatesh
On Wed, Oct 9, 2013 at 2:35 PM, Sachindranath p.v wrote:
> Hi Venkatesh,
> Could you check the number of device objects created
> by pci driver . You can see it from Device manager .
>
> On Wed, Oct 9, 2013 at 12:48 PM, Venkatesh P N wrote:
>
>> Hi,
>>
>> I am new to Windows Driver Programming.
>> I need to write a Ndis Miniport Driver for a NIC card with multiple
>> ethernet ports.
>> From the examples I got from WDK 7, it only explains for a single
>> ethernet port.
>>
>> Can anyone share me some sample code or the steps for writing it.
>>
>> Thanks
>> Venkatesh
>> — NTDEV is sponsored by OSR Visit the list at:
>> http://www.osronline.com/showlists.cfm?list=ntdev OSR is HIRING!! See
>> http://www.osr.com/careers For our schedule of WDF, WDM, debugging and
>> other seminars visit: http://www.osr.com/seminars To unsubscribe, visit
>> the List Server section of OSR Online at
>> http://www.osronline.com/page.cfm?name=ListServer
>
>
>
>
> –
> Regards
> Sachindranath P.V
> — NTDEV is sponsored by OSR Visit the list at:
> http://www.osronline.com/showlists.cfm?list=ntdev OSR is HIRING!! See
> http://www.osr.com/careers For our schedule of WDF, WDM, debugging and
> other seminars visit: http://www.osr.com/seminars To unsubscribe, visit
> the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
You would be better off writing a simple bus driver that creates the four
Ethernet ports so that an NDIS-KMDF driver can deal with a single device.
Don Burn
Windows Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Venkatesh P N
Sent: Wednesday, October 09, 2013 7:07 AM
To: Windows System Software Devs Interest List
Subject: Re: [ntdev] Ndis Miniport Driver for a NIC card with multiple
ethernet ports
Hi Sachindranath,
It shows a single device object in the Device Manager. Actually the device
is not a general NIC card. It performs some operations like crypto, packet
process etc and sends through four ethernet ports.
So as it has four ethernet ports, I should distinguish between them from my
Ndis Miniport driver.
Thanks
Venkatesh
On Wed, Oct 9, 2013 at 2:35 PM, Sachindranath p.v wrote:
Hi Venkatesh,
Could you check the number of device objects
created by pci driver . You can see it from Device manager .
On Wed, Oct 9, 2013 at 12:48 PM, Venkatesh P N
wrote:
Hi,
I am new to Windows Driver Programming.
I need to write a Ndis Miniport Driver for a NIC card with
multiple ethernet ports.
From the examples I got from WDK 7, it only explains for a
single ethernet port.
Can anyone share me some sample code or the steps for
writing it.
Thanks
Venkatesh
— NTDEV is sponsored by OSR Visit the list at:
http://www.osronline.com/showlists.cfm?list=ntdev OSR is HIRING!! See
http://www.osr.com/careers For our schedule of WDF, WDM, debugging and other
seminars visit: http://www.osr.com/seminars To unsubscribe, visit the List
Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer
–
Regards
Sachindranath P.V
— NTDEV is sponsored by OSR Visit the list at:
http://www.osronline.com/showlists.cfm?list=ntdev OSR is HIRING!! See
http://www.osr.com/careers For our schedule of WDF, WDM, debugging and other
seminars visit: http://www.osr.com/seminars To unsubscribe, visit the List
Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer
— NTDEV is sponsored by OSR Visit the list at:
http://www.osronline.com/showlists.cfm?list=ntdev OSR is HIRING!! See
http://www.osr.com/careers For our schedule of WDF, WDM, debugging and other
seminars visit: http://www.osr.com/seminars To unsubscribe, visit the List
Server section of OSR Online at
http://www.osronline.com/page.cfm?name=ListServer
Don burn said it correctly. You can check the Toaster Bus driver samples in
WDK source for creation of virtual NIC over a bus driver .
On Wed, Oct 9, 2013 at 4:49 PM, Don Burn wrote:
> You would be better off writing a simple bus driver that creates the four
> Ethernet ports so that an NDIS-KMDF driver can deal with a single device.
>
>
> Don Burn
> Windows Filesystem and Driver Consulting
> Website: http://www.windrvr.com
> Blog: http://msmvps.com/blogs/WinDrvr
>
>
>
> -----Original Message-----
> From: xxxxx@lists.osr.com
> [mailto:xxxxx@lists.osr.com] On Behalf Of Venkatesh P N
> Sent: Wednesday, October 09, 2013 7:07 AM
> To: Windows System Software Devs Interest List
> Subject: Re: [ntdev] Ndis Miniport Driver for a NIC card with multiple
> ethernet ports
>
> Hi Sachindranath,
>
>
> It shows a single device object in the Device Manager. Actually the device
> is not a general NIC card. It performs some operations like crypto, packet
> process etc and sends through four ethernet ports.
>
> So as it has four ethernet ports, I should distinguish between them from my
> Ndis Miniport driver.
>
>
>
> Thanks
> Venkatesh
>
>
>
> On Wed, Oct 9, 2013 at 2:35 PM, Sachindranath p.v
> wrote:
>
>
> Hi Venkatesh,
>
> Could you check the number of device objects
> created by pci driver . You can see it from Device manager .
>
>
> On Wed, Oct 9, 2013 at 12:48 PM, Venkatesh P N
> wrote:
>
>
> Hi,
>
>
> I am new to Windows Driver Programming.
>
> I need to write a Ndis Miniport Driver for a NIC card with
> multiple ethernet ports.
>
> From the examples I got from WDK 7, it only explains for a
> single ethernet port.
>
>
> Can anyone share me some sample code or the steps for
> writing it.
>
>
> Thanks
> Venkatesh
>
> — NTDEV is sponsored by OSR Visit the list at:
> http://www.osronline.com/showlists.cfm?list=ntdev OSR is HIRING!! See
> http://www.osr.com/careers For our schedule of WDF, WDM, debugging and
> other
> seminars visit: http://www.osr.com/seminars To unsubscribe, visit the List
> Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>
>
>
>
> –
>
> Regards
>
> Sachindranath P.V
>
> — NTDEV is sponsored by OSR Visit the list at:
> http://www.osronline.com/showlists.cfm?list=ntdev OSR is HIRING!! See
> http://www.osr.com/careers For our schedule of WDF, WDM, debugging and
> other
> seminars visit: http://www.osr.com/seminars To unsubscribe, visit the List
> Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>
>
> — NTDEV is sponsored by OSR Visit the list at:
> http://www.osronline.com/showlists.cfm?list=ntdev OSR is HIRING!! See
> http://www.osr.com/careers For our schedule of WDF, WDM, debugging and
> other
> seminars visit: http://www.osr.com/seminars To unsubscribe, visit the List
> Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>
>
> —
> NTDEV is sponsored by OSR
>
> Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev
>
> OSR is HIRING!! See http://www.osr.com/careers
>
> For our schedule of WDF, WDM, debugging and other seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>
–
Regards
Sachindranath P.V
> It shows a single device object in the Device Manager. Actually the device is not a general NIC card.
It performs some operations like crypto, packet process etc and sends through four ethernet ports.
So as it has four ethernet ports, I should distinguish between them from my Ndis Miniport driver.
This is why Don said “write a bus driver”. However, I am afraid this is just a part of the whole story - it looks like in your particular case you need to implement the entire WDM/KMDF stack, plus NDIS miniport driver.
In other words, you seem to need 3 separate drivers here…
Your NIC (i.e.bus driver’s FDO) will look like a single PCI device as long as there is nothing plugged in. Whenever an Ethernet cable gets plugged in your bus driver will create a child PDO (from PnP’s perspective this device will reside on the bus that your NIC registers,while your NIC device itself will reside on PCI bus). FDO will get attached to it, and will be dealt with by your function WDM/KMDF driver. This function driver will communicate with your NDIS miniport driver. This NDIS driver will create a virtual miniport device that will be actually presented to NDIS. On its lower edge this driver will deal with your functional driver via a standard IRP interface, and on its upper edge it will deal with NDIS library (i.e register callbacks that have to be implemented by NDIS miniport)…
Anton Bassov
NDIS 6 supports multiple ports. NdisMIndicateReceiveNetBufferLists/SendNetBufferLists contains a parameter ethernet port. Use NdisMAllocatePort to create multiple ports.
If your proprietary functionality is not too complex, you might implement everything in a miniport driver. Use custom OIDs for the non-standard functionality.
No - the “port” concept provided by NdisMAllocatePort is not meant to deal with hardware that has multiple physical ports. Hardware that has multiple physical ports should either:
(a) Expose each port as a separate PCI function, so the OS automatically carves up the hardware into multiple independent NICs
(b) Use mf.sys to explicitly carve up the hardware into independent NICs (assuming static resource allocation); or
(c) Write a custom bus driver to manually do the carving yourself (for complex resource allocation or interdependencies), as discussed above (although you can get by with just 2 drivers and not necessarily 3)
The “port” concept provided by NdisMAllocatePort is meant for other abstractions. Its usage is contextual: for a wireless NIC, a port is a way to select virtual MACs. Above an Ethernet NIC, ports are reserved for the operating system’s NIC Teaming or Bridging features.