다음을 통해 공유


Hyper-V 확장 가능 스위치 전달 컨텍스트 데이터 형식

The NET_BUFFER_LIST structure for each packet that traverses the Hyper-V extensible switch data path contains out-of-band (OOB) data. 이 데이터는 패킷이 시작된 원본 포트와 패킷 배달을 위한 하나 이상의 대상 포트를 지정합니다. 이 OOB 데이터는 확장 가능한 스위치 전달 컨텍스트로 알려져 있습니다.

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
패킷의 전달 특성을 포함하는 64비트 공용 구조체입니다. 이 데이터에는 패킷이 시작된 원본 포트 및 네트워크 어댑터 연결에 대한 식별자가 포함됩니다. 이 데이터에는 대상 포트 배열에서 사용할 수 있는 사용되지 않는 요소 수도 포함됩니다.

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

NDIS_SWITCH_FORWARDING_DESTINATION_ARRAY
이 구조체는 패킷의 대상 포트 배열을 정의합니다. 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. 이 함수는 패킷의 전달 컨텍스트에서 해당 변경 내용을 대상 포트 배열에 커밋합니다.

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
이 구조체는 패킷의 대상 포트를 정의합니다. For packets with a single destination port, there is only one NDIS_SWITCH_PORT_DESTINATION element in the destination port array. 여러 대상 포트가 있는 패킷의 경우 배열에 이러한 요소 중 하나 이상이 있습니다.

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.