draft-ietf-tsvwg-sctpsocket-28.txt   draft-ietf-tsvwg-sctpsocket-29.txt 
Network Working Group R. Stewart Network Working Group R. Stewart
Internet-Draft Huawei Internet-Draft Adara Networks
Intended status: Informational M. Tuexen Intended status: Informational M. Tuexen
Expires: October 10, 2011 Muenster Univ. of Appl. Sciences Expires: October 25, 2011 Muenster Univ. of Appl. Sciences
K. Poon K. Poon
Oracle Corporation Oracle Corporation
P. Lei P. Lei
Cisco Systems, Inc. Cisco Systems, Inc.
V. Yasevich V. Yasevich
HP HP
April 8, 2011 April 23, 2011
Sockets API Extensions for Stream Control Transmission Protocol (SCTP) Sockets API Extensions for Stream Control Transmission Protocol (SCTP)
draft-ietf-tsvwg-sctpsocket-28.txt draft-ietf-tsvwg-sctpsocket-29.txt
Abstract Abstract
This document describes a mapping of the Stream Control Transmission This document describes a mapping of the Stream Control Transmission
Protocol (SCTP) into a sockets API. The benefits of this mapping Protocol (SCTP) into a sockets API. The benefits of this mapping
include compatibility for TCP applications, access to new SCTP include compatibility for TCP applications, access to new SCTP
features and a consolidated error and event notification scheme. features and a consolidated error and event notification scheme.
Status of this Memo Status of this Memo
skipping to change at page 1, line 40 skipping to change at page 1, line 40
Internet-Drafts are working documents of the Internet Engineering Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet- working documents as Internet-Drafts. The list of current Internet-
Drafts is at http://datatracker.ietf.org/drafts/current/. Drafts is at http://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress." material or to cite them other than as "work in progress."
This Internet-Draft will expire on October 10, 2011. This Internet-Draft will expire on October 25, 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 38, line 17 skipping to change at page 38, line 17
+--------------+--------------+---------------------+ +--------------+--------------+---------------------+
| IPPROTO_SCTP | SCTP_NXTINFO | struct sctp_nxtinfo | | IPPROTO_SCTP | SCTP_NXTINFO | struct sctp_nxtinfo |
+--------------+--------------+---------------------+ +--------------+--------------+---------------------+
The sctp_nxtinfo structure is defined below: The sctp_nxtinfo structure is defined below:
struct sctp_nxtinfo { struct sctp_nxtinfo {
uint16_t nxt_sid; uint16_t nxt_sid;
uint16_t nxt_flags; uint16_t nxt_flags;
uint32_t nxt_ppid; uint32_t nxt_ppid;
size_t nxt_length; uint32_t nxt_length;
sctp_assoc_t nxt_assoc_id; sctp_assoc_t nxt_assoc_id;
}; };
nxt_sid: The SCTP stack places the next message's stream number in nxt_sid: The SCTP stack places the next message's stream number in
this value. this value.
nxt_flags: This field may contain any of the following flags and is nxt_flags: This field may contain any of the following flags and is
composed of a bitwise OR of these values. composed of a bitwise OR of these values.
SCTP_UNORDERED: This flag is present when the next message was SCTP_UNORDERED: This flag is present when the next message was
skipping to change at page 66, line 17 skipping to change at page 66, line 17
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. Please note that the close() can be blocked for at most linger_time. Please note that the
time unit is ms according to POSIX, but might be different on time unit is seconds according to POSIX, but might be different on
specific platforms. If the graceful shutdown phase does not finish specific platforms. If the graceful shutdown phase does not finish
during this period, close() will return but the graceful shutdown during this period, close() will return but the graceful shutdown
phase will continue in the system. 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
skipping to change at page 108, line 23 skipping to change at page 108, line 23
} addr; } addr;
socklen_t fromlen, infolen; socklen_t fromlen, infolen;
struct sctp_rcvinfo info; struct sctp_rcvinfo info;
unsigned int infotype; unsigned int infotype;
struct iovec iov; struct iovec iov;
char buffer[BUFFER_SIZE]; char buffer[BUFFER_SIZE];
struct sctp_event event; struct sctp_event event;
uint16_t event_types[] = {SCTP_ASSOC_CHANGE, uint16_t event_types[] = {SCTP_ASSOC_CHANGE,
SCTP_PEER_ADDR_CHANGE, SCTP_PEER_ADDR_CHANGE,
SCTP_SHUTDOWN_EVENT, SCTP_SHUTDOWN_EVENT,
SCTP_ADAPTATION_INDICATION }; SCTP_ADAPTATION_INDICATION};
/* Create a 1-to-many style SCTP socket. */ /* Create a 1-to-many style SCTP socket. */
if ((sd = socket(AF_INET6, SOCK_SEQPACKET, IPPROTO_SCTP)) < 0) { if ((sd = socket(AF_INET6, SOCK_SEQPACKET, IPPROTO_SCTP)) < 0) {
perror("socket"); perror("socket");
exit(1); exit(1);
} }
/* Enable the events of interest. */ /* Enable the events of interest. */
memset(&event, 0, sizeof(event)); memset(&event, 0, sizeof(event));
event.se_assoc_id = SCTP_FUTURE_ASSOC; event.se_assoc_id = SCTP_FUTURE_ASSOC;
skipping to change at page 111, line 8 skipping to change at page 111, line 8
perror("close"); perror("close");
exit(1); exit(1);
} }
return (0); return (0);
} }
Authors' Addresses Authors' Addresses
Randall R. Stewart Randall R. Stewart
Huawei Adara Networks
Chapin, SC 29036 Chapin, SC 29036
USA USA
Email: randall@lakerest.net Email: randall@lakerest.net
Michael Tuexen Michael Tuexen
Muenster University of Applied Sciences Muenster University of Applied Sciences
Stegerwaldstr. 39 Stegerwaldstr. 39
48565 Steinfurt 48565 Steinfurt
Germany Germany
 End of changes. 9 change blocks. 
9 lines changed or deleted 9 lines changed or added

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