FWPS_CALLOUT_NOTIFY_FN1 callback function

The filter engine calls a callout's notifyFn1 callout function to notify the callout driver about events that are associated with the callout.

Note  notifyFn1 is the specific version of notifyFn used in Windows 7 and later. See WFP Version-Independent Names and Targeting Specific Versions of Windows for more information. For Windows 8, notifyFn2 is available. For Windows Vista, notifyFn0 is available.
 

Syntax

FWPS_CALLOUT_NOTIFY_FN1 FwpsCalloutNotifyFn1;

NTSTATUS FwpsCalloutNotifyFn1(
  FWPS_CALLOUT_NOTIFY_TYPE notifyType,
  const GUID *filterKey,
  FWPS_FILTER1 *filter
)
{...}

Parameters

notifyType

A value that indicates the type of notification that the filter engine is sending to the callout. Valid values for this parameter are:

FWPS_CALLOUT_NOTIFY_ADD_FILTER

A filter is being added to the filter engine that specifies the callout for the filter's action.

FWPS_CALLOUT_NOTIFY_DELETE_FILTER

A filter is being deleted from the filter engine that specifies the callout for the filter's action.

FWPS_CALLOUT_NOTIFY_TYPE_MAX

A maximum value for testing purposes.

filterKey

filter

Return Value

A callout's notifyFn1 function returns one of the following NTSTATUS codes.

Return code Description
STATUS_SUCCESS
The callout driver accepts the notification from the filter engine.
Other status codes
An error occurred. If the notifyType parameter is FWPS_CALLOUT_NOTIFY_ADD_FILTER, the filter will not be added to the filter engine. If the notifyType parameter is FWPS_CALLOUT_NOTIFY_DELETE_FILTER, the filter will still be deleted from the filter engine.

Remarks

A callout driver registers a callout's callout functions with the filter engine by calling the FwpsCalloutRegister1 function.

The filter engine calls a callout driver's notifyFn1 function to notify the callout driver about events that are associated with the callout. If the callout driver's notifyFn1 function does not recognize the type of notification that is passed in the notifyType parameter, it should ignore the notification and return STATUS_SUCCESS.

If a callout driver registers a callout with the filter engine after filters that specify the callout for the filter's action have already been added to the filter engine, the filter engine does not call the callout driver's notifyFn1 function to notify the callout about any of the existing filters. The filter engine calls the callout driver's notifyFn1 function to notify the callout when new filters that specify the callout for the filter's action are added to the filter engine. In this situation, a callout's notifyFn1 function might not get called for every filter in the filter engine that specifies the callout for the filter's action. If a callout driver registers a callout after the filter engine is started and the callout needs to know about every filter in the filter engine that specifies the callout for the filter's action, the callout driver must call the appropriate management functions to enumerate all the filters in the filter engine and sort through the resulting list of filters to find those that specify the callout for the filter's action. See Calling Other Windows Filtering Platform Functions for more information about calling these functions.

When a filter that specifies a callout for the filter's action is deleted from the filter engine, the filter engine calls the callout driver's notifyFn1 function and passes FWP_CALLOUT_NOTIFY_DELETE_FILTER in the notifyType parameter and NULL in the filterKey parameter. For more information, see Processing Notify Callouts.

Requirements

   
Minimum supported client Available starting with Windows 7.
Target Platform Windows
Header fwpsk.h (include Fwpsk.h)
IRQL <= DISPATCH_LEVEL

See Also

Callout Driver Callout Functions

FWPS_CALLOUT0

FWPS_FILTER1

FwpsCalloutRegister1

notifyFn

notifyFn0

notifyFn2