IFWXConnection::SetSocketName method
Applies to: desktop apps only
The GetExternalSocketName method sets the name of the socket for the connection. Call this method only if the caller is emulating the connection.
Syntax
HRESULT SetSocketName(
[in] LPSOCKADDR Address,
[in] DWORD AddressLength
);
Parameters
Address [in]
Pointer to a sockaddr structure that contains the socket address.AddressLength [in]
Length, in bytes, of the Address parameter.
Return value
This method can return one of these values.
S_OK
The method succeeded.FWX_E_ALREADY_EXISTS
The socket is already bound.FWX_E_INVALID_ARG
An invalid argument was provided to this method.
Remarks
On regular connections, the Microsoft Firewall service calls the getsockname Winsock function on the external socket and passes this information to the Forefront TMG Client or Firewall Client computer. For an emulated connection, there is no external socket, or the external socket is known only to the filter. The filter is required to call this method and set the socket name.
When there is no connection, it is advisable to return an IP address of the Firewall service (external or internal as appropriate) because the client application may use this information to publish the address.
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
Build date: 7/12/2010