OID_SWITCH_PROPERTY_ADD

The protocol edge of the Hyper-V extensible switch issues an object identifier (OID) set request of OID_SWITCH_PROPERTY_ADD to notify extensible switch extensions about the addition of a switch policy property

The InformationBuffer member of the NDIS_OID_REQUEST structure contains a pointer to a buffer. This buffer contains the following data:

  • An NDIS_SWITCH_PROPERTY_PARAMETERS structure that specifies the identification and type of an extensible switch policy.

  • A property buffer that contains the parameters for an extensible switch policy. The property buffer contains a structure that is based on the PropertyType member of the NDIS_SWITCH_PROPERTY_PARAMETERS structure.

    Note  Starting with Windows Server 2012, the PropertyType member must be set to NdisSwitchPropertyTypeCustom and the property buffer must contain an NDIS_SWITCH_PROPERTY_CUSTOM structure.

Remarks

A forwarding extension can handle the OID set request of OID_SWITCH_PROPERTY_ADD. All other types of extensions must call NdisFOidRequest to forward the OID request to the next extension in the extensible switch driver stack.

The extension can veto the addition of the switch property by returning NDIS_STATUS_DATA_NOT_ACCEPTED for the OID request. For example, if an extension cannot allocate resources to enforce its updated policies on the switch, it should veto the addition request.

Note  If the extension returns other NDIS_STATUS_Xxx error status codes, the creation notification is also vetoed. However, returning status codes for transitory scenarios, such as returning NDIS_STATUS_RESOURCES, could result in a retry of the creation notification.

If the extension does not veto the OID request, it should monitor the status when the request is completed. The extension should do this to determine whether the OID request was vetoed by underlying extensions in the extensible switch control path or by the extensible switch interface.

For guidelines on how to handle an OID set request of OID_SWITCH_PROPERTY_ADD, see Managing Switch Policies.

Return Status Codes

If the forwarding extension completes the OID set request of OID_SWITCH_PROPERTY_ADD, it returns one of the following status codes.

Status Code Description

NDIS_STATUS_DATA_NOT_ACCEPTED

The extension has vetoed the switch policy addition notification.

NDIS_STATUS_FAILURE

The OID request failed for other reasons.

If the extension does not complete the OID set request of OID_SWITCH_PROPERTY_ADD, the request is completed by the underlying miniport edge of the extensible switch. The miniport edge returns the following status code.

Status Code Description

NDIS_STATUS_SUCCESS

The OID request completed successfully.

Requirements

Version

Supported in NDIS 6.30 and later.

Header

Ntddndis.h (include Ndis.h)

See also


NDIS_OID_REQUEST

NDIS_SWITCH_PROPERTY_CUSTOM

NDIS_SWITCH_PROPERTY_PARAMETERS

NdisFOidRequest