NDIS_SWITCH_GROW_NET_BUFFER_LIST_DESTINATIONS callback function (ndis.h)

The GrowNetBufferListDestinations function adds space for additional Hyper-V extensible switch destination ports to a packet that is specified by a NET_BUFFER_LIST structure.

Syntax

NDIS_SWITCH_GROW_NET_BUFFER_LIST_DESTINATIONS NdisSwitchGrowNetBufferListDestinations;

NDIS_STATUS NdisSwitchGrowNetBufferListDestinations(
  [in]  NDIS_SWITCH_CONTEXT NdisSwitchContext,
        PNET_BUFFER_LIST NetBufferList,
  [in]  UINT32 NumberOfNewDestinations,
  [out] PNDIS_SWITCH_FORWARDING_DESTINATION_ARRAY *Destinations
)
{...}

Parameters

[in] NdisSwitchContext

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.

NetBufferList

A pointer to a linked list of NET_BUFFER_LIST structures.

Note  This structure must contain an extensible switch forwarding context. If the extension created or cloned the packet, it must have previously allocated this structure by calling the AllocateNetBufferListForwardingContext function. For more information about the extensible switch forwarding context, see Hyper-V Extensible Switch Forwarding Context.
 

[in] NumberOfNewDestinations

A UINT32 value that specifies the number of new destination ports to be added for the packet.

[out] Destinations

A pointer to an NDIS_SWITCH_FORWARDING_DESTINATION_ARRAY structure. This structure specifies the extensible switch destination ports of the packet.

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 the GrowNetBufferListDestinations function to add space for destination ports for a packet. Port destinations are specified through an NDIS_SWITCH_FORWARDING_DESTINATION_ARRAY structure.

For more information on how to add destination ports to a packet, see Adding Extensible Switch Destination Port Data to a Packet.

Note  If the NetBufferList parameter contains a pointer to a linked-list of multiple NET_BUFFER_LIST structures, space for additional destination ports is only added to the first NET_BUFFER_LIST structure in the list.
 

Requirements

Requirement Value
Minimum supported client Supported in NDIS 6.30 and later.
Target Platform Desktop
Header ndis.h (include Ndis.h)
IRQL <= DISPATCH_LEVEL

See also

AllocateNetBufferListForwardingContext

NDIS_SWITCH_FORWARDING_DESTINATION_ARRAY

NDIS_SWITCH_PORT_DESTINATION

NET_BUFFER

NET_BUFFER_LIST

NdisFGetOptionalSwitchHandlers

UpdateNetBufferListDestinations