Re: Miniport versus intermediate???

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Thanks for the reply, I will look at those examples more closely. I had
started looking at those two you recommended, but wanted to make sure that
they were what I needed.

For my edification, can you give me a short example of when I would use #1?

Also, can I have the PCI connected into the TCP/IP Protocol at the same time
as an Ethernet driver and dynamically switch between them?

Thanks again,

Jan

"Stephan Wolf [MVP]" wrote:

#2 is what you need. More specifically, you need to write an NDIS-WDM
driver, i.e., a "virtual" miniport that sits on a WDM driver that
controls a PCI device. See the NDISWDM sample in the DDK (...\src
\network\ndis\ndiswdm\) as well as the PCIDRV sample (...\src\general
\pcidrv\), which can be used with NDISWDM. See also

"Miniport Driver with a WDM Lower Interface (NDIS 5.1)"
http://msdn2.microsoft.com/EN-US/library/aa504096.aspx

As an alternative, you could of course write a standard NDIS miniport
that controls your PCI device directly. But if you already have a
driver for your device then an NDIS-WDM is probably the easier choice.

Stephan
---
On Sep 18, 10:36 pm, Jan <J...@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
Hi,

I am new to writing windows drivers, and am currently in learn mode. My
ignorance may shine through in this question:

That being said, I have the following setup and issue:

I have 2 processor boards that will connect up to each other through a PCI
Express NT bridge chip. I am comfortable with writing a driver to access the
NT bridge chip to read and write across the chip.

To take the driver to the next level, I would like to hook up an existing
Protocol Driver (say TCP/IP) to my chip driver. I am starting to get
confused as to what I need to write to achieve this, whether it is a miniport
driver, an intermediate driver, or both.

If my understanding is correct, I have the following 'design':

-------------------------
| Protocol Drivers |
-------------------------
-------------------------
| * NDIS wrapper |
-------------------------

??????????????

-------------------------
| PCIE NT bridge |
| driver |
--------------------------

* Sort of spans multiple layers, (e.g. wrapper)

I understand that NDIS gives me the conformity/interfaces I must follow to
bridge between the Protocol drivers, and the underlying hardware driver (and
that it isolates me from OS to a big degree). What I can't figure out is
where I have marked ' ???????'. Here is what I think, can someone offer
more insight and point me to places to read up on this:

1) I write an intermediate driver that interfaces into the protocol drivers
at its upper edge, then at its lower edge it interfaces with a miniport
driver. Miniport driver's upper edge interfaces w/intermediate driver and
its lower edge interfaces with the PCIE NT bridge driver

2) Just write a miniport driver to interface upper edge with Protocol
Drivers and lower edge with PCIE NT bridge driver.

I actually started out thinking I just need to do #2, but as I poke around a
different articles, I am wondering if I need to translate across through an
intermediate driver for some reason. Can anyone help?

Bonus round question is can I hook the TCP/IP protocol driver up to multiple
hardware drivers, and switch dynamically between them?

Thanks for any help.

Jan


.



Relevant Pages

  • SMSC9118 NDIS ethernet driver, to connect LAN9115 directly to a PXA270 (no glue logic like cpld)
    ... I am trying to integrate in windows ce5.0 smsc driver for 911x family. ... adapter, then the pointer turns into a hour glass forever. ... ndisMInitializeAdapter: Miniport 0003B9C0, ... Miniport 0003B9C0, MiniBlock 0003B620, rc ...
    (microsoft.public.windowsce.embedded)
  • Re: Tcpip.sys bug: FTP Upload. MiniportHalt isnt called untill it has
    ... cancel packets on the miniport driver. ... driver, this bug would have been discovered long, long ago. ... handler and that does return all unsent packets to Ndis. ... hanging the PnP manager with device ...
    (microsoft.public.development.device.drivers)
  • Re: Tcpip.sys bug: FTP Upload. MiniportHalt isnt called untill it has
    ... NetEventQueryRemoveDevice query - instead, it can simply stop sending new ... call NdisCompletePnPEvenafter all packets that have been fowarded to ... cancel packets on the miniport driver. ... driver, this bug would have been discovered long, long ago. ...
    (microsoft.public.development.device.drivers)
  • Re: NDIS_MINIPORT_CHARACTERISTICS
    ... > this is by being there at the time it registers with NDIS. ... To show that it is possible that a backdoor comms ... >>of calls that NDIS makes to a miniport. ... > driver on the filesystem due to IDS/AV worries. ...
    (microsoft.public.development.device.drivers)
  • Re: Miniport: DriverObject->DriverUnload should be Chained? or Rep
    ... once your driver is miniport one that is not supposed to ... hardware - the user-mode app plays the role of the hardware. ... communicating with an app via IRPs (apparently, it has a pool of outstanding ...
    (microsoft.public.development.device.drivers)