Re: ndis passthru basic question
- From: "Thomas F. Divine" <tdivine@NOpcausaSPAM>
- Date: Wed, 11 Jun 2008 11:25:45 -0400
For Passthru there will be a virtual adapter "running" for each adapter that Passthru is bound to.
There is only one Passthru driver. In DriverEntry it knows nothing about the number of NICs it will eventually bind to. NDIS will examine information initially provided in the INF file (for example the FilterMediaTypes) and will then look for NIC miniports that can be bound to Passthru. It will then call the Passthru ProtocolBindAdapter handler for each suitable NIC miniport.
On a system with one hardware NIC there may be other software-only NICs (e.g. NDIS WAN) and there may be virtual NICs created by other components. So, there may very well be multiple Passthru bindings even on a system with only one hardware NIC. VMWare, for example, creates virtual miniports that work like real NIC miniports; their purpose is to create software-only network between the VMWare host and client.
Referencing is ESSENTIAL. It does not necessarily deal with multiple NICs. Instead, it's purpose is to insure that when asynchronous operations are performed the memory referenced for the operation continues to exist until the operation completes.
You really need to study device driver fundamentals before working in the NDIS area. Concepts like reference counting are widely used in most kernel software.
Thomas F. Divine
http://www.pcausa.com
"Joey" <oinkshannon@xxxxxxxxx> wrote in message news:e1864638-e952-4f14-88df-e65adb3c85e3@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi all,
I'll like to ask some simple questions regarding the workings of the
ndis passthru.
Coming from a non-c and non-networking background i have some
difficulty understanding some parts of the code.
"This driver exposes a virtual adapter for each binding to a real or
virtual NDIS adapter."
For a system with 2 network cards does it mean that there will be 2
virtual adapters running concurrently?
"NDIS calls Passthru’s BindAdapterHandler and PtBindAdapter for each
underlying NDIS adapter to which it is configured to bind."
pAdapt is initialized in PtBindAdapter so what I'm confused about is
whether will there be 2 virtual adapter structures initialized in a
system with 2 adapters? If that is the case how does the code handle 2
different virtual adapters because I can only see one pAdapt, or does
it actually become 2 different drivers?
I've installed the "extended passthru 1" on a virtual machine which
only shows one hardware nic, and on running ptuserio.exe it shows 3
bindings in the console.(2 ndiswan and 1 vmware amd accelerated pcnet
adapter). It's explained in the site documentation that what shows on
the console corresponds to the miniports on the system but I don't
quite understand
Lastly, I'll like to ask, in the original passthru code, is there any
significance of adding referencing and dereferencing to the virtual
adapter if there is only one nic to bind to.
Thank you,
Joey
.
- Follow-Ups:
- Re: ndis passthru basic question
- From: Joey
- Re: ndis passthru basic question
- References:
- ndis passthru basic question
- From: Joey
- ndis passthru basic question
- Prev by Date: How do you install your driver packages?
- Next by Date: Re: I would like to copy all the information from USB memory including
- Previous by thread: ndis passthru basic question
- Next by thread: Re: ndis passthru basic question
- Index(es):
Relevant Pages
|