From sacadmin Fri Jun 18 09:53:54 2004
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Date: Fri, 18 Jun 2004 12:53:12 -0400
From: James Carlson <james.d.carlson@sun.com>
To: psarc@sac.sfbay.sun.com
cc: "venugopal v. iyer" <venu.iyer@sun.com>
Subject: 2004/507 SCTP Partial Reliability
Content-Length: 7894

I'm sponsoring this fast-track request for Venu Iyer.  The timer is
set to 06/25/2004.  (As with just about every case these days, he's
aiming at the last S10 build, and would appreciate getting any issues
out in the open quickly.  The RFC describes the details of what
"partial reliability" does, but doesn't give a socket interface.  This
case aims to provide a provisional interface in advance of any
standard -- and perhaps to set the standard.  Thus, the intent is
eventually Unstable -> Standard.)


BACKGROUND

PSARC 2003/586 added RFC 2960 - Stream Control Transmission Protocol (SCTP) -
support in Solaris. RFC 3758 describes an extension to SCTP that provides
partially reliable data services to an upper layer protocol. RFE 5048344
proposes to add this SCTP extension which requires adding a couple of flags
and a new socket option to those introduced by PSARC 2003/586. The
term PR-SCTP is used henceforth to refer to the functionality provided by
RFC 3758.

RELEASE BINDING/STABLILITY LEVEL

Minor/Unstable

DETAILS

RFE 5048344 proposes to make the following changes:

Socket Option - SCTP_PRSCTP
---------------------------
Per RFC 3758 an SCTP endpoint should be able to indicate whether it wants
to enable PR-SCTP or not. For this purpose a new socket option is introduced.
The socket option is in addition to the existing socket options introduced
by PSARC 2003/586 at the IPPROTO_SCTP level.

The new socket option added by RFE 5048344 will be called SCTP_PRSCTP.
An endpoint can indicate that it supports PR-SCTP by enabling this socket
option, prior to establishing an association, using setsockopt() as

	setsockopt(sd, IPPROTO_SCTP, SCTP_PRSCTP, &onoff, sizeof (onoff));
	where,
		sd is the socket descriptor
		onoff is an integer with a value of 1 (enable) or 0 (disable)

An endpoint can determine if PR-SCTP is enabled using getsockopt() as
	getsockopt(sd, IPPROTO_SCTP, SCTP_PRSCTP, &onoff, &len)
	where,
		sd is the socket descriptor
		onoff is an integer which will, on return, have 1 if PR-SCTP
		    is enabled, and 0 otherwise.
		len is socklen_t, initially sizeof (integer)

SCTP_PRSCTP will be defined in netinet/sctp.h as:
	#define SCTP_PRSCTP	23

Flag for Partially Reliable Messages - MSG_PR_SCTP
---------------------------------------------------
Additionally, a new flag is made available for applications to specify
if a message is partially reliable. This flag will be set by an application
in the sctp_sndrcvinfo ancillary data structure that will accompany the
partially reliable message.

Currently, PSARC 2003/586 defines the following flags:

		MSG_UNORDERED
		MSG_ABORT
		MSG_EOF
		MSG_ADDR_OVER

RFE 5048344 plans to add:
		MSG_PR_SCTP

MSG_PR_SCTP will be defined in netinet/sctp.h as:
	#define MSG_PR_SCTP	0x10


Flag to indicate if an association has PR-SCTP enabled - SCTP_PRSCTP_CAPABLE
----------------------------------------------------------------------------
Another flag is added which will be set by SCTP in the 'sac_flags' field
in the sctp_assoc_change structure. Currently, there are no flags defined for
'sac_flags'. An SCTP_ASSOC_CHANGE event is sent by SCTP, with the
sctp_assoc_change appropriately filled, to the upper layer when an association
is established (if the upper layer has subscribed to this event).  The
sctp_assoc_change structure contains information about the association and
will have SCTP_PRSCTP_CAPABLE set in 'sac_flags' if  PR-SCTP is enabled on
the association.

SCTP_PRSCTP_CAPABLE is defined in netinet/sctp.h as:
	#define SCTP_PRSCTP_CAPABLE	0x01

MAN PAGE CHANGES

RFE 5048497 will make corresponding man page changes for this.

sctp_opt_info(3SOCKET)

*** sctp_opt_info_3socket	Mon Mar  8 15:12:38 2004
--- sctp_opt_info_3socket.5048344	Mon May 17 09:47:54 2004
***************
*** 102,107 ****
--- 102,108 ----
  						MSG_ADDR_OVER
  						MSG_ABORT
  						MSG_EOF
+ 						MSG_PR_SCTP
  			sinfo_ppid	Default payload protocol identifier
  					for sendmsg()
  			sinfo_context	Default context for sendmsg()
