5.1 General Objects

This section describes the set of system-defined general OIDs, both operational and statistical, that all underlying NDIS drivers support.

General Operational Characteristics

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 
List of supported OIDs

4

M

OID_GEN_HARDWARE_STATUS 
Hardware status

Arr(4)

M

OID_GEN_MEDIA_SUPPORTED 
Media types supported (encoded)

Arr(4)

M

OID_GEN_MEDIA_IN_USE 
Media types in use (encoded)

4

M

OID_GEN_MAXIMUM_LOOKAHEAD 
Maximum in bytes, receive lookahead size

4

M

OID_GEN_MAXIMUM_FRAME_SIZE 
Maximum in bytes, frame size

4

M

OID_GEN_LINK_SPEED 
Link speed in units of 100 bps

4

M

OID_GEN_TRANSMIT_BUFFER_SPACE 
Transmit buffer space

4

M

OID_GEN_RECEIVE_BUFFER_SPACE 
Receive buffer space

4

M

OID_GEN_TRANSMIT_BLOCK_SIZE 
Minimum amount of storage, in bytes, that a single packet occupies in the transmit buffer space of the NIC

4

M

OID_GEN_RECEIVE_BLOCK_SIZE 
Amount of storage, in bytes, that a single packet occupies in the receive buffer space of the NIC

4

M

OID_GEN_VENDOR_ID 
Vendor NIC code

Var.

M

OID_GEN_VENDOR_DESCRIPTION 
Vendor network card description

4

M

OID_GEN_VENDOR_DRIVER_VERSION 
Vendor-assigned version number of the driver

4

M

M

OID_GEN_CURRENT_PACKET_FILTER 
Current packet filter (encoded)

4

M

M

OID_GEN_CURRENT_LOOKAHEAD 
Current lookahead size in bytes

2

M

OID_GEN_DRIVER_VERSION 
NDIS version number used by the driver

4

M

OID_GEN_MAXIMUM_TOTAL_SIZE 
Maximum total packet length in bytes

4

M

OID_GEN_PROTOCOL_OPTIONS 
Optional protocol flags (encoded)

4

M

OID_GEN_MAC_OPTIONS 
Optional NIC flags (encoded)

4

M

OID_GEN_MEDIA_CONNECT_STATUS 
Whether the NIC is connected to the network

4

M

OID_GEN_MAXIMUM_SEND_PACKETS 
The maximum number of send packets the driver can accept per call to its MiniportSendPackets function

The following describes each of the general OID_XXX listed in the preceding chart more fully.

OID_GEN_SUPPORTED_LIST

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.

OID_GEN_HARDWARE_STATUS

Specifies the current hardware status of the underlying NIC, as one of the following NDIS_HARDWARE_STATUS-type values:

NdisHardwareStatusReady
Available and capable of sending and receiving data over the wire
NdisHardwareStatusInitializing
Initializing
NdisHardwareStatusReset
Resetting
NdisHardwareStatusClosing
Closing
NdisHardwareStatusNotReady
Not ready

OID_GEN_MEDIA_SUPPORTED

A complete list of the media types the NIC supports, as a proper subset of the following system-defined values:

NdisMedium802_3
Ethernet (802.3)
NdisMedium802_5
Token Ring (802.5)
NdisMediumFddi
FDDI
NdisMediumWan
WAN
NdisMediumLocalTalk
LocalTalk
NdisMediumDix
DEC/Intel/Xerox (DIX) Ethernet
NdisMediumArcnetRaw
ARCNET (raw)
NdisMediumArcnet878_2
ARCNET (878.2)
NdisMediumWirelessWan
Various types of NdisWirelessXxx media
NdisMediumAtm
Reserved for future use
NdisMediumIrda
Reserved for future use on Windows NT platforms

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.

OID_GEN_MEDIA_IN_USE

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:

NdisMedium802_3
Ethernet (802.3)
NdisMedium802_5
Token Ring (802.5)
NdisMediumFddi
FDDI
NdisMediumWan
WAN
NdisMediumLocalTalk
LocalTalk
NdisMediumDix
DIX
NdisMediumArcnetRaw
ARCNET (raw)
NdisMediumArcnet878_2
ARCNET (878.2)
NdisMediumWirelessWan
Various types of NdisWirelessXxx media.

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.

