The NDIS_SWITCH_FORWARDING_DETAIL_NET_BUFFER_LIST_INFO union specifies the information for forwarding a packet to one or more Hyper-V extensible switch ports.

This information is contained in the out-of-band (OOB) data of the packet's NET_BUFFER_LIST structure.


  UINT64 AsUINT64;
  struct {
    UINT32 NumAvailableDestinations : 16;
    UINT32 SourcePortId : 16;
    UINT32 SourceNicIndex : 8;
    UINT32 NativeForwardingRequired : 1;
#if ...
    UINT32 Reserved1 : 1;
    UINT32 Reserved1 : 2;
    UINT32 IsPacketDataSafe : 1;
    UINT32 SafePacketDataSize : 12;
    UINT32 IsPacketDataUncached : 1;
    UINT32 IsSafePacketDataUncached : 1;
    UINT32 Reserved2 : 7;





A value that specifies the number of unused extensible switch destination ports elements within an NET_BUFFER_LIST structure. For more information, see the Remarks section.


The identifier of the source extensible switch port from which the NET_BUFFER_LIST originated.


A UINT32 value that specifies the index of the source network adapter that is connected to the extensible switch port specified by the SourcePortId member.

For more information on this index value, see Network Adapter Index Values.


If this member is set to TRUE, packet is an NVGRE packet, and the Hyper-V Network Virtualization (HNV) component of the Hyper-V extensible switch will forward this packet. For more information, see Hybrid Forwarding.

This flag must not be written to by any extension.

Note  This flag is available only in NDIS 6.40 and later.




If this member is set to TRUE, all of the packet data comes from trusted host memory.


A value that specifies the number of consecutive bytes in the packet data that is located in trusted host memory. This value is in units of bytes from the start of the packet data. The rest of the packet data (if any) after the SafePacketDataSize value is located in untrusted shared memory that is accessed by the Hyper-V child and parent partitions.

For more information, see the Remarks section.

Note  This member is valid only if the IsPacketDataSafe member is set to FALSE.


If this flag is not set, the entire packet data is cached. If it is set, part or all of the data is not cached. When set, check the IsSafePacketDataUncached field to see if at least the SafePacketData portion is cached.


If the IsPacketDataUncached flag is set, this field indicates whether the SafePacketData part of the packet is cached. If so, see the SafePacketDataSize field for how many bytes are cached.


This member is reserved for future use by NDIS.


Extensible switch extensions can use the NET_BUFFER_LIST_SWITCH_FORWARDING_DETAIL macro to access the NDIS_SWITCH_FORWARDING_DETAIL_NET_BUFFER_LIST_INFO union in a NET_BUFFER_LIST structure.

The NumAvailableDestinations member of the NDIS_SWITCH_FORWARDING_DETAIL_NET_BUFFER_LIST_INFO union specifies the number of unused extensible switch destination port elements within a NET_BUFFER_LIST structure. Each extensible switch destination port is specified by an NDIS_SWITCH_PORT_DESTINATION element within the NDIS_SWITCH_FORWARDING_DESTINATION_ARRAY structure of a NET_BUFFER_LIST structure. The extensible switch extension calls GetNetBufferListDestinations to obtain the current NDIS_SWITCH_FORWARDING_DESTINATION_ARRAY in a NET_BUFFER_LIST structure.

The NativeForwardingRequired member specifies whether the packet is an NVGRE packet or not. If it is TRUE, the packet is an NVGRE packet, and the forwarding extension doesn't determine the packet's forwarding destination port array, although it can add or exclude destination ports in the array. For more information, see Hybrid Forwarding.

The IsPacketDataUncached flag can help extensible switch extensions determine if part or all of the packet data is cached or not. If this flag is set, part or all of the data is not cached, and the IsSafePacketDataUncached flag tells the extension whether the safe packet data part is cached. If the safe packet data is cached, then the SafePacketDataSize member specifies how many bytes are cached.

SafePacketDataSize specifies the size of the packet data that is located in local, or trusted, memory in the parent operating system of the Hyper-V parent partition. This memory is not accessible by the child partition. Therefore, it is considered "safe" from unsynchronized updates by the guest operating system that runs in that partition.

If an extensible switch extension requires more trusted space in order to inspect the packet data, it must follow these steps:

  1. The extension must duplicate the packet's NET_BUFFER_LIST structure by allocating a NET_BUFFER_LIST and NET_BUFFER structure. The extension then calls NdisCopyFromNetBufferToNetBuffer to duplicate the packet's NET_BUFFER structure. If this function completes successfully, the packet's data is copied to trusted memory.
  2. The extension must call CopyNetBufferListInfo to copy the packet's OOB data to the duplicated packet.
  3. After the original packet has been duplicated, the extension must obtain the NDIS_SWITCH_FORWARDING_DETAIL_NET_BUFFER_LIST_INFO union in the duplicated packet by using the NET_BUFFER_LIST_SWITCH_FORWARDING_DETAIL macro. The extension must set the IsPacketDataSafe member to TRUE.
For more information on how to duplicate packets in the extensible switch interface, see Originating Packet Traffic.


Minimum supported client Supported in NDIS 6.30 and later.
Header ndis.h (include Ndis.h)

See Also

Forwarding Extensions

Forwarding Packets to Hyper-V Extensible Switch Ports

Forwarding Packets to Physical Network Adapters


Hybrid Forwarding





Overview of the Hyper-V Extensible Switch