SOCKET_SECURITY_QUERY_TEMPLATE structure

The SOCKET_SECURITY_QUERY_TEMPLATE structure contains the security template used by the WSAQuerySocketSecurity function.

Syntax


typedef struct _SOCKET_SECURITY_QUERY_TEMPLATE {
  SOCKET_SECURITY_PROTOCOL SecurityProtocol;
  SOCKADDR_STORAGE         PeerAddress;
  ULONG                    PeerTokenAccessMask;
} SOCKET_SECURITY_QUERY_TEMPLATE;

Members

SecurityProtocol

A SOCKET_SECURITY_PROTOCOL value that identifies the protocol used to secure the traffic.

PeerAddress

The IP address of the peer for which security information is being queried. For connection-oriented sockets (protocol of IPPROTO_TCP), the connected socket uniquely identifies a peer. In this case, this parameter is ignored.

PeerTokenAccessMask

The access mask used for opening the peer user application and computer token handles that are returned as part of the query information.

Remarks

The SOCKET_SECURITY_QUERY_TEMPLATE structure is supported on Windows Vista and later.

The SOCKET_SECURITY_QUERY_TEMPLATE structure is used by the WSAQuerySocketSecurity function to specify the type of query information to return for a socket. The SOCKET_SECURITY_QUERY_TEMPLATE structure passed to the WSAQuerySocketSecurity function may contain zeros for all members to request default security information.

If the SOCKET_SECURITY_QUERY_TEMPLATE structure is specified with the PeerTokenAccessMask member not specified (set to zero), then the WSAQuerySocketSecurity function will not return the PeerApplicationAccessTokenHandle and PeerMachineAccessTokenHandle members in the SOCKET_SECURITY_QUERY_INFO structure.

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

Requirements

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2008 [desktop apps only]

Header

Mstcpip.h

See also

SOCKET_SECURITY_PROTOCOL
SOCKET_SECURITY_QUERY_INFO
Using Secure Socket Extensions
Windows Filtering Platform
Windows Filtering Platform API Functions
Winsock Secure Socket Extensions
WSAQuerySocketSecurity

 

 

Community Additions

ADD
Show:
© 2014 Microsoft