The GetExternalSocketName method sets the name of the socket for the connection. Call this method only if the caller is emulating the connection.
HRESULT SetSocketName( [in] LPSOCKADDR Address, [in] DWORD AddressLength );
Pointer to a sockaddr structure that contains the socket address.
Length, in bytes, of the Address parameter.
The method succeeded.
The socket is already bound.
An invalid argument was provided to this method.
On regular connections, the Microsoft Firewall service calls the getsockname Winsock function on the external socket and passes this information to the Firewall client. 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.
Server | Requires Windows Server 2008. |
---|---|
Version | Requires Forefront Threat Management Gateway (TMG). |
Header |
Declared in Wspfwext.idl. |
DLL |
Requires Wspsrv.exe. |
Send comments about this topic to Microsoft
Build date: 11/30/2009
© 2008 Microsoft Corporation. All rights reserved.