// ndis.h
typedef struct _NDIS_SWITCH_OPTIONAL_HANDLERS {
NDIS_OBJECT_HEADER Header;
NDIS_SWITCH_ALLOCATE_NET_BUFFER_LIST_FORWARDING_CONTEXT_HANDLER AllocateNetBufferListForwardingContext;
NDIS_SWITCH_FREE_NET_BUFFER_LIST_FORWARDING_CONTEXT_HANDLER FreeNetBufferListForwardingContext;
NDIS_SWITCH_SET_NET_BUFFER_LIST_SOURCE_HANDLER SetNetBufferListSource;
NDIS_SWITCH_ADD_NET_BUFFER_LIST_DESTINATION_HANDLER AddNetBufferListDestination;
NDIS_SWITCH_GROW_NET_BUFFER_LIST_DESTINATIONS_HANDLER GrowNetBufferListDestinations;
NDIS_SWITCH_GET_NET_BUFFER_LIST_DESTINATIONS_HANDLER GetNetBufferListDestinations;
NDIS_SWITCH_UPDATE_NET_BUFFER_LIST_DESTINATIONS_HANDLER UpdateNetBufferListDestinations;
NDIS_SWITCH_COPY_NET_BUFFER_LIST_INFO_HANDLER CopyNetBufferListInfo;
NDIS_SWITCH_REFERENCE_SWITCH_NIC_HANDLER ReferenceSwitchNic;
NDIS_SWITCH_DEREFERENCE_SWITCH_NIC_HANDLER DereferenceSwitchNic;
NDIS_SWITCH_REFERENCE_SWITCH_PORT_HANDLER ReferenceSwitchPort;
NDIS_SWITCH_DEREFERENCE_SWITCH_PORT_HANDLER DereferenceSwitchPort;
NDIS_SWITCH_REPORT_FILTERED_NET_BUFFER_LISTS_HANDLER ReportFilteredNetBufferLists;
NDIS_SWITCH_SET_NET_BUFFER_LIST_SWITCH_CONTEXT_HANDLER SetNetBufferListSwitchContext;
NDIS_SWITCH_GET_NET_BUFFER_LIST_SWITCH_CONTEXT_HANDLER GetNetBufferListSwitchContext;
PVOID SwitchPDReserved[NDIS_SWITCH_OPTIONAL_HANDLERS_PD_RESERVED_SIZE];
} NDIS_SWITCH_OPTIONAL_HANDLERS, *PNDIS_SWITCH_OPTIONAL_HANDLERS;
View the official Windows Driver Kit DDI referenceNo description available.
The NDIS_SWITCH_OPTIONAL_HANDLERS structure specifies the pointers to the Hyper-V extensible switch handler functions. These functions can be called by an extensible switch extension.
HeaderThe type, revision, and size of the NDIS_SWITCH_OPTIONAL_HANDLERS structure. This member is formatted as an NDIS_OBJECT_HEADER structure.
The Type member of Header must be set to NDIS_OBJECT_TYPE_DEFAULT. To specify the version of the NDIS_SWITCH_OPTIONAL_HANDLERS structure, the Revision member of Header must be set to the following value:
Original version for NDIS 6.30 and later.
Set the Size member to NDIS_SIZEOF_NDIS_SWITCH_NIC_ARRAY_REVISION_1.
AllocateNetBufferListForwardingContextA pointer to the AllocateNetBufferListForwardingContext function.
FreeNetBufferListForwardingContextA pointer to the FreeNetBufferListForwardingContext function.
SetNetBufferListSourceA pointer to the SetNetBufferListSource function.
AddNetBufferListDestinationA pointer to the AddNetBufferListDestination function.
GrowNetBufferListDestinationsA pointer to the GrowNetBufferListDestinations function.
GetNetBufferListDestinationsA pointer to the GetNetBufferListDestinations function.
UpdateNetBufferListDestinationsA pointer to the UpdateNetBufferListDestinations function.
CopyNetBufferListInfoA pointer to the CopyNetBufferListInfo function.
ReferenceSwitchNicA pointer to the ReferenceSwitchNic function.
DereferenceSwitchNicA pointer to the DereferenceSwitchNic function.
ReferenceSwitchPortA pointer to the ReferenceSwitchPort function.
DereferenceSwitchPortA pointer to the DereferenceSwitchPort function.
ReportFilteredNetBufferListsA pointer to the ReportFilteredNetBufferLists function.
SetNetBufferListSwitchContextGetNetBufferListSwitchContextSwitchPDReservedThe extensible switch handler functions provide support for filtering and forwarding actions that are performed by an extensible switch extension. These actions include the following:
When the extensible switch extension calls NdisFGetOptionalSwitchHandlers, the NdisSwitchHandlers parameter contains a pointer to an NDIS_SWITCH_OPTIONAL_HANDLERS structure. An extensible switch extension typically calls NdisFGetOptionalSwitchHandlers from its FilterAttach function.
AllocateNetBufferListForwardingContext
FreeNetBufferListForwardingContext
NdisFGetOptionalSwitchHandlers
UpdateNetBufferListDestinations