draft-ietf-tsvwg-sctpsocket-29.txt   draft-ietf-tsvwg-sctpsocket-30.txt 
Network Working Group R. Stewart Network Working Group R. Stewart
Internet-Draft Adara Networks Internet-Draft Adara Networks
Intended status: Informational M. Tuexen Intended status: Informational M. Tuexen
Expires: October 25, 2011 Muenster Univ. of Appl. Sciences Expires: December 26, 2011 Muenster Univ. of Appl. Sciences
K. Poon K. Poon
Oracle Corporation Oracle Corporation
P. Lei P. Lei
Cisco Systems, Inc. Cisco Systems, Inc.
V. Yasevich V. Yasevich
HP HP
April 23, 2011 June 24, 2011
Sockets API Extensions for Stream Control Transmission Protocol (SCTP) Sockets API Extensions for Stream Control Transmission Protocol (SCTP)
draft-ietf-tsvwg-sctpsocket-29.txt draft-ietf-tsvwg-sctpsocket-30.txt
Abstract Abstract
This document describes a mapping of the Stream Control Transmission This document describes a mapping of the Stream Control Transmission
Protocol (SCTP) into a sockets API. The benefits of this mapping Protocol (SCTP) into a sockets API. The benefits of this mapping
include compatibility for TCP applications, access to new SCTP include compatibility for TCP applications, access to new SCTP
features and a consolidated error and event notification scheme. features and a consolidated error and event notification scheme.
Status of this Memo Status of this Memo
skipping to change at page 1, line 40 skipping to change at page 1, line 40
Internet-Drafts are working documents of the Internet Engineering Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet- working documents as Internet-Drafts. The list of current Internet-
Drafts is at http://datatracker.ietf.org/drafts/current/. Drafts is at http://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress." material or to cite them other than as "work in progress."
This Internet-Draft will expire on October 25, 2011. This Internet-Draft will expire on December 26, 2011.
Copyright Notice Copyright Notice
Copyright (c) 2011 IETF Trust and the persons identified as the Copyright (c) 2011 IETF Trust and the persons identified as the
document authors. All rights reserved. document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents Provisions Relating to IETF Documents
(http://trustee.ietf.org/license-info) in effect on the date of (http://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents publication of this document. Please review these documents
skipping to change at page 3, line 48 skipping to change at page 3, line 48
5.3.2. SCTP Header Information Structure (SCTP_SNDRCV) - 5.3.2. SCTP Header Information Structure (SCTP_SNDRCV) -
DEPRECATED . . . . . . . . . . . . . . . . . . . . . 30 DEPRECATED . . . . . . . . . . . . . . . . . . . . . 30
5.3.3. Extended SCTP Header Information Structure 5.3.3. Extended SCTP Header Information Structure
(SCTP_EXTRCV) - DEPRECATED . . . . . . . . . . . . . 33 (SCTP_EXTRCV) - DEPRECATED . . . . . . . . . . . . . 33
5.3.4. SCTP Send Information Structure (SCTP_SNDINFO) . . . 34 5.3.4. SCTP Send Information Structure (SCTP_SNDINFO) . . . 34
5.3.5. SCTP Receive Information Structure (SCTP_RCVINFO) . . 36 5.3.5. SCTP Receive Information Structure (SCTP_RCVINFO) . . 36
5.3.6. SCTP Next Receive Information Structure 5.3.6. SCTP Next Receive Information Structure
(SCTP_NXTINFO) . . . . . . . . . . . . . . . . . . . 37 (SCTP_NXTINFO) . . . . . . . . . . . . . . . . . . . 37
5.3.7. SCTP PR-SCTP Information Structure (SCTP_PRINFO) . . 39 5.3.7. SCTP PR-SCTP Information Structure (SCTP_PRINFO) . . 39
5.3.8. SCTP AUTH Information Structure (SCTP_AUTHINFO) . . . 39 5.3.8. SCTP AUTH Information Structure (SCTP_AUTHINFO) . . . 39
5.3.9. SCTP Destination Address Structure (IPv4) 5.3.9. SCTP Destination IPv4 Address Structure
(SCTP_DSTADDRV4) . . . . . . . . . . . . . . . . . . 40 (SCTP_DSTADDRV4) . . . . . . . . . . . . . . . . . . 40
5.3.10. SCTP Destination Address Structure (IPv6) 5.3.10. SCTP Destination IPv6 Address Structure
(SCTP_DSTADDRV6) . . . . . . . . . . . . . . . . . . 40 (SCTP_DSTADDRV6) . . . . . . . . . . . . . . . . . . 40
6. SCTP Events and Notifications . . . . . . . . . . . . . . . . 40 6. SCTP Events and Notifications . . . . . . . . . . . . . . . . 40
6.1. SCTP Notification Structure . . . . . . . . . . . . . . . 41 6.1. SCTP Notification Structure . . . . . . . . . . . . . . . 41
6.1.1. SCTP_ASSOC_CHANGE . . . . . . . . . . . . . . . . . . 43 6.1.1. SCTP_ASSOC_CHANGE . . . . . . . . . . . . . . . . . . 43
6.1.2. SCTP_PEER_ADDR_CHANGE . . . . . . . . . . . . . . . . 44 6.1.2. SCTP_PEER_ADDR_CHANGE . . . . . . . . . . . . . . . . 44
6.1.3. SCTP_REMOTE_ERROR . . . . . . . . . . . . . . . . . . 46 6.1.3. SCTP_REMOTE_ERROR . . . . . . . . . . . . . . . . . . 46
6.1.4. SCTP_SEND_FAILED - DEPRECATED . . . . . . . . . . . . 46 6.1.4. SCTP_SEND_FAILED - DEPRECATED . . . . . . . . . . . . 46
6.1.5. SCTP_SHUTDOWN_EVENT . . . . . . . . . . . . . . . . . 48 6.1.5. SCTP_SHUTDOWN_EVENT . . . . . . . . . . . . . . . . . 48
6.1.6. SCTP_ADAPTATION_INDICATION . . . . . . . . . . . . . 48 6.1.6. SCTP_ADAPTATION_INDICATION . . . . . . . . . . . . . 48
6.1.7. SCTP_PARTIAL_DELIVERY_EVENT . . . . . . . . . . . . . 49 6.1.7. SCTP_PARTIAL_DELIVERY_EVENT . . . . . . . . . . . . . 49
skipping to change at page 4, line 30 skipping to change at page 4, line 30
7.1. send(), recv(), sendto(), and recvfrom() . . . . . . . . 56 7.1. send(), recv(), sendto(), and recvfrom() . . . . . . . . 56
7.2. setsockopt() and getsockopt() . . . . . . . . . . . . . . 58 7.2. setsockopt() and getsockopt() . . . . . . . . . . . . . . 58
7.3. read() and write() . . . . . . . . . . . . . . . . . . . 60 7.3. read() and write() . . . . . . . . . . . . . . . . . . . 60
7.4. getsockname() . . . . . . . . . . . . . . . . . . . . . . 60 7.4. getsockname() . . . . . . . . . . . . . . . . . . . . . . 60
7.5. Implicit Association Setup . . . . . . . . . . . . . . . 60 7.5. Implicit Association Setup . . . . . . . . . . . . . . . 60
8. Socket Options . . . . . . . . . . . . . . . . . . . . . . . 61 8. Socket Options . . . . . . . . . . . . . . . . . . . . . . . 61
8.1. Read / Write Options . . . . . . . . . . . . . . . . . . 63 8.1. Read / Write Options . . . . . . . . . . . . . . . . . . 63
8.1.1. Retransmission Timeout Parameters (SCTP_RTOINFO) . . 63 8.1.1. Retransmission Timeout Parameters (SCTP_RTOINFO) . . 63
8.1.2. Association Parameters (SCTP_ASSOCINFO) . . . . . . . 64 8.1.2. Association Parameters (SCTP_ASSOCINFO) . . . . . . . 64
8.1.3. Initialization Parameters (SCTP_INITMSG) . . . . . . 65 8.1.3. Initialization Parameters (SCTP_INITMSG) . . . . . . 65
8.1.4. SO_LINGER . . . . . . . . . . . . . . . . . . . . . . 65 8.1.4. SO_LINGER . . . . . . . . . . . . . . . . . . . . . . 66
8.1.5. SCTP_NODELAY . . . . . . . . . . . . . . . . . . . . 66 8.1.5. SCTP_NODELAY . . . . . . . . . . . . . . . . . . . . 66
8.1.6. SO_RCVBUF . . . . . . . . . . . . . . . . . . . . . . 66 8.1.6. SO_RCVBUF . . . . . . . . . . . . . . . . . . . . . . 66
8.1.7. SO_SNDBUF . . . . . . . . . . . . . . . . . . . . . . 66 8.1.7. SO_SNDBUF . . . . . . . . . . . . . . . . . . . . . . 67
8.1.8. Automatic Close of Associations (SCTP_AUTOCLOSE) . . 67 8.1.8. Automatic Close of Associations (SCTP_AUTOCLOSE) . . 67
8.1.9. Set Primary Address (SCTP_PRIMARY_ADDR) . . . . . . . 67 8.1.9. Set Primary Address (SCTP_PRIMARY_ADDR) . . . . . . . 67
8.1.10. Set Adaptation Layer Indicator 8.1.10. Set Adaptation Layer Indicator
(SCTP_ADAPTATION_LAYER) . . . . . . . . . . . . . . . 68 (SCTP_ADAPTATION_LAYER) . . . . . . . . . . . . . . . 68
8.1.11. Enable/Disable Message Fragmentation 8.1.11. Enable/Disable Message Fragmentation
(SCTP_DISABLE_FRAGMENTS) . . . . . . . . . . . . . . 68 (SCTP_DISABLE_FRAGMENTS) . . . . . . . . . . . . . . 68
8.1.12. Peer Address Parameters (SCTP_PEER_ADDR_PARAMS) . . . 68 8.1.12. Peer Address Parameters (SCTP_PEER_ADDR_PARAMS) . . . 68
8.1.13. Set Default Send Parameters 8.1.13. Set Default Send Parameters
(SCTP_DEFAULT_SEND_PARAM) - DEPRECATED . . . . . . . 71 (SCTP_DEFAULT_SEND_PARAM) - DEPRECATED . . . . . . . 71
8.1.14. Set Notification and Ancillary Events 8.1.14. Set Notification and Ancillary Events
skipping to change at page 5, line 24 skipping to change at page 5, line 24
8.1.25. Set or Get the Default Context (SCTP_CONTEXT) . . . . 77 8.1.25. Set or Get the Default Context (SCTP_CONTEXT) . . . . 77
8.1.26. Enable or Disable Explicit EOR Marking 8.1.26. Enable or Disable Explicit EOR Marking
(SCTP_EXPLICIT_EOR) . . . . . . . . . . . . . . . . . 78 (SCTP_EXPLICIT_EOR) . . . . . . . . . . . . . . . . . 78
8.1.27. Enable SCTP Port Reusage (SCTP_REUSE_PORT) . . . . . 78 8.1.27. Enable SCTP Port Reusage (SCTP_REUSE_PORT) . . . . . 78
8.1.28. Set Notification Event (SCTP_EVENT) . . . . . . . . . 79 8.1.28. Set Notification Event (SCTP_EVENT) . . . . . . . . . 79
8.1.29. Enable or Disable the Delivery of SCTP_RCVINFO as 8.1.29. Enable or Disable the Delivery of SCTP_RCVINFO as
Ancillary Data (SCTP_RECVRCVINFO) . . . . . . . . . . 79 Ancillary Data (SCTP_RECVRCVINFO) . . . . . . . . . . 79
8.1.30. Enable or Disable the Delivery of SCTP_NXTINFO as 8.1.30. Enable or Disable the Delivery of SCTP_NXTINFO as
Ancillary Data (SCTP_RECVNXTINFO) . . . . . . . . . . 79 Ancillary Data (SCTP_RECVNXTINFO) . . . . . . . . . . 79
8.1.31. Set Default Send Parameters (SCTP_DEFAULT_SNDINFO) . 79 8.1.31. Set Default Send Parameters (SCTP_DEFAULT_SNDINFO) . 79
8.2. Read-Only Options . . . . . . . . . . . . . . . . . . . . 79 8.1.32. Set Default PR-SCTP Parameters
(SCTP_DEFAULT_PRINFO) . . . . . . . . . . . . . . . . 79
8.2. Read-Only Options . . . . . . . . . . . . . . . . . . . . 80
8.2.1. Association Status (SCTP_STATUS) . . . . . . . . . . 80 8.2.1. Association Status (SCTP_STATUS) . . . . . . . . . . 80
8.2.2. Peer Address Information (SCTP_GET_PEER_ADDR_INFO) . 81 8.2.2. Peer Address Information (SCTP_GET_PEER_ADDR_INFO) . 82
8.2.3. Get the List of Chunks the Peer Requires to be 8.2.3. Get the List of Chunks the Peer Requires to be
Authenticated (SCTP_PEER_AUTH_CHUNKS) . . . . . . . . 82 Authenticated (SCTP_PEER_AUTH_CHUNKS) . . . . . . . . 83
8.2.4. Get the List of Chunks the Local Endpoint Requires 8.2.4. Get the List of Chunks the Local Endpoint Requires
to be Authenticated (SCTP_LOCAL_AUTH_CHUNKS) . . . . 83 to be Authenticated (SCTP_LOCAL_AUTH_CHUNKS) . . . . 84
8.2.5. Get the Current Number of Associations 8.2.5. Get the Current Number of Associations
(SCTP_GET_ASSOC_NUMBER) . . . . . . . . . . . . . . . 83 (SCTP_GET_ASSOC_NUMBER) . . . . . . . . . . . . . . . 84
8.2.6. Get the Current Identifiers of Associations 8.2.6. Get the Current Identifiers of Associations
(SCTP_GET_ASSOC_ID_LIST) . . . . . . . . . . . . . . 84 (SCTP_GET_ASSOC_ID_LIST) . . . . . . . . . . . . . . 84
8.3. Write-Only Options . . . . . . . . . . . . . . . . . . . 84 8.3. Write-Only Options . . . . . . . . . . . . . . . . . . . 85
8.3.1. Set Peer Primary Address 8.3.1. Set Peer Primary Address
(SCTP_SET_PEER_PRIMARY_ADDR) . . . . . . . . . . . . 84 (SCTP_SET_PEER_PRIMARY_ADDR) . . . . . . . . . . . . 85
8.3.2. Add a Chunk that must be Authenticated 8.3.2. Add a Chunk that must be Authenticated
(SCTP_AUTH_CHUNK) . . . . . . . . . . . . . . . . . . 85 (SCTP_AUTH_CHUNK) . . . . . . . . . . . . . . . . . . 85
8.3.3. Set a Shared Key (SCTP_AUTH_KEY) . . . . . . . . . . 85 8.3.3. Set a Shared Key (SCTP_AUTH_KEY) . . . . . . . . . . 86
8.3.4. Deactivate a Shared Key (SCTP_AUTH_DEACTIVATE_KEY) . 86 8.3.4. Deactivate a Shared Key (SCTP_AUTH_DEACTIVATE_KEY) . 87
8.3.5. Delete a Shared Key (SCTP_AUTH_DELETE_KEY) . . . . . 86 8.3.5. Delete a Shared Key (SCTP_AUTH_DELETE_KEY) . . . . . 87
9. New Functions . . . . . . . . . . . . . . . . . . . . . . . . 87 9. New Functions . . . . . . . . . . . . . . . . . . . . . . . . 88
9.1. sctp_bindx() . . . . . . . . . . . . . . . . . . . . . . 87 9.1. sctp_bindx() . . . . . . . . . . . . . . . . . . . . . . 88
9.2. sctp_peeloff() . . . . . . . . . . . . . . . . . . . . . 89 9.2. sctp_peeloff() . . . . . . . . . . . . . . . . . . . . . 90
9.3. sctp_getpaddrs() . . . . . . . . . . . . . . . . . . . . 89 9.3. sctp_getpaddrs() . . . . . . . . . . . . . . . . . . . . 90
9.4. sctp_freepaddrs() . . . . . . . . . . . . . . . . . . . . 90 9.4. sctp_freepaddrs() . . . . . . . . . . . . . . . . . . . . 91
9.5. sctp_getladdrs() . . . . . . . . . . . . . . . . . . . . 90 9.5. sctp_getladdrs() . . . . . . . . . . . . . . . . . . . . 91
9.6. sctp_freeladdrs() . . . . . . . . . . . . . . . . . . . . 91 9.6. sctp_freeladdrs() . . . . . . . . . . . . . . . . . . . . 92
9.7. sctp_sendmsg() - DEPRECATED . . . . . . . . . . . . . . . 91 9.7. sctp_sendmsg() - DEPRECATED . . . . . . . . . . . . . . . 92
9.8. sctp_recvmsg() - DEPRECATED . . . . . . . . . . . . . . . 92 9.8. sctp_recvmsg() - DEPRECATED . . . . . . . . . . . . . . . 93
9.9. sctp_connectx() . . . . . . . . . . . . . . . . . . . . . 93 9.9. sctp_connectx() . . . . . . . . . . . . . . . . . . . . . 94
9.10. sctp_send() - DEPRECATED . . . . . . . . . . . . . . . . 94 9.10. sctp_send() - DEPRECATED . . . . . . . . . . . . . . . . 95
9.11. sctp_sendx() - DEPRECATED . . . . . . . . . . . . . . . . 95 9.11. sctp_sendx() - DEPRECATED . . . . . . . . . . . . . . . . 96
9.12. sctp_sendv() . . . . . . . . . . . . . . . . . . . . . . 96 9.12. sctp_sendv() . . . . . . . . . . . . . . . . . . . . . . 97
9.13. sctp_recvv() . . . . . . . . . . . . . . . . . . . . . . 99 9.13. sctp_recvv() . . . . . . . . . . . . . . . . . . . . . . 100
10. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 101 10. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 102
11. Security Considerations . . . . . . . . . . . . . . . . . . . 101 11. Security Considerations . . . . . . . . . . . . . . . . . . . 102
12. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 101 12. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 102
13. References . . . . . . . . . . . . . . . . . . . . . . . . . 102 13. References . . . . . . . . . . . . . . . . . . . . . . . . . 103
13.1. Normative References . . . . . . . . . . . . . . . . . . 102 13.1. Normative References . . . . . . . . . . . . . . . . . . 103
13.2. Informative References . . . . . . . . . . . . . . . . . 102 13.2. Informative References . . . . . . . . . . . . . . . . . 103
Appendix A. One-to-One Style Code Example . . . . . . . . . . . 102 Appendix A. One-to-One Style Code Example . . . . . . . . . . . 104
Appendix B. One-to-Many Style Code Example . . . . . . . . . . . 105 Appendix B. One-to-Many Style Code Example . . . . . . . . . . . 106
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 110 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 112
1. Introduction 1. Introduction
The sockets API has provided a standard mapping of the Internet The sockets API has provided a standard mapping of the Internet
Protocol suite to many operating systems. Both TCP [RFC0793] and UDP Protocol suite to many operating systems. Both TCP [RFC0793] and UDP
[RFC0768] have benefited from this standard representation and access [RFC0768] have benefited from this standard representation and access
method across many diverse platforms. SCTP is a new protocol that method across many diverse platforms. SCTP is a new protocol that
provides many of the characteristics of TCP but also incorporates provides many of the characteristics of TCP but also incorporates
semantics more akin to UDP. This document defines a method to map semantics more akin to UDP. This document defines a method to map
the existing sockets API for use with SCTP, providing both a base for the existing sockets API for use with SCTP, providing both a base for
skipping to change at page 40, line 6 skipping to change at page 40, line 6
+--------------+---------------+----------------------+ +--------------+---------------+----------------------+
| cmsg_level | cmsg_type | cmsg_data[] | | cmsg_level | cmsg_type | cmsg_data[] |
+--------------+---------------+----------------------+ +--------------+---------------+----------------------+
| IPPROTO_SCTP | SCTP_AUTHINFO | struct sctp_authinfo | | IPPROTO_SCTP | SCTP_AUTHINFO | struct sctp_authinfo |
+--------------+---------------+----------------------+ +--------------+---------------+----------------------+
The sctp_authinfo structure is defined below: The sctp_authinfo structure is defined below:
struct sctp_authinfo { struct sctp_authinfo {
uint16_t auth_keyid; uint16_t auth_keynumber;
}; };
auth_keyid: This specifies the shared key identifier used for auth_keynumber: This specifies the shared key identifier used for
sending the user message. sending the user message.
An sctp_authinfo item always corresponds to the data in msg_iov. An sctp_authinfo item always corresponds to the data in msg_iov.
Please note that the SCTP implementation must not bundle user Please note that the SCTP implementation must not bundle user
messages that needs to be authenticated using different shared key messages that needs to be authenticated using different shared key
identifiers. identifiers.
5.3.9. SCTP Destination Address Structure (IPv4) (SCTP_DSTADDRV4) 5.3.9. SCTP Destination IPv4 Address Structure (SCTP_DSTADDRV4)
This cmsghdr structure specifies SCTP options for sendmsg(). This cmsghdr structure specifies SCTP options for sendmsg().
+--------------+----------------+----------------+ +--------------+----------------+----------------+
| cmsg_level | cmsg_type | cmsg_data[] | | cmsg_level | cmsg_type | cmsg_data[] |
+--------------+----------------+----------------+ +--------------+----------------+----------------+
| IPPROTO_SCTP | SCTP_DSTADDRV4 | struct in_addr | | IPPROTO_SCTP | SCTP_DSTADDRV4 | struct in_addr |
+--------------+----------------+----------------+ +--------------+----------------+----------------+
This ancillary data can be used to provide more than one destination This ancillary data can be used to provide more than one destination
address to sendmsg(). It can be used to implement sctp_sendv() using address to sendmsg(). It can be used to implement sctp_sendv() using
sendmsg(). sendmsg().
5.3.10. SCTP Destination Address Structure (IPv6) (SCTP_DSTADDRV6) 5.3.10. SCTP Destination IPv6 Address Structure (SCTP_DSTADDRV6)
This cmsghdr structure specifies SCTP options for sendmsg(). This cmsghdr structure specifies SCTP options for sendmsg().
+--------------+----------------+-----------------+ +--------------+----------------+-----------------+
| cmsg_level | cmsg_type | cmsg_data[] | | cmsg_level | cmsg_type | cmsg_data[] |
+--------------+----------------+-----------------+ +--------------+----------------+-----------------+
| IPPROTO_SCTP | SCTP_DSTADDRV6 | struct in6_addr | | IPPROTO_SCTP | SCTP_DSTADDRV6 | struct in6_addr |
+--------------+----------------+-----------------+ +--------------+----------------+-----------------+
This ancillary data can be used to provide more than one destination This ancillary data can be used to provide more than one destination
skipping to change at page 52, line 6 skipping to change at page 52, line 6
SCTP notifications, when subscribed to, are reliable. They are SCTP notifications, when subscribed to, are reliable. They are
always delivered as long as there is space in the socket receive always delivered as long as there is space in the socket receive
buffer. However, if an implementation experiences a notification buffer. However, if an implementation experiences a notification
storm, it may run out of socket buffer space. When this occurs it storm, it may run out of socket buffer space. When this occurs it
may wish to disable notifications. If the implementation chooses to may wish to disable notifications. If the implementation chooses to
do this, it will append a final notification do this, it will append a final notification
SCTP_NOTIFICATIONS_STOPPED_EVENT. This notification is a union SCTP_NOTIFICATIONS_STOPPED_EVENT. This notification is a union
sctp_notification, where only the struct sctp_tlv (see the union sctp_notification, where only the struct sctp_tlv (see the union
above) is used. It only contains this type in the sn_type field, the above) is used. It only contains this type in the sn_type field, the
sn_length field set to the sizeof an sctp_tlv structure and the sn_length field set to the size of an sctp_tlv structure and the
sn_flags set to 0. If an application receives this notification, it sn_flags set to 0. If an application receives this notification, it
will need to re-subscribe to any notifications of interest to it, will need to re-subscribe to any notifications of interest to it,
except for the sctp_data_io_event (note that SCTP_EVENTS is except for the sctp_data_io_event (note that SCTP_EVENTS is
deprecated). deprecated).
An endpoint is automatically subscribed to this event as soon as it An endpoint is automatically subscribed to this event as soon as it
is subscribed to any event other than data io events. is subscribed to any event other than data io events.
6.1.11. SCTP_SEND_FAILED_EVENT 6.1.11. SCTP_SEND_FAILED_EVENT
skipping to change at page 56, line 24 skipping to change at page 56, line 24
ALL}_ASSOC. ALL}_ASSOC.
se_type: The se_type field can be filled with any value that would se_type: The se_type field can be filled with any value that would
show up in the respective sn_type field (in the sctp_tlv structure show up in the respective sn_type field (in the sctp_tlv structure
of the notification). of the notification).
se_on: The se_on field is set to 1 to turn on an event and set to 0 se_on: The se_on field is set to 1 to turn on an event and set to 0
to turn off an event. to turn off an event.
To use this option the user fills in this structure and then calls To use this option the user fills in this structure and then calls
the setsockopt to turn on or off an individual event. The following the setsockopt() to turn on or off an individual event. The
is an example use of this option: following is an example use of this option:
{ {
struct sctp_event event; struct sctp_event event;
memset(&event, 0, sizeof(event)); memset(&event, 0, sizeof(event));
event.se_assoc_id = SCTP_FUTURE_ASSOC; event.se_assoc_id = SCTP_FUTURE_ASSOC;
event.se_type = SCTP_SENDER_DRY_EVENT; event.se_type = SCTP_SENDER_DRY_EVENT;
event.se_on = 1; event.se_on = 1;
setsockopt(fd, IPPROTO_SCTP, SCTP_EVENT, &event, sizeof(event)); setsockopt(fd, IPPROTO_SCTP, SCTP_EVENT, &event, sizeof(event));
skipping to change at page 62, line 44 skipping to change at page 62, line 44
can be used to query information for future associations. can be used to query information for future associations.
The field opt specifies which SCTP socket option to get. It can get The field opt specifies which SCTP socket option to get. It can get
any socket option currently supported that requests information any socket option currently supported that requests information
(either read/write options or read only) such as: (either read/write options or read only) such as:
SCTP_RTOINFO SCTP_RTOINFO
SCTP_ASSOCINFO SCTP_ASSOCINFO
SCTP_PRIMARY_ADDR
SCTP_PEER_ADDR_PARAMS
SCTP_DEFAULT_SEND_PARAM SCTP_DEFAULT_SEND_PARAM
SCTP_MAX_SEG
SCTP_GET_PEER_ADDR_INFO SCTP_AUTH_ACTIVE_KEY
SCTP_PRIMARY_ADDR SCTP_DELAYED_SACK
SCTP_PEER_ADDR_PARAMS
SCTP_STATUS SCTP_MAX_BURST
SCTP_CONTEXT SCTP_CONTEXT
SCTP_AUTH_ACTIVE_KEY SCTP_EVENT
SCTP_DEFAULT_SNDINFO
SCTP_DEFAULT_PRINFO
SCTP_STATUS
SCTP_GET_PEER_ADDR_INFO
SCTP_PEER_AUTH_CHUNKS SCTP_PEER_AUTH_CHUNKS
SCTP_LOCAL_AUTH_CHUNKS SCTP_LOCAL_AUTH_CHUNKS
The arg field is an option-specific structure buffer provided by the The arg field is an option-specific structure buffer provided by the
caller. See the rest of this sections subsections for more caller. See the rest of this sections subsections for more
information on these options and option-specific structures. information on these options and option-specific structures.
sctp_opt_info() returns 0 on success, or on failure returns -1 and sctp_opt_info() returns 0 on success, or on failure returns -1 and
skipping to change at page 69, line 17 skipping to change at page 69, line 21
struct sockaddr_storage spp_address; struct sockaddr_storage spp_address;
uint32_t spp_hbinterval; uint32_t spp_hbinterval;
uint16_t spp_pathmaxrxt; uint16_t spp_pathmaxrxt;
uint32_t spp_pathmtu; uint32_t spp_pathmtu;
uint32_t spp_flags; uint32_t spp_flags;
uint32_t spp_ipv6_flowlabel; uint32_t spp_ipv6_flowlabel;
uint8_t spp_ipv4_tos; uint8_t spp_ipv4_tos;
}; };
spp_assoc_id: This parameter is ignored for one-to-one style spp_assoc_id: This parameter is ignored for one-to-one style
sockets. For one-to-many style sockets it identifies the sockets. For one-to-many style sockets the application may fill
association for this query. Note that the predefined constants in an association identifier or SCTP_FUTURE_ASSOC for this query.
are not allowed. It is an error to use SCTP_{CURRENT|ALL}_ASSOC in spp_assoc_id.
spp_address: This specifies which address is of interest. If a spp_address: This specifies which address is of interest. If a
wildcard address is provided it applies to all current and future wildcard address is provided it applies to all current and future
paths. paths.
spp_hbinterval: This contains the value of the heartbeat interval, spp_hbinterval: This contains the value of the heartbeat interval,
in milliseconds (HB.Interval in [RFC4960]). Note that unless the in milliseconds (HB.Interval in [RFC4960]). Note that unless the
spp_flag is set to SPP_HB_ENABLE the value of this field is spp_flag is set to SPP_HB_ENABLE the value of this field is
ignored. Note also that a value of zero indicates the current ignored. Note also that a value of zero indicates the current
setting should be left unchanged. To set an actual value of zero setting should be left unchanged. To set an actual value of zero
skipping to change at page 76, line 11 skipping to change at page 76, line 11
the next receive. the next receive.
An implementation should default the one-to-many model to level 1. An implementation should default the one-to-many model to level 1.
The reason for this is that otherwise it is possible that a peer The reason for this is that otherwise it is possible that a peer
could begin sending a partial message and thus block all other peers could begin sending a partial message and thus block all other peers
from sending data. However a setting of level 2 requires the from sending data. However a setting of level 2 requires the
application to not only be aware of the association (via the application to not only be aware of the association (via the
association identifier or peer's address) but also the stream number. association identifier or peer's address) but also the stream number.
The stream number is not present unless the user has subscribed to The stream number is not present unless the user has subscribed to
the sctp_data_io_event (see Section 6.2). This is also why we the sctp_data_io_event (see Section 6.2), which is deprecated, or has
recommend that the one-to-one model be defaulted to level 0 (level 1 enabled the SCTP_RECVRCVINFO socket option (see Section 8.1.29).
for the one-to-one model has no effect). Note that an implementation This is also why we recommend that the one-to-one model be defaulted
should return an error if an application attempts to set the level to to level 0 (level 1 for the one-to-one model has no effect). Note
2 and has not subscribed to the sctp_data_io_event. that an implementation should return an error if an application
attempts to set the level to 2 and has not subscribed to the
sctp_data_io_event event, which is deprecated, or has enabled the
SCTP_RECVRCVINFO socket option.
For applications that have subscribed to events, those events appear For applications that have subscribed to events, those events appear
in the normal socket buffer data stream. This means that unless the in the normal socket buffer data stream. This means that unless the
user has set the fragmentation interleave level to 0, notifications user has set the fragmentation interleave level to 0, notifications
may also be interleaved with partially delivered messages. may also be interleaved with partially delivered messages.
8.1.21. Set or Get the SCTP Partial Delivery Point 8.1.21. Set or Get the SCTP Partial Delivery Point
(SCTP_PARTIAL_DELIVERY_POINT) (SCTP_PARTIAL_DELIVERY_POINT)
This option will set or get the SCTP partial delivery point. This This option will set or get the SCTP partial delivery point. This
skipping to change at page 79, line 46 skipping to change at page 79, line 48
such an application to set the default sctp_sndinfo structure. The such an application to set the default sctp_sndinfo structure. The
application that wishes to use this socket option simply passes the application that wishes to use this socket option simply passes the
sctp_sndinfo structure defined in Section 5.3.4 to this call. The sctp_sndinfo structure defined in Section 5.3.4 to this call. The
input parameters accepted by this call include snd_sid, snd_flags, input parameters accepted by this call include snd_sid, snd_flags,
snd_ppid, snd_context. The snd_flags is composed of a bitwise OR of snd_ppid, snd_context. The snd_flags is composed of a bitwise OR of
SCTP_UNORDERED, SCTP_EOF, and SCTP_SENDALL. The snd_assoc_id field SCTP_UNORDERED, SCTP_EOF, and SCTP_SENDALL. The snd_assoc_id field
specifies the association to apply the parameters to. For a one-to- specifies the association to apply the parameters to. For a one-to-
many style socket any of the predefined constants are also allowed in many style socket any of the predefined constants are also allowed in
this field. The field is ignored on the one-to-one style. this field. The field is ignored on the one-to-one style.
8.1.32. Set Default PR-SCTP Parameters (SCTP_DEFAULT_PRINFO)
This option sets and gets the default parameters for PR-SCTP. They
can be overwritten by specific information provided in send calls.
The following structure is used to access and modify these
parameters:
struct sctp_default_prinfo {
uint16_t pr_policy;
uint32_t pr_value;
sctp_assoc_t pr_assoc_id;
};
pr_policy: Same as described in Section 5.3.7.
pr_value: Same as described in Section 5.3.7.
pr_assoc_id: This field is ignored for one-to-one style sockets.
For one-to-many style sockets pr_assoc_id can be a particular
association identifier or SCTP_{FUTURE|CURRENT|ALL}_ASSOC.
8.2. Read-Only Options 8.2. Read-Only Options
The options defined in this subsection are read-only. Using this The options defined in this subsection are read-only. Using this
option in a setsockopt() call will result in an error indicating option in a setsockopt() call will result in an error indicating
EOPNOTSUPP. EOPNOTSUPP.
8.2.1. Association Status (SCTP_STATUS) 8.2.1. Association Status (SCTP_STATUS)
Applications can retrieve current status information about an Applications can retrieve current status information about an
association, including association state, peer receiver window size, association, including association state, peer receiver window size,
number of unacked data chunks, and number of data chunks pending number of unacknowledged data chunks, and number of data chunks
receipt. This information is read-only. pending receipt. This information is read-only.
The following structure is used to access this information: The following structure is used to access this information:
struct sctp_status { struct sctp_status {
sctp_assoc_t sstat_assoc_id; sctp_assoc_t sstat_assoc_id;
int32_t sstat_state; int32_t sstat_state;
uint32_t sstat_rwnd; uint32_t sstat_rwnd;
uint16_t sstat_unackdata; uint16_t sstat_unackdata;
uint16_t sstat_penddata; uint16_t sstat_penddata;
uint16_t sstat_instrms; uint16_t sstat_instrms;
skipping to change at page 81, line 4 skipping to change at page 81, line 30
* SCTP_COOKIE_ECHOED * SCTP_COOKIE_ECHOED
* SCTP_ESTABLISHED * SCTP_ESTABLISHED
* SCTP_SHUTDOWN_PENDING * SCTP_SHUTDOWN_PENDING
* SCTP_SHUTDOWN_SENT * SCTP_SHUTDOWN_SENT
* SCTP_SHUTDOWN_RECEIVED * SCTP_SHUTDOWN_RECEIVED
* SCTP_SHUTDOWN_ACK_SENT * SCTP_SHUTDOWN_ACK_SENT
sstat_rwnd: This contains the association peer's current receiver sstat_rwnd: This contains the association peer's current receiver
window size. window size.
sstat_unackdata: This is the number of unacked data chunks. sstat_unackdata: This is the number of unacknowledged data chunks.
sstat_penddata: This is the number of data chunks pending receipt. sstat_penddata: This is the number of data chunks pending receipt.
sstat_instrms: The number of streams that the peer will be using sstat_instrms: The number of streams that the peer will be using
outbound. outbound.
sstat_outstrms: The number of streams that the endpoint is allowed sstat_outstrms: The number of streams that the endpoint is allowed
to use outbound. to use outbound.
sstat_fragmentation_point: The size at which SCTP fragmentation will sstat_fragmentation_point: The size at which SCTP fragmentation will
skipping to change at page 83, line 35 skipping to change at page 84, line 20
authenticated only. authenticated only.
The following structure is used to access these parameters: The following structure is used to access these parameters:
struct sctp_authchunks { struct sctp_authchunks {
sctp_assoc_t gauth_assoc_id; sctp_assoc_t gauth_assoc_id;
uint32_t gauth_number_of_chunks; uint32_t gauth_number_of_chunks;
uint8_t gauth_chunks[]; uint8_t gauth_chunks[];
}; };
gauth_assoc_id: This parameter indicates for which association the gauth_assoc_id: This parameter is ignored for one-to-one style
user is requesting the list of local authenticated chunks. For sockets. For one-to-many style sockets the application may fill
one-to-one sockets, this parameter is ignored. in an association identifier or SCTP_FUTURE_ASSOC. It is an error
to use SCTP_{CURRENT|ALL}_ASSOC in gauth_assoc_id.
gauth_number_of_chunks: This parameter gives the number of elements gauth_number_of_chunks: This parameter gives the number of elements
in the array gauth_chunks. in the array gauth_chunks.
gauth_chunks: This parameter contains an array of chunk types that gauth_chunks: This parameter contains an array of chunk types that
the local endpoint is requesting to be authenticated. If the the local endpoint is requesting to be authenticated. If the
passed in buffer is not large enough to hold the list of chunk passed in buffer is not large enough to hold the list of chunk
types, ENOBUFS is returned. types, ENOBUFS is returned.
8.2.5. Get the Current Number of Associations (SCTP_GET_ASSOC_NUMBER) 8.2.5. Get the Current Number of Associations (SCTP_GET_ASSOC_NUMBER)
skipping to change at page 98, line 6 skipping to change at page 99, line 6
iovcnt: The number of elements in iov. iovcnt: The number of elements in iov.
addrs: An array of addresses to be used to set up an association or addrs: An array of addresses to be used to set up an association or
one single address to be used to send the message. Pass in NULL one single address to be used to send the message. Pass in NULL
if the caller does not want to set up an association nor want to if the caller does not want to set up an association nor want to
send the message to a specific address. send the message to a specific address.
addrcnt: The number of addresses in the addrs array. addrcnt: The number of addresses in the addrs array.
info: A pointer to the buffer containing the attribute associated info: A pointer to the buffer containing the attribute associated
with the message to be sent. The type is indicated by info_type with the message to be sent. The type is indicated by the
parameter. info_type parameter.
infolen: The length in bytes of info. infolen: The length in bytes of info.
infotype: Identifies the type of the information provided in info. infotype: Identifies the type of the information provided in info.
The current defined values are: The current defined values are:
SCTP_SENDV_SNDINFO: The type of info is struct sctp_sndinfo. SCTP_SENDV_NOINFO: No information is provided. The parameter
info is a NULL pointer and infolen is 0.
SCTP_SENDV_PRINFO: The type of info is struct sctp_prinfo. SCTP_SENDV_SNDINFO: The parameter info is pointing to a struct
sctp_sndinfo.
SCTP_SENDV_AUTHINFO: The type of info is struct sctp_authinfo. SCTP_SENDV_PRINFO: The parameter info is pointing to a struct
sctp_prinfo.
SCTP_SENDV_SPA: The type of info is struct sctp_sendv_spa. SCTP_SENDV_AUTHINFO: The parameter info is pointing to a struct
sctp_authinfo.
SCTP_SENDV_SPA: The parameter info is pointing to a struct
sctp_sendv_spa.
flags: The same flags as used by the sendmsg() call flags (e.g. flags: The same flags as used by the sendmsg() call flags (e.g.
MSG_DONTROUTE). MSG_DONTROUTE).
The call returns the number of bytes sent, or -1 if an error The call returns the number of bytes sent, or -1 if an error
occurred. The variable errno is then set appropriately. occurred. The variable errno is then set appropriately.
A note on one-to-many style socket. The struct sctp_sndinfo A note on one-to-many style socket. The struct sctp_sndinfo
attribute must always be used in order to specify the association the attribute must always be used in order to specify the association the
message is to be sent on. The only case where it is not needed is message is to be sent on. The only case where it is not needed is
 End of changes. 40 change blocks. 
73 lines changed or deleted 121 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/