Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

NDIS marshalling pointers

1 view
Skip to first unread message

Gammaraman

unread,
Aug 9, 2008, 1:50:00 AM8/9/08
to
Hi,

It appears to me that NDIS must be marshalling pointers being passed between
the protocol drivers and the miniport drivers. For e.g. when a set or query
OID is called by NDIS on behalf of a protocol driver, typically some pointer
parameters are passed.

I have not found any documentation saying that miniport drivers need to
perform some type of marshalling before reading/writing to the pointer
parameters. Yet without someone doing some marshalling, the miniport driver
would not be able to read/write to the pointer params due to security/memory
architecture, etc.

Can someone please confirm this?

Thanks.

Pavel A.

unread,
Aug 9, 2008, 2:53:06 PM8/9/08
to
"Gammaraman" <Gamma...@discussions.microsoft.com> wrote in message
news:F211976D-E7FB-4E5D...@microsoft.com...

( note: my reply is in the context of NT based Windows. AFAIK it
does cover WinCE as well - but better ask in WinCE newsgroups )

Both ends of NDIS OID interface (miniports and protocols/IMs) are in the
kernel.

NDIS miniports are not supposed to communicate directly with something else
besides protocols or their hardware devices. All this occurs in kernel mode.
Making a miniport communicate with user mode stretches it's contract to the
limit that leads to many
unwanted issues. Like you've mentioned, this raises the need in
marshaling, access rights, and there are more issues with
graceful handling of PnP & power events.

NDIS gives you means to expose a miniport to user mode
(NdisMRegisterDevice or NdisRegisterDeviceEx)
but if you use this, you are beyond NDIS contracts and are
on your's own. So, no documentation.

Regards,
--PA

Gammaraman

unread,
Aug 9, 2008, 3:12:00 PM8/9/08
to
Thanks, Pavel.

What about an application using NDISUIO to talk to the miniport? From the
miniport's perspective, it is talking to an NDIS protocol driver however one
of the end points of the OID interface is now in user-space. Someone has to
marshall the pointer parameters, right?

Pavel A.

unread,
Aug 9, 2008, 3:27:15 PM8/9/08
to
"Gammaraman" <Gamma...@discussions.microsoft.com> wrote in message
news:29CBD99E-4822-4785...@microsoft.com...

> Thanks, Pavel.
>
> What about an application using NDISUIO to talk to the miniport?

Gammaraman,

As already answered, in WinXP NDISUIO does not provide documented interfaces
for
our applications. Since your app is for WinCE, please ask in WinCE
newsgroups.

> From the
> miniport's perspective, it is talking to an NDIS protocol driver however
> one
> of the end points of the OID interface is now in user-space. Someone has
> to
> marshall the pointer parameters, right?

Yes, NDISUIO does the marshaling - hence, it takes responsibility
for all possible problems you've mentioned.

Regards,
--PA

Gammaraman

unread,
Aug 9, 2008, 4:42:01 PM8/9/08
to
Thanks, Pavel.

Pavel A.

unread,
Aug 9, 2008, 5:47:05 PM8/9/08
to
you're welcome.
Try also microsoft.public.pocketpc.developer.networking
--PA


"Gammaraman" <Gamma...@discussions.microsoft.com> wrote in message

news:BACD3F35-8CF1-408F...@microsoft.com...

0 new messages