Hello,
I've been working on this patch to make apr and httpd work with SCTP streams.
Stream Control Transmission Protocol (SCTP - RFC2960) is a transport layer
protocol capable of providing reliable (in-order, no loss, no duplicates,
no error) message oriented service to application.
Other interesting features of SCTP include multistreaming (many logical pipes
in 1 SCTP association to transfer independent data like web objects without
head of line blocking problem) and multihoming (ability to support more than
1 interface/IP address at a SCTP endpoint).
The idea was to enable httpd to receive HTTP request on a particular SCTP
stream and send the HTTP response on the same stream. Using different SCTP
streams for independent objects might improve performance (preventing HOL as
mentioned above).
apr-0.9.2 included recognition and support for SCTP from Randall Stewart.
I did my changes on top of this.
To give an outline of the implementation with the files involved in case
of APR:
o I created apr_socket_send_sctp and apr_socket_recv_sctp which take an extra
parameter - SCTP stream id. The recv function uses recvmsg function call and
gets the SCTP stream id on which the request came in. Similarly, sendmsg call
is used in apr_socket_send_sctp (sendrecv.c in network_io/unix).
o I didnt want to change the signature of any other function so I decided to
use buckets to pass the stream id info to and fro. The socket bucket read puts
the stream id (from socket recv) in a heap bucket and the caller takes the
responsibility of retrieving this. (apr_buckets_socket.c, apr_brigade.c).
Apart from this, there are changes to httpd.
Currently, I have this patch working for httpd-2.0.55/apr-0.9.6.
I contacted the httpd dev mailing list and they would like a patch against
the httpd trunk for the httpd part. They also pointed me to contact the
APR dev mailing list regarding the APR part of the patch. Was
wondering how I should provide the patch for APR.
Would appreciate any feedback,
Preethi