General updates of socket APIs

Table 1 lists the general updates made to the IP socket APIs.

Table 1. Summary of new and changed Communications Server socket APIs
Socket API Function call/Parameter Rel. Description Reason for change
  • Call instruction
  • CICS C socket calls
  • CICS call instruction
  • IMS call instruction
  • Language Environment C/C++ socket
  • Macro
  • REXX socket
  • UNIX System Services Assembler Callable Service
New SIOCGPARTNERINF O ioctl V1R12 Provides an interface for an application to retrieve security information about its partner. Trusted TCP connections
New SIOCSPARTNERINFO ioctl V1R12 Enables an application to avoid suspending while retrieving the partner security credentials with the SIOCGPARTNERINFO ioctl. Trusted TCP connections
  • Call instruction
  • CICS® C
  • CICS sockets extended
  • MACRO
  • REXX socket
  • UNIX assembler callable services
  • XL C/C++
bind2addrsel() V1R12 These APIs support the bind2addrsel() call defined in RFC 5014. This function is only supported for AF_INET6 sockets.

The bind2addrsel() call binds the input socket to the source IP address TCP/IP would select for the input destination IPv6 address.

The bind2addrsel function is supported in USS Assembler Callable Services with the new BPX1BAS and BPX4BAS entry points.

Configurable default address selection policy table
getsockopt, setsockopt V1R12 These APIs support a new socket option at the IPPROTO_IPV6 level: IPV6_ADDR_PREFERENCES as defined in RFC 5014. This socket option is only available for AF_INET6 sockets.

Use this option to set and get the source IP address selection preferences affecting all packets sent by a given socket.

Configurable default address selection policy table
inet6_is_srcaddr() V1R12 These APIs support the inet6_is_srcaddr() call defined in RFC 5014.

The inet6_is_srcaddr() API call tests whether the input IPv6 address conforms to the input address selection preference flags.

The inet6_is_srcaddr function is supported in USS Assembler Callable Services as a PFS control function, BPX1PCT (PC#IsSrcAddr) or BPX4PCT (PC#IsSrcAddr).

Configurable default address selection policy table
SIOCTTLSCTL ioctl - TTLS_STOP_CONNECTION request V2R1 The TTLS_STOP_CONNECTION request returns errno Eproto in these conditions:
  • If the application has not read all the data received on the secure connection, the request fails with return code of -1, errno of Eproto , and errno junior of JrTTLSStopReadDataPending.
  • If the application has outstanding write requests on the connection, the request fails with return code of -1, errno of Eproto, and errno junior of JrTTLSStopWriteDataPending.
Data security issue with AT-TLS stopped connection
  • Call instruction
  • CICS C
  • CICS sockets extended
  • MACRO
  • REXX socket
  • XL C/C++
getaddrinfo() V1R12 The addrinfo structure is enhanced to comply with RFC 5014. You can use the enhanced structure to pass source IP source address preference flags in the hints parameter of getaddrinfo(). Configurable default address selection policy table
  • Call instruction
  • CICS C socket calls
  • CICS call instruction
  • Language Environment C/C++ socket
  • Macro
  • UNIX System Services Assembler Callable Service
SIOCTTLSCTL ioctl V2R1
TTLSi_SSL_Prot
New value TTLS_PROT_TLSV1_2 (X'0303')
TTLSi_Neg_Cipher
New value TTLS_4CHAR_CIPHER (X'4X')
TTLSi_Neg_Cipher4
New field containing four character negotiated cipher
AT-TLS support for TLS v1.2 and related features
REXX Socket SIOCTTLSCTL V2R1 A new four byte cipher field is returned. The existing two character cipher contains "4X" if the cipher cannot be represented with two bytes. A new value of X'0303' can be returned to identify the SSL protocol that is in use as TLS v1.2. AT-TLS support for TLS v1.2 and related features
LE C/C++ Recv(), recvfrom(), recvmsg() V2R1 Add new MSG_CONNTERM value in msg_flags of sys/socket.h to indicate the receive request completes only when a TCP connection is terminated. Enhanced Fast Path socket support
  • TCP/IP C
  • UNIX assembler callable services
getsockopt() V1R12 When invoked with the SO_CLUSTERCONNTYPE option, this socket API returns an internal indicator for OSA-Express QDIO interfaces with CHPID type OSX or OSM. z/OS Communications Server in an ensemble
UNIX assembler callable services recv (BPX1RCV, BPX4RCV), recvfrom (BPX1RFM, BPX4RFM), recvmsg (BPX2RMS, BPX4RMS) Asyncio(BPX1AIO or BPX4AIO): AioCmd=Aio#Recv, AioCmd=Aio#RecvFrom, AioCmd=Aio#RecvMsg) V2R1 Add new MSG_CONNTERM value in msg_flags of BPXYMSGF.macro to indicate the receive request completes only when a TCP connection is terminated. Enhanced Fast Path socket support
  • XL C/C++
  • UNIX assembler callable services
SIOCSVIPA, SIOCSVIPA6 V2R1 New option: DVR_DEFINE_AFFINITY - Create DVIPA with affinity Affinity for application-instance DIVPAs