Release Notes for HP TCP/IP Services for OpenVMS Version 5.7 Update ECO 2 ________________________________________________________________ © Copyright 2011 Hewlett-Packard Development Company, L.P. Confidential computer software. Valid license from HP required for possession, use or copying. Consistent with FAR 12.211 and 12.212, Commercial Computer Software, Computer Software Documentation, and Technical Data for Commercial Items are licensed to the U.S. Government under vendor's standard commercial license. The information contained herein is subject to change without notice. The only warranties for HP products and services are set forth in the express warranty statements accompanying such products and services. Nothing herein should be construed as constituting an additional warranty. HP shall not be liable for technical or editorial errors or omissions contained herein. Intel and Itanium are trademarks or registered trademarks of Intel Corporation or its subsidiaries in the United States and other countries. UNIX is a registered trademark of The Open Group. Microsoft is a US registered trademark of Microsoft Corporation. --------------------------------------------------------------------------- Installation Note --------------------------------------------------------------------------- This HP TCP/IP Services Version 5.7 ECO 2 kit is delivered as a complete product kit. It is not necessary to install the original V5.7 kit before installing ECO 2. --------------------------------------------------------------------------- New Features for ECO 2 Updates --------------------------------------------------------------------------- This section describes the new feature of TCP/IP Services Version 5.7 ECO 2. For information about installing and configuring TCP/IP Services, see the HP TCP/IP Services for OpenVMS Installation and Configuration guide. 1.1 Network File System V3 client Network File System (NFS) V3 client is a new file transfer layer protocol in HP TCP/IP Services. The benefits of the NFS V3 client and the additions to the MOUNT command are explained in the following sections: 1.1.1 Enables large file operations The NFS V3 client protocol, by default, enables large file size operations ( > 2 GB), which helps in better performance. 1.1.2 ASYNC WRITE and COMMIT NFS WRITE type can be configured (during TCP/IP MOUNT) using a /SYNC qualifier. The /SYNC qualifier uses the FILE_SYNC and the UNSTABLE options. The FILE_SYNC option enables SYNCHRONOUS WRITE type and the UNSTABLE option enables ASYNC WRITE type on the MOUNT point. The ASYNC is the default option if the /SYNC qualifier is not specified in the MOUNT command. In case of ASYNC WRITE, the number of bytes after which the client has to send an NFS COMMIT request can be configured using the /COMMIT_BUFFER qualifier. The default value of this buffer is 512 KB. For more information, see help for the TCP/IP MOUNT qualifier. Example 1: TCP/IP MOUNT with SYNC WRITE enabled. -------------------------------------------------------------------------- TCPIP> mount dnfs0:/path="/home/system/test"/host=" "/sync=file_sync Example 2: TCP/IP MOUNT with ASYNC WRITE enabled for a /COMMIT_BUFFER qualifier of 1 MB. --------------------------------------------------------------------------- TCPIP> mount dnfs0:/path="/home/system/test"/host="" /commit_buff=1024 1.1.3 Updated HELP files The TCPIP HELP contains additional information on the new qualifiers for the MOUNT command. 1.2 New qualifiers added to the MOUNT command In this version of NFS client the following qualifiers are added to the MOUNT command: o /COMMIT_BUFFER o /TRANSPORT o /VERSION 1.2.1 /COMMIT_BUFFER /COMMIT_BUFFER=size Optional. Default: 512 While mounting a new NFS device if a /COMMIT_BUFFER qualifier value is not defined, then the Default /COMMIT_BUFFER qualifier value is taken. NFS V3 client supports ASYNC WRITE by the /COMMIT_BUFFER qualifier. The unit of the qualifier value is KB. For example, /COMMIT_BUFFER=100 KB The data in the commit buffer is flushed during the following conditions: o When the commit buffer reaches high water mark. o When the periodic commit flush timer triggers. 1.2.2 /TRANSPORT /TRANSPORT=protocol Optional. Default: TCP The following protocols are used for communicating with the NFS server: o User Datagram Protocol (UDP) o TCP 1.2.3 /VERSION /VERSION=n Optional. Default: 0 The /Version qualifier selects the NFS protocol version. By default, the NFS client attempts to communicate with the NFS server using the NFS V3 protocol. If this fails, then it uses the NFS V2 protocol. To force the NFS client to use a specific protocol version, use the following options: o 0 for auto. It first attempts to communicate using the NFS V3 protocol, if this fails, then it uses the NFS V2 protocol. o 2 for NFS V2 protocol o 3 for NFS V3 protocol Example for the MOUNT command qualifier --------------------------------------------------------------------------- tcpip mount dnfs0:/path="/exportpath"/host="host-ip"/processor=unique/commit=1024 /struc=5/system/adf=create/acp_params=dump/trans=tcp/ver=3 Note: HP recommends that you use /processor=unique to have separate ACP process for each MOUNT point. 1.3 NFS V3 client limitations 1. No support for the NFS client for the PATHCONF and MKNOD operations. These are UNIX commands and might not be relevant to the OpenVMS users. 2. Problems with UDP. NFS WRITE with UDP transport does not work and it uses TCP as the default transport mechanism for all the NFS operations. 3. Client cannot detect server reboots. When ASYNC is enabled for the MOUNT point, and if server reboots in the middle of the ASYNC WRITE and COMMIT process, the data held by the NFS client is lost. If the NFS server is restarted, it affects the NFS READ or WRITE process. Note: If the new OpenVMS NFS V3 client needs to communicate with the OpenVMS NFS server, then you must install HP TCP/IP Services V5.7 ECO 2 on the OpenVMS system that is used as the NFS server. --------------------------------------------------------------------------- New Features for ECO 1 Updates --------------------------------------------------------------------------- This section describes the new features of TCP/IP Services Version 5.7 ECO 1. 2.1 Stream Control Transmission Protocol (SCTP) SCTP is a new transport layer protocol specified by IETF RFC 4960. In the protocol stack, SCTP along with TCP and UDP, communicates over IP. SCTP makes use of the BSD- based sockets API and extensions that are described in the Internet-draft standard. For additional information about Internet-Draft, visit the following World Wide Web address: http://www.ietf.org/id/draft-ietf-tsvwg-sctpsocket-19.txt If the Internet-Draft link for revision 19 does not work, search for the latest Internet-Draft at http://www.ietf.org/. 2.2 SCTP API The SCTP sockets API is implemented as a shareable image. The applications that use SCTP API must be linked with the SYS$COMMON:[SYSLIB]TCPIP$SCTP_SHR.EXE shareable image. When linking the SCTP API with a shareable image, the image must appear in a link options file. For example: $ LINK MY_SCTP_APP, SYS$INPUT:/OPTIONS SYS$LIBRARY:TCPIP$SCTP_SHR/SHARE For more information on the need for link options file, see the OpenVMS Linker Utility Manual. 2.2.1 SCTP API functions The SCTP API functions are based on FreeBSD V7.0 routines. The following routines are derived from the IETF draft, Sockets API Extensions for SCTP, revision 19 (draft-ietf- tsvwg-sctpsocket-19.txt). sctp_bindx() sctp_connectx() sctp_peeloff() sctp_getpaddrs() sctp_freepaddrs() sctp_getladdrs() sctp_freeladdrs() sctp_send() sctp_sendx() sctp_sendmsg() sctp_sendmsgx() sctp_recvmsg() sctp_getaddrlen() sctp_opt_info() sctp_getassocid() These routines require BSD4.4 sockets, hence any application that uses these routines must be compiled with the _SOCKADDR_LEN macro defined. For a detailed description of these routines, see Appendix B. 2.2.2 Building SCTP Applications The following header files are required to compile applications that use SCTP API: o o The file, "sctp_uio.h" is included in "sctp.h", hence, you need not include in the source code. In addition, the header file, "", is modified to define the SCTP protocol type: #DEFINE IPPROTO_SCTP 132 /* SCTP */ This protocol type must be passed as the "protocol" argument in the socket() API. For example, to create a socket that uses SCTP: These header files will be available in the DECC text library, in the future releases of DECC. If the installed version of DECC does not contain the SCTP header files, they can be accessed from the TCPIP$EXAMPLES directory. In this case, to compile the SCTP sources, these header files must be in your include path. You can also define the logicals as follows: $ DEFINE NETINET TCPIP$EXAMPLES $ DEFINE SYSTEM TCPIP$EXAMPLES 2.2.3 Compiling applications The SCTP API requires BSD4.4 sockets. To compile the APIs with BSD4.4 socket definitions, compile the code with _SOCKADDR_LEN defined. By default, _SOCKADDR_LEN is not defined, hence OpenVMS uses BSD4.3 sockets. This parameter can be defined in the source code, before any other inclusions or using the CC command-line- interface. In the source code, the first line of the file or the line before any other header files must be: #DEFINE _SOCKADDR_LEN Alternately, on the command line use the /DEFINE option by executing the following: $ CC /DEFINE=(_SOCKADDR_LEN) ... 2.2.4 Linking applications To link applications, include the SCTP API, SYS$LIBRARY:TCPIP$SCTP_SHR.EXE as a shareable image: Shareable images must be linked with the main object using a link options file. For example, $ LINK MY_SCTP_APP, SYS$INPUT:/OPTIONS SYS$LIBRARY:TCPIP$SCTP_SHR/SHARE For more information on the need for link options files, see the OpenVMS Linker Utility Manual. 2.3 FreeBSD Copyright This implementation of SCTP is ported from FreeBSD. As per the copyright requirements, the FreeBSD copyright notice is as follows: Copyright 1994-2008 The FreeBSD Project. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE FREEBSD PROJECT "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FREEBSD PROJECT OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. The views and conclusions contained in the software and documentation are those of the authors and should not be interpreted as representing official policies, either expressed or implied, of the FreeBSD Project. --------------------------------------------------------------------------- Corrections for HP TCP/IP Services V5.7 BOOTP --------------------------------------------------------------------------- ECO 2 updates ------------- 3.1 LANBOOT command fails on OpenVMS 21-JUN-2010 Integrity servers and Alpha Problem: If a BL8x0c i2 server blade is configured as a satellite node, it fails to boot from the Boot Server. When you try to boot from the network port, a server response timeout message is displayed. This problem has been solved in this release, but the current fix does not work for IPv6. Deliverables: TCPIP$BOOTP.EXE Reference: PTR 75-120-1135/TCPIP_BUGS Note 3771 ECO 1 updates ------------- 3.2 "Lanboot select" command fails on OpenVMS 14-JUN-2010 Integrity servers and Alpha Problem: Although the 'flags' field in the BootRequest is set, BOOTP server sends the BootReply in unicast mode. Solution: BOOTP is made RFC 1542 compliant. BOOTP is modified to check the broadcast flag in the incoming BootRequest packet and to broadcast the BootReply accordingly. Deliverables: TCPIP$BOOTP.EXE Reference: PTR 75-120-1135 --------------------------------------------------------------------------- Corrections for HP TCP/IP Services V5.7 FTP --------------------------------------------------------------------------- ECO 2 updates ------------- 4.1 CONNECT FTP command does not accepts a port number as a parameter 29-JUL-2010 Integrity servers and Alpha Problem: When upgrading to HP TCP/IP Services V5.7 ECO 2, the CONNECT FTP command does not accepts a port number as a parameter. Deliverables: TCPIP$FTP_CLIENT.EXE Reference: QXCM1001060551/TCPIP_BUGS Note 3774 4.2 Insufficient user privilege for the FTP server 17-AUG-2010 Integrity servers and Alpha Problem: The FTP server does not allow a privileged user to copy a file into a directory. This option works fine on HP TCP/IP Services V5.6 ECO 5. The problem occurs when a FTP user has default SYSPRV privilege, but is not a member of the system group (UIC [1000,12]). Interactively, the user can copy files into the directory, but cannot copy a file via the FTP server. Deliverables: TCPIP$FTP_SERVER.EXE TCPIP$FTP_CHILD.EXE Reference: QXCM1001061592/TCPIP_BUGS Note 3776 4.3 FTP server replies to a SYST command with a NULL character at the end of the response text 21-SEP-2010 Integrity servers and Alpha Problem: When the OpenVMS TCP/IP V5.7 ECO 2 FTP server replies to a SYST command, a NULL character is inserted after the text of the response and before the CRLF. Deliverables: TCPIP$FTP_SERVER.EXE TCPIP$FTP_CHILD.EXE Reference: QXCM1001070668/TCPIP_BUGS Note 3778 4.4 Passive mode is broken when the OpenVMS FTP client is connecting to the OpenVMS FTP server via FTPS 21-OCT-2010 Integrity servers and Alpha Problem: When attempting to FTP, using File Transfer Protocol Secure (FTPS) in a passive mode, to an OpenVMS FTP server from an OpenVMS FTP client, the FTP client stops responding and displays the following error message: SSL_connect() error (TCPIP$_FTP_SSLERR, SSL_connect failed due to ssl errno: 5) Deliverables: TCPIP$FTP_CLIENT.EXE Reference: QXCM1001074894/TCPIP_BUGS Note 3785 ECO 1 updates ------------- 4.5 FTP data connection fails in passive mode 22-MAR-2010 Integrity servers and Alpha Problem: FTP data connection fails in passive mode with “425 Failed to establish connection” on a multi-homed system. While executing the ftp commands, ls, put, and get in the passive mode with TCP/IP Version 5.7 FTP client from a muliti-homed system, (that is, a system having multiple IP-addresses), client data connection gets disconnected intermittently. When connecting to internet FTP sites, FTP client displays the following error: "425 Failed to establish connection" and when connecting to an OpenVMS FTP server, the FTP client displays “425 Disallowing data connection” error. Deliverables: TCPIP$FTP_CLIENT.EXE Reference: PTR 75-123-105/TCPIP_BUGS Note 3757 4.6 FTP exits with an ACCVIO on idle timeout 14-MAY-2010 Integrity servers and Alpha Problem: The FTP server in which SSL is not enabled, exits with an ACCVIO on idle timeout. Deliverables: TCPIP$FTP_SERVER.EXE TCPIP$FTP_CHILD.EXE Reference: PTR-75-123-128/TCPIP_BUGS Note 3761 4.7 FTP client displays "421 Service not available” intermittently 17-MAY-2010 Integrity servers and Alpha Problem: The FTP client intermittently displays the following error: "421 Service not available, Remote server has closed the connection" This error is always displayed after all file transfers have been completed successfully. Deliverables: TCPIP$FTP_SERVER.EXE TCPIP$FTP_CHILD.EXE Reference: QXCM1000948610/TCPIP_BUGS Note 3763 4.8 FTP fails with duplicate name 17-MAY-2010 Integrity servers and Alpha Problem: When the FTP server gets continuously connected and disconnected from the same FTP client it fails with a duplicate name. Solution: This problem occurs only when the FTP server is loaded heavily from the same client. To resolve this problem, define the TCPIP$FTP_MSL_MAX logical in the system table with the tcp_msl value of the system as explained in the following steps: 1. Check the tcp_msl value of the system using the “sysconfig -q inet tcp_msl” command $ sysconfig -q inet tcp_msl inet: tcp_msl = 60 2. Define TCPIP$FTP_MSL_MAX logical in the system table with the tcp_msl value, in this scenario it is 60 DEFINE / SYS TCPIP$FTP_MSL_MAX 60 3. Restart the FTP server. Deliverables: TCPIP$FTP_SERVER.EXE TCPIP$FTP_CHILD.EXE Reference: QXCM1001019022/TCPIP_BUGS Note 3764 4.9 FTP unable to preserve type case in the PUT operation 18-MAY-2010 Integrity servers and Alpha Problem: An SSL enabled FTP server fails to preserve the type case of filenames in the PUT operation. Deliverables: TCPIP$FTP_SERVER.EXE TCPIP$FTP_CHILD.EXE Reference: PTR 75-120-1284/TCPIP_BUGS Note 3765 4.10 OpenVMS, TCP/IP, or Non-VMS FTP client access to ODS-5 disk 24-MAY-2010 Integrity servers and Alpha Problem: On a non-VMS FTP client, such as Windows, UNIX, or LINUX, the filenames are displayed in the VMS format with the "^" characters. Also, when retrieving the filenames using the non-VMS FTP client, the filename in OpenVMS format is displayed with "^", such as file^.1^.2^.3^.4.txt. For retrieving the files and saving them on the system, the "^" characters must not be included in the filenames. Solution: To display the VMS filename in the UNIX style, enable the TCPIP$FTPD_UNIX_DISPLAY logical by executing the following steps: 1. $ DEFINE /SYS TCPIP$FTPD_UNIX_DISPLAY TRUE 2. Restart the FTP services. Deliverables: TCPIP$FTP_SERVER.EXE TCPIP$FTP_CHILD.EXE Reference: PTR 75-117-183/TCPIP_BUGS Note 3768 --------------------------------------------------------------------------- Corrections for HP TCP/IP Services V5.7 BIND --------------------------------------------------------------------------- ECO 2 updates ------------- 5.1 nsupdate utility fails with the SYSTEM-F-OPCCUST error message 2-SEP-2010 Integrity servers and Alpha Problem: When the nsupdate utility and a TSIG secret key is used to update a CNAME instance in a domain, it fails with the SYSTEM-F-OPCCUST error message. Deliverables: TCPIP$NSUPDATE.EXE Reference: QXCM1001066144/TCPIP_BUGS Note 3777 --------------------------------------------------------------------------- Corrections for HP TCP/IP Services V5.7 BIND RESOLVER --------------------------------------------------------------------------- ECO 2 updates ------------- 6.1 TCPIP$IPC_SHR.EXE fails intermittently with an ACCVIO 19-NOV-2010 Integrity servers and Alpha Problem: When a sample C program which creates multiple threads is run, and each of the thread issue a call to getaddrinfo(), TCPIP$IPC_SHR.EXE fails intermittently with an ACCVIO. If you link this sample C program with the /THREAD=(MULTI,UPCALL) qualifier and run on multiple CPU machines, this issue is seen. If you run the same program on a single CPU machine, then an ACCVIO does not appear. Also, if you do not link the sample C program with the /THREAD=(MULTI,UPCALL) qualifier and run on both single or multiple CPU machines, then an ACCVIO does not appear. The following error message is displayed: $1$DGA11:[TCPIP_V56_BLECO5.SRC.BIND_RESOLVER]MEMCLUSTER. C;1:436:INSIST(stats[size].gets != 0U) failed Deliverables: TCPIP$IPC_SHR.EXE Reference: PTR 75-117-185/TCPIP_BUGS Note 3793 --------------------------------------------------------------------------- Corrections for HP TCP/IP Services V5.7 DHCP --------------------------------------------------------------------------- ECO 2 updates ------------- 7.1 DHCP client looses static default routes on refresh of the lease 27-OCT-2010 Integrity servers and Alpha Problem: After refresh of the lease by the Dynamic Host Configuration Protocol (DHCP) server, the manually configured static routes on the interfaces are deleted. Deliverables: TCPIP$DHCP_CLIENT.EXE Reference: QXCM1001069319/TCPIP_BUGS Note 3786 --------------------------------------------------------------------------- Corrections for HP TCP/IP Services V5.7 SSH --------------------------------------------------------------------------- ECO 2 updates ------------- 8.1 SFTP fails when IJOBLIM is reached 15-JUN-2010 Integrity servers and Alpha Problem: When the OpenVMS Interactive Login Limit (IJOBLIM) is reached, the SSH File Transfer Protocol (SFTP) fails. Deliverables: All SSH images Reference: QXCM1001028679/TCPIP_BUGS Note 3772 8.2 NAGIOS system monitoring software reports a remote command execution failure 17-AUG-2010 Integrity servers and Alpha Problem: When upgrading from HP TCP/IP Services V5.6 ECO 2 to HP TCP/IP Services V5.6 ECO 4, the NAGIOS Secure Shell (SSH) plug-in does not work for remote command execution on OpenVMS. It displays a remote command execution failure message. This problem has been resolved. Deliverables: TCPIP$SSH_SFTP-SERVER2.EXE TCPIP$SSH_SSHD2.EXE Reference: QXCM1001026577/TCPIP_BUGS Note 3775 8.3 SSH on background mode from TRU64 UNIX or Solaris to OpenVMS hangs 24-SEP-2010 Integrity servers and Alpha Problem: When you use SSH on the background mode from TRU64 UNIX or Solaris to OpenVMS, the connection is disrupted in some points. Deliverables: TCPIP$SSH_SSHD2.EXE Reference: QXCM1001029284/TCPIP_BUGS Note 3779 8.4 Maximum window size is same as specified by the RFC 4254 24-SEP-2010 Integrity servers and Alpha Problem: OpenVMS SSH server does not allows an SSH client to request a window size adjustment that is larger than 16 MB (=16*1024*1024). Deliverables: TCPIP$SSH_SSHD2.EXE Reference: QXCM1001017215/TCPIP_BUGS Note 3780 8.5 Issues with the wildcard PUT command and file names with multiple periods on the ODS-5 disk with SFTP and SCP 27-OCT-2010 Integrity servers and Alpha Problem: When the wildcard PUT command for Secure Copy (SCP) and SSH File Transfer Protocol (SFTP) is used to copy the files on a remote server, it copies the files with multiple periods on the ODS-5 disk. For example: o Using SCP wildcard PUT command with file name having circumflex character (for example, file name with 1^.2^.3^.4.txt;1) to the non-OpenVMS server fails after first transfer. o Using SFTP wildcard PUT command with *.* to a non-OpenVMS SFTP server, transfers all files and appends a semi-colon to the file name. Deliverables: TCPIP$SSH_SCP2.EXE TCPIP$SSH_SFTP2.EXE Reference: QXCM1001059611/TCPIP_BUGS Note 3788 8.6 SCP intermittently truncates target file of COPY-PUT operation 1-NOV-2010 Integrity servers and Alpha Problem: SCP intermittently truncates target file of COPY-PUT operation. The degree of failure is random. For example, when the SSH debug logs are enabled, the degree of failure decreases. However, the SCP GET operation is 100% successful. Deliverables: TCPIP$SSH_SCP2.EXE TCPIP$SSH_SSH2.EXE Reference: QXCM1000945214/TCPIP_BUGS Note 3789 8.7 SFTP issue with the Tumbleweed servers 1-NOV-2010 Integrity servers and Alpha Problem: SFTP cannot copy a file onto the Tumbleweed SSH/SFTP server and creates a zero byte file on the Tumbleweed server. Therefore, the client fails and displays the following error message: FATAL:BUILD13$:[TCPIP_V54_BLECO7.SRC_PAT.SSH2]SSHFC_TRANSFER.C;1:18 35SshFCTransfer (function name unavailable) Assertion failed: 4 Deliverables: TCPIP$SSH_SCP2.EXE TCPIP$SSH_SSH2.EXE Reference: QXCM1000949216/TCPIP_BUGS Note 3790 ECO 1 updates ------------- 8.8 SSH ignores the LGI parameters, such as LGI_BRK_DISUSER 17-MAY-2010 Integrity servers and Alpha Problem: Login failures using SSH resulting in an intrusion record do not enforce the LGI_BRK_DISUSER flag. Deliverables: TCPIP$SSH_SFTP-SERVER2.EXE TCPIP$SSH_SSHD2.EXE Reference: QXCM1001014804/TCPIP_BUGS Note 3762 --------------------------------------------------------------------------- Corrections for HP TCP/IP Services V5.7 Telnet Server --------------------------------------------------------------------------- ECO 2 updates ------------- 9.1 TNA devices are owned by a non-existent process 19-JUL-2010 Integrity servers and Alpha Problem: When the TNA devices/terminals are owned by a non-existent process, it leads to intermittent print job failures. Deliverables: TCPIP$TNDRIVER.EXE Reference: QXCM1001011176 and QXCM1000972584/TCPIP_BUGS Note 3773 ECO 1 updates ------------- 9.2 Telnet server does not clear the TELNET$L_REMOTE_OPTIONS bit 29-MAR-2010 Integrity servers and Alpha Problem: Telnet server does not clear the TELNET$L_REMOTE_OPTIONS bit in TN UCB after receiving a “WONT BINARY” command. Deliverables: TCPIP$TNDRIVER.EXE Reference: QXCM1001014454/TCPIP_BUGS Note 3767 --------------------------------------------------------------------------- Corrections for HP TCP/IP Services V5.7 LIBPCAP --------------------------------------------------------------------------- ECO 2 updates ------------- 10.1 Changes to pcap_read_pf and pcap_open_live functions 23-JUL-2010 Integrity servers and Alpha Problem: 1. pcap_loop processes packets after pcap_breakloop is called. 2. pcap_next_ex() is not defined in shareable images. 3. pcap_open_live call with unconfigured interface name does not return an error. Deliverables: TCPIP$LIBPCAP_SHR.EXE Reference: PTR 75-123-30 and PTR 75-67-30/TCPIP_BUGS Note 3782 --------------------------------------------------------------------------- Corrections for HP TCP/IP Services V5.7 NET --------------------------------------------------------------------------- ECO 2 updates ------------- 11.1 Crashes when the service limit is reached 14-OCT-2010 Integrity servers and Alpha Problem: When the service limit for any service is reached, and if any new connection is made to the service, the NET component crashes. Deliverables: TCPIP$BGDRIVER.EXE TCPIP$INTERNET_SERVICES.EXE TCPIP$INETACP.EXE Reference: QXCM1001073956/TCPIP_BUGS Note 3783 --------------------------------------------------------------------------- Corrections for HP TCP/IP Services V5.7 IPC --------------------------------------------------------------------------- ECO 2 updates ------------- 12.1 Getting NaT consumption fault in TCPIP$INET_NTOA 14-SEP-2010 Integrity servers and Alpha Problem: When the TCPIP$INET_NTOA function takes an argument of Struct sockaddr_in type, it generates NaT consumption fault. Deliverables: TCPIP$IPC_SHR.EXE Reference: PTR 75-117-192/TCPIP_BUGS Note 3781 12.2 Threads get blocked in select() call 14-OCT-2010 Integrity servers and Alpha Problem: Threads get blocked in select() call on a LOCK_LONG instruction and this leads to incoming packets occupying non-paged pool. Deliverables: TCPIP$IPC_SHR.EXE Reference: QXCM1001030924/TCPIP_BUGS Note 3784 12.3 AF_UNIX support 23-OCT-2010 Integrity servers and Alpha Problem: The AF_UNIX address family support is added. 1. Performance might be similar to the loopback AF_INET sockets. 2. No support for QIO interfaces. 3. Uses the logicals TCPIP$AF_UNIX_MIN_PORT and TCPIP$AF_UNIX_MAX_PORT to configure minimum and maximum ports for AF_UNIX. Deliverables: TCPIP$IPC_SHR.EXE Reference: TCPIP_BUGS Note 3792 --------------------------------------------------------------------------- Corrections for HP TCP/IP Services V5.7 SCTP --------------------------------------------------------------------------- ECO 1 updates ------------- 13.1 SCTP is enabled on the system 29-May-2010 Integrity servers and Alpha Problem: SCTP is enabled on the system, by default. Deliverables: TCPIP$INTERNET_SERVICES.EXE TCPIP$BGDRIVER.EXE TCPIP$INETACP.EXE Reference: TCPIP_BUGS Note 3766 Note: By default, SCTP is now disabled on the system. SCTP can be enabled on the system using the TCPIP> SYSCONFIG -C SCTP command. To disable SCTP again, reboot the system. --------------------------------------------------------------------------- Appendix A - Sample SCTP Programs --------------------------------------------------------------------------- Any TCP application can be modified to use SCTP by changing the socket call to use IPPROTO_SCTP. This appendix provides some of the sample programs that illustrate the use of SCTP API. For example: TCP_socket = socket(AF_INET, SOCK_STREAM, 0); SCTP_socket = socket(AF_INET, SOCK_STREAM, IPPROTO_SCTP); The following sample programs illustrate the use of SCTP API: o sctp_server.c : In this sample program, the server uses select() to read data over the SCTP socket. o sctp_client.c : In this sample program, the client reads user input and sends it over the SCTP socket. o sctp_clientx.c : In this sample program, the client uses sctp_connectx(). A.1 SCTP Server Sample Program This section provides the sample sctp_server.c program. #pragma module SCTP_SERVER "V5.7-00" /* ** BUILD ENVIRONMENT: ** ** If the current version of DECC does not support SCTP, then you must ** manually configure the environment as follows: ** ** $ define netinet tcpip$examples ** $ define sys tcpip$examples ** ** BUILD INSTRUCTIONS: ** ** $ cc sctp_server ** $ link sctp_server,sys$input:/options ** sys$library:tcpip$sctp_shr/share ** ** SYNTAX: ** ** sctp_server [port] ** ** EXAMPLE: ** ** Define a foreign symbol to point at the application. ** ** $ sctp_server :== $MYDEV:[MYDIR]sctp_server ** $ sctp_server */ #define _SOCKADDR_LEN #include #include #include #include #ifndef __VMS #include #else #include #endif typedef unsigned int socklen_t; /* usually defined in socket.h */ #include #include #include #include #include /* SCTP */ #define DEF_PORT 55555 #define SA(x) ((struct sockaddr *)x) int main(int argc, char *argv[]) { int listen_sd, sd, cc, port; struct sockaddr_in local, peer; socklen_t peerlen = sizeof(peer); char peer_name[INET6_ADDRSTRLEN]; char buf[128]; if(argc == 2) port = atoi(argv[1]); else port = DEF_PORT; /* setup the local address that we will bind to and listen on */ local.sin_len = sizeof(local); local.sin_family = AF_INET; local.sin_port = htons(port); local.sin_addr.s_addr = INADDR_ANY; /* create an SCTP socket */ listen_sd = socket(AF_INET, SOCK_STREAM, IPPROTO_SCTP); if(listen_sd == -1) {perror("socket"); return 1;} /* bind to local port and address(es) */ if(bind(listen_sd, SA(&local), local.sin_len) == -1) {perror("bind"); return 1;} /* prepare to accept connections */ if(listen(listen_sd, 5) == -1) {perror("listen"); return 1;} printf("Waiting for connections on SCTP port %d ...\n", port); peerlen = sizeof(peer); if((sd = accept(listen_sd, (struct sockaddr *)&peer, &peerlen)) == -1) {perror("accept"); return 1;} close(listen_sd); /* finished with listen socket */ printf("Accepted connection from: %s:%d\n", inet_ntop(AF_INET, &peer.sin_addr.s_addr, peer_name, INET6_ADDRSTRLEN), ntohs(peer.sin_port)); while(1) { cc = recv(sd, &buf, sizeof(buf), 0); if(cc == -1) /* error on socket */ {perror("recv"); break;} if(cc == 0) /* peer disconnect */ {printf("Peer closed connection."); break;} /* data available */ buf[cc] = '\0'; printf("Received: %s\n", buf); if(buf[0] == 'Q') break; } /* read forever */ close(sd); printf("All done\n"); } A.2 SCTP Client Sample Program This section provides the sample sctp_client.c program. #pragma module SCTP_CLIENT "V5.7-00" /* ** BUILD ENVIRONMENT: ** ** If the current version of DECC does not support SCTP, then you must ** manually configure the environment as follows: ** ** $ define netinet tcpip$examples ** $ define sys tcpip$examples ** ** BUILD INSTRUCTIONS: ** ** $ cc sctp_client ** $ link sctp_client,sys$input:/options ** sys$library:tcpip$sctp_shr/share ** ** SYNTAX: ** ** sctp_client hostname [port] ** ** EXAMPLE: ** ** Define a foreign symbol to point at the application. ** ** $ sctp_client :== $MYDEV:[MYDIR]sctp_client ** $ sctp_client myserver */ #define _SOCKADDR_LEN #include #include #include #ifndef __VMS #include #else #include #endif typedef unsigned int socklen_t; /* usually defined in socket.h */ #include #include #include #include #include /* SCTP */ #define DEF_PORT 55555 #define SA(x) ((struct sockaddr *)x) int main(int argc, char *argv[]) { int sd; int count = 0, cc; struct sockaddr_in peer; int peerlen = sizeof(peer); char peername[INET6_ADDRSTRLEN]; char *hostname; int port; in_addr_t in_addr; struct hostent *hent; char line[128]; if(argc == 1) {printf("Usage: client [port]\n"); return 1;} hostname = argv[1]; if(argc == 3) port = atoi(argv[2]); else port = DEF_PORT; /* convert hostname string to in_addr_t */ in_addr = inet_addr(hostname); /* first try dotted decimal notation? */ if(in_addr == (in_addr_t)-1) { hent = gethostbyname(hostname); /* now try DNS */ if(hent == NULL) {printf("No host information for %s\n", hostname); return 1;} in_addr = *(int *)hent->h_addr; } /* setup the local address that we will connect to */ peer.sin_len = sizeof(peer); peer.sin_family = AF_INET; peer.sin_port = htons(port); peer.sin_addr.s_addr = in_addr; /* create an SCTP socket */ sd = socket(AF_INET, SOCK_STREAM, IPPROTO_SCTP); if(sd == -1) {perror("socket"); return 1;} /* connect to server */ if(connect(sd, SA(&peer), peerlen) == -1) {perror("connect"); return 1;} printf("Connected to: %s:%d\n", inet_ntop(AF_INET, &peer.sin_addr.s_addr, &peername[0], sizeof(peername)), ntohs(peer.sin_port)); /* write loop */ do { printf("Enter a line to send:"); if(scanf("%[^\n]%*c", line) == -1) {perror("scanf"); return 1;} cc = write(sd, line, strlen(line)); if(cc == -1) {perror("send"); return(1);} } while(cc != -1 && line[0] != 'Q'); if(close(sd) == -1) {perror("close"); return 1;} return 0; } A.3 SCTP Clientx Sample Program This section provides the sample sctp_clientx.c program. #pragma module SCTP_CLIENTX "V5.7-00" /* ** PURPOSE: ** ** Simple SCTP client using the sctp_connectx() API. ** ** BUILD ENVIRONMENT: ** ** If the current version of DECC does not support SCTP, then you must ** manually configure the environment as follows: ** ** $ define netinet tcpip$examples ** $ define sys tcpip$examples ** ** BUILD INSTRUCTIONS: ** ** $ cc sctp_clientx ** $ link sctp_clientx,sys$input:/options ** sys$library:tcpip$sctp_shr/share ** ** SYNTAX: ** ** sctp_clientx hostname [port] ** ** EXAMPLE: ** ** Define a foreign symbol to point at the application. ** ** $ sctp_clientx :== $MYDEV:[MYDIR]sctp_clientx ** $ sctp_clientx myserver */ #define _SOCKADDR_LEN #include #include #include #ifndef __VMS #include #else #include #endif typedef unsigned int socklen_t; /* normally found in socket.h */ #include #include #include #include #include /* SCTP */ #define SA(x) ((struct sockaddr *)(x)) #define SIN(x) ((struct sockaddr_in *)(x)) #define DECODE_AF(af) ((af) == AF_INET ? "AF_INET" : \ (af) == AF_INET6 ? "AF_INET6" : \ "Unknown"), af #define DECODE_ST(st) ((st) == SOCK_STREAM ? "SOCK_STREAM" : \ (st) == SOCK_DGRAM ? "SOCK_DGRAM" : \ (st) == SOCK_RAW ? "SOCK_RAW" : \ (st) == SOCK_SEQPACKET ? "SOCK_SEQPACKET" : \ "Unknown"), st #define DECODE_PR(pr) ((pr) == IPPROTO_TCP ? "IPPROTO_TCP" : \ (pr) == IPPROTO_UDP ? "IPPROTO_UDP" : \ (pr) == IPPROTO_SCTP ? "IPPROTO_SCTP" : \ "Unknown"), pr #define DEF_PORTNAME "55555" void display_sockaddr(struct sockaddr *sa) { struct sockaddr_in *sin; struct sockaddr_in6 *sin6; char name[256]; int err; /* retrieve the nodename */ err = getnameinfo(sa, sa->sa_len, name, sizeof(name), NULL, 0, 0); if(err) { if(err == EAI_SYSTEM) perror("getnameinfo"); else printf("getnameinfo: %s\n", gai_strerror(err)); return; } printf("sockaddr:\n"); printf(" len : %d\n", sa->sa_len); printf(" family: %s (%d)\n", DECODE_AF(sa->sa_family)); switch(sa->sa_family) { case AF_INET: printf(" IPV4 Address Details:\n"); sin = (struct sockaddr_in *)sa; printf(" sin_port : %d\n", ntohs(sin->sin_port)); printf(" sin_addr : %#x (%s)\n", sin->sin_addr.s_addr, name); break; case AF_INET6: printf(" IPV6 Address Details:\n"); sin6 = (struct sockaddr_in6 *)sa; printf(" sin6_port : %d\n", ntohs(sin6->sin6_port)); printf(" sin6_flowinfo: %d\n", sin6->sin6_flowinfo); printf(" sin6_addr[1] : %#Lx (%s)\n", sin6->sin6_addr.s6_qaddr[1], name); printf(" sin6_addr[0] : %#Lx\n", sin6->sin6_addr.s6_qaddr[0]); break; default: printf("Unknown address family: %d\n", sa->sa_family); } } void display_addrinfo(struct addrinfo *ai) { int i = 0; for(; ai; ai = ai->ai_next) { printf("--- %d ----------------------------\n", ++i); printf("ai_family : %s (%d)\n", DECODE_AF(ai->ai_family)); printf("ai_socktype : %s (%d)\n", DECODE_ST(ai->ai_socktype)); printf("ai_protocol : %s (%d)\n", DECODE_PR(ai->ai_protocol)); printf("ai_addrlen : %d\n", ai->ai_addrlen); printf("ai_canonname: %s\n", ai->ai_canonname); display_sockaddr(ai->ai_addr); } } void display_packed_sockaddrs(struct sockaddr_storage *ss, int count) { int i, len; len = 0; for(i = 0; i < count; i++) { printf("+++ %d of %d +++++++++++++++++++++++++++++\n", i+1, count); display_sockaddr(SA((char *)ss + len)); len += ss->ss_len; } } struct addrinfo *parse_addrinfo(char *server, char *service, int protocol, int socktype) { struct addrinfo *res, hints; int err; memset(&hints, 0, sizeof(hints)); hints.ai_family = AF_INET; hints.ai_protocol = protocol; hints.ai_socktype = socktype; hints.ai_flags = AI_ADDRCONFIG | AI_V4MAPPED; err = getaddrinfo(server, /* name, alias, or numeric address IPV4/IPV6 */ service,/* service name or port number */ &hints, /* hints limit search to sock type, AF or proto */ &res); /* linked list of addrinfo structures */ if(err) { if(err == EAI_SYSTEM) perror("getaddrinfo"); else printf("%s", gai_strerror(err)); return NULL; } return res; } int main(int argc, char *argv[]) { int sd; int count, cc; char *server, *portname; struct addrinfo *ai; char line[128]; in_addr_t in_addr; struct hostent *hent; struct sockaddr_storage *connectx_addrs = NULL; /* packed addresses */ struct sockaddr_storage *paddrs, *laddrs; /* packed addresses */ if(argc == 1) {printf("Usage: connectx [port]\n"); return 1;} server = argv[1]; if(argc == 3) portname = argv[2]; else portname = DEF_PORTNAME; ai = parse_addrinfo(server, portname, IPPROTO_SCTP, SOCK_STREAM); if(ai == NULL) {printf("Error retrieving address information\n"); return 1;} printf("Addresses matching %s\n", server); display_addrinfo(ai); /* pack socket addresses into the connectx buffer */ count = 0; cc = 0; for(; ai; ai = ai->ai_next) { connectx_addrs = realloc(connectx_addrs, cc + ai->ai_addrlen); /* add an element */ if(connectx_addrs == NULL) {perror("realloc"); return 1;} memcpy((char *)connectx_addrs + cc, ai->ai_addr, ai->ai_addrlen); count++; /* one more address packed in */ cc += ai->ai_addrlen; } freeaddrinfo(ai); /* finished with address info */ printf("\nAddresses (packed) to connect to (%d):\n", count); display_packed_sockaddrs(connectx_addrs, count); /* create socket */ sd = socket(AF_INET, SOCK_STREAM, IPPROTO_SCTP); if(sd == -1) {perror("socket"); return 1;} if(sctp_connectx(sd, SA(connectx_addrs), count, 0) == -1) {perror("sctp_connectx"); return 1;} /* call getpaddrs to get list of peer addresses in association */ count = sctp_getpaddrs(sd, 0, (struct sockaddr **)&paddrs); if(count == -1) {perror("sctp_getpaddrs"); return 1;} printf("\nPeer Addresses in association 0:\n"); display_packed_sockaddrs(paddrs, count); /* call getladdrs to get list of local addresses in association */ count = sctp_getladdrs(sd, 0, (struct sockaddr **)&laddrs); if(count == -1) {perror("sctp_getladdrs"); return 1;} printf("\nLocal Addresses in association 0:\n"); display_packed_sockaddrs(laddrs, count); /* write loop */ count = 0; do { printf("Enter a line to send:"); if(scanf("%[^\n]%*c", line) == -1) {perror("scanf"); return 1;} cc = write(sd, line, strlen(line)); if(cc == -1) {perror("send"); return 1;} if(cc == 0) {printf("Peer disconnected\n"); break;} } while(cc != -1 && line[0] != 'Q'); if(close(sd) == -1) {perror("close"); return 1;} } --------------------------------------------------------------------------- Appendix B - SCTP API Definition --------------------------------------------------------------------------- This appendix describes the SCTP API routine specifications. This content is from open source, FreeBSD Library Functions Manual. Following are the supported SCTP API routines: sctp_bindx() sctp_connectx() sctp_peeloff() sctp_getpaddrs() sctp_freepaddrs() sctp_getladdrs() sctp_freeladdrs() sctp_send() sctp_sendx() sctp_sendmsg() sctp_sendmsgx() sctp_recvmsg() sctp_getaddrlen() sctp_opt_info() sctp_getassocid() B.1 SCTP_BINDX Binds or unbinds an SCTP socket to a list of addresses. SYNOPSIS #include #include #include int sctp_bindx(int sd, struct sockaddr *addrs, int addrcnt, int flags); DESCRIPTION The sctp_bindx() call binds or unbinds an address or a list of addresses to an SCTP endpoint. This allows a user to bind a subset of addresses. The sctp_bindx() call operates similarly to bind() but allows a list of addresses and also allows a bind or an unbind. The argument s must be a valid SCTP socket descriptor. The argument addrs is a list of addresses (where the list can be only 1 in length) that the user wants to bind or unbind to the socket. The argument type must be one of the following values. SCTP_BINDX_ADD_ADDR - This value indicates that the listed address(es) must be added to the endpoint. SCTP_BINDX_REM_ADDR - This value indicates that the listed address(es) must be removed from the endpoint. When a user adds or deletes an address to an association and the dynamic address flag net.inet.sctp.auto_ asconf is enabled, any associations in the endpoint will attempt to add the address(es) dynamically to the existing association. RETURN VALUES The call returns 0 on success and -1 upon failure. ERRORS The sctp_bindx() can return the following errors: ___________________________________________________________ Error_________________Definition___________________________ [EINVAL] This value is returned if the flags field is not one of the allowed values. [ENOMEM] This value is returned if the number of addresses being added causes a memory allocation failure in the call. [EBADF] The argument s is not a valid descriptor. [ENOTSOCK] The argument s is not a socket. ___________________________________________________________ B.2 SCTP_CONNECTX Connects an SCTP socket with multiple destination addresses. SYNOPSIS #include #include #include int sctp_connectx(int sd, struct sockaddr *, int addrcnt, sctp_assoc_t *id); DESCRIPTION The sctp_connectx() call attempts to initiate an association to a peer SCTP endpoint. The call operates similarly to connect() but it also provides the ability to specify multiple destination addresses for the peer. This allows a fault tolerant method of initiating an association. When one of the peers addresses is unreachable, the subsequent listed addresses will also be used to set up the association with the peer. The user also needs to consider that any address listed in an sctp_connectx() call is also considered "confirmed". A confirmed address is one in which the SCTP transport will trust is a part of the association and it will not send a confirmation heartbeat to it with a random nonce. If the peer SCTP stack does not list one or more of the provided addresses in its response message then the extra addresses sent in the sctp_connectx() call will be silently discarded from the association. On successful completion the provided sctp_assoc_t * will be filled in with the association identification of the newly forming association. RETURN VALUES The call returns 0 on success and -1 upon failure. ERRORS The sctp_connectx() can return the following errors: ___________________________________________________________ Error_________________Definition___________________________ [EINVAL] An address listed has an invalid family or no addresses were provided. [E2BIG] The size of the address list exceeds the amount of data provided. [EBADF] The argument s is not a valid descriptor. [ENOTSOCK]____________The_argument_s_is_not_a_socket.______ B.3 SCTP_PEELOFF Detaches an association from a one-to-many socket to a separate one-to-one socket. SYNOPSIS #include #include #include int sctp_peeloff(int sd, sctp_assoc_t id); DESCRIPTION The sctp_peeloff() system call attempts to detach the association specified by ID into its own separate socket. RETURN VALUES The call returns -1 on failure and the new socket descriptor upon success. ERRORS The sctp_peeloff() can return the following errors: ___________________________________________________________ Error_________________Definition___________________________ [ENOTCONN] The ID given to the call does not map to a valid association. [E2BIG] The size of the address list exceeds the amount of data provided. [EBADF] The argument is not a valid descriptor. [ENOTSOCK] The argument is not a socket. ___________________________________________________________ B.4 SCTP_GETPADDRS, SCTP_GETLADDRS Returns a list of addresses to the caller. SYNOPSIS #include #include #include int sctp_getpaddrs(int sd, sctp_assoc_t id, struct sockaddr **addrs); int sctp_getladdrs(int sd, sctp_assoc_t id, struct sockaddr **addrs); DESCRIPTION The sctp_getpaddrs() function is used to get the list of the peers addresses. The sctp_getladdrs() function is used to get the list of the local addresses. The association of interest is identified by the asocid argument. The addresses are returned in a newly allocated array of socket addresses returned in the argument addrs upon success. After the caller is through the function sctp_freepaddrs() or sctp_freeladdrs() should be used to release the memory allocated by these calls. RETURN VALUES The call returns -1 upon failure and a count of the number of addresses returned in addrs upon success. ERRORS These functions can return the following errors: ___________________________________________________________ Error_________________Definition___________________________ [EINVAL] An address listed has an invalid family or no addresses were provided. [ENOMEM] The call cannot allocate memory to hold the socket addresses. [EBADF] The argument is not a valid descriptor. [ENOTSOCK] The argument is not a socket. ____________________________________________________________ B.5 SCTP_FREEPADDRS, SCTP_FREELADDRS Releases the memory returned from a previous call. SYNOPSIS #include #include #include void sctp_freepaddrs(struct sockaddr *addrs); void sctp_freeladdrs(struct sockaddr *addrs); DESCRIPTION The sctp_freepaddrs() and sctp_freeladdrs() functions are used to release the memory allocated by previous calls to sctp_getpaddrs() or sctp_getladdrs() respectively. RETURN VALUES None. B.6 SCTP_SEND, SCTP_SENDX Sends a message from an SCTP socket. SYNOPSIS #include #include #include ssize_t sctp_send(int sd, const void *msg, size_t len, const struct sctp_sndrcvinfo *sinfo, int flags); ssize_t sctp_sendx(int sd, const void *msg, size_t len, struct sockaddr *addrs, int addrcnt, const struct sctp_sndrcvinfo *sinfo, int flags); DESCRIPTION The sctp_send() system call is used to transmit a message to another SCTP endpoint. sctp_send() can be used to send data to an existing association for both one-to-many (SOCK_ SEQPACKET) and one-to-one (SOCK_STREAM) socket types. The length of the message msg is given by len. If the message is too long to pass automatically through the underlying protocol, errno is set to EMSGSIZE, -1 is returned, and the message is not transmitted. No indication of failure to deliver is implicit in a sctp_ send(). Locally detected errors are indicated by a return value of -1. If no space is available at the socket to hold the message to be transmitted, then sctp_send() normally blocks, unless the socket has been placed in non-blocking I/O mode. The select(2) system call can be used to determine when you can send more data on one-to-one type (SOCK_ STREAM) sockets. The sinfo structure is used to control various SCTP features and has the following format: struct sctp_sndrcvinfo { u_int16_t sinfo_stream; // Stream sending to u_int16_t sinfo_ssn; // valid for recv only u_int16_t sinfo_flags; // flags to control sending u_int32_t sinfo_ppid; // ppid field u_int32_t sinfo_context; // context field u_int32_t sinfo_timetolive; // timetolive for PR-SCTP u_int32_t sinfo_tsn; // valid for recv only u_int32_t sinfo_cumtsn; // valid for recv only sctp_assoc_t sinfo_assoc_id; // The association id }; The sinfo-_sinfo_ppid argument is an opaque 32 bit value that is passed transparently through the stack to the peer endpoint. It will be available on reception of a message (see sctp_recvmsg(2)). Note that the stack passes this value without regard to byte order. The sinfo-_sinfo_flags argument may include one or more of the following: #define SCTP_EOF 0x0100 // Start a shutdown procedures #define SCTP_ABORT 0x0200 // Send an ABORT to peer #define SCTP_UNORDERED 0x0400 // Message is un-ordered #define SCTP_ADDR_OVER 0x0800 // Override the primary-address #define SCTP_SENDALL 0x1000 // Send this on all associations // for the endpoint // The lower byte is an enumeration of PR-SCTP policies #define SCTP_PR_SCTP_TTL 0x0001 // Time based PR-SCTP #define SCTP_PR_SCTP_BUF 0x0002 // Buffer based PR-SCTP #define SCTP_PR_SCTP_RTX 0x0003 // Num retransmissions based PR-SCTP The flag SCTP_EOF is used to instruct the SCTP stack to queue this message and then start a graceful shutdown of the association. All remaining idata in queue will be sent after which the association will be shut down. SCTP_ABORT is used to immediately terminate an association. An abort is sent to the peer and the local TCB is destroyed. SCTP_UNORDERED is used to specify that the message being sent has no specific order and should be delivered to the peer application as soon as possible. When this flag is absent messages are delivered in order within the stream they are sent, but without respect to order to peer streams. The flag SCTP_ADDR_OVER is used to specify that a specific address should be used. Normally SCTP will use only one of a multi-homed peers addresses as the primary address to send to. By default, no matter what the argument is, this primary address is used to send data. By specifying this flag, the user is asking the stack to ignore the primary address and instead use the specified address not only as a lookup mechanism to find the association but also as the actual address to send to. For a one-to-many type (SOCK_SEQPACKET) socket the flag SCTP_SENDALL can be used as a convenient way to make one send call and have all associations that are under the socket get a copy of the message. Note that this mechanism is quite efficient and makes only one actual copy of the data which is shared by all the associations for sending. The remaining flags are used for the partial reliability extension (RFC3758) and will only be effective if the peer endpoint supports this extension. This option specifies what local policy the local endpoint should use in skipping data. If none of these options are set, then data is never skipped over. SCTP_PR_SCTP_TTL is used to indicate that a time based lifetime is being applied to the data. The sinfo-_sinfo_ timetolive argument is then a number of milliseconds for which the data is attempted to be transmitted. If that many milliseconds elapse and the peer has not acknowledged the data, the data will be skipped and no longer transmitted. Note that this policy does not even assure that the data will ever be sent. In times of a congestion with large amounts of data being queued, the sinfo-_sinfo_timetolive may expire before the first transmission is ever made. The SCTP_PR_SCTP_BUF based policy transforms the sinfo-_ sinfo_timetolive field into a total number of bytes allowed on the outbound send queue. If that number or more bytes are in queue, then other buffer-based sends are looked to be removed and skipped. Note that this policy may also result in the data never being sent if no buffer based sends are in queue and the maximum specified by timetolive bytes is in queue. The SCTP_PR_SCTP_RTX policy transforms the sinfo-_sinfo_ timetolive into a number of retransmissions to allow. This policy always assures that at a minimum one send attempt is made of the data. After which no more than sinfo-_sinfo_ timetolive retransmissions will be made before the data is skipped. sinfo-_sinfo_stream is the SCTP stream that you wish to send the message on. Streams in SCTP are reliable (or partially reliable) flows of ordered messages. The sinfo-_sinfo_assoc_id field is used to select the association to send to on a one-to-many socket. For a one-to-one socket, this field is ignored. The sinfo-_sinfo_context field is used only in the event the message can not be sent. This is an opaque value that the stack retains and will give to the user when a failed send is given if that notification is enabled (see sctp(4)). Normally a user process can use this value to index some application specific data structure when a send cannot be fulfilled. The flags argument holds the same meaning and values as those found in sendmsg(2) but is generally ignored by SCTP. The fields sinfo-_sinfo_ssn, sinfo-_sinfo_tsn, and sinfo-_ sinfo_cumtsn are used only when receiving messages and are thus ignored by sctp_send(). The function sctp_sendx() has the same properties as sctp_send() with the additional arguments of an array of sockaddr structures passed in. With the addrs argument being given as an array of addresses to be sent to and the addrcnt argument indicating how many socket addresses are in the passed in array. Note that all of the addresses will only be used when an implicit association is being set up. This allows the user the equivalent behavior as doing a sctp_connectx() followed by a sctp_send() to the association. Note that if the sinfo-_sinfo_assoc_id field is 0, then the first address will be used to look up the association in place of the association id. If both an address and an association id are specified, the association id has priority. RETURN VALUES The call returns the number of characters sent, or -1 if an error occurred. ERRORS The sctp_send() system call fails if: ___________________________________________________________ Error_________________Definition___________________________ [EBADF] An invalid descriptor was specified. [ENOTSOCK] The argument s is not a socket. [EFAULT] An invalid user space address was specified for an argument. [EMSGSIZE] The socket requires that message be sent atomically, and the size of the message to be sent made this impossible. [EAGAIN] The socket is marked non-blocking and the requested operation would block. [ENOBUFS] The system was unable to allocate an internal buffer. The operation might succeed when buffers become available. [ENOBUFS] The output queue for a network interface was full. This generally indicates that the interface has stopped sending, but might be caused by transient congestion. [EHOSTUNREACH] The remote host was unreachable. [ENOTCON] On a one-to-one style socket no association exists. [ECONNRESET] An abort was received by the stack while the user was attempting to send data to the peer. [ENOENT] On a one-to-many style socket no address is specified so that the association cannot be located or the SCTP_ABORT flag was specified on a non-existing association. [EPIPE] The socket is unable to send anymore data (SBS_CANTSENDMORE has been set on the socket). This typically means that the socket is not connected and is a one-to-one style socket. ___________________________________________________________ B.7 SCTP_SENDMSG, CTP_SENDMSGX Sends a message from an SCTP socket. SYNOPSIS #include #include #include ssize_t sctp_sendmsg(int sd, const void *msg, size_t len, const struct sockaddr *to, socklen_t tolen, uint32_t ppid, uint32_t flags, uint16_t stream_no, uint32_t timetolive, uint32_t context); ssize_t sctp_sendmsgx(int sd, const void *msg, size_t len, const struct sockaddr *to, int addrcnt, uint32_t ppid, uint32_t flags, uint16_t stream_no, uint32_t timetolive, uint32_t context); DESCRIPTION The sctp_sendmsg() system call is used to transmit a message to another SCTP endpoint. The sctp_sendmsg() may be used at any time. If the socket is a one-to-many type (SOCK_SEQPACKET) socket then an attempt to send to an address that no association exists to will implicitly create a new association. Data sent in such an instance will result in the data being sent on the third leg of the SCTP four-way handshake. Note that if the socket is a one-to-one type (SOCK_STREAM) socket then an association must be in existance (by use of the connect(2) system call). Calling sctp_sendmsg() or sctp_sendmsgx() on a non-connected one-to-one socket will result in errno being set to ENOTCONN, -1 being returned, and the message not being transmitted. The address of the target is given by to with tolen specifying its size. The length of the message msg is given by len. If the message is too long to pass atomically through the underlying protocol, errno is set to EMSGSIZE, -1 is returned, and the message is not transmitted. No indication of failure to deliver is implicit in a sctp_ sendmsg(2) call. Locally detected errors are indicated by a return value of -1. If no space is available at the socket to hold the message to be transmitted, then sctp_sendmsg(2) normally blocks, unless the socket has been placed in non-blocking I/O mode. The select(2) system call may be used to determine when it is possible to send more data on one-to-one type (SOCK_ STREAM) sockets. The ppid argument is an opaque 32 bit value that is passed transparently through the stack to the peer endpoint. It will be available on reception of a message (see sctp_ recvmsg(2)). Note that the stack passes this value without regard to byte order. The flags argument may include one or more of the following: #define SCTP_EOF 0x0100 // Start a shutdown procedures #define SCTP_ABORT 0x0200 // Send an ABORT to peer #define SCTP_UNORDERED 0x0400 // Message is un-ordered #define SCTP_ADDR_OVER 0x0800 // Override the primary-address #define SCTP_SENDALL 0x1000 // Send this on all associations // for the endpoint // The lower byte is an enumeration of PR-SCTP policies #define SCTP_PR_SCTP_TTL 0x0001 // Time based PR-SCTP #define SCTP_PR_SCTP_BUF 0x0002 // Buffer based PR-SCTP #define SCTP_PR_SCTP_RTX 0x0003 // Num retransmissions based PR-SCTP The flag SCTP_EOF is used to instruct the SCTP stack to queue this message and then start a graceful shutdown of the association. All remaining data in queue will be sent after which the association will be shut down. SCTP_ABORT is used to immediately terminate an association. An abort is sent to the peer and the local TCB is destroyed. SCTP_UNORDERED is used to specify that the message being sent has no specific order and should be delivered to the peer application as soon as possible. When this flag is absent messages are delivered in order within the stream they are sent, but without respect to order to peer streams. The flag SCTP_ADDR_OVER is used to specify that an specific address should be used. Normally SCTP will use only one of a multi-homed peers addresses as the primary address to send to. By default, no matter what the to argument is, this primary address is used to send data. By specifying this flag, the user is asking the stack to ignore the primary address and instead use the specified address not only as a lookup mechanism to find the association but also as the actual address to send to. For a one-to-many type (SOCK_SEQPACKET) socket the flag SCTP_SENDALL can be used as a convenient way to make one send call and have all associations that are under the socket get a copy of the message. Note that this mechanism is quite efficient and makes only one actual copy of the data which is shared by all the associations for sending. The remaining flags are used for the partial reliability extension (RFC3758) and will only be effective if the peer endpoint supports this extension. This option specifies what local policy the local endpoint should use in skipping data. If none of these options are set, then data is not skipped over. SCTP_PR_SCTP_TTL is used to indicate that a time based lifetime is being applied to the data. The timetolive argument is then a number of milliseconds for which the data is attempted to be transmitted. If that many milliseconds elapse and the peer has not acknowledged the data, the data will be skipped and no longer transmitted. Note that this policy does not even assure that the data will be sent. In times of a congestion with large amounts of data being queued, the timetolive might expire before the first transmission is made. The SCTP_PR_SCTP_BUF based policy transforms the timetolive field into a total number of bytes allowed on the outbound send queue. If that number or more bytes are in queue, then other buffer based sends are looked to be removed and skipped. Note that this policy may also result in the data never being sent if no buffer based sends are in queue and the maximum specified by timetolive bytes is in queue. The SCTP_PR_SCTP_RTX policy transforms the timetolive into a number of retransmissions to allow. This policy always assures that at a minimum one send attempt is made of the data. After which no more than timetolive retransmissions will be made before the data is skipped. stream_no is the SCTP stream that you want to send the message on. Streams in SCTP are reliable (or partially reliable) flows of ordered messages. The context field is used only in the event the message cannot be sent. This is an opaque value that the stack retains and will give to the user when a failed send is given if that notification is enabled (see sctp(4)). Normally a user process can use this value to index some application specific data structure when a send cannot be fulfilled. sctp_sendmsgx() is identical to sctp_sendmsg() with the exception that it takes an array of sockaddr structures in the argument to and adds the additional argument addrcnt which specifies how many addresses are in the array. This allows a caller to implicitly set up an association passing multiple addresses as if sctp_connectx() had been called to set up the association. RETURN VALUES The call returns the number of characters sent, or -1 if an error occurred. ERRORS The sctp_sendmsg() system call fails if: ___________________________________________________________ Error_________________Definition___________________________ [EBADF] An invalid descriptor was specified. [ENOTSOCK] The argument s is not a socket. [EFAULT] An invalid user space address was specified for an argument. [EMSGSIZE] The socket requires that message be sent automically, and the size of the message to be sent made this impossible. [EAGAIN] The socket is marked non-blocking and the requested operation would block. [ENOBUFS] The system was unable to allocate an internal buffer. The operation may succeed when buffers become available. [ENOBUFS] The output queue for a network interface was full. This generally indicates that the interface has stopped sending, but may be caused by transient congestion. [EHOSTUNREACH] The remote host was unreachable. [ENOTCON] On a one-to-one style socket no association exists. [ECONNRESET] An abort was received by the stack while the user was attempting to send data to the peer. [ENOENT] On a one-to-many style socket no address is specified so that the association cannot be located or the SCTP_ABORT flag was specified on a non-existing association. [EPIPE] The socket is unable to send anymore data (SBS_CANTSENDMORE has been set on the socket). This typically means that the socket is not connected and is a one-to-one style socket. _______________________________________________________________ B.8 SCTP_RECVMSG Receives a message from an SCTP socket. SYNOPSIS #include #include #include ssize_t sctp_recvmsg(int sd, void *msg, size_t len, struct sockaddr * from, socklen_t * fromlen, struct sctp_sndrcvinfo *sinfo, int *msg_flags); DESCRIPTION The sctp_recvmsg() system call is used to receive a message from another SCTP endpoint. The sctp_recvmsg() call is used by one-to-one (SOCK_STREAM) type sockets after a successful connect() call or after the application has performed a listen() followed by a successful accept(). For a one-to-many (SOCK_SEQPACKET) type socket, an endpoint may call sctp_recvmsg() after having implicitly started an association via one of the send calls including sctp_ sendmsg(), sendto() and sendmsg(). Or, an application might also receive a message after having called listen() with a positive backlog to enable the reception of new associations. The address of the sender is held in the from argument with fromlen specifying its size. At the completion of a successful sctp_recvmsg() call from will hold the address of the peer and fromlen will hold the length of that address. Note that the address is bounded by the initial value of fromlen, which is used as an in/out variable. The length of the message msg to be received is bounded by len. If the message is too long to fit in the users receive buffer, then the flags argument will not have the MSG_EOF flag applied. If the message is a complete message then the flags argument will have MSG_EOF set. Locally detected errors are indicated by a return value of -1 with errno set accordingly. The flags argument might also hold the value MSG_NOTIFICATION. When this occurs it indicates that the message received is not from the peer endpoint, but instead is a notification from the SCTP stack (see sctp(4) for more details). Note that no notifications are ever given unless the user subscribes to such notifications using the SCTP_ EVENTS socket option. If no messages are available at the socket then sctp_ recvmsg() normally blocks on the reception of a message or NOTIFICATION, unless the socket has been placed in non- blocking I/O mode. The select(2) system call can be used to determine when you can receive a message. The sinfo argument is defined as follows. struct sctp_sndrcvinfo { u_int16_t sinfo_stream; // Stream arriving on u_int16_t sinfo_ssn; // Stream Sequence Number u_int16_t sinfo_flags; // Flags on the incoming message u_int32_t sinfo_ppid; // The ppid field u_int32_t sinfo_context; // context field u_int32_t sinfo_timetolive; // not used by sctp_recvmsg u_int32_t sinfo_tsn; // The transport sequence number u_int32_t sinfo_cumtsn; // The cumulative acknowledgment point sctp_assoc_t sinfo_assoc_id; // The association ID of the peer }; The sinfo-_sinfo_ppid is an opaque 32 bit value that is passed transparently through the stack from the peer endpoint. Note that the stack passes this value without regard to byte order. The sinfo-_sinfo_flags field can include the following: #define SCTP_UNORDERED 0x0400 // Message is un-ordered The SCTP_UNORDERED flag is used to specify that the message arrived with no specific order and was delivered to the peer application as soon as possible. When this flag is absent the message was delivered in order within the stream it was received. sinfo-_sinfo_stream is the SCTP stream that the message was received on. Streams in SCTP are reliable (or partially reliable) flows of ordered messages. The sinfo-_sinfo_context field is used only if the local application set an association level context with the SCTP_CONTEXT socket option. Optionally a user process can use this value to index some application specific data structure for all data coming from a specific association. The sinfo-_sinfo_ssn will hold the stream sequence number assigned by the peer endpoint if the message is not unordered. For unordered messages this field holds an undefined value. The sinfo-_sinfo_tsn holds a transport sequence number (TSN) that was assigned to this message by the peer endpoint. For messages that fit in or less than the path MTU this will be the only TSN assigned. Note that for messages that span multiple TSNs this value will be one of the TSNs that was used on the message. The sinfo-_sinfo_cumtsn holds the current cumulative acknowledgment point of the transport association. Note that this might be larger or smaller than the TSN assigned to the message itself. The sinfo-_sinfo_assoc_id is the unique association identification that was assigned to the association. For one-to-many (SOCK_SEQPACKET) type sockets this value can be used to send data to the peer without the use of an address field. It is also quite useful in setting various socket options on the specific association (see sctp(4)). The sinfo-_info_timetolive field is not used by sctp_ recvmsg. RETURN VALUES The call returns the number of characters sent, or -1 if an error occurred. ERRORS The sctp_recvmsg() system call fails if: ___________________________________________________________ Error_________________Definition___________________________ [EBADF] An invalid descriptor was specified. [ENOTSOCK] The argument s is not a socket. [EFAULT] An invalid user space address was specified for an argument. [EMSGSIZE] The socket requires that message be sent automtically, and the size of the message to be sent made this impossible. [EAGAIN] The socket is marked non-blocking and the requested operation would block. [ENOBUFS] The system was unable to allocate an internal buffer. The operation might succeed when buffers become available. [ENOBUFS] The output queue for a network interface was full. This generally indicates that the interface has stopped sending, but might be caused by transient congestion. [EHOSTUNREACH] The remote host was unreachable. [ENOTCON] On a one-to-one style socket no association exists. [ECONNRESET] An abort was received by the stack while the user was attempting to send data to the peer. [ENOENT] On a one-to-many style socket no address is specified so that the association cannot be located or the SCTP_ABORT flag was specified on a non-existing association. [EPIPE] The socket is unable to send anymore data (SBS_CANTSENDMORE has been set on the socket). This typically means that the socket is not connected and is a one-to-one style socket. ____________________________________________________________ B.9 SCTP_GETADDRLEN Returns the address length of an address family. SYNOPSIS #include #include #include int sctp_getaddrlen(sa_family_t family); DESCRIPTION The sctp_getaddrlen() function returns the size of a specific address family. This function is provided for application binary compatibility since it provides the application with the size the operating system thinks the specific address family is. Note that the function will actually create an SCTP socket and then gather the information via a getsockopt() system calls. If for some reason a SCTP socket cannot be created or the getsockopt() call fails, an error will be returned with errno set as specified in the socket() or getsockopt() system call. RETURN VALUES The call returns the number of bytes that the operating system expects for the specific address family or -1. ERRORS The sctp_getaddrlen() function can return the following errors: ___________________________________________________________ Error_________________Definition___________________________ [EINVAL] The address family specified does NOT ______________________exist._______________________________ B.10 SCTP_OPT_INFO Gathers SCTP socket information. SYNOPSIS #include #include #include int sctp_opt_info(int sd, sctp_assoc_t id, int opt, void *arg, socklen_t *size); DESCRIPTION The sctp_opt_info() call provides a multi-OS compatible method for getting specific getsockopt() data where an association identification needs to be passed into the operating system. For FreeBSD a direct getsockopt() can be used, since FreeBSD has the ability to pass information into the operating system on a getsockopt() call. Other operating systems might not have this ability. For those who want to write portable code amongst multiple operating systems this call should be used for the following SCTP socket options. o SCTP_RTOINFO o SCTP_ASSOCINFO o SCTP_PRIMARY_ADDR o SCTP_SET_PEER_PRIMARY_ADDR o SCTP_STATUS o SCTP_GET_PEER_ADDR_INFO o SCTP_AUTH_ACTIVE_KEY o SCTP_PEER_AUTH_CHUNKS o SCTP_LOCAL_AUTH_CHUNKS ERRORS The sctp_opt_info() function can return the following errors: ___________________________________________________________ Error_________________Definition___________________________ [EINVAL] The argument arg value was invalid. [EOPNOTSUPP] The argument opt was not one of the above listed SCTP socket options. [EBADF] The argument s is not a valid descriptor. [ENOTSOCK] The argument s is not a socket. ___________________________________________________________ B.11 SCTP_GETASSOCID Returns an association ID for a specified socket address. SYNOPSIS #include #include #include sctp_assoc_t sctp_getassocid(int sd, struct sockaddr *addr); DESCRIPTION The sctp_getassocid() call attempts to look up the specified socket address addr and find the respective association identification. RETURN VALUES The call returns the association ID upon success and 0 is returned upon failure. ERRORS The sctp_getassocid() function can return the following errors: ___________________________________________________________ Error_________________Definition___________________________ [ENOENT] The address does not have an association setup to it. [EBADF] The argument s is not a valid descriptor. [ENOTSOCK] The argument s is not a socket. ___________________________________________________________