***************
*** 109,117 ****
  					The time to live in milliseconds for
  					a message on the sending side. The
  					message will expire if the sending
! 					side has not sent it within the
! 					specified time period. A value of 0
  					indicates the message does not expire.
  			sinfo_tsn	Always returned as 0.
  			sinfo_cumtsn	Always returned as 0.
  			sinfo_assoc_id	Filled in by the caller to specify
--- 110,129 ----
  					The time to live in milliseconds for
  					a message on the sending side. The
  					message will expire if the sending
! 					side has not started the first
! 					transmission for this message within
! 					the specified time period. If the
! 					sending side has started the first
! 					transmission before the time period
! 					expires, the message is sent as a
! 					normal reliable message. A value of 0
  					indicates the message does not expire.
+ 					Additionally, if MSG_PR_SCTP is set
+ 					(in sinfo_flags), then the message
+ 					expires if the entire message has not
+ 					been transmitted within the time
+ 					period (even if transmission has
+ 					already started).
  			sinfo_tsn	Always returned as 0.
  			sinfo_cumtsn	Always returned as 0.
  			sinfo_assoc_id	Filled in by the caller to specify

*** sctp_sendmsg_3socket	Tue Mar  9 12:10:54 2004
--- sctp_sendmsg_3socket.5048344.0618	Fri Jun 18 08:41:40 2004
***************
*** 28,35 ****
  				identifier
  		stream_no	the target stream for this message
  		timetolive	the time period, in milliseconds, after
! 				which the message expires if it has
! 				not been sent to the peer.
  		context		a value that is returned back if an error
  				occurs on the send of this message.
  				
--- 28,39 ----
  				identifier
  		stream_no	the target stream for this message
  		timetolive	the time period, in milliseconds, after
! 				which the message expires if transmission for
! 				the message has not been started. If 
! 				MSG_PR_SCTP is set in 'flags', then the
! 				message expires even if transmission has
! 				started. A value of '0' indicates that the
! 				message does not expire.
  		context		a value that is returned back if an error
  				occurs on the send of this message.
  				
***************
*** 52,57 ****
--- 56,71 ----
  			the specified association (one-to-many style SCTP
  			socket only).
  
+ 	MSG_PR_SCTP	This flag indicates that the message is to be treated
+ 			as a partially reliable message. The message will
+ 			expire unless the entire message as been successfully
+ 			transmitted by the time period specified in the
+ 			'timetolive' parameter.
+ 			Note that MSG_PR_SCTP implements "timed reliability"
+ 			service for SCTP messages and this interface is
+ 			unstable since there is no common standard, as yet,
+ 			defined for this service.
+ 
  RETURN VALUES
  	sctp_sendmsg() returns the number of bytes sent, or -1 if an error
  	occurred.


SUMMARY

RFE 5048344 proposes to add the functionality defined in RFC 3758. It
introduces the following in order to do so:

	1. A new socket option at the IPPROTO_SCTP level - 'SCTP_PRSCTP'
	2. A new flag for an application to indicate if a message is
	   partially reliable - 'MSG_PR_SCTP'
	3. A new flag for SCTP to indicate (as an event) to the upper layer
	   if PR-SCTP is enabled on an association - 'SCTP_PRSCTP_CAPABLE'

All the 3 will be defined in netinet/sctp.h


REFERENCES

PSARC/2003/586	: Implementing SCTP in SunOS
		  http://sac.sfbay.sun.com/Archives/CaseLog/arc/PSARC/2003/586/
RFC 2960	: Stream Control Transmission Protocol
		  http://ietf.org/rfc/rfc2960.txt
RFC 3758	: Stream Control Transmission Protocol (SCTP)
		  Partial Reliability Extension
		  http://www.ietf.org/rfc/rfc3758.txt
RFE 5048344	: need to add Partial Reliability extension to SCTP
RFE 5048497	: need man page modifications for PR-SCTP
Project URL	: http://snt.eng.sun.com/sctp/

From sacadmin Wed Jun 23 11:25:35 2004
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Date: Wed, 23 Jun 2004 14:23:54 -0400
From: James Carlson <james.d.carlson@sun.com>
To: psarc@sac.sfbay.sun.com
cc: "venugopal v. iyer" <venu.iyer@sun.com>
Subject: Re: 2004/507 SCTP Partial Reliability
Content-Length: 376

This case was approved during ARC business at today's meeting.  I have
deposited a copy of the final specification as 'spec.txt' in the case
directory.

-- 
James Carlson, IP Systems Group                <james.d.carlson@sun.com>
Sun Microsystems / 1 Network Drive         71.234W   Vox +1 781 442 2084
MS UBUR02-212 / Burlington MA 01803-2757   42.497N   Fax +1 781 442 1677

