Re: NDIS miniport driver question
From: Don Burn (burn_at_stopspam.acm.org)
Date: 05/14/04
- Next message: Stephan Wolf: "Re: NDIS miniport driver question"
- Previous message: Gary Chapman: "NDIS miniport driver question"
- In reply to: Gary Chapman: "NDIS miniport driver question"
- Next in thread: Stephan Wolf: "Re: NDIS miniport driver question"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 14 May 2004 17:17:38 -0400
Well, NDIS does wrap things but some of the wrappers are quite thin, for
example
#define NdisWritePortUchar(Handle,Port,Data)
\
WRITE_PORT_UCHAR((PUCHAR)(NDIS_PORT_TO_PORT(Handle,Port)),(UCHAR)(Data))
#define NdisStallExecution(MicroSecondsToStall)
KeStallExecutionProcessor(MicroSecondsToStall)
So you can see how the driver calls the HAL even if the names are different.
Things get more confusing if the driver is an NDIS WDM driver where all of
the normal WDM calls are available.
Good news is that in the future the network support (and other miniports for
that matter) will become integrated into the new WDF model in a cleaner
fashion. There will only be one name for a function, and the miniport stuff
will provide environment specific support, not generic stuff such as locking
they currently do.
-- Don Burn (MVP, Windows DDK) Windows 2k/XP/2k3 Filesystem and Driver Consulting Remove StopSpam from the email to reply "Gary Chapman" <none@none.no> wrote in message news:opr70chhyl2p1re9@netech... > > I have a question about NDIS miniport drivers (The actual vendor supplied > NIC driver) > > In most of the documentation about NDIS it looks as though the NIC driver > communicates with the network card via the NDIS wrapper. In other > documentation it would appear that the NIC driver has to go via the NDIS > hook driver, the NDIS wrapper and then the NDIS hook driver again to reach > the NIC. > > I have looked at my own driver on Win2k, and another driver on Win98, with > a dependency checker. Both appear to call the following functions > exported from HAL.DLL: > > KeStallExecutionProcessor() > READ_PORT_UCHAR() > READ_PORT_ULONG() > READ_PORT_USHORT() > WRITE_PORT_UCHAR() > WRITE_PORT_ULONG() > WRITE_PORT_USHORT() > > This leaves me a little bit confused as it would seem that the NIC driver > uses HAL.DLL to talk to the hardware, rather than going back through > NDIS.SYS. > > So, my question: > > Is it true that NDIS completely wraps the NIC driver at both the upper and > lower edge (As indicated by various architecture diagrams from microsoft, > PCAUSA, etc.) Or does the NIC driver call the READ_PORT, WRITE_PORT > functions of HAL.DLL who in turn talks to the hardware without ever going > back through the NDIS wrapper or NDIS-hooking filters. > > To see an example of the architecture diagrams that are confusing me > please check out the image at the following link: > http://www.ndis.com/images/netkernel.gif > > Any help or pointers on this would be appreciated. > > Many thanks in advance, > > GC > -- > Using Opera's revolutionary e-mail client: http://www.opera.com/m2/
- Next message: Stephan Wolf: "Re: NDIS miniport driver question"
- Previous message: Gary Chapman: "NDIS miniport driver question"
- In reply to: Gary Chapman: "NDIS miniport driver question"
- Next in thread: Stephan Wolf: "Re: NDIS miniport driver question"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|