OID_GEN_MAXIMUM_LOOKAHEAD

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.

OID_GEN_MAXIMUM_FRAME_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.

OID_GEN_LINK_SPEED

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.

OID_GEN_TRANSMIT_BUFFER_SPACE

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.

OID_GEN_RECEIVE_BUFFER_SPACE

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.

OID_GEN_TRANSMIT_BLOCK_SIZE

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.

OID_GEN_RECEIVE_BLOCK_SIZE

The amount of storage, in bytes, that a single packet occupies in the receive buffer space of the NIC.

OID_GEN_VENDOR_ID

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.

OID_GEN_VENDOR_DESCRIPTION

Points to a zero-terminated counted string describing the NIC.

OID_GEN_VENDOR_DRIVER_VERSION

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.

OID_GEN_CURRENT_PACKET_FILTER

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:

NDIS_PACKET_TYPE_ALL_FUNCTIONAL
All functional address packets, not just the ones in the current functional address.
NDIS_PACKET_TYPE_ALL_MULTICAST
All multicast address packets, not just the ones enumerated in the multicast address list.
NDIS_PACKET_TYPE_ALL_LOCAL
All packets sent by installed protocols and all packets indicated by the NIC identified by a given NdisBindingHandle.
NDIS_PACKET_TYPE_BROADCAST
Broadcast packets.
NDIS_PACKET_TYPE_DIRECTED
Directed packets. Directed packets contain a destination address equal to the station address of the NIC.
NDIS_PACKET_TYPE_FUNCTIONAL
Functional address packets sent to addresses included in the current functional address.
NDIS_PACKET_TYPE_GROUP
Packets sent to the current group address.
NDIS_PACKET_TYPE_MAC_FRAME
NIC driver frames that a Token Ring NIC receives.
NDIS_PACKET_TYPE_SMT
SMT packets that an FDDI NIC receives.
NDIS_PACKET_TYPE_MULTICAST
Multicast address packets sent to addresses in the multicast address list.

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.

NDIS_PACKET_TYPE_PROMISCUOUS
Specifies all packets.
NDIS_PACKET_TYPE_SOURCE_ROUTING
All source routing packets. If the protocol driver sets this bit, the NDIS library attempts to act as a source routing bridge.

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.

OID_GEN_CURRENT_LOOKAHEAD

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.

OID_GEN_DRIVER_VERSION

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.

OID_GEN_MAXIMUM_TOTAL_SIZE

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.

OID_GEN_PROTOCOL_OPTIONS

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:

NDIS_PROT_OPTION_ESTIMATED_LENGTH
Indicates that packets can be indicated at the worst-case estimate of packet size, instead of an exact value, to this protocol.
NDIS_PROT_OPTION_NO_LOOPBACK
The protocol does will not require loopback support on the binding.

OID_GEN_MAC_OPTIONS

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:

NDIS_MAC_OPTION_COPY_LOOKAHEAD_DATA
The protocol driver is free to access indicated data by any means. Some fast-copy functions have trouble accessing on-board device memory. NIC drivers that indicate data out of mapped device memory should never set this flag. If a NIC driver does set this flag, it relaxes the restriction on fast-copy functions.
NDIS_MAC_OPTION_RECEIVE_SERIALIZED
The NIC driver indicates packets in a serial manner. That is, such a driver does not enter a new receive indication until the previous receive and any associated calls to the driver’s MiniportTransferData function, if any, have been completed.
NDIS_MAC_OPTION_TRANSFERS_NOT_PEND
The NIC driver never returns NDIS_STATUS_PENDING from its MiniportTransferData function. The call succeeds or fails immediately in all cases.

A miniport that indicates receives with NdisMIndicateReceivePacket has no MiniportTransferData function. Such a driver should set this flag.

NDIS_MAC_OPTION_NO_LOOPBACK
The NIC has no internal loopback support so NDIS will manage loopbacks on behalf of this driver. A miniport cannot provide its own software loopback as efficiently as NDIS, so every miniport should set this flag unless its NIC has hardware loopback support. WAN NIC miniports must set this flag.
NDIS_MAC_OPTION_FULL_DUPLEX
The NIC driver supports full-duplex transmits and indications on SMP platforms. NDIS serializes calls to the MiniportSend(Packets) function of such a driver separately from its serialized calls to other MiniportXxx functions. A driver that reports its medium type as NdisMediumWan cannot set this flag, and WAN NIC miniports cannot be full-duplex drivers.

