Share via


FilterSetModuleOptions (Compact 2013)

3/26/2014

This function changes the set of optional services that are associated with a specified filter module.

Syntax

NDIS_STATUS
  FilterSetModuleOptions(
    IN  NDIS_HANDLE  FilterModuleContext
    );

Parameters

  • FilterModuleContext
    A handle to the context area for the filter module that is the target of this request. The filter driver created and initialized this context area in the FilterAttach function.

Return Value

FilterSetModuleOptions returns one of the following status values:

Value

Meaning

NDIS_STATUS_SUCCESS

FilterSetModuleOptions successfully registered the filter module's optional services and resources.

NDIS_STATUS_RESOURCES

FilterSetModuleOptions could not allocate the resources that the filter module requires.

NDIS_STATUS_XXX or NTSTATUS_XXX

The filter driver's attempt to register options failed. Usually, such an error status is propagated from an NdisXxx function or a kernel-mode support routine.

Remarks

If FilterSetModuleOptions is defined, NDIS calls FilterSetModuleOptions before it calls the FilterRestart function to start the filter module.

A filter driver specifies the default values for the changeable filter module options in the NDIS_FILTER_DRIVER_CHARACTERISTICS structure that it passes to the NdisFRegisterFilterDriver function during driver initialization.

To change options for a specific filter module at run time, the filter driver must also specify an entry point for FilterSetModuleOptions in the NDIS_FILTER_DRIVER_CHARACTERISTICS structure.

To specify the options that should be changed, FilterSetModuleOptions defines a characteristics structure and calls the NdisSetOptionalHandlers function. Filter drivers must not call NdisSetOptionalHandlers from a different thread.

The possible characteristics structures that can be specified from FilterSetModuleOptions are as follows:

NDIS_FILTER_PARTIAL_CHARACTERISTICS

NDIS_CLIENT_CHIMNEY_OFFLOAD_GENERIC_CHARACTERISTICS

NDIS_CLIENT_CHIMNEY_OFFLOAD_TCP_CHARACTERISTICS

NDIS_PROVIDER_CHIMNEY_OFFLOAD_GENERIC_CHARACTERISTICS

NDIS_PROVIDER_CHIMNEY_OFFLOAD_TCP_CHARACTERISTICS

The options that are specified in each characteristics structure can be different for each filter module.

When NDIS calls the FilterDetach function, the filter driver should undo all the operations that were performed in FilterSetModuleOptions.

NDIS calls FilterSetModuleOptions at IRQL <= DISPATCH_LEVEL.

Requirements

Header

filter.h

See Also

Reference

NDIS Filter Driver Functions
NDIS_FILTER_DRIVER_CHARACTERISTICS
NDIS_FILTER_PARTIAL_CHARACTERISTICS
NdisFRegisterFilterDriver
NdisSetOptionalHandlers