NDIS_SWITCH_GROW_NET_BUFFER_LIST_DESTINATIONS callback function

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 GrowNetBufferListDestinations;

NDIS_STATUS GrowNetBufferListDestinations(
  _In_    NDIS_SWITCH_CONTEXT                       NdisSwitchContext,
  _Inout_ PNET_BUFFER_LIST                          NetBufferLists,
  _In_    UINT32                                    NumberOfNewDestinations,
  _Out_   PNDIS_SWITCH_FORWARDING_DESTINATION_ARRAY *Destinations
)
{ ... }

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.

NetBufferLists [in, out]

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.
 
NumberOfNewDestinations [in]

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

Destinations [out]

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

Target platform

Version

Supported in NDIS 6.30 and later.

Header

Ndis.h (include Ndis.h)

IRQL

<= DISPATCH_LEVEL

See also

AllocateNetBufferListForwardingContext
NDIS_SWITCH_FORWARDING_DESTINATION_ARRAY
NDIS_SWITCH_PORT_DESTINATION
NdisFGetOptionalSwitchHandlers
NET_BUFFER
NET_BUFFER_LIST
UpdateNetBufferListDestinations

 

 

Send comments about this topic to Microsoft

Show: