FwpsClassifyOptionSet0 function (fwpsk.h)

The FwpsClassifyOptionSet0 function is called by a callout filter's classifyFn function to specify additional information that affects the characteristics of permitted filtering operations.

Note  FwpsClassifyOptionSet0 is a specific version of FwpsClassifyOptionSet. See WFP Version-Independent Names and Targeting Specific Versions of Windows for more information.
 

Syntax

NTSTATUS FwpsClassifyOptionSet0(
  [in] const FWPS_INCOMING_METADATA_VALUES0 *inMetadataValues,
  [in] const FWP_CLASSIFY_OPTION_TYPE       option,
  [in] const FWP_VALUE0                     *newValue
);

Parameters

[in] inMetadataValues

A pointer to an FWPS_INCOMING_METADATA_VALUES0 structure. This structure contains the values for each of the metadata fields at the layer that is being filtered.

[in] option

An FWP_CLASSIFY_OPTION_TYPE enumeration constant that indicates whether the newValue parameter refers to unicast, multicast, or loose source mapping states, or to data time-out values. For more information, see Remarks.

[in] newValue

A pointer to an array of FWP_VALUE0 structures. Each structure in the array contains particular values for a particular FWP_OPTION_VALUE_XXX constant. For more information, see Remarks.

Return value

The FwpsClassifyOptionSet0 function returns one of the following NTSTATUS codes.

Return code Description
STATUS_SUCCESS
The function completed successfully.
STATUS_FWP_INVALID_ENUMERATOR
The option parameter does not match any of the values in the FWP_CLASSIFY_OPTION_TYPE enumeration.
STATUS_FWP_OUT_OF_BOUNDS
The option value specified by newValue -> uint32 does not include one of the defined FWP_OPTION_VALUE_XXX constant values.
STATUS_OBJECT_TYPE_MISMATCH
The data type specified by newValue -> Type was not FWP_UINT32.
STATUS_UNSUCCESSFUL
A general error occurred.
Other status codes
An error occurred.

Remarks

This function should be called only by a callout filter's classifyFn function.

The following are the allowed values of the option parameter and members of the FWP_VALUE0 structure pointed to by the newValue parameter.

option Parameter newValue->type Value newValue->uint32 Value
FWP_CLASSIFY_OPTION_LOOSE_SOURCE_MAPPING FWP_UINT32 FWP_OPTION_VALUE_ENABLE_LOOSE_SOURCE
Enable loose source mapping.

FWP_OPTION_VALUE_DISABLE_LOOSE_SOURCE

Disable loose source mapping.
FWP_CLASSIFY_OPTION_MULTICAST_STATE FWP_UINT32 FWP_OPTION_VALUE_ALLOW_MULTICAST_STATE
Allow link-local multicast state creation on outbound traffic.

FWP_OPTION_VALUE_DENY_MULTICAST_STATE

Do not allow link-local multicast state creation on outbound traffic.

FWP_OPTION_VALUE_ALLOW_NON_LINK_LOCAL_RESPONSE

Allow multicast state creation for outbound traffic (permitting non–link-local responses).
FWP_CLASSIFY_OPTION_MCAST_BCAST_LIFETIME FWP_UINT32 > 0 Specifies the multicast/broadcast state lifetime, in seconds.
FWP_CLASSIFY_OPTION_UNICAST_LIFETIME FWP_UINT32 > 0 Specifies the unicast state lifetime, in seconds.
 

The first (highest weight) caller to set a particular option will be granted that option. For example, if callout A sets the multicast state option, callout B will not be able to do so, but callout B can set other options.

Requirements

Requirement Value
Minimum supported client Available starting with Windows Vista.
Target Platform Universal
Header fwpsk.h (include Fwpsk.h)
Library Fwpkclnt.lib
IRQL <= DISPATCH_LEVEL

See also

FWPM_CLASSIFY_OPTION0

FWPM_CLASSIFY_OPTIONS0

FWPS_INCOMING_METADATA_VALUES0

FWP_CLASSIFY_OPTION_TYPE

FWP_VALUE0

classifyFn