Bewerken

Delen via


Managing Custom Port Feature Status Information

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

OID_SWITCH_PORT_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 port 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_PORT_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 NdisSwitchPortPropertyTypeCustom.

  • An NDIS_SWITCH_PORT_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_PORT_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_PORT_FEATURE_STATUS_QUERY:

  • The extension must handle the OID request if it manages a custom extensible switch port property that matches the FeatureStatusId member of the NDIS_SWITCH_PORT_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_PORT_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 property, 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 port feature status information, see Custom Port Feature Status.