IFWXConnection::AttachDataFilterWithDestination method

Applies to: desktop apps only

The AttachDataFilterWithDestination method attaches a data filter to the connection. The data filter is associated with a remote UDP destination.

Syntax

HRESULT AttachDataFilterWithDestination(
  [in]  IFWXDataFilter *piDataFilter,
  [in]  FwxDataFilterPriorityClass PriorityClass,
  [in]  IUnknown *punkFilterContext,
  [in]  LPSOCKADDR ExternalAddress,
  [in]  INT ExternalAddressLength
);

Parameters

  • piDataFilter [in]
    Pointer to the IFWXDataFilter interface on the data filter to use with this connection.

  • PriorityClass [in]
    Priority class for the data filter. This determines the position of the data filter in relation to other data filters that may be attached to the connection. This parameter is a value from the FwxDataFilterPriorityClass enumeration.

  • punkFilterContext [in]
    Pointer to the interface to use to pass context information to the data filter. This interface is passed to the IFWXDataFilter::SetSockets method. This parameter can be NULL.

  • ExternalAddress [in]
    Pointer to a sockaddr structure that contains the address of the peer of UDP datagrams for which the data filter is installed.

    The data filter receives all datagrams sent through the connection but is removed if the service causes a destination to expire.

  • ExternalAddressLength [in]
    Length, in bytes, of the ExternalAddress parameter.

Return value

This method can return one of these values.

  • S_OK
    The method succeeded.

  • E_OUTOFMEMORY
    Not enough memory or resources could be allocated to complete the operation.

  • FWX_E_TERMINATING
    The object is shutting down.

  • E_INVALIDARG
    An invalid value was passed to the method.

Remarks

This method must be called only in the context of the IFWXSessionFilter::FirewallEventHandler method while handling an event of type fwx_Udp_Destination. This method would be used when you want the filter to attach only to data from a specific destination, even if the connection is not destination specific, as is the case for UDP connections.

The data filter will receive all of the packets on the connection.

The data filter will be detached from the connection automatically if the UDP destination expires.

Requirements

Minimum supported client

None supported

Minimum supported server

Windows Server 2008 R2, Windows Server 2008 with SP2 (64-bit only)

Version

Forefront Threat Management Gateway (TMG) 2010

Header

Wspfwext.idl

DLL

Wspsrv.exe

See also

IFWXConnection

 

 

Build date: 7/12/2010