Accessing NDIS miniport driver from a user-mode application on Windows 98

Hi all,

On windows 2000 the adapter can be opened using the
function CreateFile with the Hex representation of the
Adapter name(GUID) and
we can send the ioctl calls using the code
IOCTL_NDIS_QUERY_GLOBAL_STATS for any of the
information that we need.

On Windows 98, this functionality is not supported.
I wish to know the method to be used for opening the
adapter and issuing the ioctl calls programmatically
on Windows 98.

The Miniport driver is the driver that comes along
with the NIC cards and am not sure whether the driver
has support of exposing symbolic names.

Please send me your inputs on this.

regards,
Murali


Do You Yahoo!?
Yahoo! Health - Feel better, live better
http://health.yahoo.com

You can use NdisMRegisterDevice to create a private device object. This will work on Win 98SE, ME, 2000, XP in exactly the same way. But it will not work on 98gold because NdisMRegisterDevice is not supported there.

The implementation is somewhat tricky, at least when you have several adapter objects. This is because there is no context associated with the private device object. I implemented this by a simple linear search in a global list of adapters. This should be no problem because the number of installed adapters is limited. You can identify the adapter by means of a number or handle passed in the parameters of the IOCTL.


Udo Eberhardt
Thesycon GmbH, Germany
xxxxx@thesycon.de
www.thesycon.de

-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com]On Behalf Of Murali S
Sent: Tuesday, July 23, 2002 5:41 PM
To: NT Developers Interest List
Subject: [ntdev] Accessing NDIS miniport driver from a user-mode
application on Windows 98

Hi all,

On windows 2000 the adapter can be opened using the
function CreateFile with the Hex representation of the
Adapter name(GUID) and
we can send the ioctl calls using the code
IOCTL_NDIS_QUERY_GLOBAL_STATS for any of the
information that we need.

On Windows 98, this functionality is not supported.
I wish to know the method to be used for opening the
adapter and issuing the ioctl calls programmatically
on Windows 98.

The Miniport driver is the driver that comes along
with the NIC cards and am not sure whether the driver
has support of exposing symbolic names.

Please send me your inputs on this.

regards,
Murali


Do You Yahoo!?
Yahoo! Health - Feel better, live better
http://health.yahoo.com


You are currently subscribed to ntdev as: xxxxx@thesycon.de
To unsubscribe send a blank email to %%email.unsub%%

Murali,

I did a quick check and NDIS does create a symbolic name in Windows 98
when NDIS initializes the miniport. I would have to do some research to
verify the exact name. However, there is no support for
IOCTL_NDIS_QUERY_GLOBAL_STATS. If you were the creator of the miniport,
you could add your own support. But from your message, I take it that
your question is generic to all miniports and that you do not have
control over the miniport code.

Depending on what information you want to extract, you may be able to
accomplish what you want by writing a thin protocol driver that would
bind to the miniport in question and expose its own IOCTL interface.
When your protocol gets your private IOCTL, it can turn around and query
the miniport through NdisRequest OIDs. An example to do this is the
Windows XP DDK sample NDISUIO. I have ported that sample to Windows
98/Me. I can send you what I have if you want to explore this route.

Hope this helps,

Bryan S. Burgin
xxxxx@microsoft.com

This posting is provided “AS IS” with no warranties, and confers no
rights.

-----Original Message-----
From: Murali S [mailto:xxxxx@yahoo.com]
Sent: Tuesday, July 23, 2002 8:41 AM
To: NT Developers Interest List
Subject: [ntdev] Accessing NDIS miniport driver from a user-mode
application on Windows 98

Hi all,

On windows 2000 the adapter can be opened using the
function CreateFile with the Hex representation of the
Adapter name(GUID) and
we can send the ioctl calls using the code
IOCTL_NDIS_QUERY_GLOBAL_STATS for any of the
information that we need.

On Windows 98, this functionality is not supported.
I wish to know the method to be used for opening the
adapter and issuing the ioctl calls programmatically
on Windows 98.

The Miniport driver is the driver that comes along
with the NIC cards and am not sure whether the driver
has support of exposing symbolic names.

Please send me your inputs on this.

regards,
Murali


Do You Yahoo!?
Yahoo! Health - Feel better, live better
http://health.yahoo.com


You are currently subscribed to ntdev as: xxxxx@microsoft.com
To unsubscribe send a blank email to %%email.unsub%%