OID_SWITCH_PORT_PROPERTY_ADD
The protocol edge of the Hyper-V extensible switch issues an object identifier (OID) set request of OID_SWITCH_PORT_PROPERTY_ADD to notify extensible switch extensions about the addition of a policy property for an extensible switch port.
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_PROPERTY_PARAMETERS structure that specifies the identification and type of parameters for a port policy.
A property buffer that contains the parameters for a port policy. The property buffer contains a structure that is based on the PropertyType member of the NDIS_SWITCH_PORT_PROPERTY_PARAMETERS structure. For example, if the PropertyType member is set to NdisSwitchPortPropertyTypeVlan, the property buffer contains an NDIS_SWITCH_PORT_PROPERTY_VLAN structure.
Remarks
A forwarding extension can handle the OID set request of OID_SWITCH_PORT_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 port property by returning NDIS_STATUS_DATA_NOT_ACCEPTED for the OID request. For example, if an extension cannot allocate resources to enforce its configured policies on the port, 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_PORT_PROPERTY_ADD, see Managing Port Policies.
Return Status Codes
If the forwarding extension completes the OID set request of OID_SWITCH_PORT_PROPERTY_ADD, it returns one of the following status codes:
Status Code | Description |
---|---|
NDIS_STATUS_INVALID_LENGTH |
The length of the information buffer is too small to process the NDIS_SWITCH_PORT_PROPERTY_PARAMETERS structure and the data in the structure's property buffer. The extension sets the DATA.SET_INFORMATION.BytesNeeded member in the NDIS_OID_REQUEST structure to the minimum buffer size that is required. |
NDIS_STATUS_DATA_NOT_ACCEPTED |
The forwarding extension has vetoed the port policy addition notification. |
NDIS_STATUS_NOT_SUPPORTED |
The forwarding extension does not support the port policy. |
NDIS_STATUS_Xxx |
The OID request failed for other reasons. |
If the extension does not complete the OID set request of OID_SWITCH_PORT_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_SWITCH_PORT_PROPERTY_CUSTOM
NDIS_SWITCH_PORT_PROPERTY_PARAMETERS