FWPS_VSWITCH_INTERFACE_EVENT_CALLBACK0 callback function (fwpsk.h)
The filter engine calls the vSwitchInterfaceEventNotifyFn (FWPS_VSWITCH_INTERFACE_EVENT_CALLBACK0) callout function to notify the callout driver about events that are associated the virtual switch interface.
Syntax
FWPS_VSWITCH_INTERFACE_EVENT_CALLBACK0 FwpsVswitchInterfaceEventCallback0;
NTSTATUS FwpsVswitchInterfaceEventCallback0(
[in, optional] void *notifyContext,
[in] void *completionContext,
[in] FWPS_VSWITCH_EVENT_TYPE eventType,
[in] const NDIS_SWITCH_PARAMETERS *vSwitch,
[in] const NDIS_SWITCH_NIC_PARAMETERS *vSwitchNic
)
{...}
Parameters
[in, optional] notifyContext
A pointer to a context provided by the callout driver. The driver passed this pointer to the notifyContext parameter of the FwpsvSwitchEventsSubscribe0 function. This parameter is optional and can be NULL.
[in] completionContext
A pointer to a completion context provided by the callout driver. This parameter is optional and can be NULL.
[in] eventType
The type of virtual switch event specified as one of the FWPS_VSWITCH_EVENT_TYPE enumeration values. For more information, see Remarks.
[in] vSwitch
A pointer to an NDIS_SWITCH_PARAMETERS structure that contains information about a virtual switch.
[in] vSwitchNic
A pointer to an NDIS_SWITCH_NIC_PARAMETERS structure that specifies the parameters for a virtual miniport adapter that is connected to a virtual switch port.
Return value
A callout's
FWPS_VSWITCH_INTERFACE_EVENT_CALLBACK0 function returns one of the following NTSTATUS codes.
Return code | Description |
---|---|
|
The callout driver accepts the notification from the filter engine. |
|
An error occurred. |
Remarks
A callout driver registers a
vSwitchInterfaceEventNotifyFn function by calling
the FwpsvSwitchEventsSubscribe0
function.
If the eventType parameter is set to WPS_VSWITCH_EVENT_INTERFACE_CREATE, a new network connection between a virtual switch port and a network adapter is completely established. The vSwitchNic parameter identifies an NDIS_SWITCH_NIC_PARAMETERS structure that contains information about the virtual network adapter that is connected to the virtual switch port.
If the eventType parameter is FWPS_VSWITCH_EVENT_INTERFACE_DISCONNECT, the connection between a virtual switch port and a network adapter is being torn down. After the connection has been completely torn down, the WFP filter driver will call vSwitchInterfaceEventNotifyFn with FWPS_VSWITCH_EVENT_INTERFACE_DELETE set in the eventType parameter.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Available starting with Windows 8. |
Target Platform | Windows |
Header | fwpsk.h (include Fwpsk.h) |
IRQL | <= DISPATCH_LEVEL |