OID_SWITCH_NIC_SAVE

OID_SWITCH_NIC_SAVE

The protocol edge of the Hyper-V extensible switch issues an object identifier (OID) method request of OID_SWITCH_NIC_SAVE during an operation to save run-time data for an extensible switch port and its network adapter connection. The extension returns this data so that run-time data can be saved and restored at a later time. After the run-time data is saved, it is restored through OID set requests of OID_SWITCH_NIC_RESTORE.

The InformationBuffer member of the NDIS_OID_REQUEST structure contains a pointer to an NDIS_SWITCH_NIC_SAVE_STATE structure. This structure is allocated by the protocol edge of the extensible switch.

Remarks

When it receives the OID method request of OID_SWITCH_NIC_SAVE, the extensible switch extension saves run-time data by doing the following:

  • The extension saves the data within the NDIS_SWITCH_NIC_SAVE_STATE structure starting from SaveDataOffset bytes from the start of the structure.

  • If the SaveDataSize provided is not large enough to hold the required save data, the extension sets the method structure’s BytesNeeded field to NDIS_SIZEOF_NDIS_SWITCH_NIC_SAVE_STATE_REVISION_1 plus the amount of buffer necessary to hold the save data, and completes the OID with NDIS_STATUS_BUFFER_TOO_SHORT. The OID will be reissued with the required size.

  • The extension populates the ExtensionId and ExtensionFriendlyName fields with its own identifier and name, and completes the OID method request with NDIS_STATUS_SUCCESS. This causes the protocol edge of the extensible switch to issue another OID method request to allow the extension to either return more save data, or allow other extensions down the stack to save their own data.

Note  If the extension does not have run-time data to save, it must call NdisFOidRequest to forward this OID method request to underlying extensions in the extensible switch driver stack. For more information about this procedure, see Filtering OID Requests in an NDIS Filter Driver.
 

The Hyper-V extensible switch populates the Header, PortId, NicIdex, SaveDataSize and SaveDataOffset fields of the structure before issuing the OID. The extension cannot modify these fields.

OID method requests of OID_SWITCH_NIC_SAVE are ultimately handled by the underlying miniport edge of the extensible switch. After this OID method request has been received by the miniport edge of the extensible switch, it completes the OID request with NDIS_STATUS_SUCCESS. This notifies the protocol edge of the extensible switch that all extensions in the extensible switch driver stack have been queried for run-time data. The protocol edge of the extensible switch then issues an OID set request of OID_SWITCH_NIC_SAVE_COMPLETE to complete the save operation.

For more information on how to save run-time data for an extensible switch port, see Saving Hyper-V Extensible Switch Run-Time Data.

Return Status Codes

The extensible switch extension returns one of the following status codes for the OID method request of OID_SWITCH_NIC_SAVE.

Status CodeDescription

NDIS_STATUS_BUFFER_TOO_SHORT

The length of the information buffer is too small for the NDIS_SWITCH_NIC_SAVE_STATE and its associated run-time data The extensible switch extension must set the DATA.METHOD_INFORMATION.BytesNeeded member in the NDIS_OID_REQUEST structure to the minimum buffer size that is required.

NDIS_STATUS_SUCCESS

The extension returns this status if it is returning run-time data to save.

NDIS_STATUS_Xxx

The request failed for other reasons.

 

The underlying miniport edge of the extensible switch returns the following status code for the OID method request of OID_SWITCH_NIC_SAVE.

Status CodeDescription

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_NIC_SAVE_STATE
NdisFOidRequest
OID_SWITCH_NIC_RESTORE
OID_SWITCH_NIC_SAVE_COMPLETE

 

 

Send comments about this topic to Microsoft

Show:
© 2016 Microsoft