GetExternalPeerName Method of the IFWXConnection Interface

The GetExternalPeerName method gets the peer name for the external socket. This method is implemented by calling the Windows Sockets (Winsock)getpeername function on the actual external socket.

Syntax

HRESULT GetExternalPeerName(
  [out]	LPSOCKADDR Address,
  [in, out]  LPINT AddressLength
);

Parameters

Address

Pointer to a sockaddr structure that receives the peer name.

AddressLength

On input, this parameter specifies the size, in bytes, of the Address buffer. On output, it receives the size, in bytes, needed to hold the address.

Return Value

S_OK

The method succeeded.

HRESULT_FROM_WIN32(WSAEFAULT)

The name or namelen parameter is not a valid part of the user address space, or the namelen parameter is too small.

FWX_E_TERMINATING

The object is shutting down.

Remarks

When the firewall is chained to another firewall or proxy, this method returns the value for the next proxy in the chain.

Note  This method should not be called from the session event handling portion of your filter code. At that point in the code, the network connection has not been established yet, and may be denied by the application filter or by another application filter. Typically you would call this method from within one of the IFWXDataFilter methods of a data filter attached to the connection; that is, at a point when you are certain that the connection has been established.

Requirements

Server Requires Windows Server 2008.
Version Requires Forefront Threat Management Gateway (TMG).
Header

Declared in Wspfwext.idl.

DLL

Requires Wspsrv.exe.

See Also

IFWXConnection


Send comments about this topic to Microsoft

Build date: 11/30/2009

© 2008 Microsoft Corporation. All rights reserved.

[an error occurred while processing this directive]