WTS_CLIENT_ADDRESS structure

Contains the client network address of a Remote Desktop Services session.

Syntax


typedef struct _WTS_CLIENT_ADDRESS {
  DWORD AddressFamily;
  BYTE  Address[20];
} WTS_CLIENT_ADDRESS, *PWTS_CLIENT_ADDRESS;

Members

AddressFamily

Address family. This member can be AF_INET, AF_INET6, AF_IPX, AF_NETBIOS, or AF_UNSPEC.

Address

Client network address. The format of the field of Address depends on the address type as specified by the AddressFamily member.

For an address family AF_INET: Address contains the IPV4 address of the client as a null-terminated string.

For an family AF_INET6: Address contains the IPV6 address of the client as raw byte values. (For example, the address "FFFF::1" would be represented as the following series of byte values: "0xFF 0xFF 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x01")

Remarks

The client network address is reported by the RDP client itself when it connects to the server. This could be different than the address that actually connected to the server. For example, suppose there is a NAT between the client and the server. The client can report its own IP address, but the IP address that actually connects to the server is the NAT address. For VPN connections, the IP address might not be discoverable by the client. If it cannot be discovered, the client can report the only IP address it has, which may be the ISP assigned address. Because the address may not be the actual network address, it should not be used as a form of client authentication.

Requirements

Minimum supported client

Windows Vista

Minimum supported server

Windows Server 2008

Header

Wtsapi32.h

See also

WTSQuerySessionInformation

 

 

Show: