draft-ietf-tsvwg-sctpsocket-18.txt   draft-ietf-tsvwg-sctpsocket-19.txt 
Network Working Group R. Stewart Network Working Group R. Stewart
Internet-Draft The Resource Group Internet-Draft Researcher
Intended status: Informational K. Poon Intended status: Informational K. Poon
Expires: May 7, 2009 Sun Microsystems, Inc. Expires: August 20, 2009 Sun Microsystems, Inc.
M. Tuexen M. Tuexen
Univ. of Applied Sciences Muenster Univ. of Applied Sciences Muenster
V. Yasevich V. Yasevich
HP HP
P. Lei P. Lei
Cisco Systems, Inc. Cisco Systems, Inc.
November 3, 2008 February 16, 2009
Sockets API Extensions for Stream Control Transmission Protocol (SCTP) Sockets API Extensions for Stream Control Transmission Protocol (SCTP)
draft-ietf-tsvwg-sctpsocket-18.txt draft-ietf-tsvwg-sctpsocket-19.txt
Status of this Memo Status of this Memo
By submitting this Internet-Draft, each author represents that any This Internet-Draft is submitted to IETF in full conformance with the
applicable patent or other IPR claims of which he or she is aware provisions of BCP 78 and BCP 79.
have been or will be disclosed, and any of which he or she becomes
aware will be disclosed, in accordance with Section 6 of BCP 79.
Internet-Drafts are working documents of the Internet Engineering Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF), its areas, and its working groups. Note that Task Force (IETF), its areas, and its working groups. Note that
other groups may also distribute working documents as Internet- other groups may also distribute working documents as Internet-
Drafts. Drafts.
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."
The list of current Internet-Drafts can be accessed at The list of current Internet-Drafts can be accessed at
http://www.ietf.org/ietf/1id-abstracts.txt. http://www.ietf.org/ietf/1id-abstracts.txt.
The list of Internet-Draft Shadow Directories can be accessed at The list of Internet-Draft Shadow Directories can be accessed at
http://www.ietf.org/shadow.html. http://www.ietf.org/shadow.html.
This Internet-Draft will expire on May 7, 2009. This Internet-Draft will expire on August 20, 2009.
Copyright Notice
Copyright (c) 2009 IETF Trust and the persons identified as the
document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents
(http://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents
carefully, as they describe your rights and restrictions with respect
to this document.
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.
Table of Contents Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 5 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 6
2. Conventions . . . . . . . . . . . . . . . . . . . . . . . . . 6 2. Conventions . . . . . . . . . . . . . . . . . . . . . . . . . 7
3. Data Types . . . . . . . . . . . . . . . . . . . . . . . . . . 6 3. Data Types . . . . . . . . . . . . . . . . . . . . . . . . . . 7
4. One-to-Many Style Interface . . . . . . . . . . . . . . . . . 6 4. One-to-Many Style Interface . . . . . . . . . . . . . . . . . 7
4.1. Basic Operation . . . . . . . . . . . . . . . . . . . . . 6 4.1. Basic Operation . . . . . . . . . . . . . . . . . . . . . 7
4.1.1. socket() . . . . . . . . . . . . . . . . . . . . . . . 7 4.1.1. socket() . . . . . . . . . . . . . . . . . . . . . . . 8
4.1.2. bind() . . . . . . . . . . . . . . . . . . . . . . . . 8 4.1.2. bind() . . . . . . . . . . . . . . . . . . . . . . . . 9
4.1.3. listen() . . . . . . . . . . . . . . . . . . . . . . . 9 4.1.3. listen() . . . . . . . . . . . . . . . . . . . . . . . 10
4.1.4. sendmsg() and recvmsg() . . . . . . . . . . . . . . . 10 4.1.4. sendmsg() and recvmsg() . . . . . . . . . . . . . . . 11
4.1.5. close() . . . . . . . . . . . . . . . . . . . . . . . 11 4.1.5. close() . . . . . . . . . . . . . . . . . . . . . . . 12
4.1.6. connect() . . . . . . . . . . . . . . . . . . . . . . 12 4.1.6. connect() . . . . . . . . . . . . . . . . . . . . . . 13
4.2. Implicit Association Setup . . . . . . . . . . . . . . . . 12 4.2. Implicit Association Setup . . . . . . . . . . . . . . . . 13
4.3. Non-blocking mode . . . . . . . . . . . . . . . . . . . . 13 4.3. Non-blocking mode . . . . . . . . . . . . . . . . . . . . 14
4.4. Special considerations . . . . . . . . . . . . . . . . . . 14 4.4. Special considerations . . . . . . . . . . . . . . . . . . 15
5. One-to-One Style Interface . . . . . . . . . . . . . . . . . . 15 5. One-to-One Style Interface . . . . . . . . . . . . . . . . . . 16
5.1. Basic Operation . . . . . . . . . . . . . . . . . . . . . 16 5.1. Basic Operation . . . . . . . . . . . . . . . . . . . . . 17
5.1.1. socket() . . . . . . . . . . . . . . . . . . . . . . . 16 5.1.1. socket() . . . . . . . . . . . . . . . . . . . . . . . 17
5.1.2. bind() . . . . . . . . . . . . . . . . . . . . . . . . 17 5.1.2. bind() . . . . . . . . . . . . . . . . . . . . . . . . 18
5.1.3. listen() . . . . . . . . . . . . . . . . . . . . . . . 18 5.1.3. listen() . . . . . . . . . . . . . . . . . . . . . . . 19
5.1.4. accept() . . . . . . . . . . . . . . . . . . . . . . . 18 5.1.4. accept() . . . . . . . . . . . . . . . . . . . . . . . 19
5.1.5. connect() . . . . . . . . . . . . . . . . . . . . . . 19 5.1.5. connect() . . . . . . . . . . . . . . . . . . . . . . 20
5.1.6. close() . . . . . . . . . . . . . . . . . . . . . . . 20 5.1.6. close() . . . . . . . . . . . . . . . . . . . . . . . 21
5.1.7. shutdown() . . . . . . . . . . . . . . . . . . . . . . 20 5.1.7. shutdown() . . . . . . . . . . . . . . . . . . . . . . 21
5.1.8. sendmsg() and recvmsg() . . . . . . . . . . . . . . . 21 5.1.8. sendmsg() and recvmsg() . . . . . . . . . . . . . . . 22
5.1.9. getpeername() . . . . . . . . . . . . . . . . . . . . 21 5.1.9. getpeername() . . . . . . . . . . . . . . . . . . . . 22
6. Data Structures . . . . . . . . . . . . . . . . . . . . . . . 22 6. Data Structures . . . . . . . . . . . . . . . . . . . . . . . 23
6.1. The msghdr and cmsghdr Structures . . . . . . . . . . . . 22 6.1. The msghdr and cmsghdr Structures . . . . . . . . . . . . 23
6.2. SCTP msg_control Structures . . . . . . . . . . . . . . . 23 6.2. SCTP msg_control Structures . . . . . . . . . . . . . . . 24
6.2.1. SCTP Initiation Structure (SCTP_INIT) . . . . . . . . 24 6.2.1. SCTP Initiation Structure (SCTP_INIT) . . . . . . . . 25
6.2.2. SCTP Header Information Structure (SCTP_SNDRCV) . . . 25 6.2.2. SCTP Header Information Structure (SCTP_SNDRCV) . . . 26
6.2.3. Extended SCTP Header Information Structure 6.2.3. Extended SCTP Header Information Structure
(SCTP_EXTRCV) . . . . . . . . . . . . . . . . . . . . 27 (SCTP_EXTRCV) . . . . . . . . . . . . . . . . . . . . 28
6.3. SCTP Events and Notifications . . . . . . . . . . . . . . 28 6.3. SCTP Events and Notifications . . . . . . . . . . . . . . 29
6.3.1. SCTP Notification Structure . . . . . . . . . . . . . 29 6.3.1. SCTP Notification Structure . . . . . . . . . . . . . 30
6.3.2. SCTP_ASSOC_CHANGE . . . . . . . . . . . . . . . . . . 30 6.3.2. SCTP_ASSOC_CHANGE . . . . . . . . . . . . . . . . . . 31
6.3.3. SCTP_PEER_ADDR_CHANGE . . . . . . . . . . . . . . . . 32 6.3.3. SCTP_PEER_ADDR_CHANGE . . . . . . . . . . . . . . . . 33
6.3.4. SCTP_REMOTE_ERROR . . . . . . . . . . . . . . . . . . 33 6.3.4. SCTP_REMOTE_ERROR . . . . . . . . . . . . . . . . . . 34
6.3.5. SCTP_SEND_FAILED . . . . . . . . . . . . . . . . . . . 33 6.3.5. SCTP_SEND_FAILED . . . . . . . . . . . . . . . . . . . 35
6.3.6. SCTP_SHUTDOWN_EVENT . . . . . . . . . . . . . . . . . 35 6.3.6. SCTP_SHUTDOWN_EVENT . . . . . . . . . . . . . . . . . 36
6.3.7. SCTP_ADAPTATION_INDICATION . . . . . . . . . . . . . . 35 6.3.7. SCTP_ADAPTATION_INDICATION . . . . . . . . . . . . . . 36
6.3.8. SCTP_PARTIAL_DELIVERY_EVENT . . . . . . . . . . . . . 36 6.3.8. SCTP_PARTIAL_DELIVERY_EVENT . . . . . . . . . . . . . 37
6.3.9. SCTP_AUTHENTICATION_EVENT . . . . . . . . . . . . . . 37 6.3.9. SCTP_AUTHENTICATION_EVENT . . . . . . . . . . . . . . 38
6.3.10. SCTP_SENDER_DRY_EVENT . . . . . . . . . . . . . . . . 37 6.3.10. SCTP_SENDER_DRY_EVENT . . . . . . . . . . . . . . . . 38
6.4. Ancillary Data Considerations and Semantics . . . . . . . 38 6.4. Ancillary Data Considerations and Semantics . . . . . . . 39
6.4.1. Multiple Items and Ordering . . . . . . . . . . . . . 38 6.4.1. Multiple Items and Ordering . . . . . . . . . . . . . 39
6.4.2. Accessing and Manipulating Ancillary Data . . . . . . 38 6.4.2. Accessing and Manipulating Ancillary Data . . . . . . 39
6.4.3. Control Message Buffer Sizing . . . . . . . . . . . . 39 6.4.3. Control Message Buffer Sizing . . . . . . . . . . . . 40
7. Common Operations for Both Styles . . . . . . . . . . . . . . 40 7. Common Operations for Both Styles . . . . . . . . . . . . . . 41
7.1. send(), recv(), sendto(), and recvfrom() . . . . . . . . . 40 7.1. send(), recv(), sendto(), and recvfrom() . . . . . . . . . 41
7.2. setsockopt() and getsockopt() . . . . . . . . . . . . . . 42 7.2. setsockopt() and getsockopt() . . . . . . . . . . . . . . 43
7.3. read() and write() . . . . . . . . . . . . . . . . . . . . 42 7.3. read() and write() . . . . . . . . . . . . . . . . . . . . 43
7.4. getsockname() . . . . . . . . . . . . . . . . . . . . . . 43 7.4. getsockname() . . . . . . . . . . . . . . . . . . . . . . 44
8. Socket Options . . . . . . . . . . . . . . . . . . . . . . . . 43 8. Socket Options . . . . . . . . . . . . . . . . . . . . . . . . 44
8.1. Read / Write Options . . . . . . . . . . . . . . . . . . . 45 8.1. Read / Write Options . . . . . . . . . . . . . . . . . . . 46
8.1.1. Retransmission Timeout Parameters (SCTP_RTOINFO) . . . 45 8.1.1. Retransmission Timeout Parameters (SCTP_RTOINFO) . . . 46
8.1.2. Association Parameters (SCTP_ASSOCINFO) . . . . . . . 46 8.1.2. Association Parameters (SCTP_ASSOCINFO) . . . . . . . 47
8.1.3. Initialization Parameters (SCTP_INITMSG) . . . . . . . 47 8.1.3. Initialization Parameters (SCTP_INITMSG) . . . . . . . 48
8.1.4. SO_LINGER . . . . . . . . . . . . . . . . . . . . . . 47 8.1.4. SO_LINGER . . . . . . . . . . . . . . . . . . . . . . 48
8.1.5. SCTP_NODELAY . . . . . . . . . . . . . . . . . . . . . 48 8.1.5. SCTP_NODELAY . . . . . . . . . . . . . . . . . . . . . 49
8.1.6. SO_RCVBUF . . . . . . . . . . . . . . . . . . . . . . 48 8.1.6. SO_RCVBUF . . . . . . . . . . . . . . . . . . . . . . 49
8.1.7. SO_SNDBUF . . . . . . . . . . . . . . . . . . . . . . 48 8.1.7. SO_SNDBUF . . . . . . . . . . . . . . . . . . . . . . 49
8.1.8. Automatic Close of Associations (SCTP_AUTOCLOSE) . . . 48 8.1.8. Automatic Close of Associations (SCTP_AUTOCLOSE) . . . 49
8.1.9. Set Primary Address (SCTP_PRIMARY_ADDR) . . . . . . . 49 8.1.9. Set Primary Address (SCTP_PRIMARY_ADDR) . . . . . . . 50
8.1.10. Set Adaptation Layer Indicator 8.1.10. Set Adaptation Layer Indicator
(SCTP_ADAPTATION_LAYER) . . . . . . . . . . . . . . . 49 (SCTP_ADAPTATION_LAYER) . . . . . . . . . . . . . . . 50
8.1.11. Enable/Disable Message Fragmentation 8.1.11. Enable/Disable Message Fragmentation
(SCTP_DISABLE_FRAGMENTS) . . . . . . . . . . . . . . . 49 (SCTP_DISABLE_FRAGMENTS) . . . . . . . . . . . . . . . 50
8.1.12. Peer Address Parameters (SCTP_PEER_ADDR_PARAMS) . . . 50 8.1.12. Peer Address Parameters (SCTP_PEER_ADDR_PARAMS) . . . 51
8.1.13. Set Default Send Parameters 8.1.13. Set Default Send Parameters
(SCTP_DEFAULT_SEND_PARAM) . . . . . . . . . . . . . . 52 (SCTP_DEFAULT_SEND_PARAM) . . . . . . . . . . . . . . 53
8.1.14. Set Notification and Ancillary Events (SCTP_EVENTS) . 52 8.1.14. Set Notification and Ancillary Events (SCTP_EVENTS) . 53
8.1.15. Set/Clear IPv4 Mapped Addresses 8.1.15. Set/Clear IPv4 Mapped Addresses
(SCTP_I_WANT_MAPPED_V4_ADDR) . . . . . . . . . . . . . 53 (SCTP_I_WANT_MAPPED_V4_ADDR) . . . . . . . . . . . . . 54
8.1.16. Get or Set the Maximum Fragmentation Size 8.1.16. Get or Set the Maximum Fragmentation Size
(SCTP_MAXSEG) . . . . . . . . . . . . . . . . . . . . 53 (SCTP_MAXSEG) . . . . . . . . . . . . . . . . . . . . 54
8.1.17. Get or Set the List of Supported HMAC Identifiers 8.1.17. Get or Set the List of Supported HMAC Identifiers
(SCTP_HMAC_IDENT) . . . . . . . . . . . . . . . . . . 53 (SCTP_HMAC_IDENT) . . . . . . . . . . . . . . . . . . 54
8.1.18. Get or Set the Active Shared Key 8.1.18. Get or Set the Active Shared Key
(SCTP_AUTH_ACTIVE_KEY) . . . . . . . . . . . . . . . . 54 (SCTP_AUTH_ACTIVE_KEY) . . . . . . . . . . . . . . . . 55
8.1.19. Get or Set Delayed SACK Timer (SCTP_DELAYED_SACK) . . 55 8.1.19. Get or Set Delayed SACK Timer (SCTP_DELAYED_SACK) . . 56
8.1.20. Get or Set Fragmented Interleave 8.1.20. Get or Set Fragmented Interleave
(SCTP_FRAGMENT_INTERLEAVE) . . . . . . . . . . . . . . 56 (SCTP_FRAGMENT_INTERLEAVE) . . . . . . . . . . . . . . 57
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) . . . . . . . . . . . . 57 (SCTP_PARTIAL_DELIVERY_POINT) . . . . . . . . . . . . 58
8.1.22. Set or Get the Use of Extended Receive Info 8.1.22. Set or Get the Use of Extended Receive Info
(SCTP_USE_EXT_RCVINFO) . . . . . . . . . . . . . . . . 57 (SCTP_USE_EXT_RCVINFO) . . . . . . . . . . . . . . . . 58
8.1.23. Set or Get the Auto ASCONF Flag (SCTP_AUTO_ASCONF) . . 57 8.1.23. Set or Get the Auto ASCONF Flag (SCTP_AUTO_ASCONF) . . 58
8.1.24. Set or Get the Maximum Burst (SCTP_MAX_BURST) . . . . 58 8.1.24. Set or Get the Maximum Burst (SCTP_MAX_BURST) . . . . 59
8.1.25. Set or Get the Default Context (SCTP_CONTEXT) . . . . 58 8.1.25. Set or Get the Default Context (SCTP_CONTEXT) . . . . 59
8.1.26. Enable or Disable Explicit EOR Marking 8.1.26. Enable or Disable Explicit EOR Marking
(SCTP_EXPLICIT_EOR) . . . . . . . . . . . . . . . . . 59 (SCTP_EXPLICIT_EOR) . . . . . . . . . . . . . . . . . 60
8.1.27. Enable SCTP Port Reusage (SCTP_REUSE_PORT) . . . . . . 59 8.1.27. Enable SCTP Port Reusage (SCTP_REUSE_PORT) . . . . . . 60
8.2. Read-Only Options . . . . . . . . . . . . . . . . . . . . 59 8.2. Read-Only Options . . . . . . . . . . . . . . . . . . . . 60
8.2.1. Association Status (SCTP_STATUS) . . . . . . . . . . . 59 8.2.1. Association Status (SCTP_STATUS) . . . . . . . . . . . 60
8.2.2. Peer Address Information (SCTP_GET_PEER_ADDR_INFO) . . 60 8.2.2. Peer Address Information (SCTP_GET_PEER_ADDR_INFO) . . 61
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) . . . . . . . . 61 Authenticated (SCTP_PEER_AUTH_CHUNKS) . . . . . . . . 62
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) . . . . . 62 to be Authenticated (SCTP_LOCAL_AUTH_CHUNKS) . . . . . 63
8.2.5. Get the Current Number of Associations 8.2.5. Get the Current Number of Associations
(SCTP_GET_ASSOC_NUMBER) . . . . . . . . . . . . . . . 62 (SCTP_GET_ASSOC_NUMBER) . . . . . . . . . . . . . . . 63
8.2.6. Get the Current Identifiers of Associations 8.2.6. Get the Current Identifiers of Associations
(SCTP_GET_ASSOC_ID_LIST) . . . . . . . . . . . . . . . 62 (SCTP_GET_ASSOC_ID_LIST) . . . . . . . . . . . . . . . 63
8.3. Write-Only Options . . . . . . . . . . . . . . . . . . . . 63 8.3. Write-Only Options . . . . . . . . . . . . . . . . . . . . 64
8.3.1. Set Peer Primary Address 8.3.1. Set Peer Primary Address
(SCTP_SET_PEER_PRIMARY_ADDR) . . . . . . . . . . . . . 63 (SCTP_SET_PEER_PRIMARY_ADDR) . . . . . . . . . . . . . 64
8.3.2. Add a Chunk That Must Be Authenticated 8.3.2. Add a Chunk That Must Be Authenticated
(SCTP_AUTH_CHUNK) . . . . . . . . . . . . . . . . . . 63 (SCTP_AUTH_CHUNK) . . . . . . . . . . . . . . . . . . 64
8.3.3. Set a Shared Key (SCTP_AUTH_KEY) . . . . . . . . . . . 64 8.3.3. Set a Shared Key (SCTP_AUTH_KEY) . . . . . . . . . . . 65
8.3.4. Deactivate a Shared Key (SCTP_AUTH_DEACTIVATE_KEY) . . 64 8.3.4. Deactivate a Shared Key (SCTP_AUTH_DEACTIVATE_KEY) . . 65
8.3.5. Delete a Shared Key (SCTP_AUTH_DELETE_KEY) . . . . . . 65 8.3.5. Delete a Shared Key (SCTP_AUTH_DELETE_KEY) . . . . . . 66
8.4. Ancillary Data and Notification Interest Options . . . . . 66 8.4. Ancillary Data and Notification Interest Options . . . . . 67
9. New Functions . . . . . . . . . . . . . . . . . . . . . . . . 68 9. New Functions . . . . . . . . . . . . . . . . . . . . . . . . 69
9.1. sctp_bindx() . . . . . . . . . . . . . . . . . . . . . . . 68 9.1. sctp_bindx() . . . . . . . . . . . . . . . . . . . . . . . 69
9.2. sctp_peeloff() . . . . . . . . . . . . . . . . . . . . . . 69 9.2. sctp_peeloff() . . . . . . . . . . . . . . . . . . . . . . 70
9.3. sctp_getpaddrs() . . . . . . . . . . . . . . . . . . . . . 70 9.3. sctp_getpaddrs() . . . . . . . . . . . . . . . . . . . . . 71
9.4. sctp_freepaddrs() . . . . . . . . . . . . . . . . . . . . 71 9.4. sctp_freepaddrs() . . . . . . . . . . . . . . . . . . . . 72
9.5. sctp_getladdrs() . . . . . . . . . . . . . . . . . . . . . 71 9.5. sctp_getladdrs() . . . . . . . . . . . . . . . . . . . . . 72
9.6. sctp_freeladdrs() . . . . . . . . . . . . . . . . . . . . 72 9.6. sctp_freeladdrs() . . . . . . . . . . . . . . . . . . . . 73
9.7. sctp_sendmsg() . . . . . . . . . . . . . . . . . . . . . . 72 9.7. sctp_sendmsg() . . . . . . . . . . . . . . . . . . . . . . 73
9.8. sctp_recvmsg() . . . . . . . . . . . . . . . . . . . . . . 73 9.8. sctp_recvmsg() . . . . . . . . . . . . . . . . . . . . . . 74
9.9. sctp_connectx() . . . . . . . . . . . . . . . . . . . . . 73 9.9. sctp_connectx() . . . . . . . . . . . . . . . . . . . . . 74
9.10. sctp_send() . . . . . . . . . . . . . . . . . . . . . . . 74 9.10. sctp_send() . . . . . . . . . . . . . . . . . . . . . . . 75
9.11. sctp_sendx() . . . . . . . . . . . . . . . . . . . . . . . 75 9.11. sctp_sendx() . . . . . . . . . . . . . . . . . . . . . . . 76
9.12. sctp_getaddrlen() . . . . . . . . . . . . . . . . . . . . 76 9.12. sctp_getaddrlen() . . . . . . . . . . . . . . . . . . . . 77
10. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 76 10. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 77
11. Security Considerations . . . . . . . . . . . . . . . . . . . 77 11. Security Considerations . . . . . . . . . . . . . . . . . . . 78
12. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 77 12. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 78
13. Normative References . . . . . . . . . . . . . . . . . . . . . 77 13. Normative References . . . . . . . . . . . . . . . . . . . . . 78
Appendix A. One-to-One Style Code Example . . . . . . . . . . . . 78 Appendix A. One-to-One Style Code Example . . . . . . . . . . . . 79
Appendix B. One-to-Many Style Code Example . . . . . . . . . . . 83 Appendix B. One-to-Many Style Code Example . . . . . . . . . . . 84
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 85 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 86
Intellectual Property and Copyright Statements . . . . . . . . . . 87
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 8, line 14 skipping to change at page 9, line 14
int socket(int domain, int socket(int domain,
int type, int type,
int protocol); int protocol);
and one uses PF_INET or PF_INET6 as the domain, SOCK_SEQPACKET as the and one uses PF_INET or PF_INET6 as the domain, SOCK_SEQPACKET as the
type and IPPROTO_SCTP as the protocol. type and IPPROTO_SCTP as the protocol.
Here, SOCK_SEQPACKET indicates the creation of a one-to-many style Here, SOCK_SEQPACKET indicates the creation of a one-to-many style
socket. socket.
The first form creates an endpoint which can use only IPv4 addresses, Using the PF_INET domain indicates the creation of an endpoint which
while, the second form creates an endpoint which can use both IPv6 can use only IPv4 addresses, while PF_INET6 creates an endpoint which
and IPv4 addresses. can use both IPv6 and IPv4 address.
4.1.2. bind() 4.1.2. bind()
Applications use bind() to specify which local address the SCTP Applications use bind() to specify which local address the SCTP
endpoint should associate itself with. endpoint should associate itself with.
An SCTP endpoint can be associated with multiple addresses. To do An SCTP endpoint can be associated with multiple addresses. To do
this, sctp_bindx() is introduced in Section 9.1 to help applications this, sctp_bindx() is introduced in Section 9.1 to help applications
do the job of associating multiple addresses. do the job of associating multiple addresses.
skipping to change at page 16, line 52 skipping to change at page 17, line 52
Applications calls socket() to create a socket descriptor to Applications calls socket() to create a socket descriptor to
represent an SCTP endpoint. represent an SCTP endpoint.
The function prototype is The function prototype is
int socket(int domain, int socket(int domain,
int type, int type,
int protocol); int protocol);
and one uses PF_INET or PF_INET6 as the domain, SOCK_SEQPACKET as the and one uses PF_INET or PF_INET6 as the domain, SOCK_STREAM as the
type and IPPROTO_SCTP as the protocol. type and IPPROTO_SCTP as the protocol.
Here, SOCK_STREAM indicates the creation of a one-to-one style Here, SOCK_STREAM indicates the creation of a one-to-one style
socket. socket.
The first form creates an endpoint which can use only IPv4 addresses, Using the PF_INET domain indicates the creation of an endpoint which
while the second form creates an endpoint which can use both IPv6 and can use only IPv4 addresses, while PF_INET6 creates an endpoint which
IPv4 addresses. can use both IPv6 and IPv4 address.
5.1.2. bind() 5.1.2. bind()
Applications use bind() to pass an address to be associated with an Applications use bind() to pass an address to be associated with an
SCTP endpoint to the system. bind() allows only either a single SCTP endpoint to the system. bind() allows only either a single
address or a IPv4 or IPv6 wildcard address to be bound. An SCTP address or a IPv4 or IPv6 wildcard address to be bound. An SCTP
endpoint can be associated with multiple addresses. To do this, endpoint can be associated with multiple addresses. To do this,
sctp_bindx() is introduced in Section 9.1 to help applications do the sctp_bindx() is introduced in Section 9.1 to help applications do the
job of associating multiple addresses. job of associating multiple addresses.
skipping to change at page 32, line 10 skipping to change at page 33, line 10
sac_assoc_id: The association id field, holds the identifier for the sac_assoc_id: The association id field, holds the identifier for the
association. All notifications for a given association have the association. All notifications for a given association have the
same association identifier. For one-to-one style socket, this same association identifier. For one-to-one style socket, this
field is ignored. field is ignored.
sac_info: If the sac_state is SCTP_COMM_LOST and an ABORT chunk was sac_info: If the sac_state is SCTP_COMM_LOST and an ABORT chunk was
received for this association, sac_info[] contains the complete received for this association, sac_info[] contains the complete
ABORT chunk as defined in the SCTP specification [RFC4960] section ABORT chunk as defined in the SCTP specification [RFC4960] section
3.3.7. If the sac_state is SCTP_COMM_UP or SCTP_RESTART, sac_info 3.3.7. If the sac_state is SCTP_COMM_UP or SCTP_RESTART, sac_info
may contain an array of features that the current association may contain an array of features that the current association
supports. Features include supports. Features may include
SCTP_PR: The both endpoints support the protocol extension SCTP_PR: The both endpoints support the protocol extension
described in [RFC3758]. described in [RFC3758].
SCTP_AUTH: The both endpoints support the protocol extension SCTP_AUTH: The both endpoints support the protocol extension
described in [RFC4895]. described in [RFC4895].
SCTP_ASCONF: The both endpoints support the protocol extension SCTP_ASCONF: The both endpoints support the protocol extension
described in [RFC5061]. described in [RFC5061].
SCTP_MULTIBUF: For an one-to-many style socket, the local
endpoints uses separate send and/or receive buffers for each
SCTP association.
6.3.3. SCTP_PEER_ADDR_CHANGE 6.3.3. SCTP_PEER_ADDR_CHANGE
When a destination address on a multi-homed peer encounters a change When a destination address on a multi-homed peer encounters a change
an interface details event is sent. The information has the an interface details event is sent. The information has the
following structure: following structure:
struct sctp_paddr_change { struct sctp_paddr_change {
uint16_t spc_type; uint16_t spc_type;
uint16_t spc_flags; uint16_t spc_flags;
skipping to change at page 66, line 31 skipping to change at page 67, line 31
SCTP_SEND_FAILED (sctp_send_failure_event): described in SCTP_SEND_FAILED (sctp_send_failure_event): described in
Section 6.3.5 Section 6.3.5
SCTP_REMOTE_ERROR (sctp_peer_error_event): described in SCTP_REMOTE_ERROR (sctp_peer_error_event): described in
Section 6.3.4 Section 6.3.4
SCTP_SHUTDOWN_EVENT (sctp_shtudown_event): described in SCTP_SHUTDOWN_EVENT (sctp_shtudown_event): described in
Section 6.3.6 Section 6.3.6
SCTP_PARTIAL_DELIVERY_EVENT (sctp_partial_delivery_event): described SCTP_PARTIAL_DELIVERY_EVENT (sctp_partial_delivery_event): described
in Section 6.3.8 in Section 6.3.8
SCTP_ADAPTATION_INDICATION (sctp_adaptation_layer_event): described SCTP_ADAPTATION_INDICATION (sctp_adaptation_layer_event): described
in Section 6.3.7 in Section 6.3.7
SCTP_AUTHENTICATION_INDICATION (sctp_authentication_event): SCTP_AUTHENTICATION_EVENT (sctp_authentication_event): described in
described in Section 6.3.9) Section 6.3.9)
SCTP_SENDER_DRY_EVENT (sctp_sender_dry_event): described in SCTP_SENDER_DRY_EVENT (sctp_sender_dry_event): described in
Section 6.3.10 Section 6.3.10
To receive any ancillary data or notifications, first the application To receive any ancillary data or notifications, first the application
registers its interest by calling the SCTP_EVENTS setsockopt() with registers its interest by calling the SCTP_EVENTS setsockopt() with
the following structure: the following structure:
struct sctp_event_subscribe{ struct sctp_event_subscribe{
uint8_t sctp_data_io_event; uint8_t sctp_data_io_event;
uint8_t sctp_association_event; uint8_t sctp_association_event;
skipping to change at page 85, line 14 skipping to change at page 86, line 14
/* Wait for new associations */ /* Wait for new associations */
while(1){ while(1){
/* Echo back any and all data */ /* Echo back any and all data */
echo(fd,1); echo(fd,1);
} }
} }
Authors' Addresses Authors' Addresses
Randall R. Stewart Randall R. Stewart
The Resource Group Researcher
1700 Pennsylvania Ave NW Chapin, SC 29036
Suite 56
Washington, DC 20006
USA USA
Email: randall.stewart@trgworld.com Email: randall@lakerest.net
Kacheong Poon Kacheong Poon
Sun Microsystems, Inc. Sun Microsystems, Inc.
4150 Network Circle 4150 Network Circle
Santa Clara, CA 95054 Santa Clara, CA 95054
USA USA
Email: kacheong.poon@sun.com Email: kacheong.poon@sun.com
Michael Tuexen Michael Tuexen
skipping to change at page 87, line 4 skipping to change at line 4003
Email: vladislav.yasevich@hp.com Email: vladislav.yasevich@hp.com
Peter Lei Peter Lei
Cisco Systems, Inc. Cisco Systems, Inc.
8735 West Higgins Road 8735 West Higgins Road
Suite 300 Suite 300
Chicago, IL 60631 Chicago, IL 60631
USA USA
Email: peterlei@cisco.com Email: peterlei@cisco.com
Full Copyright Statement
Copyright (C) The IETF Trust (2008).
This document is subject to the rights, licenses and restrictions
contained in BCP 78, and except as set forth therein, the authors
retain all their rights.
This document and the information contained herein are provided on an
"AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS
OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY, THE IETF TRUST AND
THE INTERNET ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF
THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED
WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
Intellectual Property
The IETF takes no position regarding the validity or scope of any
Intellectual Property Rights or other rights that might be claimed to
pertain to the implementation or use of the technology described in
this document or the extent to which any license under such rights
might or might not be available; nor does it represent that it has
made any independent effort to identify any such rights. Information
on the procedures with respect to rights in RFC documents can be
found in BCP 78 and BCP 79.
Copies of IPR disclosures made to the IETF Secretariat and any
assurances of licenses to be made available, or the result of an
attempt made to obtain a general license or permission for the use of
such proprietary rights by implementers or users of this
specification can be obtained from the IETF on-line IPR repository at
http://www.ietf.org/ipr.
The IETF invites any interested party to bring to its attention any
copyrights, patents or patent applications, or other proprietary
rights that may cover technology that may be required to implement
this standard. Please address the information to the IETF at
ietf-ipr@ietf.org.
 End of changes. 34 change blocks. 
139 lines changed or deleted 149 lines changed or added

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