1
votes

A NDIS 6.0 miniport driver provides statistic counters that are provided by the function MiniportQueryInformation. The information request is passed in the NdisRequest parameter. That actual query is defined by the member Oid of the NdisRequest.

I want to query some of this information in an application process, e.g. the value for OID_802_3_RCV_OVERRUN. The miniport driver runs in NDIS context in the kernel process. Usually only a protocol driver can call functions that cause the invocation of the miniport functions.

The IP Helper Functions API include the functions GetIfEntry and GetIFEntry2 to retrieved information about the network interface. The result is a MIB_IF_ROW2 struct that includes counters of the send and received data. But it only includes a (cumulative) InErrors member, not the counter for the requested Oid OID_802_3_RCV_OVERRUN.

How can I pass a request for information through NDIS and get the desired information from the miniport driver?

1

1 Answers

1
votes

First, Legacy's approach is to write the protocol driver first, make a request to the protocol driver through Application IOCTL, perform an OID query through NdisRequest from the kernel, and pass the result to the Application. but, Writing protocol drivers will be a daunting task.

Second, you can use the WMI interface to query the OID. Please refer to the link below.

https://docs.microsoft.com/en-us/archive/blogs/ndis/mapping-from-ndis-oids-to-wmi-classes

However, even with these methods, keep in mind that depending on your LAN adapter vendor, the Miniport driver may not support the OID, so you will not get the results you want.