PfAddFiltersToInterface

[PfAddFiltersToInterface is available for use in the operating systems listed in the Requirements section. In Windows Server "Longhorn", this function returns ERROR_CALL_NOT_SUPPORTED. The MprConfigInterfaceTransportSetInfo function and the Windows Filtering Platform API Management Functions provide similar functionality.]

The PfAddFiltersToInterface function adds the specified filters to the specified interface.

DWORD PfAddFiltersToInterface(
  INTERFACE_HANDLE ih,
  DWORD cInFilters,
  PPF_FILTER_DESCRIPTOR pfiltIn,
  DWORD cOutFilters,
  PPF_FILTER_DESCRIPTOR pfiltOut,
  PFILTER_HANDLE pfHandle
);

Parameters

  • ih
    [in] Specifies a handle to the interface.
  • cInFilters
    [in] Specifies the number of input filter descriptions pointed to by the pfiltIn parameter.
  • pfiltIn
    [in] Pointer to an array of filter descriptions to use as input filters.
  • cOutFilters
    [in] Specifies the number of output filter descriptions pointed to by the pfiltOut parameter.
  • pfiltOut
    [in] Pointer to an array of filter descriptions to use as output filters.
  • pfHandle
    [out] Pointer to a buffer that receives an array of filter handles. If the caller does not require the filter handles, the caller may set this parameter to NULL.

Return Value

If the function succeeds, the return value is NO_ERROR.

If the function fails, the return value is one of the following error codes.

Value Meaning
PFERROR_NO_FILTERS_GIVEN No filter descriptions were supplied.
Other Use FormatMessage to obtain the message string for the returned error.

Remarks

A filter reverses the default processing rule for the interface, that is, the rule that was specified during the call to PfCreateInterface.

Requirements

Server Requires Windows Server 2003 or Windows 2000 Server.
Header

Declared in Fltdefs.h.

Library

Use Iphlpapi.lib.

DLL Requires Iphlpapi.dll.

See Also

PfRemoveFiltersFromInterface
PfRemoveFilterHandles