This section describes the set of system-defined general OIDs, both operational and statistical, that all underlying NDIS drivers support.
The following chart summarizes the OIDs used to get or set the general operational characteristics of miniports and/or their NICs.
Length |
Q |
S |
Name |
Arr(4) |
M |
OID_GEN_SUPPORTED_LIST | |
4 |
M |
OID_GEN_HARDWARE_STATUS | |
Arr(4) |
M |
OID_GEN_MEDIA_SUPPORTED | |
Arr(4) |
M |
OID_GEN_MEDIA_IN_USE | |
4 |
M |
OID_GEN_MAXIMUM_LOOKAHEAD | |
4 |
M |
OID_GEN_MAXIMUM_FRAME_SIZE | |
4 |
M |
OID_GEN_LINK_SPEED | |
4 |
M |
OID_GEN_TRANSMIT_BUFFER_SPACE | |
4 |
M |
OID_GEN_RECEIVE_BUFFER_SPACE | |
4 |
M |
OID_GEN_TRANSMIT_BLOCK_SIZE | |
4 |
M |
OID_GEN_RECEIVE_BLOCK_SIZE | |
4 |
M |
OID_GEN_VENDOR_ID | |
Var. |
M |
OID_GEN_VENDOR_DESCRIPTION | |
4 |
M |
OID_GEN_VENDOR_DRIVER_VERSION | |
4 |
M |
M |
OID_GEN_CURRENT_PACKET_FILTER |
4 |
M |
M |
OID_GEN_CURRENT_LOOKAHEAD |
2 |
M |
OID_GEN_DRIVER_VERSION | |
4 |
M |
OID_GEN_MAXIMUM_TOTAL_SIZE | |
4 |
M |
OID_GEN_PROTOCOL_OPTIONS | |
4 |
M |
OID_GEN_MAC_OPTIONS | |
4 |
M |
OID_GEN_MEDIA_CONNECT_STATUS | |
4 |
M |
OID_GEN_MAXIMUM_SEND_PACKETS |
The following describes each of the general OID_XXX listed in the preceding chart more fully.
Specifies an array of OIDs for objects that the underlying driver or its NIC supports. Objects include general, media-specific, and implementation-specific objects.
The underlying driver should order the OID list it returns in increasing numeric order. NDIS forwards a subset of the returned list to protocols that make this query. That is, NDIS filters any supported statistics OIDs out of the list since protocols never make statistics queries subsequentlly.
Specifies the current hardware status of the underlying NIC, as one of the following NDIS_HARDWARE_STATUS-type values:
A complete list of the media types the NIC supports, as a proper subset of the following system-defined values:
Currently, NDIS drivers provide support for ATM networks as LAN-emulation drivers. Such a driver declares its medium as NdisMedium802_3 or NdisMedium802_5, rather than NdisMediumAtm. Such a driver emulates Ethernet or Token Ring to higher-level NDIS drivers, complies with the ATM Forum’s LANE V1.0, and provides UNI 3.1 signaling support.
By contrast, a wireless-WAN NIC driver must report its medium type as NdisMediumWirelessWan. However, such a miniport also must provide NdisWWDIXEthernetFrames header format to any bound protocol that selects this format, and the miniport can provide its NIC’s native header format as well. To support existing LAN-based protocols, the driver writer can provide an NDIS intermediate driver to “translate” a wireless NIC’s native header formats and medium-specific information into a form understood by existing protocols.
If the underlying miniport returns NULL for this query or if an experimental media type is used, the driver must indicate receives with NdisMIndicateReceivePacket. Any protocol bound to such an underlying NIC driver receives all such indications, that is, the protocol cannot filter receives with OID_GEN_CURRENT_PACKET_FILTER.
A complete list of the media types the NIC is currently supporting, defined as some, none (also called “the NULL filter”), or all of the following:
If the underlying miniport returns NULL for this query or if an experimental media type is used, the driver must indicate receives with NdisMIndicateReceivePacket. Any protocol bound to such an underlying NIC driver receives all such indications, that is, the protocol cannot filter receives with OID_GEN_CURRENT_PACKET_FILTER.
The maximum number of bytes the NIC can always provide as lookahead data.
If the underlying driver supports multipacket receive indications, bound protocols are given full net packets on every indication. Consequently, this value is identical to that returned for OID_GEN_RECEIVE_BLOCK_SIZE.
The maximum network packet size in bytes the NIC supports, not including a header.
For a binding emulating another medium type, the NIC driver must define the maximum frame size in such a way that it will not transform a protocol-supplied net packet of this size to a net packet too large for the true network medium.
The maximum speed of the NIC (kbps). The unit of measurement is 100 bps, so a value of 100,000 represents a hardware bit rate of 10 Mbps.
The amount of memory, in bytes, on the NIC available for buffering transmit data. A protocol can use this OID as a guide for sizing the amount of transmit data per send.
The amount of memory on the NIC available for buffering receive data. A protocol driver can use this OID as a guide for advertising its receive window when it establishes sessions with remote nodes.
The minimum number of bytes that a single net packet occupies in the transmit buffer space of the NIC.
For example, on some NICs the transmit space is divided into 256-byte pieces so such a NIC’s transmit block size would be 256. To calculate the total transmit buffer space on such a NIC, its driver multiplies the number of transmit buffers on the NIC by its transmit block size.
For other NICs, the transmit block size is identical to its maximum packet size.
The amount of storage, in bytes, that a single packet occupies in the receive buffer space of the NIC.
A three-byte IEEE-registered vendor code, followed by a single byte the vendor assigns to identify a particular NIC.
The IEEE code uniquely identifies the vendor and is the same as the three bytes appearing at the beginning of the NIC hardware address.
Vendors without an IEEE-registered code should use the value 0xFFFFFF.
Points to a zero-terminated counted string describing the NIC.
The vendor-assigned version number of the NIC driver.
The low-order half of the return value specifies the minor version, while the high-order half specifies the major version.
Determines the types of net packets for which a protocol receives indications from a NIC driver that reports its medium type as one for which the system provides a filter library. The packet filter is an inclusive OR of the following types:
A protocol driver can receive Ethernet (802.3) multicast packets or Token Ring
(802.5) functional address packets by specifying the multicast or functional
address packet type. Setting the multicast address list or functional address
determines which multicast address groups the NIC driver enables.
At a call to NdisOpenAdapter, NDIS disables packet reception, along with multicast and functional addresses.
For a query, NDIS returns the OR of all binding filters.
For a set, the specified packet filter replaces the previous packet filter for the binding. If the NIC driver previously enabled a packet type but the protocol driver does not specify it in a new filter, the protocol driver will not receive packets of this type.
If the NIC driver does not set a bit for a particular packet type in response to this query, the protocol driver will not receive packets of that type. Consequently, a protocol driver can disable packet reception by calling NdisRequest with a filter of zero. In these circumstances, if promiscuous mode is enabled, the protocol driver continues to receive packets even if the sending network node does not direct them to it. NDIS then sends the protocol driver all packets the NIC receives.
Setting a specific packet filter does not alter the packet filter for other protocols bound to (or above) the same NIC. For example, if one bound protocol enables promiscuous mode, other bound protocols do not receive packets they have not specifically requested with their own packet filters.
The number of bytes of received packet data, excluding the header, that will be indicated to the protocol driver.
For a query, NDIS returns the largest lookahead size from among all the bindings. A protocol driver can set a suggested value for the number of bytes to be used in its binding; however, the underlying NIC driver is never required to limit its indications to the value set.
If the underlying driver supports multipacket receive indications, bound protocols are given full net packets on every indication. Consequently, this value is identical to that returned for OID_GEN_RECEIVE_BLOCK_SIZE.
The NDIS version in use by the NIC driver. The high byte is the major version number and the low byte is the minor version number.
The maximum total packet length, in bytes, the NIC supports, including the header. This value is medium-dependent. The returned length specifies the largest packet a protocol driver can pass to NdisSend or NdisSendPackets.
For a binding emulating another media type, the NIC driver must define the maximum total packet length in such a way that it will not transform a protocol-supplied net packet of this size to a net packet too large for the true network medium.
A bitmask that defines optional properties of the protocol driver. A protocol informs NDIS of its properties, which can optionally take advantage of them. If the protocol driver does not set its flags on a binding, NDIS assumes they are all clear.
The following flags are currently defined:
A bitmask that defines optional properties of the underlying driver or its NIC. A protocol that initiates this query can determine which of the flags the underlying driver sets, and can optionally take advantage of them.
The following flags are currently defined:
A miniport that indicates receives with NdisMIndicateReceivePacket
has no MiniportTransferData function. Such a driver should set this flag.
This OID requests the miniport to return the connection status of the NIC on the network as one of the following system-defined values:
NdisMediaStateConnected
NdisMediaStateDisconnected
When a NIC miniport senses that the network connection has been lost, it should call NdisMIndicateStatus with NDIS_STATUS_MEDIA_DISCONNECT. When the connection is restored, it should call NdisMIndicateStatus with NDIS_STATUS_MEDIA_CONNECT.
The maximum number of send packets the MiniportSendPackets function can accept. If a larger packet array is given to MiniportSendPackets, it will return some packets in the array to NDIS for resubmission later.
If the underlying driver has only a MiniportSend function, it should return one for this query. Legacy NIC drivers usually return NDIS_STATUS_NOT_SUPPORTED for this query.
The following chart summarizes the OIDs used to get or set the general statistics for NDIS drivers and NICs.
Length |
Q |
S |
Name |
4 |
M |
OID_GEN_XMIT_OK | |
4 |
M |
OID_GEN_RCV_OK | |
4 |
M |
OID_GEN_XMIT_ERROR | |
4 |
M |
OID_GEN_RCV_ERROR | |
4 |
M |
OID_GEN_RCV_NO_BUFFER | |
8 |
O |
OID_GEN_DIRECTED_BYTES_XMIT | |
4 |
O |
OID_GEN_DIRECTED_FRAMES_XMIT | |
8 |
O |
OID_GEN_MULTICAST_BYTES_XMIT | |
4 |
O |
OID_GEN_MULTICAST_FRAMES_XMIT | |
8 |
O |
OID_GEN_BROADCAST_BYTES_XMIT | |
4 |
O |
OID_GEN_BROADCAST_FRAMES_XMIT | |
8 |
O |
OID_GEN_DIRECTED_BYTES_RCV | |
4 |
O |
OID_GEN_DIRECTED_FRAMES_RCV | |
8 |
O |
OID_GEN_MULTICAST_BYTES_RCV | |
4 |
O |
OID_GEN_MULTICAST_FRAMES_RCV | |
8 |
O |
OID_GEN_BROADCAST_BYTES_RCV | |
4 |
O |
OID_GEN_BROADCAST_FRAMES_RCV | |
4 |
O |
OID_GEN_RCV_CRC_ERROR | |
4 |
O |
OID_GEN_TRANSMIT_QUEUE_LENGTH |
The following describes each of the OID_XXX listed in the preceding chart more fully.
The number of frames transmitted without errors.
The number of frames the NIC receives without errors and indicates to bound protocols.
The number of frames a NIC fails to transmit.
The number of frames a NIC receives but does not indicate to the protocols due to errors.
The number of frames the NIC cannot receive due to lack of NIC receive buffer space. Some NICs do not provide the exact number, but only the number of times they have missed at least one frame.
The number of bytes in directed packets transmitted without errors.
The number of directed packets transmitted without errors.
The number of bytes in multicast/functional packets transmitted without errors.
The number of multicast/functional packets transmitted without errors.
The number of bytes in broadcast packets transmitted without errors.
The number of broadcast packets transmitted without errors.
The number of bytes in directed packets received without errors.
The number of directed packets received without errors.
The number of bytes in multicast/functional packets received without errors.
The number of multicast/functional packets received without errors.
The number of bytes in broadcast packets received without errors.
The number of broadcast packets received without errors.
The number of frames received with checksum errors.
The number of packets currently queued for transmission, whether on the NIC or in a driver-internal queue. For queries, the number returned is always the total number of packets currently queued, which can include unsubmitted send requests queued in the NDIS library.