NDIS_SWITCH_ALLOCATE_NET_BUFFER_LIST_FORWARDING_CONTEXT - NtDoc

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

NDIS_SWITCH_ALLOCATE_NET_BUFFER_LIST_FORWARDING_CONTEXT NdisSwitchAllocateNetBufferListForwardingContext;

NDIS_STATUS NdisSwitchAllocateNetBufferListForwardingContext(
  [in]      NDIS_SWITCH_CONTEXT NdisSwitchContext,
  [in, out] PNET_BUFFER_LIST NetBufferList
)
{...}
View the official Windows Driver Kit DDI reference

NtDoc

No description available.

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

NDIS_SWITCH_ALLOCATE_NET_BUFFER_LIST_FORWARDING_CONTEXT callback function

Description

The AllocateNetBufferListForwardingContext function prepares a NET_BUFFER_LIST structure for send or receive operations within the extensible switch.

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.

NetBufferList [in, out]

A pointer to a linked list of NET_BUFFER_LIST structures.

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 can originate packet send operations within the extensible switch data path. For example, the extension can send packets to any port on the extensible switch. For more information about this data path, see Hyper-V Extensible Switch Data Path.

After the extension calls NdisAllocateNetBufferList or NdisAllocateCloneNetBufferList to create or clone a packet from its NET_BUFFER_LIST pool, the extension must call the AllocateNetBufferListForwardingContext function. This function allocates and initializes the out-of-band (OOB) extensible switch forwarding context for the specified NET_BUFFER_LIST structure. For more information about this context, see Hyper-V Extensible Switch Forwarding Context.

The extension must follow these guidelines for allocating the forwarding context through the AllocateNetBufferListForwardingContext function:

For more information on how to originate send operations, see Filter Module Send and Receive Operations.

Note If the NetBufferList parameter contains a pointer to a linked-list of multiple NET_BUFFER_LIST structures, only the first NET_BUFFER_LIST structure in the list has a forwarding context allocated for it.

See also

CopyNetBufferListInfo

FilterAttach

FreeNetBufferListForwardingContext

NET_BUFFER

NET_BUFFER_LIST

NdisAllocateNetBufferList

NdisFGetOptionalSwitchHandlers

NdisFreeNetBufferList