Rediger

Del via


Managing Custom Switch Feature Status Information

The Hyper-V extensible switch interface uses the following object identifier (OID) to query custom status information for the extensible switch. This status information is known as switch feature status information:

OID_SWITCH_FEATURE_STATUS_QUERY
This OID method request is issued by the protocol edge of the extensible switch to obtain the custom feature status information for a specified switch property.

After a successful return from this OID method request, the InformationBuffer member of the NDIS_OID_REQUEST structure contains a pointer to a buffer. This buffer contains the following data:

  • An NDIS_SWITCH_FEATURE_STATUS_PARAMETERS structure that specifies the custom feature status information that is to be returned.

    Note  For a custom feature status, the FeatureStatusType member is set to NdisSwitchPropertyTypeCustom.

  • An NDIS_SWITCH_FEATURE_STATUS_CUSTOM structure that contains the status information about a custom property assigned to an extensible switch port.

    When the protocol edge of the extensible switch issues the OID_SWITCH_FEATURE_STATUS_QUERY request, it sets the FeatureStatusCustomBufferLength and FeatureStatusCustomBufferOffset members to a location in the InformationBuffer member that the extension can use to return the feature status information.

The extensible switch extension must follow these guidelines when it receives an OID method request of OID_SWITCH_FEATURE_STATUS_QUERY:

  • The extension must handle the OID request if it manages a custom extensible switch feature status that matches the FeatureStatusId member of the NDIS_SWITCH_FEATURE_STATUS_PARAMETERS structure.

  • If the extension handles the OID method request, it must return the feature status information that matches the parameters specified by the NDIS_SWITCH_FEATURE_STATUS_PARAMETERS structure.

    If the feature status buffer is too small, the extension must fail the OID request with NDIS_STATUS_INVALID_LENGTH. The extension must set the DATA.SET_INFORMATION.BytesNeeded member in the NDIS_OID_REQUEST structure to the minimum buffer size that is required.

    Otherwise, the extension must return the feature status information and complete the OID request with NDIS_STATUS_SUCCESS.

  • If the extension does not manage the custom extensible switch feature status, it must call NdisFOidRequest to forward the OID request down the extensible switch driver stack.

    For more information about how to forward OID requests, see Filtering OID Requests in an NDIS Filter Driver.

For more information about how to define and register switch feature status information, see Custom Switch Feature Status.