Bewerken

Delen via


OID_SWITCH_PORT_TEARDOWN

The protocol edge of the Hyper-V extensible switch issues an object identifier (OID) set request of OID_SWITCH_PORT_TEARDOWN to notify underlying extensible switch extensions that an extensible switch port will begin the deletion process. This process is started when the protocol driver issues an OID set request of OID_SWITCH_PORT_DELETE.

The InformationBuffer member of the NDIS_OID_REQUEST structure contains a pointer to an NDIS_SWITCH_PORT_PARAMETERS structure.

Remarks

The PortId member of the NDIS_SWITCH_PORT_PARAMETERS structure specifies the extensible switch port for which the connect notification is being made. The extensible switch extension must update any cached information about the port that it obtained in the following ways:

The protocol edge of the extensible switch issues an OID set request of OID_SWITCH_PORT_TEARDOWN to notify the extension that a port is in the process of being deleted from the extensible switch. Before this OID request is issued, the protocol edge of the extensible switch had previously issued the following OIDs if the port had an active network adapter connection:

  • OID_SWITCH_NIC_DISCONNECT, which notified underlying extensions that the network adapter is no longer connected to the port that is specified in the NDIS_SWITCH_PORT_PARAMETERS structure.

  • OID_SWITCH_NIC_DELETE, which notified underlying extensions that the network connection between the network adapter and extensible switch port has been deleted.

    The protocol edge issues this OID set request after all pending packets for the specified extensible switch port have been canceled or completed.

After the extension completes this OID set request and the reference counter for the extensible switch port is zero, the protocol edge of the extensible switch issues an OID set request of OID_SWITCH_PORT_DELETE. This OID request deletes the port from the extensible switch.

Note  An extension increments the reference counter for an extensible switch port by calling ReferenceSwitchPort. An extension decrements the reference counter by calling DereferenceSwitchPort.

The extension must follow these guidelines for handling OID set requests of OID_SWITCH_PORT_TEARDOWN:

  • The extension must always forward this OID set request to underlying extensions. The extension must not fail the request.

    Note  The extension must not modify the NDIS_SWITCH_PORT_PARAMETERS structure that is associated with the OID request.

  • After the extension forwards this OID request, it cannot forward packets to the deleted port. The extension also cannot issue OID requests nor call the ReferenceSwitchPort function for the deleted port.

Note  The extension must not issue OID set requests of OID_SWITCH_PORT_TEARDOWN.

For more information about the states of extensible switch ports and network adapter connections, see Hyper-V Extensible Switch Port and Network Adapter States.

Return Status Codes

The underlying miniport edge of the extensible switch completes the OID set request of OID_SWITCH_PORT_TEARDOWN and 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


DereferenceSwitchPort

FilterAttach

NDIS_OID_REQUEST

NDIS_SWITCH_PARAMETERS

NDIS_SWITCH_PORT_PARAMETERS

NdisFOidRequest

NET_PNP_EVENT

OID_SWITCH_NIC_DELETE

OID_SWITCH_PARAMETERS

OID_SWITCH_PORT_ARRAY

ReferenceSwitchPort