OID_SWITCH_NIC_ARRAY

A Hyper-V extensible switch extension issues an object identifier (OID) query request of OID_SWITCH_NIC_ARRAY to obtain an array. Each element in the array specifies the configuration parameters of a virtual network adapter that is associated with an extensible switch port.

If the OID query request is completed successfully, the InformationBuffer member of the NDIS_OID_REQUEST structure contains a pointer to a buffer. This buffer contains the following data:

  • An NDIS_SWITCH_NIC_ARRAY structure that defines the number of elements in the array. This structure also specifies the offset to the first element in the array.

  • An array of NDIS_SWITCH_NIC_PARAMETERS structures. Each of these structures contains information about a network adapter that is connected to an extensible switch port.

    Note  If no network adapters are connected to extensible switch ports, the underlying miniport edge of the extensible switch sets the NumElements member of the NDIS_SWITCH_NIC_ARRAY structure to zero. In this case, no NDIS_SWITCH_NIC_PARAMETERS structures are returned.

Remarks

The OID_SWITCH_NIC_ARRAY OID must only be issued when the Hyper-V extensible switch has completed activation. Please see Querying the Hyper-V Extensible Switch Configuration for more details.

When the extension processes the returned NDIS_SWITCH_NIC_PARAMETERS structure, it must not assume that the various string members of the NDIS_SWITCH_PORT_PARAMETERS structure, such as NicFriendlyName, are NULL-terminated. The data types for these string members are type-defined by the IF_COUNTED_STRING structure. The driver must determine the string length from the value of the Length member of this structure.

Note  If the string is null-terminated, the Length member must not include the terminating null character.

Return Status Codes

The underlying miniport edge of the extensible switch completes the OID query request of OID_SWITCH_NIC_ARRAY and returns one of the following status codes.

Status Code Description

NDIS_STATUS_SUCCESS

The OID request completed successfully.

NDIS_STATUS_INVALID_LENGTH

The length of the information buffer is too small to return the NDIS_SWITCH_NIC_ARRAY and its array of NDIS_SWITCH_NIC_PARAMETERS elements. The underlying miniport edge of the extensible switch 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_OID_REQUEST

NDIS_SWITCH_NIC_ARRAY

NDIS_SWITCH_NIC_PARAMETERS

Querying the Hyper-V Extensible Switch Configuration