draft-ietf-tsvwg-sctpsocket-13.txt   draft-ietf-tsvwg-sctpsocket-14.txt 
Network Working Group R. Stewart Network Working Group R. Stewart
Internet-Draft Cisco Systems, Inc. Internet-Draft Cisco Systems, Inc.
Expires: December 11, 2006 Q. Xie Expires: June 14, 2007 Q. Xie
Motorola, Inc. Motorola, Inc.
L. Yarroll L. Yarroll
TimeSys Corp TimeSys Corp
K. Poon K. Poon
Sun Microsystems, Inc. Sun Microsystems, Inc.
M. Tuexen M. Tuexen
Univ. of Applied Sciences Muenster Univ. of Applied Sciences Muenster
June 9, 2006 December 11, 2006
Sockets API Extensions for Stream Control Transmission Protocol (SCTP) Sockets API Extensions for Stream Control Transmission Protocol (SCTP)
draft-ietf-tsvwg-sctpsocket-13.txt draft-ietf-tsvwg-sctpsocket-14.txt
Status of this Memo Status of this Memo
By submitting this Internet-Draft, each author represents that any By submitting this Internet-Draft, each author represents that any
applicable patent or other IPR claims of which he or she is aware applicable patent or other IPR claims of which he or she is aware
have been or will be disclosed, and any of which he or she becomes 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. 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
skipping to change at page 1, line 41 skipping to change at page 1, line 41
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 December 11, 2006. This Internet-Draft will expire on June 14, 2007.
Copyright Notice Copyright Notice
Copyright (C) The Internet Society (2006). Copyright (C) The IETF Trust (2006).
Abstract Abstract
This document describes a mapping of the Stream Control Transmission This document describes a mapping of the Stream Control Transmission
Protocol SCTP RFC2960 [RFC2960] into a sockets API. The benefits of Protocol SCTP into a sockets API. The benefits of this mapping
this mapping include compatibility for TCP applications, access to include compatibility for TCP applications, access to new SCTP
new SCTP features and a consolidated error and event notification features and a consolidated error and event notification scheme.
scheme.
Table of Contents Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 5 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 5
2. Conventions . . . . . . . . . . . . . . . . . . . . . . . . . 6 2. Conventions . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.1. Data Types . . . . . . . . . . . . . . . . . . . . . . . . 6 2.1. Data Types . . . . . . . . . . . . . . . . . . . . . . . . 6
3. one-to-many style Interface . . . . . . . . . . . . . . . . . 6 3. one-to-many style Interface . . . . . . . . . . . . . . . . . 6
3.1. Basic Operation . . . . . . . . . . . . . . . . . . . . . 6 3.1. Basic Operation . . . . . . . . . . . . . . . . . . . . . 6
3.1.1. socket() - one-to-many style socket . . . . . . . . . 7 3.1.1. socket() - one-to-many style socket . . . . . . . . . 7
3.1.2. bind() - one-to-many style socket . . . . . . . . . . 8 3.1.2. bind() - one-to-many style socket . . . . . . . . . . 8
skipping to change at page 2, line 45 skipping to change at page 2, line 44
4.1.9. getpeername() . . . . . . . . . . . . . . . . . . . . 20 4.1.9. getpeername() . . . . . . . . . . . . . . . . . . . . 20
5. Data Structures . . . . . . . . . . . . . . . . . . . . . . . 21 5. Data Structures . . . . . . . . . . . . . . . . . . . . . . . 21
5.1. The msghdr and cmsghdr Structures . . . . . . . . . . . . 21 5.1. The msghdr and cmsghdr Structures . . . . . . . . . . . . 21
5.2. SCTP msg_control Structures . . . . . . . . . . . . . . . 22 5.2. SCTP msg_control Structures . . . . . . . . . . . . . . . 22
5.2.1. SCTP Initiation Structure (SCTP_INIT) . . . . . . . . 23 5.2.1. SCTP Initiation Structure (SCTP_INIT) . . . . . . . . 23
5.2.2. SCTP Header Information Structure (SCTP_SNDRCV) . . . 24 5.2.2. SCTP Header Information Structure (SCTP_SNDRCV) . . . 24
5.2.3. Extended SCTP Header Information Structure 5.2.3. Extended SCTP Header Information Structure
(SCTP_EXTRCV) . . . . . . . . . . . . . . . . . . . . 27 (SCTP_EXTRCV) . . . . . . . . . . . . . . . . . . . . 27
5.3. SCTP Events and Notifications . . . . . . . . . . . . . . 31 5.3. SCTP Events and Notifications . . . . . . . . . . . . . . 31
5.3.1. SCTP Notification Structure . . . . . . . . . . . . . 31 5.3.1. SCTP Notification Structure . . . . . . . . . . . . . 31
5.4. Ancillary Data Considerations and Semantics . . . . . . . 41 5.4. Ancillary Data Considerations and Semantics . . . . . . . 42
5.4.1. Multiple Items and Ordering . . . . . . . . . . . . . 41 5.4.1. Multiple Items and Ordering . . . . . . . . . . . . . 42
5.4.2. Accessing and Manipulating Ancillary Data . . . . . . 42 5.4.2. Accessing and Manipulating Ancillary Data . . . . . . 42
5.4.3. Control Message Buffer Sizing . . . . . . . . . . . . 42 5.4.3. Control Message Buffer Sizing . . . . . . . . . . . . 43
6. Common Operations for Both Styles . . . . . . . . . . . . . . 43 6. Common Operations for Both Styles . . . . . . . . . . . . . . 44
6.1. send(), recv(), sendto(), recvfrom() . . . . . . . . . . . 43 6.1. send(), recv(), sendto(), recvfrom() . . . . . . . . . . . 44
6.2. setsockopt(), getsockopt() . . . . . . . . . . . . . . . . 44 6.2. setsockopt(), getsockopt() . . . . . . . . . . . . . . . . 45
6.3. read() and write() . . . . . . . . . . . . . . . . . . . . 45 6.3. read() and write() . . . . . . . . . . . . . . . . . . . . 46
6.4. getsockname() . . . . . . . . . . . . . . . . . . . . . . 45 6.4. getsockname() . . . . . . . . . . . . . . . . . . . . . . 46
7. Socket Options . . . . . . . . . . . . . . . . . . . . . . . . 46 7. Socket Options . . . . . . . . . . . . . . . . . . . . . . . . 47
7.1. Read / Write Options . . . . . . . . . . . . . . . . . . . 48 7.1. Read / Write Options . . . . . . . . . . . . . . . . . . . 48
7.1.1. Retransmission Timeout Parameters (SCTP_RTOINFO) . . . 48 7.1.1. Retransmission Timeout Parameters (SCTP_RTOINFO) . . . 48
7.1.2. Association Parameters (SCTP_ASSOCINFO) . . . . . . . 48 7.1.2. Association Parameters (SCTP_ASSOCINFO) . . . . . . . 49
7.1.3. Initialization Parameters (SCTP_INITMSG) . . . . . . . 50 7.1.3. Initialization Parameters (SCTP_INITMSG) . . . . . . . 51
7.1.4. SO_LINGER . . . . . . . . . . . . . . . . . . . . . . 50 7.1.4. SO_LINGER . . . . . . . . . . . . . . . . . . . . . . 51
7.1.5. SCTP_NODELAY . . . . . . . . . . . . . . . . . . . . . 50 7.1.5. SCTP_NODELAY . . . . . . . . . . . . . . . . . . . . . 51
7.1.6. SO_RCVBUF . . . . . . . . . . . . . . . . . . . . . . 51 7.1.6. SO_RCVBUF . . . . . . . . . . . . . . . . . . . . . . 51
7.1.7. SO_SNDBUF . . . . . . . . . . . . . . . . . . . . . . 51 7.1.7. SO_SNDBUF . . . . . . . . . . . . . . . . . . . . . . 52
7.1.8. Automatic Close of associations (SCTP_AUTOCLOSE) . . . 51 7.1.8. Automatic Close of associations (SCTP_AUTOCLOSE) . . . 52
7.1.9. Set Peer Primary Address 7.1.9. Set Peer Primary Address
(SCTP_SET_PEER_PRIMARY_ADDR) . . . . . . . . . . . . . 51 (SCTP_SET_PEER_PRIMARY_ADDR) . . . . . . . . . . . . . 52
7.1.10. Set Primary Address (SCTP_PRIMARY_ADDR) . . . . . . . 52 7.1.10. Set Primary Address (SCTP_PRIMARY_ADDR) . . . . . . . 53
7.1.11. Set Adaptation Layer Indicator 7.1.11. Set Adaptation Layer Indicator
(SCTP_ADAPTATION_LAYER) . . . . . . . . . . . . . . . 52 (SCTP_ADAPTATION_LAYER) . . . . . . . . . . . . . . . 53
7.1.12. Enable/Disable message fragmentation 7.1.12. Enable/Disable message fragmentation
(SCTP_DISABLE_FRAGMENTS) . . . . . . . . . . . . . . . 52 (SCTP_DISABLE_FRAGMENTS) . . . . . . . . . . . . . . . 53
7.1.13. Peer Address Parameters (SCTP_PEER_ADDR_PARAMS) . . . 53 7.1.13. Peer Address Parameters (SCTP_PEER_ADDR_PARAMS) . . . 54
7.1.14. Set default send parameters 7.1.14. Set default send parameters
(SCTP_DEFAULT_SEND_PARAM) . . . . . . . . . . . . . . 55 (SCTP_DEFAULT_SEND_PARAM) . . . . . . . . . . . . . . 56
7.1.15. Set notification and ancillary events (SCTP_EVENTS) . 56 7.1.15. Set notification and ancillary events (SCTP_EVENTS) . 57
7.1.16. Set/clear IPv4 mapped addresses 7.1.16. Set/clear IPv4 mapped addresses
(SCTP_I_WANT_MAPPED_V4_ADDR) . . . . . . . . . . . . . 56 (SCTP_I_WANT_MAPPED_V4_ADDR) . . . . . . . . . . . . . 57
7.1.17. Set the maximum fragmentation size (SCTP_MAXSEG) . . . 56 7.1.17. Set the maximum fragmentation size (SCTP_MAXSEG) . . . 57
7.1.18. Add a chunk that must be authenticated 7.1.18. Add a chunk that must be authenticated
(SCTP_AUTH_CHUNK) . . . . . . . . . . . . . . . . . . 56 (SCTP_AUTH_CHUNK) . . . . . . . . . . . . . . . . . . 57
7.1.19. Get or set the list of supported HMAC Identifiers 7.1.19. Get or set the list of supported HMAC Identifiers
(SCTP_HMAC_IDENT) . . . . . . . . . . . . . . . . . . 57 (SCTP_HMAC_IDENT) . . . . . . . . . . . . . . . . . . 58
7.1.20. Set a shared key (SCTP_AUTH_KEY) . . . . . . . . . . . 57 7.1.20. Set a shared key (SCTP_AUTH_KEY) . . . . . . . . . . . 58
7.1.21. Get or set the active shared key 7.1.21. Get or set the active shared key
(SCTP_AUTH_ACTIVE_KEY) . . . . . . . . . . . . . . . . 58 (SCTP_AUTH_ACTIVE_KEY) . . . . . . . . . . . . . . . . 59
7.1.22. Delete a shared key (SCTP_AUTH_DELETE_KEY) . . . . . . 58 7.1.22. Delete a shared key (SCTP_AUTH_DELETE_KEY) . . . . . . 59
7.1.23. Get or set delayed ack timer 7.1.23. Get or set delayed ack timer
(SCTP_DELAYED_ACK_TIME) . . . . . . . . . . . . . . . 59 (SCTP_DELAYED_ACK_TIME) . . . . . . . . . . . . . . . 60
7.1.24. Get or set fragmented interleave 7.1.24. Get or set fragmented interleave
(SCTP_FRAGMENT_INTERLEAVE) . . . . . . . . . . . . . . 59 (SCTP_FRAGMENT_INTERLEAVE) . . . . . . . . . . . . . . 60
7.1.25. Set or Get the sctp partial delivery point 7.1.25. Set or Get the sctp partial delivery point
(SCTP_PARTIAL_DELIVERY_POINT) . . . . . . . . . . . . 60 (SCTP_PARTIAL_DELIVERY_POINT) . . . . . . . . . . . . 61
7.1.26. Set or Get the use of extended receive info 7.1.26. Set or Get the use of extended receive info
(SCTP_USE_EXT_RCVINFO) . . . . . . . . . . . . . . . . 60 (SCTP_USE_EXT_RCVINFO) . . . . . . . . . . . . . . . . 61
7.1.27. Set or Get the auto asconf flag (SCTP_AUTO_ASCONF) . . 60 7.1.27. Set or Get the auto asconf flag (SCTP_AUTO_ASCONF) . . 61
7.1.28. Set or Get the maximum burst (SCTP_MAX_BURST) . . . . 61 7.1.28. Set or Get the maximum burst (SCTP_MAX_BURST) . . . . 61
7.1.29. Set or Get the default context (SCTP_CONTEXT) . . . . 61 7.1.29. Set or Get the default context (SCTP_CONTEXT) . . . . 62
7.2. Read-Only Options . . . . . . . . . . . . . . . . . . . . 61 7.1.30. Enable or disable explicit EOR marking
7.2.1. Association Status (SCTP_STATUS) . . . . . . . . . . . 61 (SCTP_EXPLICIT_EOR) . . . . . . . . . . . . . . . . . 62
7.2.2. Peer Address Information (SCTP_GET_PEER_ADDR_INFO) . . 62 7.2. Read-Only Options . . . . . . . . . . . . . . . . . . . . 62
7.2.1. Association Status (SCTP_STATUS) . . . . . . . . . . . 62
7.2.2. Peer Address Information (SCTP_GET_PEER_ADDR_INFO) . . 64
7.2.3. Get the list of chunks the peer requires to be 7.2.3. Get the list of chunks the peer requires to be
authenticated (SCTP_PEER_AUTH_CHUNKS) . . . . . . . . 63 authenticated (SCTP_PEER_AUTH_CHUNKS) . . . . . . . . 65
7.2.4. Get the list of chunks the local endpoint requires 7.2.4. Get the list of chunks the local endpoint requires
to be authenticated (SCTP_LOCAL_AUTH_CHUNKS) . . . . . 64 to be authenticated (SCTP_LOCAL_AUTH_CHUNKS) . . . . . 65
7.2.5. Get the list of current associations 7.2.5. Get the list of current associations
(SCTP_GET_ASOC_ID_LIST) . . . . . . . . . . . . . . . 64 (SCTP_GET_ASOC_ID_LIST) . . . . . . . . . . . . . . . 65
7.3. Ancillary Data and Notification Interest Options . . . . . 65 7.3. Ancillary Data and Notification Interest Options . . . . . 66
8. New Interfaces . . . . . . . . . . . . . . . . . . . . . . . . 67 8. New Interfaces . . . . . . . . . . . . . . . . . . . . . . . . 68
8.1. sctp_bindx() . . . . . . . . . . . . . . . . . . . . . . . 67 8.1. sctp_bindx() . . . . . . . . . . . . . . . . . . . . . . . 69
8.2. Branched-off Association . . . . . . . . . . . . . . . . . 69 8.2. Branched-off Association . . . . . . . . . . . . . . . . . 70
8.3. sctp_getpaddrs() . . . . . . . . . . . . . . . . . . . . . 69 8.3. sctp_getpaddrs() . . . . . . . . . . . . . . . . . . . . . 70
8.4. sctp_freepaddrs() . . . . . . . . . . . . . . . . . . . . 70 8.4. sctp_freepaddrs() . . . . . . . . . . . . . . . . . . . . 71
8.5. sctp_getladdrs() . . . . . . . . . . . . . . . . . . . . . 70 8.5. sctp_getladdrs() . . . . . . . . . . . . . . . . . . . . . 71
8.6. sctp_freeladdrs() . . . . . . . . . . . . . . . . . . . . 71 8.6. sctp_freeladdrs() . . . . . . . . . . . . . . . . . . . . 72
8.7. sctp_sendmsg() . . . . . . . . . . . . . . . . . . . . . . 71 8.7. sctp_sendmsg() . . . . . . . . . . . . . . . . . . . . . . 72
8.8. sctp_recvmsg() . . . . . . . . . . . . . . . . . . . . . . 71 8.8. sctp_recvmsg() . . . . . . . . . . . . . . . . . . . . . . 73
8.9. sctp_connectx() . . . . . . . . . . . . . . . . . . . . . 72 8.9. sctp_connectx() . . . . . . . . . . . . . . . . . . . . . 73
8.10. sctp_send() . . . . . . . . . . . . . . . . . . . . . . . 73 8.10. sctp_send() . . . . . . . . . . . . . . . . . . . . . . . 74
8.11. sctp_sendx() . . . . . . . . . . . . . . . . . . . . . . . 73 8.11. sctp_sendx() . . . . . . . . . . . . . . . . . . . . . . . 75
8.12. sctp_getaddrlen . . . . . . . . . . . . . . . . . . . . . 74 8.12. sctp_getaddrlen . . . . . . . . . . . . . . . . . . . . . 76
9. Preprocessor Constants . . . . . . . . . . . . . . . . . . . . 75 9. Preprocessor Constants . . . . . . . . . . . . . . . . . . . . 76
10. IANA considerations . . . . . . . . . . . . . . . . . . . . . 75 10. IANA considerations . . . . . . . . . . . . . . . . . . . . . 77
11. Security Considerations . . . . . . . . . . . . . . . . . . . 75 11. Security Considerations . . . . . . . . . . . . . . . . . . . 77
12. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 76 12. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 77
13. References . . . . . . . . . . . . . . . . . . . . . . . . . . 76 13. Normative references . . . . . . . . . . . . . . . . . . . . . 78
13.1. Normative references . . . . . . . . . . . . . . . . . . . 76 Appendix A. one-to-one style Code Example . . . . . . . . . . . . 78
13.2. Informational References . . . . . . . . . . . . . . . . . 77 Appendix B. one-to-many style Code Example . . . . . . . . . . . 84
Appendix A. one-to-one style Code Example . . . . . . . . . . . . 77 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 85
Appendix B. one-to-many style Code Example . . . . . . . . . . . 82 Intellectual Property and Copyright Statements . . . . . . . . . . 87
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 84
Intellectual Property and Copyright Statements . . . . . . . . . . 86
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 RFC793 [RFC0793] Protocol suite to many operating systems. Both TCP RFC793 [RFC0793]
and UDP RFC768 [RFC0768] have benefited from this standard and UDP RFC768 [RFC0768] have benefited from this standard
representation and access method across many diverse platforms. SCTP representation and access method across many diverse platforms. SCTP
is a new protocol that provides many of the characteristics of TCP is a new protocol that provides many of the characteristics of TCP
but also incorporates semantics more akin to UDP. This document but also incorporates semantics more akin to UDP. This document
defines a method to map the existing sockets API for use with SCTP, defines a method to map the existing sockets API for use with SCTP,
skipping to change at page 10, line 10 skipping to change at page 10, line 10
3.1.4. sendmsg() and recvmsg() - one-to-many style socket 3.1.4. sendmsg() and recvmsg() - one-to-many style socket
An application uses sendmsg() and recvmsg() call to transmit data to An application uses sendmsg() and recvmsg() call to transmit data to
and receive data from its peer. and receive data from its peer.
ssize_t sendmsg(int sd, const struct msghdr *message, int flags); ssize_t sendmsg(int sd, const struct msghdr *message, int flags);
ssize_t recvmsg(int sd, struct msghdr *message, int flags); ssize_t recvmsg(int sd, struct msghdr *message, int flags);
sd - the socket descriptor of the endpoint. sd - the socket descriptor of the endpoint.
message: pointer to the msghdr structure which contains a single user message: pointer to the msghdr structure which contains a single
message and possibly some ancillary data. See Section 5 for user message and possibly some ancillary data. See Section 5 for
complete description of the data structures. complete description of the data structures.
flags - No new flags are defined for SCTP at this level. See Section flags - No new flags are defined for SCTP at this level. See
5 for SCTP-specific flags used in the msghdr structure. Section 5 for SCTP-specific flags used in the msghdr structure.
As we will see in Section 5, along with the user data, the ancillary As we will see in Section 5, along with the user data, the ancillary
data field is used to carry the sctp_sndrcvinfo and/or the data field is used to carry the sctp_sndrcvinfo and/or the
sctp_initmsg structures to perform various SCTP functions including sctp_initmsg structures to perform various SCTP functions including
specifying options for sending each user message. Those options, specifying options for sending each user message. Those options,
depending on whether sending or receiving, include stream number, depending on whether sending or receiving, include stream number,
stream sequence number, various flags, context and payload protocol stream sequence number, various flags, context and payload protocol
Id, etc. Id, etc.
When sending user data with sendmsg(), the msg_name field in msghdr When sending user data with sendmsg(), the msg_name field in msghdr
skipping to change at page 20, line 8 skipping to change at page 20, line 8
it is possible to achieve the same results as half close in SCTP it is possible to achieve the same results as half close in SCTP
using SCTP streams.) using SCTP streams.)
The syntax is: The syntax is:
int shutdown(int sd, int how); int shutdown(int sd, int how);
sd - the socket descriptor of the association to be closed. sd - the socket descriptor of the association to be closed.
how - Specifies the type of shutdown. The values are as follows: how - Specifies the type of shutdown. The values are as follows:
SHUT_RD - Disables further receive operations. No SCTP protocol SHUT_RD - Disables further receive operations. No SCTP protocol
action is taken. action is taken.
SHUT_WR - Disables further send operations, and initiates the SCTP SHUT_WR - Disables further send operations, and initiates the
shutdown sequence. SCTP shutdown sequence.
SHUT_RDWR - Disables further send and receive operations and SHUT_RDWR - Disables further send and receive operations and
initiates the SCTP shutdown sequence. initiates the SCTP shutdown sequence.
The major difference between SCTP and TCP shutdown() is that SCTP The major difference between SCTP and TCP shutdown() is that SCTP
SHUT_WR initiates immediate and full protocol shutdown, whereas TCP SHUT_WR initiates immediate and full protocol shutdown, whereas TCP
SHUT_WR causes TCP to go into the half closed state. SHUT_RD behaves SHUT_WR causes TCP to go into the half closed state. SHUT_RD behaves
the same for SCTP as TCP. The purpose of SCTP SHUT_WR is to close the same for SCTP as TCP. The purpose of SCTP SHUT_WR is to close
the SCTP association while still leaving the socket descriptor open, the SCTP association while still leaving the socket descriptor open,
so that the caller can receive back any data SCTP was unable to so that the caller can receive back any data SCTP was unable to
deliver (see Section 5.3.1.4 for more information). deliver (see Section 5.3.1.4 for more information).
skipping to change at page 29, line 25 skipping to change at page 29, line 25
SCTP_EOF - Setting this flag invokes the SCTP graceful shutdown SCTP_EOF - Setting this flag invokes the SCTP graceful shutdown
procedures on the specified association. Graceful shutdown procedures on the specified association. Graceful shutdown
assures that all data enqueued by both endpoints is successfully assures that all data enqueued by both endpoints is successfully
transmitted before closing the association (one-to-many style transmitted before closing the association (one-to-many style
only). only).
SCTP_SENDALL - This flag, if set, will cause a one-to-many model SCTP_SENDALL - This flag, if set, will cause a one-to-many model
socket to send the message to all associations that are currently socket to send the message to all associations that are currently
established on this socket. For the one-to-one socket, this flag established on this socket. For the one-to-one socket, this flag
has no effect. has no effect.
SCTP_EOR - This flag, if set, will indicate that this send
terminates the record.
sinfo_timetolive: 32 bit (unsigned integer) sinfo_timetolive: 32 bit (unsigned integer)
For the sending side, this field contains the message time to live in For the sending side, this field contains the message time to live in
milliseconds. The sending side will expire the message within the milliseconds. The sending side will expire the message within the
specified time period if the message as not been sent to the peer specified time period if the message as not been sent to the peer
within this time period. This value will override any default value within this time period. This value will override any default value
set using any socket option. Also note that the value of 0 is set using any socket option. Also note that the value of 0 is
special in that it indicates no timeout should occur on this message. special in that it indicates no timeout should occur on this message.
skipping to change at page 32, line 16 skipping to change at page 32, line 33
The following list describes the SCTP notification and event types The following list describes the SCTP notification and event types
for the field sn_type. for the field sn_type.
SCTP_ASSOC_CHANGE: This tag indicates that an association has either SCTP_ASSOC_CHANGE: This tag indicates that an association has either
been opened or closed. Refer to Section 5.3.1.1 for details. been opened or closed. Refer to Section 5.3.1.1 for details.
SCTP_PEER_ADDR_CHANGE: This tag indicates that an address that is SCTP_PEER_ADDR_CHANGE: This tag indicates that an address that is
part of an existing association has experienced a change of state part of an existing association has experienced a change of state
(e.g. a failure or return to service of the reachability of a (e.g. a failure or return to service of the reachability of a
endpoint via a specific transport address). Please see endpoint via a specific transport address). Please see
Section 5.3.1.2 for data structure details. Section 5.3.1.2 for data structure details.
SCTP_REMOTE_ERROR: The attached error message is an Operational Error SCTP_REMOTE_ERROR: The attached error message is an Operational
received from the remote peer. It includes the complete TLV sent Error received from the remote peer. It includes the complete TLV
by the remote endpoint. See Section 5.3.1.3 for the detailed sent by the remote endpoint. See Section 5.3.1.3 for the detailed
format. format.
SCTP_SEND_FAILED: The attached datagram could not be sent to the SCTP_SEND_FAILED: The attached datagram could not be sent to the
remote endpoint. This structure includes the original remote endpoint. This structure includes the original
SCTP_SNDRCVINFO that was used in sending this message i.e. this SCTP_SNDRCVINFO that was used in sending this message i.e. this
structure uses the sctp_sndrecvinfo per Section 5.3.1.4. structure uses the sctp_sndrecvinfo per Section 5.3.1.4.
SCTP_SHUTDOWN_EVENT: The peer has sent a SHUTDOWN. No further data SCTP_SHUTDOWN_EVENT: The peer has sent a SHUTDOWN. No further data
should be sent on this socket. should be sent on this socket.
SCTP_ADAPTATION_INDICATION: This notification holds the peers SCTP_ADAPTATION_INDICATION: This notification holds the peers
indicated adaptation layer. Please see Section 5.3.1.6. indicated adaptation layer. Please see Section 5.3.1.6.
SCTP_PARTIAL_DELIVERY_EVENT: This notification is used to tell a SCTP_PARTIAL_DELIVERY_EVENT: This notification is used to tell a
skipping to change at page 35, line 34 skipping to change at page 36, line 8
This field holds one of a number of values that communicate the event This field holds one of a number of values that communicate the event
that happened to the address. They include: that happened to the address. They include:
Event Name Description Event Name Description
---------------- --------------- ---------------- ---------------
SCTP_ADDR_AVAILABLE - This address is now reachable. SCTP_ADDR_AVAILABLE - This address is now reachable.
SCTP_ADDR_UNREACHABLE - The address specified can no longer be SCTP_ADDR_UNREACHABLE - The address specified can no longer be
reached. Any data sent to this address is rerouted to an reached. Any data sent to this address is rerouted to an
alternate until this address becomes reachable. alternate until this address becomes reachable.
SCTP_ADDR_REMOVED - The address is no longer part of the association. SCTP_ADDR_REMOVED - The address is no longer part of the
association.
SCTP_ADDR_ADDED - The address is now part of the association. SCTP_ADDR_ADDED - The address is now part of the association.
SCTP_ADDR_MADE_PRIM - This address has now been made to be the SCTP_ADDR_MADE_PRIM - This address has now been made to be the
primary destination address. primary destination address.
SCTP_ADDR_CONFIRMED - This address has now been confirmed as a valid SCTP_ADDR_CONFIRMED - This address has now been confirmed as a valid
address. address.
spc_error: 32 bits (signed integer) spc_error: 32 bits (signed integer)
If the state was reached due to any error condition (e.g. If the state was reached due to any error condition (e.g.
SCTP_ADDR_UNREACHABLE) any relevant error information is available in SCTP_ADDR_UNREACHABLE) any relevant error information is available in
skipping to change at page 37, line 24 skipping to change at page 37, line 49
uint32_t ssf_error; uint32_t ssf_error;
struct sctp_sndrcvinfo ssf_info; struct sctp_sndrcvinfo ssf_info;
sctp_assoc_t ssf_assoc_id; sctp_assoc_t ssf_assoc_id;
uint8_t ssf_data[0]; uint8_t ssf_data[0];
}; };
ssf_type: ssf_type:
It should be SCTP_SEND_FAILED. It should be SCTP_SEND_FAILED.
ssf_flags: 16 bits (unsigned integer)
The flag value will take one of the following values: The flag value will take one of the following values:
SCTP_DATA_UNSENT - Indicates that the data was never put on the wire. SCTP_DATA_UNSENT - Indicates that the data was never put on the
wire.
SCTP_DATA_SENT - Indicates that the data was put on the wire. Note SCTP_DATA_SENT - Indicates that the data was put on the wire. Note
that this does not necessarily mean that the data was (or was not) that this does not necessarily mean that the data was (or was not)
successfully delivered. successfully delivered.
ssf_length: 32 bits (unsigned integer) ssf_length: 32 bits (unsigned integer)
This field is the total length of the notification data, including This field is the total length of the notification data, including
the notification header and the payload in ssf_data. the notification header and the payload in ssf_data.
ssf_error: 16 bits (unsigned integer) ssf_error: 16 bits (unsigned integer)
skipping to change at page 40, line 40 skipping to change at page 41, line 19
5.3.1.8. SCTP_AUTHENTICATION_EVENT 5.3.1.8. SCTP_AUTHENTICATION_EVENT
When a receiver is using authentication this message will provide When a receiver is using authentication this message will provide
notifications regarding new keys being made active as well as errors. notifications regarding new keys being made active as well as errors.
struct sctp_authkey_event { struct sctp_authkey_event {
uint16_t auth_type; uint16_t auth_type;
uint16_t auth_flags; uint16_t auth_flags;
uint32_t auth_length; uint32_t auth_length;
uint32_t auth_keynumber; uint16_t auth_keynumber;
uint32_t auth_altkeynumber; uint16_t auth_altkeynumber;
uint32_t auth_indication; uint32_t auth_indication;
sctp_assoc_t auth_assoc_id; sctp_assoc_t auth_assoc_id;
}; };
auth_type auth_type
It should be SCTP_AUTHENTICATION_EVENT It should be SCTP_AUTHENTICATION_EVENT
auth_flags: 16 bits (unsigned integer) auth_flags: 16 bits (unsigned integer)
Currently unused. Currently unused.
auth_length: 32 bits (unsigned integer) auth_length: 32 bits (unsigned integer)
This field is the total length of the notification data, including This field is the total length of the notification data, including
the notification header. It will generally be sizeof (struct the notification header. It will generally be sizeof (struct
sctp_authkey_event). sctp_authkey_event).
auth_keynumber: 32 bits (unsigned integer) auth_keynumber: 32 bits (unsigned integer)
skipping to change at page 41, line 24 skipping to change at page 42, line 4
This field holds the keynumber set by the user for the effected key. This field holds the keynumber set by the user for the effected key.
If more than one key is involved, this will contain one of the keys If more than one key is involved, this will contain one of the keys
involved in the notification. involved in the notification.
auth_altkeynumber: 32 bits (unsigned integer) auth_altkeynumber: 32 bits (unsigned integer)
This field holds an alternate keynumber which is used by some This field holds an alternate keynumber which is used by some
notifications. notifications.
auth_indication: 32 bits (unsigned integer) auth_indication: 32 bits (unsigned integer)
This field hold the error or indication being reported. The This field hold the error or indication being reported. The
following values are currently defined: following values are currently defined:
SCTP_AUTH_NEWKEY - this report indicates that a new key has been made SCTP_AUTH_NEWKEY - this report indicates that a new key has been
active (used for the first time by the peer) and is now the active made active (used for the first time by the peer) and is now the
key. The auth_keynumber field holds the user specified key active key. The auth_keynumber field holds the user specified key
number. number.
auth_assoc_id: sizeof (sctp_assoc_t) auth_assoc_id: sizeof (sctp_assoc_t)
The association id field, holds the identifier for the association. The association id field, holds the identifier for the association.
All notifications for a given association have the same association All notifications for a given association have the same association
identifier. identifier.
5.4. Ancillary Data Considerations and Semantics 5.4. Ancillary Data Considerations and Semantics
skipping to change at page 44, line 4 skipping to change at page 44, line 36
ssize_t send(int sd, const void *msg, size_t len, int flags); ssize_t send(int sd, const void *msg, size_t len, int flags);
ssize_t sendto(int sd, const void *msg, size_t len, int flags, ssize_t sendto(int sd, const void *msg, size_t len, int flags,
const struct sockaddr *to, socklen_t tolen); const struct sockaddr *to, socklen_t tolen);
ssize_t recv(int sd, void *buf, size_t len, int flags); ssize_t recv(int sd, void *buf, size_t len, int flags);
ssize_t recvfrom(int sd, void *buf, size_t len, int flags, ssize_t recvfrom(int sd, void *buf, size_t len, int flags,
struct sockaddr *from, socklen_t *fromlen); struct sockaddr *from, socklen_t *fromlen);
sd - the socket descriptor of an SCTP endpoint. sd - the socket descriptor of an SCTP endpoint.
msg - the message to be sent. msg - the message to be sent.
len - the size of the message or the size of buffer. len - the size of the message or the size of buffer.
to - one of the peer addresses of the association to be used to send to - one of the peer addresses of the association to be used to send
the message. the message.
tolen - the size of the address. tolen - the size of the address.
buf - the buffer to store a received message. buf - the buffer to store a received message.
from - the buffer to store the peer address used to send the received from - the buffer to store the peer address used to send the
message. received message.
fromlen - the size of the from address fromlen - the size of the from address
flags - (described below). flags - (described below).
These calls give access to only basic SCTP protocol features. If These calls give access to only basic SCTP protocol features. If
either peer in the association uses multiple streams, or sends either peer in the association uses multiple streams, or sends
unordered data these calls will usually be inadequate, and may unordered data these calls will usually be inadequate, and may
deliver the data in unpredictable ways. deliver the data in unpredictable ways.
SCTP has the concept of multiple streams in one association. The SCTP has the concept of multiple streams in one association. The
above calls do not allow the caller to specify on which stream a above calls do not allow the caller to specify on which stream a
skipping to change at page 49, line 16 skipping to change at page 50, line 4
sctp_assoc_t sasoc_assoc_id; sctp_assoc_t sasoc_assoc_id;
uint16_t sasoc_asocmaxrxt; uint16_t sasoc_asocmaxrxt;
uint16_t sasoc_number_peer_destinations; uint16_t sasoc_number_peer_destinations;
uint32_t sasoc_peer_rwnd; uint32_t sasoc_peer_rwnd;
uint32_t sasoc_local_rwnd; uint32_t sasoc_local_rwnd;
uint32_t sasoc_cookie_life; uint32_t sasoc_cookie_life;
}; };
sasoc_asocmaxrxt - This contains the maximum retransmission attempts sasoc_asocmaxrxt - This contains the maximum retransmission attempts
to make for the association. to make for the association.
sasoc_number_peer_destinations - This is the number of destination sasoc_number_peer_destinations - This is the number of destination
addresses that the peer has. addresses that the peer has.
sasoc_peer_rwnd - This holds the current value of the peers rwnd sasoc_peer_rwnd - This holds the current value of the peers rwnd
(reported in the last SACK) minus any outstanding data (i.e. data (reported in the last SACK) minus any outstanding data (i.e. data
inflight). inflight).
sasoc_local_rwnd - This holds the last reported rwnd that was sent to sasoc_local_rwnd - This holds the last reported rwnd that was sent
the peer. to the peer.
sasoc_cookie_life - This is the associations cookie life value used sasoc_cookie_life - This is the associations cookie life value used
when issuing cookies. when issuing cookies.
sasoc_assoc_id - This is filled in the application, and identifies sasoc_assoc_id - This is filled in the application, and identifies
the association for this query. the association for this query.
This information may be examined for either the endpoint or a This information may be examined for either the endpoint or a
specific association. To examine a endpoints default parameters the specific association. To examine a endpoints default parameters the
association id (sasoc_assoc_id) should must be set to the value '0'. association id (sasoc_assoc_id) should must be set to the value '0'.
The values of the sasoc_peer_rwnd is meaningless when examining The values of the sasoc_peer_rwnd is meaningless when examining
endpoint information. endpoint information.
skipping to change at page 52, line 45 skipping to change at page 53, line 37
7.1.11. Set Adaptation Layer Indicator (SCTP_ADAPTATION_LAYER) 7.1.11. Set Adaptation Layer Indicator (SCTP_ADAPTATION_LAYER)
Requests that the local endpoint set the specified Adaptation Layer Requests that the local endpoint set the specified Adaptation Layer
Indication parameter for all future INIT and INIT-ACK exchanges. Indication parameter for all future INIT and INIT-ACK exchanges.
struct sctp_setadaptation { struct sctp_setadaptation {
uint32_t ssb_adaptation_ind; uint32_t ssb_adaptation_ind;
}; };
ssb_adaptation_ind - The adaptation layer indicator that will be ssb_adaptation_ind - The adaptation layer indicator that will be
included in any outgoing Adaptation Layer Indication parameter included in any outgoing Adaptation Layer Indication parameter.
7.1.12. Enable/Disable message fragmentation (SCTP_DISABLE_FRAGMENTS) 7.1.12. Enable/Disable message fragmentation (SCTP_DISABLE_FRAGMENTS)
This option is a on/off flag and is passed an integer where a non- This option is a on/off flag and is passed an integer where a non-
zero is on and a zero is off. If enabled no SCTP message zero is on and a zero is off. If enabled no SCTP message
fragmentation will be performed. Instead if a message being sent fragmentation will be performed. Instead if a message being sent
exceeds the current PMTU size, the message will NOT be sent and exceeds the current PMTU size, the message will NOT be sent and
instead a error will be indicated to the user. instead a error will be indicated to the user.
7.1.13. Peer Address Parameters (SCTP_PEER_ADDR_PARAMS) 7.1.13. Peer Address Parameters (SCTP_PEER_ADDR_PARAMS)
skipping to change at page 53, line 44 skipping to change at page 54, line 40
in milliseconds. Note that unless the spp_flag is set to in milliseconds. Note that unless the spp_flag is set to
SPP_HB_ENABLE the value of this field is ignored. Note also that SPP_HB_ENABLE the value of this field is ignored. Note also that
a value of zero indicates the current setting should be left a value of zero indicates the current setting should be left
unchanged. To set an actual value of zero the use of the flag unchanged. To set an actual value of zero the use of the flag
SPP_HB_TIME_IS_ZERO should be used. SPP_HB_TIME_IS_ZERO should be used.
spp_pathmaxrxt - This contains the maximum number of retransmissions spp_pathmaxrxt - This contains the maximum number of retransmissions
before this address shall be considered unreachable. Note that before this address shall be considered unreachable. Note that
unless the spp_flag is set to SPP_PMTUD_ENABLE the value of this unless the spp_flag is set to SPP_PMTUD_ENABLE the value of this
field is ignored. Note also that a value of zero indicates the field is ignored. Note also that a value of zero indicates the
current setting should be left unchanged. current setting should be left unchanged.
spp_pathmtu - When Path MTU discovery is disabled the value specified spp_pathmtu - When Path MTU discovery is disabled the value
here will be the "fixed" path mtu (i.e. the value of the spp_flags specified here will be the "fixed" path mtu (i.e. the value of the
field must include the flag SPP_PMTUD_DISABLE for this field to spp_flags field must include the flag SPP_PMTUD_DISABLE for this
have any effect). Note that if the spp_address field is empty field to have any effect). Note that if the spp_address field is
then all associations on this address will have this fixed path empty then all associations on this address will have this fixed
mtu set upon them. If an address is specified, then only that path mtu set upon them. If an address is specified, then only
address will be effected. that address will be effected.
spp_sackdelay - When delayed sack is enabled, this value specifies spp_sackdelay - When delayed sack is enabled, this value specifies
the number of milliseconds that sacks will be delayed for. This the number of milliseconds that sacks will be delayed for. This
value will apply to all addresses of an association if the value will apply to all addresses of an association if the
spp_address field is empty. Note that unless the spp_flag is set spp_address field is empty. Note that unless the spp_flag is set
to SPP_SACKDELAY_ENABLE the value of this field is ignored. Note to SPP_SACKDELAY_ENABLE the value of this field is ignored. Note
also that a value of zero indicates the current setting should be also that a value of zero indicates the current setting should be
left unchanged. left unchanged.
spp_ipv6_flowlabel- This field is used in conjunction with the spp_ipv6_flowlabel- This field is used in conjunction with the
SPP_IPV4_FLOWLABEL flag. SPP_IPV4_FLOWLABEL flag.
spp_ipv4_tos- This field is used in conjunction with the SPP_IPV4_TOS spp_ipv4_tos- This field is used in conjunction with the
flag. SPP_IPV4_TOS flag.
spp_flags- These flags are used to control various features on an spp_flags- These flags are used to control various features on an
association. The flag field is a bit mask which may contain zero association. The flag field is a bit mask which may contain zero
or more of the following options: or more of the following options:
SPP_HB_ENABLE - Enable heartbeats on the specified address. Note SPP_HB_ENABLE - Enable heartbeats on the specified address. Note
that if the address field is empty all addresses for the that if the address field is empty all addresses for the
association have heartbeats enabled upon them. association have heartbeats enabled upon them.
SPP_HB_DISABLE - Disable heartbeats on the specified address. SPP_HB_DISABLE - Disable heartbeats on the specified address.
Note that if the address field is empty all addresses for the Note that if the address field is empty all addresses for the
association will have their heartbeats disabled. Note also association will have their heartbeats disabled. Note also
that SPP_HB_ENABLE and SPP_HB_DISABLE are mutually exclusive, that SPP_HB_ENABLE and SPP_HB_DISABLE are mutually exclusive,
only one of these two should be specified. Enabling both only one of these two should be specified. Enabling both
fields will have undetermined results. fields will have undetermined results.
SPP_HB_DEMAND - Request a user initiated heartbeat to be made SPP_HB_DEMAND - Request a user initiated heartbeat to be made
skipping to change at page 55, line 4 skipping to change at page 55, line 43
SPP_SACKDELAY_ENABLE - Setting this flag turns on delayed sack. SPP_SACKDELAY_ENABLE - Setting this flag turns on delayed sack.
The time specified in spp_sackdelay is used to specify the sack The time specified in spp_sackdelay is used to specify the sack
delay for this address. Note that if spp_address is empty then delay for this address. Note that if spp_address is empty then
all addresses will enable delayed sack and take on the sack all addresses will enable delayed sack and take on the sack
delay value specified in spp_sackdelay. delay value specified in spp_sackdelay.
SPP_SACKDELAY_DISABLE - Setting this flag turns off delayed sack. SPP_SACKDELAY_DISABLE - Setting this flag turns off delayed sack.
If the spp_address field is blank then delayed sack is disabled If the spp_address field is blank then delayed sack is disabled
for the entire association. Note also that this field is for the entire association. Note also that this field is
mutually exclusive to SPP_SACKDELAY_ENABLE, setting both will mutually exclusive to SPP_SACKDELAY_ENABLE, setting both will
have undefined results. have undefined results.
SPP_IPV6_FLOWLABEL - Setting this flag enables setting of the
SPP_IPV6_FLOWLABEL - Setting this flag enables setting of the IPV6 IPV6 flowlabel value associated with either the association or
flowlabel value associated with either the association or the the specific address. If the address field is filled in, then
specific address. If the address field is filled in, then the the specific destination address has this value set upon it.
specific destination address has this value set upon it. If If the association is specified, but not the address, then the
the association is specified, but not the address, then the
flowlabel value is set for any future destination addresses flowlabel value is set for any future destination addresses
that may be added. The value is obtained in the that may be added. The value is obtained in the
spp_ipv6_flowlabel field. spp_ipv6_flowlabel field.
Upon retrieval, this flag will be set to indicate that the Upon retrieval, this flag will be set to indicate that the
spp_ipv6_flowlabel field has a valid value returned. If a spp_ipv6_flowlabel field has a valid value returned. If a
specific destination addresses is set (in the spp_address specific destination addresses is set (in the spp_address
field) when called then the value returned is that of the field) when called then the value returned is that of the
address. If just an association is specified (and no address) address. If just an association is specified (and no address)
then the association default flowlabel is returned. If neither then the association default flowlabel is returned. If neither
skipping to change at page 57, line 12 skipping to change at page 57, line 50
received only in an authenticated way. Changes to the list of chunks received only in an authenticated way. Changes to the list of chunks
will only effect future associations on the socket. will only effect future associations on the socket.
struct sctp_authchunk { struct sctp_authchunk {
uint8_t sauth_chunk; uint8_t sauth_chunk;
}; };
sauth_chunks - This parameter contains a chunk type sauth_chunks - This parameter contains a chunk type
that the user is requesting to be authenticated. that the user is requesting to be authenticated.
The chunk types for INIT, INIT-ACK, COOKIE-ECHO, COOKIE-ACK, The chunk types for INIT, INIT-ACK, SHUTDOWN-COMPLETE, and AUTH
SHUTDOWN-COMPLETE, and AUTH chunks MUST not be used. If they are chunks MUST not be used. If they are used an error MUST be returned.
used an error MUST be returned. The usage of this option enables
SCTP-AUTH in cases where it is not required by other means (for The usage of this option enables SCTP-AUTH in cases where it is not
example the use of ADD-IP). required by other means (for example the use of ADD-IP).
7.1.19. Get or set the list of supported HMAC Identifiers 7.1.19. Get or set the list of supported HMAC Identifiers
(SCTP_HMAC_IDENT) (SCTP_HMAC_IDENT)
This option gets or sets the list of HMAC algorithms that the local This option gets or sets the list of HMAC algorithms that the local
endpoint requires the peer to use. endpoint requires the peer to use.
struct sctp_hmacalgo { struct sctp_hmacalgo {
uint32_t shmac_idents[]; uint16_t shmac_idents[];
}; };
shmac_idents - This parameter contains an array of HMAC Identifiers shmac_idents - This parameter contains an array of HMAC Identifiers
that the local endpoint is requesting the peer to use, in priority that the local endpoint is requesting the peer to use, in priority
order. order.
7.1.20. Set a shared key (SCTP_AUTH_KEY) 7.1.20. Set a shared key (SCTP_AUTH_KEY)
This option will set a shared secret key which is used to build an This option will set a shared secret key which is used to build an
association shared key. association shared key.
struct sctp_authkey { struct sctp_authkey {
sctp_assoc_t sca_assoc_id; sctp_assoc_t sca_assoc_id;
uint32_t sca_keynumber; uint16_t sca_keynumber;
uint8_t sca_key[]; uint8_t sca_key[];
}; };
sca_assoc_id - This parameter, if non-zero, indicates what sca_assoc_id - This parameter, if non-zero, indicates what
association that the shared key is being set upon. Note that if association that the shared key is being set upon. Note that if
this element contains zero, then the shared key is set upon the this element contains zero, then the shared key is set upon the
endpoint and all future associations will use this key (if not endpoint and all future associations will use this key (if not
changed by subsequent calls to SCTP_AUTH_KEY). For one-to-one changed by subsequent calls to SCTP_AUTH_KEY). For one-to-one
sockets, this parameter is ignored. Note, however, that this sockets, this parameter is ignored. Note, however, that this
option will set a key on the association if the socket is option will set a key on the association if the socket is
skipping to change at page 58, line 22 skipping to change at page 59, line 16
used by the endpoint (or association) as the shared secret key. used by the endpoint (or association) as the shared secret key.
Note, if the length of this field is zero, a null key is set. Note, if the length of this field is zero, a null key is set.
7.1.21. Get or set the active shared key (SCTP_AUTH_ACTIVE_KEY) 7.1.21. Get or set the active shared key (SCTP_AUTH_ACTIVE_KEY)
This option will get or set the active shared key to be used to build This option will get or set the active shared key to be used to build
the association shared key. the association shared key.
struct sctp_authkeyid { struct sctp_authkeyid {
sctp_assoc_t scact_assoc_id; sctp_assoc_t scact_assoc_id;
uint32_t scact_keynumber; uint16_t scact_keynumber;
}; };
scact_assoc_id - This parameter, if non-zero, indicates what scact_assoc_id - This parameter, if non-zero, indicates what
association that the shared key identifier is being set active association that the shared key identifier is being set active
upon. Note that if this element contains zero, then the upon. Note that if this element contains zero, then the
activation applies to the endpoint and all future associations activation applies to the endpoint and all future associations
will use the specified shared key identifier. For one-to-one will use the specified shared key identifier. For one-to-one
sockets, this parameter is ignored. Note, however, that this sockets, this parameter is ignored. Note, however, that this
option will set the active key on the association if the socket is option will set the active key on the association if the socket is
connected, otherwise this will set the default active key for the connected, otherwise this will set the default active key for the
skipping to change at page 58, line 46 skipping to change at page 59, line 40
be used for sending authenticated chunks. The key identifier MUST be used for sending authenticated chunks. The key identifier MUST
correspond to an existing shared key. Note that shared key correspond to an existing shared key. Note that shared key
identifier '0' defaults to a null key. identifier '0' defaults to a null key.
7.1.22. Delete a shared key (SCTP_AUTH_DELETE_KEY) 7.1.22. Delete a shared key (SCTP_AUTH_DELETE_KEY)
This option will delete a shared secret key from use. This option will delete a shared secret key from use.
struct sctp_authkeyid { struct sctp_authkeyid {
sctp_assoc_t scact_assoc_id; sctp_assoc_t scact_assoc_id;
uint32_t scact_keynumber; uint16_t scact_keynumber;
}; };
scact_assoc_id - This parameter, if non-zero, indicates what scact_assoc_id - This parameter, if non-zero, indicates what
association that the shared key identifier is being deleted from. association that the shared key identifier is being deleted from.
Note that if this element contains zero, then the shared key is Note that if this element contains zero, then the shared key is
deleted from the endpoint and all associations will no longer use deleted from the endpoint and all associations will no longer use
the specified shared key identifier (unless otherwise set on the the specified shared key identifier (unless otherwise set on the
association using SCTP_AUTH_KEY). For one-to-one sockets, this association using SCTP_AUTH_KEY). For one-to-one sockets, this
parameter is ignored. Note, however, that this option will delete parameter is ignored. Note, however, that this option will delete
the key from the association if the socket is connected, otherwise the key from the association if the socket is connected, otherwise
this will delete the key from the endpoint. this will delete the key from the endpoint.
scact_keynumber - this parameter is the shared key identifier which scact_keynumber - this parameter is the shared key identifier which
skipping to change at page 59, line 36 skipping to change at page 60, line 30
struct sctp_assoc_value { struct sctp_assoc_value {
sctp_assoc_t assoc_id; sctp_assoc_t assoc_id;
uint32_t assoc_value; uint32_t assoc_value;
}; };
assoc_id - This parameter, indicates which association the user is assoc_id - This parameter, indicates which association the user is
performing an action upon. Note that if this field's value is performing an action upon. Note that if this field's value is
zero then the endpoints default value is changed (effecting future zero then the endpoints default value is changed (effecting future
associations only). associations only).
assoc_value - This parameter contains the number of milliseconds that assoc_value - This parameter contains the number of milliseconds
the user is requesting the delayed ACK timer be set to. Note that that the user is requesting the delayed ACK timer be set to. Note
this value is defined in the standard to be between 200 and 500 that this value is defined in the standard to be between 200 and
milliseconds. 500 milliseconds.
7.1.24. Get or set fragmented interleave (SCTP_FRAGMENT_INTERLEAVE) 7.1.24. Get or set fragmented interleave (SCTP_FRAGMENT_INTERLEAVE)
This options will at a minimum specify if the implementation is doing This options will at a minimum specify if the implementation is doing
fragmented interleave. Fragmented interleave, for a one to many fragmented interleave. Fragmented interleave, for a one to many
socket, is when subsequent calls to receive a message may return socket, is when subsequent calls to receive a message may return
parts of messages from different associations. Some implementations parts of messages from different associations. Some implementations
may allow you to turn this value on or off. If so, when turned off, may allow you to turn this value on or off. If so, when turned off,
no fragment interleave will occur (which will cause a head of line no fragment interleave will occur (which will cause a head of line
blocking amongst multiple associations sharing the same one to many blocking amongst multiple associations sharing the same one to many
skipping to change at page 61, line 38 skipping to change at page 62, line 31
sctp_assoc_t assoc_id; sctp_assoc_t assoc_id;
uint32_t assoc_value; uint32_t assoc_value;
}; };
assoc_id - This parameter, indicates which association the user is assoc_id - This parameter, indicates which association the user is
performing an action upon. Note that if this field's value is performing an action upon. Note that if this field's value is
zero then the endpoints default value is changed (effecting future zero then the endpoints default value is changed (effecting future
associations only). associations only).
assoc_value - This parameter contains the context. assoc_value - This parameter contains the context.
7.1.30. Enable or disable explicit EOR marking (SCTP_EXPLICIT_EOR)
This boolean flag is used to enable or disable explict end of record
(EOR) marking. When this option is enabled, a user may make multiple
send system calls to send a record and must indicate that they are
finished sending a particular record by including on the send the
SCTP_EOR flag. If this boolean flag is disabled then each individual
send system call is considered to have a SCTP_EOR indicator set on it
implicitly without the user having to explicitly add this flag.
7.2. Read-Only Options 7.2. Read-Only Options
7.2.1. Association Status (SCTP_STATUS) 7.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 unacked data chunks, and number of data chunks pending
receipt. This information is read-only. The following structure is receipt. This information is read-only. The following structure is
used to access this information: used to access this information:
skipping to change at page 62, line 42 skipping to change at page 63, line 42
sstat_penddata - This is the number of data chunks pending receipt. sstat_penddata - This is the number of data chunks pending receipt.
sstat_primary - This is information on the current primary peer sstat_primary - This is information on the current primary peer
address. address.
sstat_assoc_id - (one-to-many style socket) This holds the an sstat_assoc_id - (one-to-many style socket) This holds the an
identifier for the association. All notifications for a given identifier for the association. All notifications for a given
association have the same association identifier. association have the same association identifier.
sstat_instrms - The number of streams that the peer will be using sstat_instrms - The number of streams that the peer will be using
inbound. inbound.
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
occur. will occur.
To access these status values, the application calls getsockopt() To access these status values, the application calls getsockopt()
with the option name SCTP_STATUS. The sstat_assoc_id parameter is with the option name SCTP_STATUS. The sstat_assoc_id parameter is
ignored for one-to-one style socket. ignored for one-to-one style socket.
7.2.2. Peer Address Information (SCTP_GET_PEER_ADDR_INFO) 7.2.2. Peer Address Information (SCTP_GET_PEER_ADDR_INFO)
Applications can retrieve information about a specific peer address Applications can retrieve information about a specific peer address
of an association, including its reachability state, congestion of an association, including its reachability state, congestion
window, and retransmission timer values. This information is read- window, and retransmission timer values. This information is read-
skipping to change at page 64, line 10 skipping to change at page 65, line 16
(SCTP_PEER_AUTH_CHUNKS) (SCTP_PEER_AUTH_CHUNKS)
This option gets a list of chunks for a specified association that This option gets a list of chunks for a specified association that
the peer requires to be received authenticated only. the peer requires to be received authenticated only.
struct sctp_authchunks { struct sctp_authchunks {
sctp_assoc_t gauth_assoc_id; sctp_assoc_t gauth_assoc_id;
uint8_t gauth_chunks[]; uint8_t gauth_chunks[];
}; };
gauth_assoc_id - This parameter, indicates which association the user gauth_assoc_id - This parameter, indicates which association the
is requesting the list of peer authenticated chunks. For one-to- user is requesting the list of peer authenticated chunks. For
one sockets, this parameter is ignored. one-to-one sockets, this parameter is ignored.
gauth_chunks - This parameter contains an array of chunks that the gauth_chunks - This parameter contains an array of chunks that the
peer is requesting to be authenticated. peer is requesting to be authenticated.
7.2.4. Get the list of chunks the local endpoint requires to be 7.2.4. Get the list of chunks the local endpoint requires to be
authenticated (SCTP_LOCAL_AUTH_CHUNKS) authenticated (SCTP_LOCAL_AUTH_CHUNKS)
This option gets a list of chunks for a specified association that This option gets a list of chunks for a specified association that
the local endpoint requires to be received authenticated only. the local endpoint requires to be received authenticated only.
struct sctp_authchunks { struct sctp_authchunks {
sctp_assoc_t gauth_assoc_id; sctp_assoc_t gauth_assoc_id;
uint8_t gauth_chunks[]; uint8_t gauth_chunks[];
}; };
gauth_assoc_id - This parameter, indicates which association the user gauth_assoc_id - This parameter, indicates which association the
is requesting the list of local authenticated chunks. For one-to- user is requesting the list of local authenticated chunks. For
one sockets, this parameter is ignored. one-to-one sockets, this parameter is ignored.
gauth_chunks - This parameter contains an array of chunks that the gauth_chunks - This parameter contains an array of chunks that the
local endpoint is requesting to be authenticated. local endpoint is requesting to be authenticated.
7.2.5. Get the list of current associations (SCTP_GET_ASOC_ID_LIST) 7.2.5. Get the list of current associations (SCTP_GET_ASOC_ID_LIST)
This option gets a list of current associations that are associated This option gets a list of current associations that are associated
with a socket. with a socket.
struct sctp_assoc_ids { struct sctp_assoc_ids {
uint16_t asls_assoc_start; /* array of index's start at 0 */ uint16_t asls_assoc_start; /* array of index's start at 0 */
skipping to change at page 65, line 4 skipping to change at page 66, line 6
This option gets a list of current associations that are associated This option gets a list of current associations that are associated
with a socket. with a socket.
struct sctp_assoc_ids { struct sctp_assoc_ids {
uint16_t asls_assoc_start; /* array of index's start at 0 */ uint16_t asls_assoc_start; /* array of index's start at 0 */
uint8_t asls_numb_present; uint8_t asls_numb_present;
uint8_t asls_more_to_get; uint8_t asls_more_to_get;
sctp_assoc_t asls_assoc_id[MAX_ASOC_IDS_RET]; sctp_assoc_t asls_assoc_id[MAX_ASOC_IDS_RET];
}; };
asls_assoc_start - This parameter gives an initial starting place to asls_assoc_start - This parameter gives an initial starting place to
begin collecting association information. Normally a user sets begin collecting association information. Normally a user sets
this initially to 0. Subsequent calls that need to get more this initially to 0. Subsequent calls that need to get more
association identifications (in cases where the socket has more association identifications (in cases where the socket has more
than MAX_ASOC_IDS_RET established i.e asls_more_to_get returns set than MAX_ASOC_IDS_RET established i.e asls_more_to_get returns set
to false) are made by incrementing the asls_assoc_start by the to false) are made by incrementing the asls_assoc_start by the
number of previous association id's seen. This cycle is repeated number of previous association id's seen. This cycle is repeated
until the asls_more_to_get field becomes true, indicating that all until the asls_more_to_get field becomes true, indicating that all
association id's have been retrieved. association id's have been retrieved.
asls_numb_present - This field holds the total number of associations asls_numb_present - This field holds the total number of
that have been copied into the asls_assoc_id array. This value associations that have been copied into the asls_assoc_id array.
will NOT be larger than MAX_ASOC_IDS_RET. This value will NOT be larger than MAX_ASOC_IDS_RET.
asls_more_to_get - This field holds a boolean flag indicating to the asls_more_to_get - This field holds a boolean flag indicating to the
caller if more association id's are available then asked for. caller if more association id's are available then asked for.
Subsequent calls to this option will be needed to gather these Subsequent calls to this option will be needed to gather these
association id's. association id's.
asls_assoc_id - an array of association id's that are currently asls_assoc_id - an array of association id's that are currently
active under this socket. active under this socket.
MAX_ASOC_IDS_RET This value is a constant defined to limit the number MAX_ASOC_IDS_RET This value is a constant defined to limit the
of association identifications returned with each call. This number of association identifications returned with each call.
value can be no larger than 255.. This value can be no larger than 255..
7.3. Ancillary Data and Notification Interest Options 7.3. Ancillary Data and Notification Interest Options
Applications can receive per-message ancillary information and Applications can receive per-message ancillary information and
notifications of certain SCTP events with recvmsg(). notifications of certain SCTP events with recvmsg().
The following optional information is available to the application: The following optional information is available to the application:
1. SCTP_SNDRCV (sctp_data_io_event): Per-message information (i.e. 1. SCTP_SNDRCV (sctp_data_io_event): Per-message information (i.e.
stream number, TSN, SSN, etc. described in Section 5.2.2) stream number, TSN, SSN, etc. described in Section 5.2.2)
skipping to change at page 69, line 29 skipping to change at page 70, line 33
The application uses sctp_peeloff() call to branch off an association The application uses sctp_peeloff() call to branch off an association
into a separate socket (Note the semantics are somewhat changed from into a separate socket (Note the semantics are somewhat changed from
the traditional one-to-one style accept() call). Note that the new the traditional one-to-one style accept() call). Note that the new
socket is a one-to-one style socket. Thus it will be confined to socket is a one-to-one style socket. Thus it will be confined to
operations allowed for a one-to-one style socket. operations allowed for a one-to-one style socket.
The syntax is: The syntax is:
new_sd = sctp_peeloff(int sd, sctp_assoc_t assoc_id); new_sd = sctp_peeloff(int sd, sctp_assoc_t assoc_id);
the new socket descriptor representing the branched-off new_sd: the new socket descriptor representing the branched-off
association. association.
the original one-to-many style socket descriptor returned from the sd: the original one-to-many style socket descriptor returned from
socket() system call (see Section 3.1.1). the socket() system call (see Section 3.1.1).
the specified identifier of the association that is to be branched assoc_id: the specified identifier of the association that is to be
off to a separate file descriptor (Note, in a traditional one-to- branched off to a separate file descriptor (Note, in a traditional
one style accept() call, this would be an out parameter, but for one-to-one style accept() call, this would be an out parameter,
the one-to-many style call, this is an in parameter). but for the one-to-many style call, this is an in parameter).
8.3. sctp_getpaddrs() 8.3. sctp_getpaddrs()
sctp_getpaddrs() returns all peer addresses in an association. The sctp_getpaddrs() returns all peer addresses in an association. The
syntax is, syntax is,
int sctp_getpaddrs(int sd, sctp_assoc_t id, int sctp_getpaddrs(int sd, sctp_assoc_t id,
struct sockaddr **addrs); struct sockaddr **addrs);
On return, addrs will point to an array dynamically allocated On return, addrs will point to an array dynamically allocated
skipping to change at page 71, line 47 skipping to change at page 73, line 7
sd - is the socket descriptor sd - is the socket descriptor
msg - is the message to be sent. msg - is the message to be sent.
len - is the length of the message. len - is the length of the message.
to - is the destination address of the message. to - is the destination address of the message.
tolen - is the length of the destination address. tolen - is the length of the destination address.
ppid - is the same as sinfo_ppid (see section 5.2.2) ppid - is the same as sinfo_ppid (see section 5.2.2)
flags - is the same as sinfo_flags (see section 5.2.2) flags - is the same as sinfo_flags (see section 5.2.2)
stream_no - is the same as sinfo_stream (see section 5.2.2) stream_no - is the same as sinfo_stream (see section 5.2.2)
timetolive - is the same as sinfo_timetolive (see section 5.2.2) timetolive - is the same as sinfo_timetolive (see section 5.2.2)
context - is the same as sinfo_context (see section 5.2.2) context - is the same as sinfo_context (see section 5.2.2)
The call returns the number of characters sent, or -1 if an error
occurred. The variable errno is then set appropriately.
8.8. sctp_recvmsg() 8.8. sctp_recvmsg()
An implementation may provide a library function (or possibly system An implementation may provide a library function (or possibly system
call) to assist the user with the advanced features of SCTP. Note call) to assist the user with the advanced features of SCTP. Note
that in order for the sctp_sndrcvinfo structure to be filled in by that in order for the sctp_sndrcvinfo structure to be filled in by
sctp_recvmsg() the caller must enable the sctp_data_io_events with sctp_recvmsg() the caller must enable the sctp_data_io_events with
the SCTP_EVENTS option. Note that the setting of the the SCTP_EVENTS option. Note that the setting of the
SCTP_USE_EXT_RCVINFO will effect this function as well, causing the SCTP_USE_EXT_RCVINFO will effect this function as well, causing the
sctp_sndrcvinfo information to be extended. sctp_sndrcvinfo information to be extended.
skipping to change at page 72, line 24 skipping to change at page 73, line 33
void *msg, void *msg,
size_t len, size_t len,
struct sockaddr *from, struct sockaddr *from,
socklen_t *fromlen socklen_t *fromlen
struct sctp_sndrcvinfo *sinfo struct sctp_sndrcvinfo *sinfo
int *msg_flags) int *msg_flags)
sd - is the socket descriptor sd - is the socket descriptor
msg - is a message buffer to be filled. msg - is a message buffer to be filled.
len - is the length of the message buffer. len - is the length of the message buffer.
from - is a pointer to a address to be filled with the sender of this from - is a pointer to a address to be filled with the sender of
messages address. this messages address.
fromlen - is the from length. fromlen - is the from length.
sinfo - A pointer to a sctp_sndrcvinfo structure to be filled upon sinfo - A pointer to a sctp_sndrcvinfo structure to be filled upon
receipt of the message. receipt of the message.
msg_flags - A pointer to a integer to be filled with any message msg_flags - A pointer to a integer to be filled with any message
flags (e.g. MSG_NOTIFICATION). flags (e.g. MSG_NOTIFICATION).
The call returns the number of bytes received, or -1 if an error
occurred. The variable errno is then set appropriately.
8.9. sctp_connectx() 8.9. sctp_connectx()
An implementation may provide a library function (or possibly system An implementation may provide a library function (or possibly system
call) to assist the user with associating to an endpoint that is call) to assist the user with associating to an endpoint that is
multi-homed. Much like sctp_bindx() this call allows a caller to multi-homed. Much like sctp_bindx() this call allows a caller to
specify multiple addresses at which a peer can be reached. The way specify multiple addresses at which a peer can be reached. The way
the SCTP stack uses the list of addresses to set up the association the SCTP stack uses the list of addresses to set up the association
is implementation dependent. This function only specifies that the is implementation dependent. This function only specifies that the
stack will try to make use of all the addresses in the list when stack will try to make use of all the addresses in the list when
skipping to change at page 73, line 9 skipping to change at page 74, line 18
Note that the list of addresses passed in is only used for setting up Note that the list of addresses passed in is only used for setting up
the association. It does not necessarily equal the set of addresses the association. It does not necessarily equal the set of addresses
the peer uses for the resulting association. If the caller wants to the peer uses for the resulting association. If the caller wants to
find out the set of peer addresses, it must use sctp_getpaddrs() to find out the set of peer addresses, it must use sctp_getpaddrs() to
retrieve them after the association has been set up. retrieve them after the association has been set up.
sctp_connectx(). Its syntax is, sctp_connectx(). Its syntax is,
int sctp_connectx(int sd, int sctp_connectx(int sd,
struct sockaddr *addrs, struct sockaddr *addrs,
int addrcnt) int addrcnt,
sctp_assoc_t *id)
sd - is the socket descriptor sd - is the socket descriptor
addrs - is an array of addresses. addrs - is an array of addresses.
addrcnt - is the number of addresses in the array. addrcnt - is the number of addresses in the array.
id - is an output parameter that if passed in as a non-NULL will
return the association identification for the newly created
association (if successful).
The call returns 0 on success or -1 if an error occured. The
variable errno is then set appropriately.
8.10. sctp_send() 8.10. sctp_send()
An implementation may provide another alternative function or system An implementation may provide another alternative function or system
call to assist an application with the sending of data without the call to assist an application with the sending of data without the
use of the CMSG header structures. The function takes the following use of the CMSG header structures. The function takes the following
form: form:
sctp_send(). Its syntax is, sctp_send(). Its syntax is,
skipping to change at page 73, line 29 skipping to change at page 75, line 4
use of the CMSG header structures. The function takes the following use of the CMSG header structures. The function takes the following
form: form:
sctp_send(). Its syntax is, sctp_send(). Its syntax is,
int sctp_send(int sd, int sctp_send(int sd,
const void *msg, const void *msg,
size_t len, size_t len,
const struct sctp_sndrcvinfo *sinfo, const struct sctp_sndrcvinfo *sinfo,
int flags); int flags);
sd - is the socket descriptor sd - is the socket descriptor
msg - The message to be sent msg - The message to be sent
len - The length of the message len - The length of the message
sinfo - A pointer to a sctp_sndrcvinfo structure used as described in sinfo - A pointer to a sctp_sndrcvinfo structure used as described
5.2.2 for a sendmsg call. in 5.2.2 for a sendmsg call.
flags - is used in the same format as the sendmsg call flags (e.g. flags - is used in the same format as the sendmsg call flags (e.g.
MSG_DONTROUTE). MSG_DONTROUTE).
This function call may also be used to terminate an association using This function call may also be used to terminate an association using
an association identification by setting the sinfo.sinfo_flags to an association identification by setting the sinfo.sinfo_flags to
SCTP_EOF and the sinfo.sinfo_assoc_id to the association that needs SCTP_EOF and the sinfo.sinfo_assoc_id to the association that needs
to be terminated. In such a case the len of the message would be to be terminated. In such a case the len of the message would be
zero. zero.
The call returns the number of characters sent, or -1 if an error
occurred. The variable errno is then set appropriately.
8.11. sctp_sendx() 8.11. sctp_sendx()
An implementation may provide another alternative function or system An implementation may provide another alternative function or system
call to assist an application with the sending of data without the call to assist an application with the sending of data without the
use of the CMSG header structures that also gives a list of use of the CMSG header structures that also gives a list of
addresses. The list of addresses is provided for implicit addresses. The list of addresses is provided for implicit
association setup. In such a case the list of addresses serves the association setup. In such a case the list of addresses serves the
same purpose as the addresses given in sctp_connectx (see same purpose as the addresses given in sctp_connectx (see
Section 8.9). Section 8.9).
skipping to change at page 74, line 23 skipping to change at page 75, line 46
struct sockaddr *addrs, struct sockaddr *addrs,
int addrcnt, int addrcnt,
struct sctp_sndrcvinfo *sinfo, struct sctp_sndrcvinfo *sinfo,
int flags); int flags);
sd - is the socket descriptor sd - is the socket descriptor
msg - The message to be sent msg - The message to be sent
len - The length of the message len - The length of the message
addrs - is an array of addresses. addrs - is an array of addresses.
addrcnt - is the number of addresses in the array. addrcnt - is the number of addresses in the array.
sinfo - A pointer to a sctp_sndrcvinfo structure used as described in sinfo - A pointer to a sctp_sndrcvinfo structure used as described
5.2.2 for a sendmsg call. in 5.2.2 for a sendmsg call.
flags - is used in the same format as the sendmsg call flags (e.g. flags - is used in the same format as the sendmsg call flags (e.g.
MSG_DONTROUTE). MSG_DONTROUTE).
Note that on return from this call the sinfo structure will have Note that on return from this call the sinfo structure will have
changed in that the sinfo_assoc_id will be filled in with the new changed in that the sinfo_assoc_id will be filled in with the new
association id. association id.
This function call may also be used to terminate an association using This function call may also be used to terminate an association using
an association identification by setting the sinfo.sinfo_flags to an association identification by setting the sinfo.sinfo_flags to
SCTP_EOF and the sinfo.sinfo_assoc_id to the association that needs SCTP_EOF and the sinfo.sinfo_assoc_id to the association that needs
to be terminated. In such a case the len of the message would be to be terminated. In such a case the len of the message would be
zero. zero.
The call returns the number of characters sent, or -1 if an error
occurred. The variable errno is then set appropriately.
8.12. sctp_getaddrlen 8.12. sctp_getaddrlen
For application binary portability it is sometimes desirable to know For application binary portability it is sometimes desirable to know
what the kernel thinks is the length of a socket address family. what the kernel thinks is the length of a socket address family.
This function, when called with a valid family type will return the This function, when called with a valid family type will return the
length that the operating system uses in the specified family's length that the operating system uses in the specified family's
socket address structure. socket address structure.
int sctp_getaddrlen(sa_family_t family); int sctp_getaddrlen(sa_family_t family);
skipping to change at page 75, line 11 skipping to change at page 76, line 37
socket address structure. socket address structure.
int sctp_getaddrlen(sa_family_t family); int sctp_getaddrlen(sa_family_t family);
9. Preprocessor Constants 9. Preprocessor Constants
For application portability it is desirable to define pre-processor For application portability it is desirable to define pre-processor
constants for determination if sctp is present and supports various constants for determination if sctp is present and supports various
features. The following pre-processor constants should be defined in features. The following pre-processor constants should be defined in
a include file, sctp.h. a include file, sctp.h.
HAVE_SCTP - If this constant is defined to 1, then an implementation HAVE_SCTP - If this constant is defined to 1, then an implementation
of SCTP is available. of SCTP is available.
HAVE_KERNEL_SCTP - If this constant is defined to 1, then a kernel HAVE_KERNEL_SCTP - If this constant is defined to 1, then a kernel
SCTP implementation is available through the sockets interface. SCTP implementation is available through the sockets interface.
HAVE_SCTP_PRSCTP - If this constant is defined to 1, then the SCTP HAVE_SCTP_PRSCTP - If this constant is defined to 1, then the SCTP
implementation supports the partial reliability extension to SCTP. implementation supports the partial reliability extension to SCTP.
HAVE_SCTP_ADDIP - If this constant is defined to 1, then the SCTP HAVE_SCTP_ADDIP - If this constant is defined to 1, then the SCTP
implementation supports the dynamic address extension to SCTP. implementation supports the dynamic address extension to SCTP.
HAVE_SCTP_CANSET_PRIMARY - If this constant is defined to 1, then the HAVE_SCTP_CANSET_PRIMARY - If this constant is defined to 1, then
SCTP implementation supports the ability to request setting of the the SCTP implementation supports the ability to request setting of
remote primary address. the remote primary address.
HAVE_SCTP_SAT_NETWORK_CAPABILITY - If this constant is defined to 1, HAVE_SCTP_SAT_NETWORK_CAPABILITY - If this constant is defined to 1,
then the SCTP implementation supports the satellite network then the SCTP implementation supports the satellite network
extension to SCTP. extension to SCTP.
HAVE_SCTP_MULTIBUF - If this constant is defined to 1, then the SCTP HAVE_SCTP_MULTIBUF - If this constant is defined to 1, then the SCTP
implementation dedicates separate buffer space to each association implementation dedicates separate buffer space to each association
on a one-to-many socket. If this constant is defined to 0, then on a one-to-many socket. If this constant is defined to 0, then
the implementation provides a single block of shared buffer space the implementation provides a single block of shared buffer space
for a one-to-many socket. for a one-to-many socket.
HAVE_SCTP_NOCONNECT - If this constant is defined to 1, then the SCTP HAVE_SCTP_NOCONNECT - If this constant is defined to 1, then the
implementation supports initiating an association on a one-to-one SCTP implementation supports initiating an association on a one-
style socket without the use of connect(), as outlined in to-one style socket without the use of connect(), as outlined in
Section 4.1.5. Section 4.1.5.
HAVE_SCTP_EXT_RCVINFO - If this constant is defined to 1, then the HAVE_SCTP_EXT_RCVINFO - If this constant is defined to 1, then the
SCTP implementation supports the use of the extended style SCTP implementation supports the use of the extended style
sndrecinfo structure, sctp_extrcvinfo. sndrecinfo structure, sctp_extrcvinfo.
10. IANA considerations 10. IANA considerations
This document contains no IANA considerations. This document contains no IANA considerations.
11. Security Considerations 11. Security Considerations
skipping to change at page 76, line 20 skipping to change at page 78, line 4
associations on a privileged port, it MAY be permitted to accept new associations on a privileged port, it MAY be permitted to accept new
associations, but it SHOULD NOT be permitted to open new associations, but it SHOULD NOT be permitted to open new
associations. This could be relevant for the r* family of protocols. associations. This could be relevant for the r* family of protocols.
12. Acknowledgments 12. Acknowledgments
Special acknowledgment is given to Ken Fujita and Jonathan Woods who Special acknowledgment is given to Ken Fujita and Jonathan Woods who
helped extensively in the early formation of this document. helped extensively in the early formation of this document.
The authors also wish to thank Kavitha Baratakke, Mike Bartlett, Jon The authors also wish to thank Kavitha Baratakke, Mike Bartlett, Jon
Berger, Mark Butler, Scott Kimble, Renee Revis, and many others on Berger, Mark Butler, Scott Kimble, Renee Revis, Andreas Fink, and
the TSVWG mailing list for contributing valuable comments. many others on the TSVWG mailing list for contributing valuable
comments.
A special thanks to Phillip Conrad, for his suggested text, quick and A special thanks to Phillip Conrad, for his suggested text, quick and
constructive insights, and most of all his persistent fighting to constructive insights, and most of all his persistent fighting to
keep the interface to SCTP usable for the application programmer. keep the interface to SCTP usable for the application programmer.
13. References 13. Normative references
13.1. Normative references
[RFC0793] Postel, J., "Transmission Control Protocol", STD 7, [RFC0793] Postel, J., "Transmission Control Protocol", STD 7,
RFC 793, September 1981. RFC 793, September 1981.
[RFC0768] Postel, J., "User Datagram Protocol", STD 6, RFC 768, [RFC0768] Postel, J., "User Datagram Protocol", STD 6, RFC 768,
August 1980. August 1980.
[RFC1644] Braden, B., "T/TCP -- TCP Extensions for Transactions [RFC1644] Braden, B., "T/TCP -- TCP Extensions for Transactions
Functional Specification", RFC 1644, July 1994. Functional Specification", RFC 1644, July 1994.
skipping to change at page 77, line 12 skipping to change at page 78, line 41
[RFC2553] Gilligan, R., Thomson, S., Bound, J., and W. Stevens, [RFC2553] Gilligan, R., Thomson, S., Bound, J., and W. Stevens,
"Basic Socket Interface Extensions for IPv6", RFC 2553, "Basic Socket Interface Extensions for IPv6", RFC 2553,
March 1999. March 1999.
[RFC2960] Stewart, R., Xie, Q., Morneault, K., Sharp, C., [RFC2960] Stewart, R., Xie, Q., Morneault, K., Sharp, C.,
Schwarzbauer, H., Taylor, T., Rytina, I., Kalla, M., Schwarzbauer, H., Taylor, T., Rytina, I., Kalla, M.,
Zhang, L., and V. Paxson, "Stream Control Transmission Zhang, L., and V. Paxson, "Stream Control Transmission
Protocol", RFC 2960, October 2000. Protocol", RFC 2960, October 2000.
13.2. Informational References
Appendix A. one-to-one style Code Example Appendix A. one-to-one style Code Example
The following code is a simple implementation of an echo server over The following code is a simple implementation of an echo server over
SCTP. The example shows how to use some features of one-to-one style SCTP. The example shows how to use some features of one-to-one style
IPv4 SCTP sockets, including: IPv4 SCTP sockets, including:
o Opening, binding, and listening for new associations on a socket; o Opening, binding, and listening for new associations on a socket;
o Enabling ancillary data o Enabling ancillary data
o Enabling notifications o Enabling notifications
o Using ancillary data with sendmsg() and recvmsg() o Using ancillary data with sendmsg() and recvmsg()
skipping to change at page 85, line 4 skipping to change at page 86, line 21
Email: piggy@acm.org Email: piggy@acm.org
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
Phone: Phone:
Email: kacheong.poon@sun.com Email: kacheong.poon@sun.com
Michael Tuexen Michael Tuexen
Univ. of Applied Sciences Muenster Univ. of Applied Sciences Muenster
Stegerwaldstr. 39 Stegerwaldstr. 39
48565 Steinfurt 48565 Steinfurt
Germany Germany
Email: tuexen@fh-muenster.de Email: tuexen@fh-muenster.de
Intellectual Property Statement Full Copyright Statement
Copyright (C) The IETF Trust (2006).
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 The IETF takes no position regarding the validity or scope of any
Intellectual Property Rights or other rights that might be claimed to Intellectual Property Rights or other rights that might be claimed to
pertain to the implementation or use of the technology described in pertain to the implementation or use of the technology described in
this document or the extent to which any license under such rights 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 might or might not be available; nor does it represent that it has
made any independent effort to identify any such rights. Information made any independent effort to identify any such rights. Information
on the procedures with respect to rights in RFC documents can be on the procedures with respect to rights in RFC documents can be
found in BCP 78 and BCP 79. found in BCP 78 and BCP 79.
skipping to change at page 86, line 29 skipping to change at page 87, line 45
such proprietary rights by implementers or users of this such proprietary rights by implementers or users of this
specification can be obtained from the IETF on-line IPR repository at specification can be obtained from the IETF on-line IPR repository at
http://www.ietf.org/ipr. http://www.ietf.org/ipr.
The IETF invites any interested party to bring to its attention any The IETF invites any interested party to bring to its attention any
copyrights, patents or patent applications, or other proprietary copyrights, patents or patent applications, or other proprietary
rights that may cover technology that may be required to implement rights that may cover technology that may be required to implement
this standard. Please address the information to the IETF at this standard. Please address the information to the IETF at
ietf-ipr@ietf.org. ietf-ipr@ietf.org.
Disclaimer of Validity
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 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.
Copyright Statement
Copyright (C) The Internet Society (2006). 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.
Acknowledgment Acknowledgment
Funding for the RFC Editor function is currently provided by the Funding for the RFC Editor function is provided by the IETF
Internet Society. Administrative Support Activity (IASA).
 End of changes. 83 change blocks. 
187 lines changed or deleted 217 lines changed or added

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