Szerkesztés

Megosztás a következőn keresztül:


OID_NIC_SWITCH_ENUM_SWITCHES

An overlying driver or user-mode application issues an object identifier (OID) query request of OID_NIC_SWITCH_ENUM_SWITCHES to obtain an array. Each element in the array specifies the attributes of a NIC switch that has been created on a network adapter.

After a successful return from this OID query request, the InformationBuffer member of the NDIS_OID_REQUEST structure contains a pointer to a buffer that contains the following:

Remarks

Overlying drivers and user-mode applications issue OID query requests of OID_NIC_SWITCH_ENUM_SWITCHES to enumerate the NIC switches created on a network adapter.

Note  Starting with Windows Server 2012, the single root I/O virtualization (SR-IOV) interface only supports the default NIC switch on the network adapter. Therefore, the returned NDIS_NIC_SWITCH_INFO_ARRAY structure must specify a single NDIS_NIC_SWITCH_INFO element for the default NIC switch, which is referenced by the identifier of NDIS_DEFAULT_SWITCH_ID.

Return Status Codes

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

When NDIS handles the OID_NIC_SWITCH_ENUM_SWITCHES request, it returns one of the following status codes.

Status Code Description

NDIS_STATUS_SUCCESS

The OID request completed successfully.

NDIS_STATUS_NOT_SUPPORTED

The miniport driver either does not support the SR-IOV interface or is not enabled to use the interface.

NDIS_STATUS_INVALID_PARAMETER

One or more of the members of the NDIS_NIC_SWITCH_INFO_ARRAY structure have invalid values.

NDIS_STATUS_INVALID_LENGTH

The information buffer was too short. NDIS sets 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.30 and later.

Header

Ntddndis.h (include Ndis.h)

See also


NDIS_NIC_SWITCH_INFO

NDIS_NIC_SWITCH_INFO_ARRAY

NDIS_OID_REQUEST

OID_NIC_SWITCH_CREATE_SWITCH

OID_NIC_SWITCH_PARAMETERS