Bug 48918 - Add support for SCTP beyond opening an SCTP socket.
Summary: Add support for SCTP beyond opening an SCTP socket.
Status: NEW
Alias: None
Product: APR
Classification: Unclassified
Component: APR (show other bugs)
Version: 1.4.5
Hardware: All All
: P2 enhancement (vote)
Target Milestone: ---
Assignee: Apache Portable Runtime bugs mailinglist
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-03-15 19:02 UTC by Jon Leighton
Modified: 2011-12-01 19:15 UTC (History)
1 user (show)



Attachments
Support for additional SCTP functionality (36.71 KB, patch)
2010-03-15 19:15 UTC, Jon Leighton
Details | Diff
adds support for non-Windows platforms (15.87 KB, patch)
2011-12-01 19:13 UTC, Jon Leighton
Details | Diff
adds support for Windows XP (requires main) (21.90 KB, patch)
2011-12-01 19:14 UTC, Jon Leighton
Details | Diff
adds support for SCTP tests on all platforms (31.15 KB, patch)
2011-12-01 19:15 UTC, Jon Leighton
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jon Leighton 2010-03-15 19:02:40 UTC
APR has supported using SCTP socket for many years, but it does not support access to the many features of SCTP.  I am proposing to add support for sctp_sendmsg() and sctp_recvmsg(), as well as methods to get and set the many SCTP socket options that are not simply on/off options.
Comment 1 Jon Leighton 2010-03-15 19:15:12 UTC
Created attachment 25133 [details]
Support for additional SCTP functionality 

I've attached a patch that adds the following new functions:

apr_socket_sctp_sendmsg()
apr_socket_sctp_recvmsg()
apr_socket_opt_set_sctp()
apr_socket_opt_get_sctp()

The patch also adds support for the SCTP on/off socket option SCTP_USE_EXT_RCVINFO, and adds SCTP socket test code to several files in the test directory, as well as adding an additional file called testsockopt_sctp.c.
Comment 2 preethi.cis 2010-03-19 00:16:58 UTC
The bigger picture with this effort is to add SCTP streams support into Apache's APR and httpd server. 

The current HTTP over SCTP design (http://tools.ietf.org/html/draft-natarajan-http-over-sctp-01) exploits SCTP streams to avoid head-of-line blocking. SCTP (RFC 4960) also offers other services unavailable in TCP such as unordered delivery, partially reliable transmission, message based transfer, multihoming support, more
secure connection establishment with a cookie mechanism and so on. 

Our empirical study has shown that HTTP over SCTP streams improves HTTP response times, and created a lot of interest at IETF's http-bis WG.

Jon Leighton (who submitted this patch) has been working with mozilla to get HTTP/SCTP into Firefox and NSPR's source repositories (https://bugzilla.mozilla.org/show_bug.cgi?id=486199). Our hope is to do something similar with APR and httpd. 

We'd appreciate any comments/suggestions on the patch. Thanks!
Comment 3 Dan Poirier 2010-03-19 14:16:44 UTC
Extending support beyond just Mac OS X and FreeBSD might increase interest.  According to Wikipedia, Linux, AIX, HP-UX, and Solaris all support SCTP, and others; any reason not to include them?
Comment 4 Jon Leighton 2010-03-19 15:27:07 UTC
(In reply to comment #3)
> Extending support beyond just Mac OS X and FreeBSD might increase interest. 
> According to Wikipedia, Linux, AIX, HP-UX, and Solaris all support SCTP, and
> others; any reason not to include them?

The patch should support FreeBSD, Mac OS X, Linux, Solaris and Open Solaris, though I haven't yet tested it on either Solaris or OpenSolaris.  If you have trouble getting the patch to work on any of those systems I would like to know about it.  AIX and HP-UX are more of a problem because they are proprietary and not widely available (in the same way and Mac OS X and Windows are).  I would be very interested in hearing from anyone that has access to either AIX or HP-UX and is willing to test out the patch.  I'm guessing you concluded that the patch only supported FreeBSD and Mac OS X because my modifications to configure.in explicity check for those two OSes.  The OS check is there because only the FreeBSD and Mac OS X implementations of SCTP currently support the SCTP_USE_SCTP_RCVINFO socket option.

- Jon
Comment 5 preethi.cis 2010-04-28 20:35:34 UTC
Hello, 

Wondering if our patch worked on Linux and other platforms. We'd really appreciate any feedback/comments on the patch. Thanks!
Comment 6 Jon Leighton 2011-12-01 19:12:33 UTC
I've updated the patch and would very much appreciate any feedback.  The patch has been tested on recent versions of FreeBSD, Linux, Mac OS X, Solaris, Solaris Express, and Windows XP.  I'm now working on updating this from 1.4.5 to trunk and will then add support for more recent versions of Windows.

The patch is broken into three files:
apr-1.4.5_sctp_main.patch - adds support for non-Windows platforms
apr-1.4.5_sctp_win32.patch - adds support for Windows XP (requires main)
apr_1.4.5_sctp_test.patch - adds support for tests on all platforms (requires main and win32)

Support for SCTP on Mac OS X requires installing the SCTP network kernel extension from http://sctp.fh-muenster.de/sctp-nke.html

Support for SCTP on Windows requires installing the SCTP driver and library from http://www.bluestop.org/SctpDrv

All other platforms have native support for SCTP.
Comment 7 Jon Leighton 2011-12-01 19:13:47 UTC
Created attachment 28014 [details]
adds support for non-Windows platforms
Comment 8 Jon Leighton 2011-12-01 19:14:40 UTC
Created attachment 28015 [details]
adds support for Windows XP (requires main)
Comment 9 Jon Leighton 2011-12-01 19:15:42 UTC
Created attachment 28016 [details]
adds support for SCTP tests on all platforms