3.3 Query Information Handler

If MiniportInitialize returns NDIS_STATUS_SUCCESS, NDIS calls MiniportQueryInformation to get and save the operational characteristics of the driver. The miniport must support all the mandatory general and media-specific operational OIDs.

The set of mandatory general operational OIDs include:

In particular, the miniport’s MiniportQueryInformation function must be prepared to respond to OID_GEN_MAXIMUM_LOOKAHEAD, OID_GEN_MAXIMUM_SEND_PACKETS, and OID_GEN_MAC_OPTIONS.

If the miniport indicates received data by calling NdisXxxIndicateReceive, it should respond to OID_GEN_MAXIMUM_LOOKAHEAD with the maximum number of bytes the NIC can provide as lookahead data. If that value is different from the size of the lookahead buffer supported by bound protocols, NDIS will call MiniportSetInformation to set the size of the lookahead buffer provided by the miniport to the minimum of the miniport and protocol(s) values.

If the driver always indicates up full packets with NdisMIndicateReceivePacket, it should set this value to the maximum total packet size, which excludes the header.

If a miniport registers a MiniportSendPackets function, MiniportQueryInformation will be called with the OID_GEN_MAXIMUM_SEND_PACKETS request. The miniport must respond with the maximum number of packets it is prepared to handle on a single send request. The miniport should pick a maximum that minimizes the number of packets that it either has to return to NDIS or queue internally because it has no resources (its device is full). A miniport for a busmaster DMA device should attempt to pick a value that keeps its device filled under anticipated loads.

When MiniportQueryInformation is called with OID_GEN_MAC_OPTIONS, the bit mask returned by MiniportQueryInformation will specify which optional operations the miniport performs. The set of flags include:

A miniport must never use the flag NDIS_MAC_OPTION_RESERVED, which is reserved for NDIS internal use.

MiniportQueryInformation will also be queried with a media-specific OID to determine the NIC’s current address. For instance, the miniport for a NIC of type 802.3 will be queried with OID_802_3_CURRENT_ADDRESS.

The miniports for certain media types will receive additional OIDs that are media-specific. As an example, a miniport whose NIC is of type 802.3 will be queried with OID_802.3_MAXIMUM_LIST_SIZE. See the Network Driver Reference for a list and description of the general operational and media-specific OIDs.