The SCTP protocol is a relatively new protocol that is an alternative to UDP and TCP. It has a couple of really interesting capabilities:

  • support for multiple streams that run in parallel

  • support for acknowledgement and replay quality ranging from UDP’s just-drop-it to TCP’s block-until-it-gets-through

  • support for multi-homed endpoints, even supporting a mixture of IPv4 and IPv6 addresses

Now imagine using SCTP for the next connection to your favourite media website.  You’d reserve a TCP-quality stream to exchange HTTP, and another over which you’d receive media, perhaps in an RTP flow, with UDP style (if it needs to be interactive) or a maximum resend attempt timer (if it isn’t live and can suffer the delay of buffering).  And imagine that the web frontend relays your request over SCTP to a media server in its backend.  Then, if the backend can find what you are looking for, the web portal connects you directly to the backend and you can enjoy the media without the hickups that would occur if the media was served over HTTP with full-blown TCP connection quality.

What we would like to see verified is if the following is possible, and if so, a bit of C code to demonstrate this fact:

  1. Setup an SCTP session from party A to B

  2. Setup an SCTP session from party B to C

  3. Let B add the address of C to the session between A and B

  4. Let B add the address of A to the session between B and C

  5. Figure out what it takes to get one of the streams between A and C to communicate directly

  6. B should ask C to make this switch for one stream only; it may need to sync stream sequence numbers, perhaps through the Partial Reliability extension

  7. The code on A and C that runs over that one stream may explicitly mention the target socket in sendmsg() and/of recvmsg()

  8. Look for race conditions where B sends sequence numbers to C (or A) while C (or A) is just sending a new message

  9. Demonstrate that other streams between A and B continue as before, as well as between B and C

  10. Demonstrate that this is compatible with the SCTP RFCs

  11. If this is not possible, then explain the conflict based on the RFCs — and be sure to ask us if we see a way out

Please understand that this assignment cannot be done without some experience in network stack programming in C.  The socket interface should be addressed directly to get the best out of it. Another requirement for students undertaking this assignment is the ability to understand RFCs.