SOCKET_PEER_TARGET_NAME structure (mstcpip.h)

The SOCKET_PEER_TARGET_NAME structure contains the IP address and name for a peer target and the type of security protocol to be used on a socket.

Syntax

typedef struct _SOCKET_PEER_TARGET_NAME {
  SOCKET_SECURITY_PROTOCOL SecurityProtocol;
  SOCKADDR_STORAGE         PeerAddress;
  ULONG                    PeerTargetNameStringLen;
  wchar_t                  AllStrings[0];
} SOCKET_PEER_TARGET_NAME;

Members

SecurityProtocol

A SOCKET_SECURITY_PROTOCOL value that identifies the type of protocol used to secure the traffic on the socket.

PeerAddress

The IP address of the peer for the socket.

PeerTargetNameStringLen

The length, in bytes, of the peer target name in the AllStrings member.

AllStrings[0]

The peer target name for the socket.

Remarks

The SOCKET_PEER_TARGET_NAME structure is supported on Windows Vista and later.

The SOCKET_PEER_TARGET_NAME structure is used by the WSASetSocketPeerTargetName function to specify the peer target name that corresponds to a peer IP address. This target name is meant to be specified by client applications to securely identify the peer that should be authenticated.

Currently, the only type of security protocol that is supported is IPsec. So specifying an enumeration value of SOCKET_SECURITY_PROTOCOL_DEFAULT has the same effect as specifying SOCKET_SECURITY_PROTOCOL_IPSEC in the SecurityProtocol member.

The implementation of IPsec on Windows Vista and Windows Server 2008 only supports computer-to-computer and user-to-computer authentication. As a result, the peer target name specified in the AllStrings member of the SOCKET_PEER_TARGET_NAME structure should refer to the peer computer principal.

Requirements

Requirement Value
Minimum supported client Windows Vista [desktop apps only]
Minimum supported server Windows Server 2008 [desktop apps only]
Header mstcpip.h

See also

SOCKADDR_STORAGE

SOCKET_SECURITY_PROTOCOL

Using Secure Socket Extensions

WSASetSocketPeerTargetName

Windows Filtering Platform

Windows Filtering Platform API Functions

Winsock Secure Socket Extensions