NDIS_SWITCH_DEREFERENCE_SWITCH_NIC - NtDoc

Native API online documentation, based on the System Informer (formerly Process Hacker) phnt headers
// ndis.h

NDIS_SWITCH_DEREFERENCE_SWITCH_NIC NdisSwitchDereferenceSwitchNic;

NDIS_STATUS NdisSwitchDereferenceSwitchNic(
  [in] NDIS_SWITCH_CONTEXT NdisSwitchContext,
  [in] NDIS_SWITCH_PORT_ID SwitchPortId,
  [in] NDIS_SWITCH_NIC_INDEX SwitchNicIndex
)
{...}
View the official Windows Driver Kit DDI reference

NtDoc

No description available.

Windows Driver Kit DDI reference (nc-ndis-ndis_switch_dereference_switch_nic)

NDIS_SWITCH_DEREFERENCE_SWITCH_NIC callback function

Description

The DereferenceSwitchNic function decrements the Hyper-V extensible switch reference counter for a network adapter that is connected to an extensible switch port. The reference counter was incremented through a previous call to ReferenceSwitchNic.

Parameters

NdisSwitchContext [in]

An NDIS_SWITCH_CONTEXT value that contains the handle of the extensible switch module to which the Hyper-V extensible switch extension is attached. When the extension calls NdisFGetOptionalSwitchHandlers, this handle is returned through the NdisSwitchContext parameter.

SwitchPortId [in]

An NDIS_SWITCH_PORT_ID value that contains the unique identifier of the extensible switch port to which the virtual network adapter is connected.

SwitchNicIndex [in]

An NDIS_SWITCH_NIC_INDEX value that specifies the index of the virtual network adapter for which the extensible switch reference counter is to be incremented.

For more information on NDIS_SWITCH_NIC_INDEX values, see Network Adapter Index Values.

Return value

If the call succeeds, the function returns NDIS_STATUS_SUCCESS. Otherwise, it returns an NDIS_STATUS_Xxx error code that is defined in Ndis.h.

Remarks

The extensible switch extension calls DereferenceSwitchNic to decrement the reference counter for a network adapter that is connected to an extensible switch port. While the extensible switch reference counter has a nonzero value, the protocol edge of the extensible switch will not issue an object identifier (OID) set request of OID_SWITCH_NIC_DELETE to delete the connection to the adapter.

The extension must call DereferenceSwitchNic if it had previously called ReferenceSwitchNic for a network adapter connection.

See also

NdisFGetOptionalSwitchHandlers

OID_SWITCH_NIC_DELETE

ReferenceSwitchNic