draft-ietf-tsvwg-sctpsocket-25.txt   draft-ietf-tsvwg-sctpsocket-26.txt 
Network Working Group R. Stewart Network Working Group R. Stewart
Internet-Draft Huawei Internet-Draft Huawei
Intended status: Informational M. Tuexen Intended status: Informational M. Tuexen
Expires: July 11, 2011 Muenster Univ. of Applied Sciences Expires: August 1, 2011 Muenster Univ. of Applied
Sciences
K. Poon K. Poon
Oracle Corporation Oracle Corporation
P. Lei P. Lei
Cisco Systems, Inc. Cisco Systems, Inc.
V. Yasevich V. Yasevich
HP HP
January 7, 2011 January 28, 2011
Sockets API Extensions for Stream Control Transmission Protocol (SCTP) Sockets API Extensions for Stream Control Transmission Protocol (SCTP)
draft-ietf-tsvwg-sctpsocket-25.txt draft-ietf-tsvwg-sctpsocket-26.txt
Abstract Abstract
This document describes a mapping of the Stream Control Transmission This document describes a mapping of the Stream Control Transmission
Protocol (SCTP) into a sockets API. The benefits of this mapping Protocol (SCTP) into a sockets API. The benefits of this mapping
include compatibility for TCP applications, access to new SCTP include compatibility for TCP applications, access to new SCTP
features and a consolidated error and event notification scheme. features and a consolidated error and event notification scheme.
Status of this Memo Status of this Memo
skipping to change at page 1, line 40 skipping to change at page 1, line 41
Internet-Drafts are working documents of the Internet Engineering Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet- working documents as Internet-Drafts. The list of current Internet-
Drafts is at http://datatracker.ietf.org/drafts/current/. Drafts is at http://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress." material or to cite them other than as "work in progress."
This Internet-Draft will expire on July 11, 2011. This Internet-Draft will expire on August 1, 2011.
Copyright Notice Copyright Notice
Copyright (c) 2011 IETF Trust and the persons identified as the Copyright (c) 2011 IETF Trust and the persons identified as the
document authors. All rights reserved. document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents Provisions Relating to IETF Documents
(http://trustee.ietf.org/license-info) in effect on the date of (http://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents publication of this document. Please review these documents
skipping to change at page 4, line 31 skipping to change at page 4, line 31
7.2. setsockopt() and getsockopt() . . . . . . . . . . . . . . 58 7.2. setsockopt() and getsockopt() . . . . . . . . . . . . . . 58
7.3. read() and write() . . . . . . . . . . . . . . . . . . . 59 7.3. read() and write() . . . . . . . . . . . . . . . . . . . 59
7.4. getsockname() . . . . . . . . . . . . . . . . . . . . . . 59 7.4. getsockname() . . . . . . . . . . . . . . . . . . . . . . 59
7.5. Implicit Association Setup . . . . . . . . . . . . . . . 60 7.5. Implicit Association Setup . . . . . . . . . . . . . . . 60
8. Socket Options . . . . . . . . . . . . . . . . . . . . . . . 61 8. Socket Options . . . . . . . . . . . . . . . . . . . . . . . 61
8.1. Read / Write Options . . . . . . . . . . . . . . . . . . 62 8.1. Read / Write Options . . . . . . . . . . . . . . . . . . 62
8.1.1. Retransmission Timeout Parameters (SCTP_RTOINFO) . . 62 8.1.1. Retransmission Timeout Parameters (SCTP_RTOINFO) . . 62
8.1.2. Association Parameters (SCTP_ASSOCINFO) . . . . . . . 63 8.1.2. Association Parameters (SCTP_ASSOCINFO) . . . . . . . 63
8.1.3. Initialization Parameters (SCTP_INITMSG) . . . . . . 65 8.1.3. Initialization Parameters (SCTP_INITMSG) . . . . . . 65
8.1.4. SO_LINGER . . . . . . . . . . . . . . . . . . . . . . 65 8.1.4. SO_LINGER . . . . . . . . . . . . . . . . . . . . . . 65
8.1.5. SCTP_NODELAY . . . . . . . . . . . . . . . . . . . . 65 8.1.5. SCTP_NODELAY . . . . . . . . . . . . . . . . . . . . 66
8.1.6. SO_RCVBUF . . . . . . . . . . . . . . . . . . . . . . 66 8.1.6. SO_RCVBUF . . . . . . . . . . . . . . . . . . . . . . 66
8.1.7. SO_SNDBUF . . . . . . . . . . . . . . . . . . . . . . 66 8.1.7. SO_SNDBUF . . . . . . . . . . . . . . . . . . . . . . 66
8.1.8. Automatic Close of Associations (SCTP_AUTOCLOSE) . . 66 8.1.8. Automatic Close of Associations (SCTP_AUTOCLOSE) . . 66
8.1.9. Set Primary Address (SCTP_PRIMARY_ADDR) . . . . . . . 67 8.1.9. Set Primary Address (SCTP_PRIMARY_ADDR) . . . . . . . 67
8.1.10. Set Adaptation Layer Indicator 8.1.10. Set Adaptation Layer Indicator
(SCTP_ADAPTATION_LAYER) . . . . . . . . . . . . . . . 67 (SCTP_ADAPTATION_LAYER) . . . . . . . . . . . . . . . 67
8.1.11. Enable/Disable Message Fragmentation 8.1.11. Enable/Disable Message Fragmentation
(SCTP_DISABLE_FRAGMENTS) . . . . . . . . . . . . . . 67 (SCTP_DISABLE_FRAGMENTS) . . . . . . . . . . . . . . 68
8.1.12. Peer Address Parameters (SCTP_PEER_ADDR_PARAMS) . . . 68 8.1.12. Peer Address Parameters (SCTP_PEER_ADDR_PARAMS) . . . 68
8.1.13. Set Default Send Parameters 8.1.13. Set Default Send Parameters
(SCTP_DEFAULT_SEND_PARAM) - DEPRECATED . . . . . . . 70 (SCTP_DEFAULT_SEND_PARAM) - DEPRECATED . . . . . . . 70
8.1.14. Set Notification and Ancillary Events 8.1.14. Set Notification and Ancillary Events
(SCTP_EVENTS) - DEPRECATED . . . . . . . . . . . . . 70 (SCTP_EVENTS) - DEPRECATED . . . . . . . . . . . . . 71
8.1.15. Set/Clear IPv4 Mapped Addresses 8.1.15. Set/Clear IPv4 Mapped Addresses
(SCTP_I_WANT_MAPPED_V4_ADDR) . . . . . . . . . . . . 71 (SCTP_I_WANT_MAPPED_V4_ADDR) . . . . . . . . . . . . 71
8.1.16. Get or Set the Maximum Fragmentation Size 8.1.16. Get or Set the Maximum Fragmentation Size
(SCTP_MAXSEG) . . . . . . . . . . . . . . . . . . . . 71 (SCTP_MAXSEG) . . . . . . . . . . . . . . . . . . . . 71
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) . . . . . . . . . . . . . . . . . . 72 (SCTP_HMAC_IDENT) . . . . . . . . . . . . . . . . . . 72
8.1.18. Get or Set the Active Shared Key 8.1.18. Get or Set the Active Shared Key
(SCTP_AUTH_ACTIVE_KEY) . . . . . . . . . . . . . . . 72 (SCTP_AUTH_ACTIVE_KEY) . . . . . . . . . . . . . . . 72
8.1.19. Get or Set Delayed SACK Timer (SCTP_DELAYED_SACK) . . 73 8.1.19. Get or Set Delayed SACK Timer (SCTP_DELAYED_SACK) . . 73
8.1.20. Get or Set Fragmented Interleave 8.1.20. Get or Set Fragmented Interleave
(SCTP_FRAGMENT_INTERLEAVE) . . . . . . . . . . . . . 74 (SCTP_FRAGMENT_INTERLEAVE) . . . . . . . . . . . . . 74
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) . . . . . . . . . . . . 75 (SCTP_PARTIAL_DELIVERY_POINT) . . . . . . . . . . . . 75
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) - DEPRECATED . . . . . . . . . 75 (SCTP_USE_EXT_RCVINFO) - DEPRECATED . . . . . . . . . 76
8.1.23. Set or Get the Auto ASCONF Flag (SCTP_AUTO_ASCONF) . 76 8.1.23. Set or Get the Auto ASCONF Flag (SCTP_AUTO_ASCONF) . 76
8.1.24. Set or Get the Maximum Burst (SCTP_MAX_BURST) . . . . 76 8.1.24. Set or Get the Maximum Burst (SCTP_MAX_BURST) . . . . 76
8.1.25. Set or Get the Default Context (SCTP_CONTEXT) . . . . 77 8.1.25. Set or Get the Default Context (SCTP_CONTEXT) . . . . 77
8.1.26. Enable or Disable Explicit EOR Marking 8.1.26. Enable or Disable Explicit EOR Marking
(SCTP_EXPLICIT_EOR) . . . . . . . . . . . . . . . . . 77 (SCTP_EXPLICIT_EOR) . . . . . . . . . . . . . . . . . 77
8.1.27. Enable SCTP Port Reusage (SCTP_REUSE_PORT) . . . . . 77 8.1.27. Enable SCTP Port Reusage (SCTP_REUSE_PORT) . . . . . 78
8.1.28. Set Notification Event (SCTP_EVENT) . . . . . . . . . 78 8.1.28. Set Notification Event (SCTP_EVENT) . . . . . . . . . 78
8.1.29. Enable or Disable the Delivery of SCTP_RCVINFO as 8.1.29. Enable or Disable the Delivery of SCTP_RCVINFO as
Ancillary Data (SCTP_RECVRCVINFO) . . . . . . . . . . 78 Ancillary Data (SCTP_RECVRCVINFO) . . . . . . . . . . 78
8.1.30. Enable or Disable the Delivery of SCTP_NXTINFO as 8.1.30. Enable or Disable the Delivery of SCTP_NXTINFO as
Ancillary Data (SCTP_RECVNXTINFO) . . . . . . . . . . 78 Ancillary Data (SCTP_RECVNXTINFO) . . . . . . . . . . 78
8.1.31. Set Default Send Parameters (SCTP_DEFAULT_SNDINFO) . 78 8.1.31. Set Default Send Parameters (SCTP_DEFAULT_SNDINFO) . 79
8.2. Read-Only Options . . . . . . . . . . . . . . . . . . . . 79 8.2. Read-Only Options . . . . . . . . . . . . . . . . . . . . 79
8.2.1. Association Status (SCTP_STATUS) . . . . . . . . . . 79 8.2.1. Association Status (SCTP_STATUS) . . . . . . . . . . 79
8.2.2. Peer Address Information (SCTP_GET_PEER_ADDR_INFO) . 80 8.2.2. Peer Address Information (SCTP_GET_PEER_ADDR_INFO) . 81
8.2.3. Get the List of Chunks the Peer Requires to be 8.2.3. Get the List of Chunks the Peer Requires to be
Authenticated (SCTP_PEER_AUTH_CHUNKS) . . . . . . . . 82 Authenticated (SCTP_PEER_AUTH_CHUNKS) . . . . . . . . 82
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) . . . . 82 to be Authenticated (SCTP_LOCAL_AUTH_CHUNKS) . . . . 82
8.2.5. Get the Current Number of Associations 8.2.5. Get the Current Number of Associations
(SCTP_GET_ASSOC_NUMBER) . . . . . . . . . . . . . . . 83 (SCTP_GET_ASSOC_NUMBER) . . . . . . . . . . . . . . . 83
8.2.6. Get the Current Identifiers of Associations 8.2.6. Get the Current Identifiers of Associations
(SCTP_GET_ASSOC_ID_LIST) . . . . . . . . . . . . . . 83 (SCTP_GET_ASSOC_ID_LIST) . . . . . . . . . . . . . . 83
8.3. Write-Only Options . . . . . . . . . . . . . . . . . . . 84 8.3. Write-Only Options . . . . . . . . . . . . . . . . . . . 84
8.3.1. Set Peer Primary Address 8.3.1. Set Peer Primary Address
skipping to change at page 65, line 39 skipping to change at page 65, line 39
struct linger { struct linger {
int l_onoff; /* option on/off */ int l_onoff; /* option on/off */
int l_linger; /* linger time */ int l_linger; /* linger time */
}; };
To enable the option, set l_onoff to 1. If the l_linger value is set To enable the option, set l_onoff to 1. If the l_linger value is set
to 0, calling close() is the same as the ABORT primitive. If the to 0, calling close() is the same as the ABORT primitive. If the
value is set to a negative value, the setsockopt() call will return value is set to a negative value, the setsockopt() call will return
an error. If the value is set to a positive value linger_time, the an error. If the value is set to a positive value linger_time, the
close() can be blocked for at most linger_time ms. If the graceful close() can be blocked for at most linger_time. Please note that the
shutdown phase does not finish during this period, close() will time unit is ms according to Posix, but might be different on
return but the graceful shutdown phase will continue in the system. specific platforms. If the graceful shutdown phase does not finish
during this period, close() will return but the graceful shutdown
phase will continue in the system.
Note, this is a socket level option, not an SCTP level option. When Note, this is a socket level option, not an SCTP level option. When
using this option, an application must specify a level of SOL_SOCKET using this option, an application must specify a level of SOL_SOCKET
in the call. in the call.
8.1.5. SCTP_NODELAY 8.1.5. SCTP_NODELAY
Turn on/off any Nagle-like algorithm. This means that packets are Turn on/off any Nagle-like algorithm. This means that packets are
generally sent as soon as possible and no unnecessary delays are generally sent as soon as possible and no unnecessary delays are
introduced, at the cost of more packets in the network. Turning this introduced, at the cost of more packets in the network. Turning this
skipping to change at page 109, line 28 skipping to change at page 109, line 28
n = sctp_recvv(sd, &iov, 1, n = sctp_recvv(sd, &iov, 1,
&addr.sa, &fromlen, &addr.sa, &fromlen,
&info, &infolen, &infotype, &info, &infolen, &infotype,
&flags); &flags);
if (flags & MSG_NOTIFICATION) { if (flags & MSG_NOTIFICATION) {
print_notification(iov.iov_base); print_notification(iov.iov_base);
} else { } else {
char addrbuf[INET6_ADDRSTRLEN]; char addrbuf[INET6_ADDRSTRLEN];
char *ap; const char *ap;
in_port_t port; in_port_t port;
if (addr.sa.sa_family == AF_INET) { if (addr.sa.sa_family == AF_INET) {
ap = inet_ntop(AF_INET, &addr.sin.sin_addr, ap = inet_ntop(AF_INET, &addr.sin.sin_addr,
addrbuf, INET6_ADDRSTRLEN); addrbuf, INET6_ADDRSTRLEN);
port = ntohs(addr.sin.sin_port); port = ntohs(addr.sin.sin_port);
} else { } else {
ap = inet_ntop(AF_INET6, &addr.sin6.sin6_addr, ap = inet_ntop(AF_INET6, &addr.sin6.sin6_addr,
addrbuf, INET6_ADDRSTRLEN); addrbuf, INET6_ADDRSTRLEN);
port = ntohs(addr.sin6.sin6_port); port = ntohs(addr.sin6.sin6_port);
 End of changes. 13 change blocks. 
15 lines changed or deleted 18 lines changed or added

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