Rediger

Del via


OID_NIC_SWITCH_CURRENT_CAPABILITIES

An overlying driver issues an object identifier (OID) query request of OID_NIC_SWITCH_CURRENT_CAPABILITIES to obtain the currently enabled hardware capabilities of the NIC switch in a network adapter.

After a successful return from the OID query request, the InformationBuffer member of the NDIS_OID_REQUEST structure contains a pointer to an NDIS_NIC_SWITCH_CAPABILITIES structure.

Remarks

Starting with NDIS 6.20, miniport drivers supply the currently enabled NIC switch hardware capabilities on the network adapter when its MiniportInitializeEx function is called. The driver initializes an NDIS_NIC_SWITCH_CAPABILITIES structure with the NIC switch hardware capabilities and sets the CurrentNicSwitchCapabilities member of the NDIS_MINIPORT_ADAPTER_HARDWARE_ASSIST_ATTRIBUTES structure to a pointer to the NDIS_NIC_SWITCH_CAPABILITIES structure. The miniport driver then calls the NdisMSetMiniportAttributes function and sets the MiniportAttributes parameter to a pointer to an NDIS_MINIPORT_ADAPTER_HARDWARE_ASSIST_ATTRIBUTES structure.

Note  Starting with NDIS 6.30, miniport drivers that support the single root I/O virtualization (SR-IOV) interface must register the enabled hardware capabilities of the NIC switch. Drivers register these capabilities by calling NdisMSetMiniportAttributes.

Overlying protocol and filter drivers do not have to issue OID query requests of OID_NIC_SWITCH_CURRENT_CAPABILITIES. NDIS provides the currently enabled NIC switch hardware capabilities of a network adapter to these drivers in the following way:

  • NDIS reports the currently enabled NIC switch hardware capabilities of an underlying network adapter to overlying protocol drivers in the NicSwitchCapabilities member of the NDIS_BIND_PARAMETERS structure during the bind operation.

  • NDIS reports the currently enabled NIC switch hardware capabilities of an underlying network adapter to overlying filter drivers in the NicSwitchCapabilities member of the NDIS_FILTER_ATTACH_PARAMETERS structure during the attach operation.

Return Status Codes

NDIS handles the OID query request of the OID_NIC_SWITCH_CURRENT_CAPABILITIES request for miniport drivers. The drivers will not be issued this OID request.

When NDIS handles the OID_NIC_SWITCH_CURRENT_CAPABILITIES request, it returns one of the following status codes:

Status Code Description

NDIS_STATUS_SUCCESS

The request completed successfully. The InformationBuffer points to an NDIS_NIC_SWITCH_CAPABILITIES structure.

NDIS_STATUS_NOT_SUPPORTED

The miniport driver either does not support the single root I/O virtualization (SR-IOV) interface or is not enabled to use the interface.

NDIS_STATUS_INVALID_LENGTH

The length of the information buffer is less than sizeof(NDIS_NIC_SWITCH_CAPABILITIES). The miniport driver must set the DATA.QUERY_INFORMATION.BytesNeeded member in the NDIS_OID_REQUEST structure to the minimum buffer size that is required.

NDIS_STATUS_FAILURE

The request failed for other reasons.

Requirements

Version

Supported in NDIS 6.20 and later.

Header

Ntddndis.h (include Ndis.h)

See also

NDIS_BIND_PARAMETERS

NDIS_FILTER_ATTACH_PARAMETERS

NDIS_MINIPORT_ADAPTER_HARDWARE_ASSIST_ATTRIBUTES

NDIS_NIC_SWITCH_CAPABILITIES

NDIS_OID_REQUEST