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:
An NDIS_NIC_SWITCH_INFO_ARRAY structure that defines the number of elements within the array.
An array of NDIS_NIC_SWITCH_INFO structures. Each of these structures contains the information about a single NIC switch created on the network adapter.
Note If the network adapter has no NIC switches, the driver sets the NumElements member of the NDIS_NIC_SWITCH_INFO_ARRAY structure to zero and no NDIS_NIC_SWITCH_INFO structures are returned.
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) |