draft-ietf-tsvwg-sctp-strrst-03.txt   draft-ietf-tsvwg-sctp-strrst-04.txt 
Network Working Group R. Stewart Network Working Group R. Stewart
Internet-Draft Huawei Internet-Draft Huawei
Intended status: Standards Track P. Lei Intended status: Standards Track P. Lei
Expires: July 19, 2010 Cisco Systems, Inc. Expires: August 27, 2010 Cisco Systems, Inc.
M. Tuexen M. Tuexen
Muenster Univ. of Applied Sciences Muenster Univ. of Applied Sciences
January 15, 2010 February 23, 2010
Stream Control Transmission Protocol (SCTP) Stream Reconfiguration Stream Control Transmission Protocol (SCTP) Stream Reconfiguration
draft-ietf-tsvwg-sctp-strrst-03.txt draft-ietf-tsvwg-sctp-strrst-04.txt
Abstract Abstract
Many applications that desire to use SCTP have requested the ability Many applications that desire to use SCTP have requested the ability
to "reset" a stream. The intention of resetting a stream is to start to "reset" a stream. The intention of resetting a stream is to start
the numbering sequence of the stream back at 'zero' with a the numbering sequence of the stream back at 'zero' with a
corresponding notification to the upper layer that this act as been corresponding notification to the upper layer that this act as been
performed. The applications that have requested this feature performed. The applications that have requested this feature
normally desire it so that they can "re-use" streams for different normally desire it so that they can "re-use" streams for different
purposes but still utilize the stream sequence number for the purposes but still utilize the stream sequence number for the
skipping to change at page 2, line 5 skipping to change at page 2, line 5
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 July 19, 2010. This Internet-Draft will expire on August 27, 2010.
Copyright Notice Copyright Notice
Copyright (c) 2010 IETF Trust and the persons identified as the Copyright (c) 2010 IETF Trust and the persons identified as the
document authors. All rights reserved. document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents Provisions Relating to IETF Documents
(http://trustee.ietf.org/license-info) in effect on the date of (http://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents publication of this document. Please review these documents
skipping to change at page 3, line 43 skipping to change at page 3, line 43
Reset Request Parameter . . . . . . . . . . . . . . . 17 Reset Request Parameter . . . . . . . . . . . . . . . 17
5.2.3. Receiver Side Procedures for the Incoming SSN 5.2.3. Receiver Side Procedures for the Incoming SSN
Reset Request Parameter . . . . . . . . . . . . . . . 18 Reset Request Parameter . . . . . . . . . . . . . . . 18
5.2.4. Receiver Side Procedures for the SSN/TSN Reset 5.2.4. Receiver Side Procedures for the SSN/TSN Reset
Request Parameter . . . . . . . . . . . . . . . . . . 18 Request Parameter . . . . . . . . . . . . . . . . . . 18
5.2.5. Receiver Side Procedures for the Add Outgoing 5.2.5. Receiver Side Procedures for the Add Outgoing
Streams Request Parameter . . . . . . . . . . . . . . 19 Streams Request Parameter . . . . . . . . . . . . . . 19
5.2.6. Receiver Side Procedures for the Stream Reset 5.2.6. Receiver Side Procedures for the Stream Reset
Response Parameter . . . . . . . . . . . . . . . . . . 19 Response Parameter . . . . . . . . . . . . . . . . . . 19
5.3. Various Examples of the Stream Reset procedures . . . . . 20 5.3. Various Examples of the Stream Reset procedures . . . . . 20
6. Socket API considerations . . . . . . . . . . . . . . . . . . 21 6. Socket API Considerations . . . . . . . . . . . . . . . . . . 21
6.1. Stream Reset event . . . . . . . . . . . . . . . . . . . . 21 6.1. Events . . . . . . . . . . . . . . . . . . . . . . . . . . 21
6.2. Event Subscription . . . . . . . . . . . . . . . . . . . . 22 6.1.1. Stream Reset Event . . . . . . . . . . . . . . . . . . 22
6.3. Socket Options . . . . . . . . . . . . . . . . . . . . . . 23 6.1.2. Association Reset Event . . . . . . . . . . . . . . . 23
6.1.3. Stream Change Event . . . . . . . . . . . . . . . . . 23
6.2. Event Subscription . . . . . . . . . . . . . . . . . . . . 24
6.3. Socket Options . . . . . . . . . . . . . . . . . . . . . . 25
6.3.1. Enable/Disable Stream Reset 6.3.1. Enable/Disable Stream Reset
(SCTP_ENABLE_STREAM_RESET) . . . . . . . . . . . . . . 24 (SCTP_ENABLE_STREAM_RESET) . . . . . . . . . . . . . . 26
6.3.2. Reset Incoming and/or Outgoing Streams 6.3.2. Reset Incoming and/or Outgoing Streams
(SCTP_RESET_STREAMS) . . . . . . . . . . . . . . . . . 24 (SCTP_RESET_STREAMS) . . . . . . . . . . . . . . . . . 27
6.3.3. Reset SSN/TSN (SCTP_RESET_SSN_TSN) . . . . . . . . . . 25 6.3.3. Reset SSN/TSN (SCTP_RESET_ASSOC) . . . . . . . . . . . 27
6.3.4. Add Outgoing Streams (SCTP_ADD_STREAMS) . . . . . . . 25 6.3.4. Add Outgoing Streams (SCTP_ADD_OUT_STREAMS) . . . . . 28
7. Security Considerations . . . . . . . . . . . . . . . . . . . 28
7. Security Considerations . . . . . . . . . . . . . . . . . . . 26 8. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 28
8. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 26 8.1. A New Chunk Type . . . . . . . . . . . . . . . . . . . . . 29
8.1. A New Chunk Type . . . . . . . . . . . . . . . . . . . . . 26 8.2. Five New Parameter Types . . . . . . . . . . . . . . . . . 29
8.2. Five New Parameter Types . . . . . . . . . . . . . . . . . 27 9. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 29
9. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 27 10. References . . . . . . . . . . . . . . . . . . . . . . . . . . 30
10. References . . . . . . . . . . . . . . . . . . . . . . . . . . 27 10.1. Normative References . . . . . . . . . . . . . . . . . . . 30
10.1. Normative References . . . . . . . . . . . . . . . . . . . 27 10.2. Informative References . . . . . . . . . . . . . . . . . . 30
10.2. Informative References . . . . . . . . . . . . . . . . . . 27 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 30
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 28
1. Introduction 1. Introduction
Many applications that desire to use SCTP have requested the ability Many applications that desire to use SCTP have requested the ability
to "reset" a stream. The intention of resetting a stream is to start to "reset" a stream. The intention of resetting a stream is to start
the numbering sequence of the stream back at 'zero' with a the numbering sequence of the stream back at 'zero' with a
corresponding notification to the upper layer that this act as been corresponding notification to the upper layer that this act as been
performed. The applications that have requested this feature performed. The applications that have requested this feature
normally desire it so that they can "re-use" streams for different normally desire it so that they can "re-use" streams for different
purposes but still utilize the stream sequence number for the purposes but still utilize the stream sequence number for the
skipping to change at page 7, line 5 skipping to change at page 7, line 5
4. SSN/TSN Reset Request Parameter. 4. SSN/TSN Reset Request Parameter.
5. Add Outgoing Streams Request Parameter. 5. Add Outgoing Streams Request Parameter.
6. Stream Reset Response Parameter. 6. Stream Reset Response Parameter.
7. Stream Reset Response Parameter, Outgoing SSN Reset Request 7. Stream Reset Response Parameter, Outgoing SSN Reset Request
Parameter. Parameter.
8. Stream Reset Response Parameter, Add Outgoing Streams Request 8. Stream Reset Response Parameter, Stream Reset Response Parameter.
Parameter.
9. Stream Reset Response Parameter, Stream Reset Response Parameter.
If a sender transmits an unsupported combination, the receiver SHOULD If a sender transmits an unsupported combination, the receiver SHOULD
send an ERROR chunk with a protocol violation cause. send an ERROR chunk with a protocol violation cause.
4. New Parameter Types 4. New Parameter Types
This section defines the new parameter types that will be used in the This section defines the new parameter types that will be used in the
STREAM_RESET chunk. Table 2 illustrates the new parameter types. STREAM_RESET chunk. Table 2 illustrates the new parameter types.
+----------------+----------------------------------------+ +----------------+----------------------------------------+
skipping to change at page 8, line 50 skipping to change at page 8, line 50
field holds the Stream Reset Request Sequence Number of the field holds the Stream Reset Request Sequence Number of the
incoming request. In the other case it holds the next expected incoming request. In the other case it holds the next expected
Stream Reset Request Sequence Number - 1. Stream Reset Request Sequence Number - 1.
Senders last assigned TSN: 4 bytes (unsigned integer) Senders last assigned TSN: 4 bytes (unsigned integer)
This value holds the next TSN minus 1, in other words the last TSN This value holds the next TSN minus 1, in other words the last TSN
that this sender assigned. that this sender assigned.
Stream Number N: 2 bytes (unsigned integer) Stream Number N: 2 bytes (unsigned integer)
This optional field, if included, is used to indicates specific This optional field, if included, is used to indicates specific
streams that are to be reset. If no streams are listed, then ALL streams that are to be reset. If no streams are listed, then all
streams are to be reset. streams are to be reset.
This parameter can appear in a STREAM RESET chunk. This parameter This parameter can appear in a STREAM RESET chunk. This parameter
MUST NOT appear in any other chunk type. MUST NOT appear in any other chunk type.
4.2. Incoming SSN Reset Request Parameter 4.2. Incoming SSN Reset Request Parameter
This parameter is used by the sender to request that the peer This parameter is used by the sender to request that the peer
requests some of its outgoing streams to be reset. requests some of its outgoing streams to be reset.
skipping to change at page 9, line 42 skipping to change at page 9, line 42
Parameter Length: 2 bytes (unsigned integer) Parameter Length: 2 bytes (unsigned integer)
This field holds the length of the parameter. This field holds the length of the parameter.
Stream Reset Request Sequence Number: 4 bytes (unsigned integer) Stream Reset Request Sequence Number: 4 bytes (unsigned integer)
This field is used to identify the request. It is a monotonically This field is used to identify the request. It is a monotonically
increasing number that is initialized to the same value as the increasing number that is initialized to the same value as the
Initial TSN number. It is increased by 1. Initial TSN number. It is increased by 1.
Stream Number N: 2 bytes (unsigned integer) Stream Number N: 2 bytes (unsigned integer)
This optional field, if included, is used to indicate specific This optional field, if included, is used to indicate specific
streams that are to be reset. If no streams are listed, then ALL streams that are to be reset. If no streams are listed, then all
streams are to be reset. streams are to be reset.
This parameter can appear in a STREAM RESET chunk. This parameter This parameter can appear in a STREAM RESET chunk. This parameter
MUST NOT appear in any other chunk type. MUST NOT appear in any other chunk type.
4.3. SSN/TSN Reset Request Parameter 4.3. SSN/TSN Reset Request Parameter
This parameter is used by the sender to request to reset the TSN and This parameter is used by the sender to request to reset the TSN and
SSN numbering of all streams. SSN numbering of all streams.
skipping to change at page 15, line 42 skipping to change at page 15, line 42
transmissions and TSN assignment until the reset procedure is transmissions and TSN assignment until the reset procedure is
finished by the peer either acknowledging or denying the finished by the peer either acknowledging or denying the
request. request.
C3: The SSN/TSN Reset Request Parameter is put into a STREAM RESET C3: The SSN/TSN Reset Request Parameter is put into a STREAM RESET
Chunk. There MUST NOT be any other parameter in this chunk. Chunk. There MUST NOT be any other parameter in this chunk.
C4: The STREAM RESET Chunk is sent following the rules given in C4: The STREAM RESET Chunk is sent following the rules given in
Section 5.1.1 Section 5.1.1
There SHOULD NOT be sent more than one SSN/TSN Reset Request within a
maximum segment lifetime.
5.1.5. Sender Side Procedures for the Stream Reset Response Parameter 5.1.5. Sender Side Procedures for the Stream Reset Response Parameter
When an implementation receives a request parameter it MUST respond When an implementation receives a request parameter it MUST respond
with a Stream Reset Response Parameter in the following manner: with a Stream Reset Response Parameter in the following manner:
D1: The Stream Reset Request Sequence number of the incoming request D1: The Stream Reset Request Sequence number of the incoming request
is copied to the Stream Reset Response Sequence Number field of is copied to the Stream Reset Response Sequence Number field of
the Stream Reset Response Parameter. the Stream Reset Response Parameter.
D2: The result of the processing of the incoming request is filled D2: The result of the processing of the incoming request is filled
skipping to change at page 17, line 7 skipping to change at page 17, line 11
earlier. earlier.
The decision to deny a stream reset request is an administrative The decision to deny a stream reset request is an administrative
decision and may be user configurable even after the association has decision and may be user configurable even after the association has
formed. If for whatever reason the endpoint does NOT wish to process formed. If for whatever reason the endpoint does NOT wish to process
a received request parameter it MUST send a corresponding response a received request parameter it MUST send a corresponding response
parameter as described in Section 5.1.5 with an appropriate Result parameter as described in Section 5.1.5 with an appropriate Result
field. field.
Implementation Note: A SACK is recommended to be bundled with any Implementation Note: A SACK is recommended to be bundled with any
stream reset response so that any retranmission processing that needs stream reset response so that any retransmission processing that
to occur can be expidited. A SACK chunk is not required for this needs to occur can be expedited. A SACK chunk is not required for
feature to work, but it will in effect help minimize the delay in this feature to work, but it will in effect help minimize the delay
completing a stream reset operation in the face of any data loss. in completing a stream reset operation in the face of any data loss.
5.2.2. Receiver Side Procedures for the Outgoing SSN Reset Request 5.2.2. Receiver Side Procedures for the Outgoing SSN Reset Request
Parameter Parameter
In the case that the endpoint is willing to perform a stream reset In the case that the endpoint is willing to perform a stream reset
the following steps SHOULD be followed: the following steps SHOULD be followed:
E1: If the Senders Last Assigned TSN number is greater than the E1: If the Senders Last Assigned TSN number is greater than the
cumulative acknowledgment point, then the endpoint MUST enter cumulative acknowledgment point, then the endpoint MUST enter
"deferred reset processing". In this mode, any data arriving "deferred reset processing". In this mode, any data arriving
skipping to change at page 17, line 32 skipping to change at page 17, line 36
for the effected stream(s) MUST be queued locally and held until for the effected stream(s) MUST be queued locally and held until
the Cumulative Acknowledgment point reaches the 'senders last the Cumulative Acknowledgment point reaches the 'senders last
assigned TSN number'. When the Cumulative Acknowledgment point assigned TSN number'. When the Cumulative Acknowledgment point
reaches the last assigned TSN number then proceed to the next reaches the last assigned TSN number then proceed to the next
step. Note that the receiver of a stream reset that causes it step. Note that the receiver of a stream reset that causes it
to entered deferred reset processing does NOT withhold the to entered deferred reset processing does NOT withhold the
stream reset acknowledgment from the peer. This also means that stream reset acknowledgment from the peer. This also means that
the receiver will need to queue up any additional stream reset the receiver will need to queue up any additional stream reset
requests received including the one that caused the receiver to requests received including the one that caused the receiver to
enter deferred reset processing. This is because once the enter deferred reset processing. This is because once the
acknowledgement is recevied by the sender, the sender is free to acknowledgement is received by the sender, the sender is free to
send a new stream reset. send a new stream reset.
E2: If the Stream Reset Timer is running for the Stream Reset E2: If the Stream Reset Timer is running for the Stream Reset
Request Sequence Number indicated in the Stream Reset Response Request Sequence Number indicated in the Stream Reset Response
Sequence Number field, mark the Stream Reset Request Sequence Sequence Number field, mark the Stream Reset Request Sequence
Number as acknowledged. If all Stream Reset Request Sequence Number as acknowledged. If all Stream Reset Request Sequence
Numbers the Stream Reset Timer is running for are acknowledged, Numbers the Stream Reset Timer is running for are acknowledged,
stop the Stream Reset Timer. stop the Stream Reset Timer.
E3: If no Stream Numbers are listed in the parameter, then all E3: If no Stream Numbers are listed in the parameter, then all
skipping to change at page 18, line 32 skipping to change at page 18, line 35
F2: The STREAM RESET chunk is sent after the incoming STREAM RESET F2: The STREAM RESET chunk is sent after the incoming STREAM RESET
chunk is processed completely. chunk is processed completely.
5.2.4. Receiver Side Procedures for the SSN/TSN Reset Request Parameter 5.2.4. Receiver Side Procedures for the SSN/TSN Reset Request Parameter
In the case that the endpoint is willing to perform a SSN/TSN reset In the case that the endpoint is willing to perform a SSN/TSN reset
the following steps SHOULD be followed: the following steps SHOULD be followed:
G1: Compute an appropriate value for the Receiver's next TSN, the G1: Compute an appropriate value for the Receiver's next TSN, the
TSN the peer should use to send the next DATA chunk. Note that TSN the peer should use to send the next DATA chunk. The value
an appropriate value should be larger than the highest TSN last SHOULD be the smallest TSN not acknowledged by the receiver of
received plus a delta of at least 2^31 additional TSN's. the request plus 2^31.
G2: Compute an appropriate value for the local endpoints next TSN, G2: Compute an appropriate value for the local endpoints next TSN,
i.e. the receiver of the SSN/TSN reset chunks next TSN to be i.e. the receiver of the SSN/TSN reset chunks next TSN to be
assigned. Note that an appropriate value should be larger than assigned. The value SHOULD be the highest TSN sent by the
the endpoints current next TSN to send by at least one TSN. receiver of the request plus 1.
G3: Do the same processing as if a SACK chunk with no gap report and G3: Do the same processing as if a SACK chunk with no gap report and
a cumulative TSN ACK of Sender's next TSN - 1 was received. a cumulative TSN ACK of Sender's next TSN - 1 was received.
G4: Do the same processing as if an FWD-TSN chunk with all streams G4: Do the same processing as if an FWD-TSN chunk with all streams
affected and a new cumulative TSN ACK of Receiver's next TSN - 1 affected and a new cumulative TSN ACK of Receiver's next TSN - 1
was received. was received.
G5: All incoming and outgoing streams MUST be reset to '0' as the G5: All incoming and outgoing streams MUST be reset to '0' as the
next expected and outgoing stream sequence numbers, next expected and outgoing stream sequence numbers,
skipping to change at page 20, line 6 skipping to change at page 20, line 12
sent to inform the local endpoint that the outbound streams have sent to inform the local endpoint that the outbound streams have
been reset. been reset.
H4: If the request was a SSN/TSN Reset Request new DATA should be H4: If the request was a SSN/TSN Reset Request new DATA should be
sent from Receiver's next TSN and beginning with stream sequence sent from Receiver's next TSN and beginning with stream sequence
number '0' for all outgoing streams. All incoming streams are number '0' for all outgoing streams. All incoming streams are
also reset to '0' as the next expected stream sequence number. also reset to '0' as the next expected stream sequence number.
The peer will send DATA chunks starting with Sender's next TSN. The peer will send DATA chunks starting with Sender's next TSN.
H5: If the request was to add outgoing streams and the result was H5: If the request was to add outgoing streams and the result was
sucessful, the endpoint should add the additional streams to the successful, the endpoint should add the additional streams to
association. Note that an implementation may allocate the the association. Note that an implementation may allocate the
memory at the time of the request, but it MUST NOT use the memory at the time of the request, but it MUST NOT use the
streams until the peer has responded with a postive streams until the peer has responded with a positive
acknowledgment. acknowledgment.
5.3. Various Examples of the Stream Reset procedures 5.3. Various Examples of the Stream Reset procedures
The following example illustrates an Endpoint A resetting all streams
in both directions.
E-A E-Z
----------[STR_RESET(IN-REQ:X|OUT-REQ:X+1,Y-3)]------->
<-[STR_RESET(RESP:Y|OUT-REQ:Y+1,X+1))]---------
-------[STR_RESET(RESP:Y)]----------------->
The following example illustrates an Endpoint A resetting stream 1 The following example illustrates an Endpoint A resetting stream 1
and 2 for just its outgoing streams. and 2 for just its outgoing streams.
E-A E-Z E-A E-Z
-------[STR_RESET(OUT-REQ:X/1,2]------------------> ----------[STR_RESET(OUT-REQ:X/1,2)]---------->
<---[STR_RESET(RESP:X/1,2)]------------ <-------------[STR_RESET(RESP:X)]--------------
The following example illustrates an Endpoint A resetting stream 1 The following example illustrates an Endpoint A resetting stream 1
and 2 for just its incoming streams. and 2 for just its incoming streams.
E-A E-Z E-A E-Z
------[STR_RESET(IN-REQ:X/1,2]-----------> -----------[STR_RESET(IN-REQ:X/1,2)]---------->
<---[STR_RESET(RESP:X/1,2]------- <-----------[STR_RESET(OUT-REQ:Y,X)]-----------
-------------[STR_RESET(RESP:Y)]-------------->
The following example illustrates an Endpoint A resetting all streams
in both directions.
E-A E-Z
-----[STR_RESET(OUT-REQ:X,Y-1)|IN-REQ:X+1]---->
<------[STR_RESET(RESP:X|OUT-REQ:Y,X+1)]-------
-------------[STR_RESET(RESP:Y)]-------------->
The following example illustrates an Endpoint A requesting the The following example illustrates an Endpoint A requesting the
streams and TSN's be reset. At the completion E-A has the new streams and TSN's be reset. At the completion E-A has the new
sending TSN (selected by the peer) of B and E-Z has the new sending sending TSN (selected by the peer) of B and E-Z has the new sending
TSN of A (also selected by the peer). TSN of A (also selected by the peer).
E-A E-Z E-A E-Z
------[STR_RESET(TSN-REQ:X]-----------> ------------[STR_RESET(TSN-REQ:X)]------------>
<---[STR_RESET(RESP:X/S-TSN=A, R-TSN=B]------- <-----[STR_RESET(RESP:X/S-TSN=A, R-TSN=B)]-----
6. Socket API considerations The following example illustrates an Endpoint A requesting to add 3
additional outgoing streams.
E-A E-Z
--------[STR_RESET(ADD_OUT_STRMS:X/3)]-------->
<-------------[STR_RESET(RESP:X)]--------------
6. Socket API Considerations
This section describes how the socket API defined in This section describes how the socket API defined in
[I-D.ietf-tsvwg-sctpsocket] SHOULD be extended to make the features [I-D.ietf-tsvwg-sctpsocket] SHOULD be extended to make the features
of SCTP stream reset available to the application. of SCTP stream reset available to the application.
6.1. Stream Reset event 6.1. Events
The union sctp_notification {} is extended by containing a new field The union sctp_notification {} is extended by containing three new
sn_strreset_event: fields: sn_strreset_event, sn_assocreset_event, and
sn_strchange_event:
union sctp_notification { union sctp_notification {
struct { struct {
uint16_t sn_type; uint16_t sn_type;
uint16_t sn_flags; uint16_t sn_flags;
uint32_t sn_length; uint32_t sn_length;
} sn_header; } sn_header;
... ...
struct sctp_stream_reset_event sn_strreset_event; struct sctp_stream_reset_event sn_strreset_event;
struct sctp_assoc_reset_event sn_assocreset_event;
struct sctp_stream_change_event sn_strchange_event;
... ...
} }
The corresponding sn_type value is SCTP_STREAM_RESET_EVENT. The corresponding sn_type values are given in Table 4.
+--------------------------+----------------------------------------+
| sn_type | valid field in union sctp_notification |
+--------------------------+----------------------------------------+
| SCTP_STREAM_RESET_EVENT | sn_strreset_event |
| SCTP_ASSOC_RESET_EVENT | sn_assocreset_event |
| SCTP_STREAM_CHANGE_EVENT | sn_strchange_event |
+--------------------------+----------------------------------------+
Table 4
These events are delivered when an incoming request was processed
successfully or the processing of an outgoing request has been
finished.
6.1.1. Stream Reset Event
The event delivered has the following structure: The event delivered has the following structure:
struct sctp_stream_reset_event { struct sctp_stream_reset_event {
uint16_t strreset_type; uint16_t strreset_type;
uint16_t strreset_flags; uint16_t strreset_flags;
uint32_t strreset_length; uint32_t strreset_length;
sctp_assoc_t strreset_assoc_id; sctp_assoc_t strreset_assoc_id;
uint16_t strreset_stream_list[]; uint16_t strreset_stream_list[];
}; };
strreset_type: It should be SCTP_STREAM_RESET_EVENT. strreset_type: It should be SCTP_STREAM_RESET_EVENT.
strreset_flags: This field is formed from the bitwise OR of one or strreset_flags: This field is formed from the bitwise OR of one or
more of the following currently defined flags: more of the following currently defined flags:
SCTP_STREAM_RESET_INCOMING_SSN: The peer reset its incoming SCTP_STREAM_RESET_INCOMING_SSN: The streams identifiers given in
streams. strreset_stream_list[] refers to incoming streams of the
endpoint.
SCTP_STREAM_RESET_OUTGOING_SSN: The peer reset its outgoing
streams.
SCTP_STREAM_RESET_SSN_TSN: The peer reset its SSN/TSNs.
SCTP_STREAM_RESET_ADD_STREAMS: The peer added streams. Therefore SCTP_STREAM_RESET_OUTGOING_SSN: The stream identifiers given in
the number of incoming streams has changed. strreset_stream_list[] refers to outgoing streams of the
endpoint.
SCTP_STREAM_RESET_DENIED: The corresponding request was denied by SCTP_STREAM_RESET_DENIED: The corresponding request was denied by
the peer. the peer.
SCTP_STREAM_RESET_FAILED: The corresponding request failed. SCTP_STREAM_RESET_FAILED: The corresponding request failed.
SCTP_STREAM_RESET_ALL_STREAMS: All streams are covered by this At least one of SCTP_STREAM_RESET_INCOMING_SSN and
event. If this flags is not set, only the streams in SCTP_STREAM_RESET_OUTGOING_SSN are set. SCTP_STREAM_RESET_DENIED
strreset_stream_list are affected. and SCTP_STREAM_RESET_FAILED are mutual exclusive. If the request
was successful, none of these are set.
strreset_length: This field is the total length of the delivered strreset_length: This field is the total length of the delivered
event, including the header. event, including the header.
strreset_assoc_id: The association id field, holds the identifier strreset_assoc_id: The association id field, holds the identifier
for the association. All notifications for a given association for the association. All notifications for a given association
have the same association identifier. For one-to-one style have the same association identifier. For one-to-one style
socket, this field is ignored. socket, this field is ignored.
strreset_stream_list: The list of stream identifiers this event strreset_stream_list: The list of stream identifiers this event
refers to. An empty list identifies ALL streams has being reset. refers to. An empty list identifies all streams as being reset.
Depending on strreset_flags the identifiers refer to incoming or
outgoing streams or both.
6.1.2. Association Reset Event
The event delivered has the following structure:
struct sctp_assoc_reset_event {
uint16_t assocreset_type;
uint16_t assocreset_flags;
uint32_t assocreset_length;
sctp_assoc_t assocreset_assoc_id;
uint32_t assocreset_local_tsn;
uint32_t assocreset_remote_tsn;
};
assocreset_type: It should be SCTP_ASSOC_RESET_EVENT.
assocreset_flags: This field is formed from the bitwise OR of one or
more of the following currently defined flags:
SCTP_ASSOC_RESET_DENIED: The corresponding outgoing request was
denied by the peer.
SCTP_ASSOC_RESET_FAILED: The corresponding outgoing request
failed.
SCTP_ASSOC_RESET_DENIED and SCTP_ASSOC_RESET_FAILED are mutual
exclusive. If the request was successful, none of these are set.
assocreset_length: This field is the total length of the delivered
event, including the header.
assocreset_assoc_id: The association id field, holds the identifier
for the association. All notifications for a given association
have the same association identifier. For one-to-one style
socket, this field is ignored.
assocreset_local_tsn: The next TSN used by the endpoint.
assocreset_remote_tsn: The next TSN used by the peer.
6.1.3. Stream Change Event
The event delivered has the following structure:
struct sctp_stream_change_event {
uint16_t strchange_type;
uint16_t strchange_flags;
uint32_t strchange_length;
sctp_assoc_t strchange_assoc_id;
uint16_t strchange_instrms;
uint16_t strchange_outstrms;
};
strchange_type: It should be SCTP_STREAM_CHANGE_EVENT.
strchange_flags: This field is formed from the bitwise OR of one or
more of the following currently defined flags:
SCTP_STREAM_CHANGE_DENIED: The corresponding request was denied
by the peer.
SCTP_STREAM_CHANGE_FAILED: The corresponding request failed.
SCTP_STREAM_CHANGE_DENIED and SCTP_STREAM_CHANGE_FAILED are mutual
exclusive. If the request was successful, none of these are set.
strchange_length: This field is the total length of the delivered
event, including the header.
strchange_assoc_id: The association id field, holds the identifier
for the association. All notifications for a given association
have the same association identifier. For one-to-one style
socket, this field is ignored.
strchange_instrms: The number of streams that the peer is allowed to
use outbound.
strchange_outstrms: The number of streams that the endpoint is
allowed to use outbound.
6.2. Event Subscription 6.2. Event Subscription
There are two methods defined in the SCTP socket API to subscribe to There are two methods defined in the SCTP socket API to subscribe to
events. The original method defined was an events structure with the events. The original method defined was an events structure with the
socket option SCTP_EVENTS. Some implementations may have already socket option SCTP_EVENTS. Some implementations may have already
expanded their data structure for this API to include the stream expanded their data structure for this API to include the stream
reset subscriptions. The new API is to use a setsockopt with the reset subscriptions. The new API is to use a setsockopt with the
SCTP_SET_EVENT socket option. This option takes a structure that SCTP_SET_EVENT socket option. This option takes a structure that
defines the association, the event type (using the same value found defines the association, the event type (using the same value found
in the event type field) and a on/off boolean. This newer API is the in the event type field) and a on/off boolean. This newer API is the
preferred method but we define both methods for compatability. preferred method but we define both methods for compatibility.
For some implementations the structure now takes on the form: For some implementations the structure now takes on the form:
struct sctp_event_subscribe { struct sctp_event_subscribe {
uint8_t sctp_data_io_event; uint8_t sctp_data_io_event;
uint8_t sctp_association_event; uint8_t sctp_association_event;
uint8_t sctp_address_event; uint8_t sctp_address_event;
uint8_t sctp_send_failure_event; uint8_t sctp_send_failure_event;
uint8_t sctp_peer_error_event; uint8_t sctp_peer_error_event;
uint8_t sctp_shutdown_event; uint8_t sctp_shutdown_event;
uint8_t sctp_partial_delivery_event; uint8_t sctp_partial_delivery_event;
uint8_t sctp_adaptation_layer_event; uint8_t sctp_adaptation_layer_event;
uint8_t sctp_authentication_event; uint8_t sctp_authentication_event;
uint8_t sctp_sender_dry_event; uint8_t sctp_sender_dry_event;
uint8_t sctp_stream_reset_event; uint8_t sctp_stream_reset_event;
uint8_t sctp_assoc_reset_event;
uint8_t sctp_stream_change_event;
}; };
For those implementations that support this method simply putting a 1 For those implementations that support this method simply putting a 1
or 0 in the sctp_stream_reset_event and setting the SCTP_EVENTS or 0 in the sctp_stream_reset_event and setting the SCTP_EVENTS
socket option will work.However not all implementations support this socket option will work. However not all implementations support
method. this method.
The prefered method is to use the SCTP_SET_EVENT socket option and The preferred method is to use the SCTP_SET_EVENT socket option and
fill in the structure sctp_set_event structure. fill in the structure sctp_set_event structure.
struct sctp_set_event { struct sctp_set_event {
sctp_assoc_t se_assoc_id; sctp_assoc_t se_assoc_id;
uint16_t se_type; uint16_t se_type;
uint8_t se_on; uint8_t se_on;
}; };
Using this method, the user fill in the se_type with the same value Using this method, the user fill in the se_type with the same value
found in strreset_type field i.e. SCTP_STREAM_RESET_EVENT. The user found in strreset_type field i.e. SCTP_STREAM_RESET_EVENT. The user
will also fill in the se_assoc_id field with either the association will also fill in the se_assoc_id field with either the association
to set this event on (this field is ignored for one-to-one style to set this event on (this field is ignored for one-to-one style
sockets) or one of the reserved contstant values defined in the sockets) or one of the reserved constant values defined in the socket
socket API document. Finally the se_on field is set with a 1 to API document. Finally the se_on field is set with a 1 to enable the
enable the event or a 0 to disable the event. event or a 0 to disable the event.
6.3. Socket Options 6.3. Socket Options
The following table describes the new socket options which make the The following table describes the new socket options which make the
SCTP stream reset features accessible to the user. They all use SCTP stream reset features accessible to the user. They all use
IPPROTO_SCTP as their level. IPPROTO_SCTP as their level.
+--------------------------+---------------------------+-----+-----+ +--------------------------+---------------------------+-----+-----+
| option name | data type | get | set | | option name | data type | get | set |
+--------------------------+---------------------------+-----+-----+ +--------------------------+---------------------------+-----+-----+
| SCTP_STREAM_RESET_EVENT | struct sctp_tlv | X | X |
| SCTP_ENABLE_STREAM_RESET | struct sctp_assoc_value | X | X | | SCTP_ENABLE_STREAM_RESET | struct sctp_assoc_value | X | X |
| SCTP_RESET_STREAMS | struct sctp_reset_streams | | X | | SCTP_RESET_STREAMS | struct sctp_reset_streams | | X |
| SCTP_RESET_SSN_TSN | sctp_assoc_t | | X | | SCTP_RESET_ASSOC | sctp_assoc_t | | X |
| SCTP_ADD_STREAMS | struct sctp_assoc_value | | X | | SCTP_ADD_OUT_STREAMS | struct sctp_assoc_value | | X |
+--------------------------+---------------------------+-----+-----+ +--------------------------+---------------------------+-----+-----+
Table 4 Table 5
6.3.1. Enable/Disable Stream Reset (SCTP_ENABLE_STREAM_RESET) 6.3.1. Enable/Disable Stream Reset (SCTP_ENABLE_STREAM_RESET)
This option allows a user to control whether the SCTP implementation This option allows a user to control whether the SCTP implementation
processes or denies incoming requests in STREAM_RESET chunks. processes or denies incoming requests in STREAM_RESET chunks.
The default is not to process incoming requests. The default is not to process incoming requests.
To set or get this option the user fills in the following structure: To set or get this option the user fills in the following structure:
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 is ignored for one-to-one style sockets. assoc_id: This parameter is ignored for one-to-one style sockets.
For one-to-many style sockets this parameter indicates which For one-to-many style sockets this parameter indicates which
association the user is performing an action upon. association the user is performing an action upon.
assoc_value: If this parameter is zero the processing of incoming assoc_value: It is formed from the bitwise OR of one or more of the
requests will be denied. If it is non-zero incoming requests will following currently defined flags:
be processed.
SCTP_DENY_RESET_IN_STREAM_REQ: Deny received Incoming SSN Reset
Requests if this flag is set, process it if not.
SCTP_DENY_RESET_OUT_STREAM_REQ: Deny received Outgoing SSN Reset
Requests if this flag is set, process it if not.
SCTP_DENY_RESET_ASSOC_REQ: Deny received SSN/TSN Reset Requests
if this flag is set, process it if not.
SCTP_DENY_CHANGE_ASSOC_REQ: Deny received Add Outgoing Streams
Requests if this flag is set, process it if not.
The default value is ~(SCTP_DENY_IN_STREAM_RESET|
SCTP_DENY_OUT_STREAM_RESET|SCTP_DENY_ASSOC_RESET|
SCTP_DENY_ASSOC_CHANGE)
Please note that using the option does not have any impact on
subscribing to any related events.
6.3.2. Reset Incoming and/or Outgoing Streams (SCTP_RESET_STREAMS) 6.3.2. Reset Incoming and/or Outgoing Streams (SCTP_RESET_STREAMS)
This option allows the user to request the reset incoming and/or This option allows the user to request the reset incoming and/or
outgoing streams. outgoing streams.
To set or get this option the user fills in the following structure: To set or get this option the user fills in the following structure:
struct sctp_reset_streams { struct sctp_reset_streams {
sctp_assoc_t srs_assoc_id; sctp_assoc_t srs_assoc_id;
skipping to change at page 25, line 20 skipping to change at page 27, line 38
following currently defined flags: following currently defined flags:
* SCTP_STREAM_RESET_INCOMING * SCTP_STREAM_RESET_INCOMING
* SCTP_STREAM_RESET_OUTGOING * SCTP_STREAM_RESET_OUTGOING
srs_number_streams: This parameter is the number of elements in the srs_number_streams: This parameter is the number of elements in the
srs_stream_list. If it is zero, the operation is performed on all srs_stream_list. If it is zero, the operation is performed on all
streams. streams.
srs_stream_list: This parameter contains a list of stream identifier srs_stream_list: This parameter contains a list of stream
on which the operation is performed on. It contains identifiers on which the operation is performed on. It contains
srs_number_streams elements. If it is empty, the operation is srs_number_streams elements. If it is empty, the operation is
performed on all streams. performed on all streams. Depending on srs_flags the identifiers
refer to incoming or outgoing streams or both.
6.3.3. Reset SSN/TSN (SCTP_RESET_SSN_TSN) 6.3.3. Reset SSN/TSN (SCTP_RESET_ASSOC)
This option allows a user to request the reset the SSN/TSN. This option allows a user to request the reset the SSN/TSN.
To set this option the user provides an option_value of type To set this option the user provides an option_value of type
sctp_assoc_t. sctp_assoc_t.
On one-to-one style sockets the option_value is ignored. For one-to- On one-to-one style sockets the option_value is ignored. For one-to-
many style sockets the option_value is the association identifier of many style sockets the option_value is the association identifier of
the association on which the action is to be performed on. the association on which the action is to be performed on.
6.3.4. Add Outgoing Streams (SCTP_ADD_STREAMS) 6.3.4. Add Outgoing Streams (SCTP_ADD_OUT_STREAMS)
This option allows a user to request the addition a number of This option allows a user to request the addition a number of
outgoing streams. outgoing streams.
To set this option the user fills in the following structure: To set this option the user fills in the following structure:
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;
}; };
skipping to change at page 26, line 4 skipping to change at page 28, line 17
This option allows a user to request the addition a number of This option allows a user to request the addition a number of
outgoing streams. outgoing streams.
To set this option the user fills in the following structure: To set this option the user fills in the following structure:
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 is ignored for one-to-one style sockets. assoc_id: This parameter is ignored for one-to-one style sockets.
For one-to-many style sockets this parameter indicates which For one-to-many style sockets this parameter indicates which
association the user is performing an action upon. association the user is performing an action upon.
assoc_value: This parameter is the number of outgoing streams to assoc_value: This parameter is the number of outgoing streams to
add. add.
An endpoint can limit the number of incoming streams by using the
sinit_max_instreams field in the struct sctp_initmsg{} when issuing
an SCTP_INIT socket option, as defined in
[I-D.ietf-tsvwg-sctpsocket]. An incoming request asking for more
streams than allow will be denied.
7. Security Considerations 7. Security Considerations
Having the ability to reset a stream should not pose any additional Having the ability to reset a stream should not pose any additional
security risk to SCTP. An attacker that can successfully inject a security risk to SCTP. An attacker that can successfully inject a
stream reset would also be able to inject data or other malicious stream reset would also be able to inject data or other malicious
information into an association such as an ABORT. information into an association such as an ABORT.
8. IANA Considerations 8. IANA Considerations
[NOTE to RFC-Editor: [NOTE to RFC-Editor:
skipping to change at page 27, line 27 skipping to change at page 29, line 43
Chunk Parameter Type Value Chunk Parameter Type Value
-------------------- ---------- -------------------- ----------
Outgoing SSN Reset Request Parameter 13 (0x000d) Outgoing SSN Reset Request Parameter 13 (0x000d)
Incoming SSN Reset Request Parameter 14 (0x000e) Incoming SSN Reset Request Parameter 14 (0x000e)
SSN/TSN Reset Request Parameter 15 (0x000f) SSN/TSN Reset Request Parameter 15 (0x000f)
Stream Reset Response Parameter 16 (0x0010) Stream Reset Response Parameter 16 (0x0010)
Add Outgoing Streams Request Parameter 17 (0x0011) Add Outgoing Streams Request Parameter 17 (0x0011)
9. Acknowledgments 9. Acknowledgments
The authors wish to thank Paul Aitken, Irene Ruengeler, and Robin The authors wish to thank Paul Aitken, Kacheong Poon, Irene
Seggelmann for there invaluable comments. Ruengeler, Robin Seggelmann, and Vlad Yasevich for there invaluable
comments.
10. References 10. References
10.1. Normative References 10.1. Normative References
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", BCP 14, RFC 2119, March 1997. Requirement Levels", BCP 14, RFC 2119, March 1997.
[RFC4960] Stewart, R., "Stream Control Transmission Protocol", [RFC4960] Stewart, R., "Stream Control Transmission Protocol",
RFC 4960, September 2007. RFC 4960, September 2007.
[RFC5061] Stewart, R., Xie, Q., Tuexen, M., Maruyama, S., and M. [RFC5061] Stewart, R., Xie, Q., Tuexen, M., Maruyama, S., and M.
Kozuka, "Stream Control Transmission Protocol (SCTP) Kozuka, "Stream Control Transmission Protocol (SCTP)
skipping to change at page 28, line 4 skipping to change at page 30, line 23
Kozuka, "Stream Control Transmission Protocol (SCTP) Kozuka, "Stream Control Transmission Protocol (SCTP)
Dynamic Address Reconfiguration", RFC 5061, Dynamic Address Reconfiguration", RFC 5061,
September 2007. September 2007.
10.2. Informative References 10.2. Informative References
[I-D.ietf-tsvwg-sctpsocket] [I-D.ietf-tsvwg-sctpsocket]
Stewart, R., Poon, K., Tuexen, M., Yasevich, V., and P. Stewart, R., Poon, K., Tuexen, M., Yasevich, V., and P.
Lei, "Sockets API Extensions for Stream Control Lei, "Sockets API Extensions for Stream Control
Transmission Protocol (SCTP)", Transmission Protocol (SCTP)",
draft-ietf-tsvwg-sctpsocket-19 (work in progress), draft-ietf-tsvwg-sctpsocket-21 (work in progress),
February 2009. February 2010.
URIs URIs
[1] <http://www.iana.org/assignments/sctp-parameters> [1] <http://www.iana.org/assignments/sctp-parameters>
Authors' Addresses Authors' Addresses
Randall R. Stewart Randall R. Stewart
Huawei Huawei
Chapin, SC 29036 Chapin, SC 29036
 End of changes. 48 change blocks. 
100 lines changed or deleted 235 lines changed or added

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