OID_GEN_MEDIA_CONNECT_STATUS

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.

OID_GEN_MAXIMUM_SEND_PACKETS

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.

General Statistics

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 
Frames transmitted without errors.

4

M

OID_GEN_RCV_OK 
Frames received without errors.

4

M

OID_GEN_XMIT_ERROR 
Frames not transmitted or transmitted with errors

4

M

OID_GEN_RCV_ERROR 
Frames received with errors

4

M

OID_GEN_RCV_NO_BUFFER 
Frame missed, no buffers

8

O

OID_GEN_DIRECTED_BYTES_XMIT 
Directed bytes transmitted without errors

4

O

OID_GEN_DIRECTED_FRAMES_XMIT 
Directed frames transmitted without errors

8

O

OID_GEN_MULTICAST_BYTES_XMIT 
Multicast bytes transmitted without errors

4

O

OID_GEN_MULTICAST_FRAMES_XMIT 
Multicast frames transmitted without errors

8

O

OID_GEN_BROADCAST_BYTES_XMIT 
Broadcast bytes transmitted without errors

4

O

OID_GEN_BROADCAST_FRAMES_XMIT 
Broadcast frames transmitted without errors

8

O

OID_GEN_DIRECTED_BYTES_RCV 
Directed bytes received without errors

4

O

OID_GEN_DIRECTED_FRAMES_RCV 
Directed frames received without errors

8

O

OID_GEN_MULTICAST_BYTES_RCV 
Multicast bytes received without errors

4

O

OID_GEN_MULTICAST_FRAMES_RCV 
Multicast frames received without errors

8

O

OID_GEN_BROADCAST_BYTES_RCV 
Broadcast bytes received without errors

4

O

OID_GEN_BROADCAST_FRAMES_RCV 
Broadcast frames received without errors

4

O

OID_GEN_RCV_CRC_ERROR 
Frames received with circular redundancy check (CRC) or frame check sequence (FCS) error

4

O

OID_GEN_TRANSMIT_QUEUE_LENGTH 
Length of transmit queue

The following describes each of the OID_XXX listed in the preceding chart more fully.

OID_GEN_XMIT_OK

The number of frames transmitted without errors.

OID_GEN_RCV_OK

The number of frames the NIC receives without errors and indicates to bound protocols.

OID_GEN_XMIT_ERROR

The number of frames a NIC fails to transmit.

OID_GEN_RCV_ERROR

The number of frames a NIC receives but does not indicate to the protocols due to errors.

OID_GEN_RCV_NO_BUFFER

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.

OID_GEN_DIRECTED_BYTES_XMIT

The number of bytes in directed packets transmitted without errors.

OID_GEN_DIRECTED_FRAMES_XMIT

The number of directed packets transmitted without errors.

OID_GEN_MULTICAST_BYTES_XMIT

The number of bytes in multicast/functional packets transmitted without errors.

OID_GEN_MULTICAST_FRAMES_XMIT

The number of multicast/functional packets transmitted without errors.

OID_GEN_BROADCAST_BYTES_XMIT

The number of bytes in broadcast packets transmitted without errors.

OID_GEN_BROADCAST_FRAMES_XMIT

The number of broadcast packets transmitted without errors.

OID_GEN_DIRECTED_BYTES_RCV

The number of bytes in directed packets received without errors.

OID_GEN_DIRECTED_FRAMES_RCV

The number of directed packets received without errors.

OID_GEN_MULTICAST_BYTES_RCV

The number of bytes in multicast/functional packets received without errors.

OID_GEN_MULTICAST_FRAMES_RCV

The number of multicast/functional packets received without errors.

OID_GEN_BROADCAST_BYTES_RCV

The number of bytes in broadcast packets received without errors.

OID_GEN_BROADCAST_FRAMES_RCV

The number of broadcast packets received without errors.

OID_GEN_RCV_CRC_ERROR

The number of frames received with checksum errors.

OID_GEN_TRANSMIT_QUEUE_LENGTH

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.