Partilhar via


Hyper-V Tipos de dados de contexto de encaminhamento do comutador extensível

The NET_BUFFER_LIST structure for each packet that traverses the Hyper-V extensible switch data path contains out-of-band (OOB) data. Esses dados especificam a porta de origem de onde o pacote se originou, bem como uma ou mais portas de destino para entrega de pacotes. Esses dados OOB são conhecidos como o contexto de encaminhamento de switch extensível.

The following data types have been declared to access the extensible switch forwarding context within a packet's NET_BUFFER_LIST structure:

NDIS_SWITCH_FORWARDING_DETAIL_NET_BUFFER_LIST_INFO
Esta é uma união de 64 bits que contém as características de encaminhamento de um pacote. Esses dados incluem os identificadores da porta de origem e da conexão do adaptador de rede do qual o pacote se originou. Esses dados também incluem o número de elementos não utilizados disponíveis na matriz de porta de destino.

The extensible switch extension can access this data by using the NET_BUFFER_LIST_SWITCH_FORWARDING_DETAIL macro.

NDIS_SWITCH_FORWARDING_DESTINATION_ARRAY
Essa estrutura define a matriz de porta de destino para o pacote. Each element in this array is formatted as an NDIS_SWITCH_PORT_DESTINATION structure.

The NDIS_SWITCH_FORWARDING_DESTINATION_ARRAY structure contains members that specify the current number of the total number of elements as well as the number of used elements in the array.

The extensible switch extension can obtain this array by calling the GetNetBufferListDestinations function. If the driver adds or modifies elements in the array for a packet with multiple destination ports, it must call the UpdateNetBufferListDestinations function. Esta função confirma essas alterações na matriz de porta de destino no contexto de encaminhamento do pacote.

Note To commit changes to a packet with only one destination port, it is more efficient for the driver to call the AddNetBufferListDestination function.

NDIS_SWITCH_PORT_DESTINATION
Essa estrutura define uma porta de destino para o pacote. For packets with a single destination port, there is only one NDIS_SWITCH_PORT_DESTINATION element in the destination port array. Para pacotes com várias portas de destino, há um ou mais desses elementos na matriz.

After the extensible switch extension has called GetNetBufferListDestinations to obtain the packet's destination port array, it can access individual elements in the array by using the NDIS_SWITCH_PORT_DESTINATION_AT_ARRAY_INDEX macro.