On 29.05.2008, at 16:52, Jens Alfke wrote: SCTP (Stream Control Transmission Protocol) is a relatively new transport protocol that has some benefits over TCP in that it's message-oriented and supports multiple streams. It's major enough to have deserved several chapters' worth of coverage in the 2004 edition of "Unix Network Programming", and it's implemented in almost all other Unix-based operating systems[1], but I can't find any mention of Mac OS X support.
SCTP is not supported in MacOS X at the current time by Apple but there are others who did the hard work:
There is a userland implementation ( www.sctp.de) which has its limitations mainly due to multihoming (Userspace has no control over which interface packets get sent out) and of course the limitation that if your Application crashes, the peers are left in a undefined state and might take a while to recover if you restart your application.
There is a kernel space impelmentation (patch to kernel) and a KEXT implementation. The KEXT implementation depends on a Kernel API which is not public to attach a protocol on top of IP. So the drawback is that the KEXT is kernel version depenent and for every 10.5.x you need to produce a new version (or like since 10.4.6 simply update the plist file to adapt to the newer version of the kernel API).
Its written by Randal Steward, Peter Lei, Michael Tüxen and a few other experienced folks. Names you will find on some SCTP related RFC's as well.
That version can be checked out from CVS by doing:
(password sctp)
You can build it in Xcode from project file in KERN/nke/sctp_nke/Tiger or KERN/nke/sctp_nke/Leopard/.
To install you need to put the following files into place:
/usr/lib/libsctp.dylib /usr/include/netinet/sctp.h /usr/include/netinet/sctp_uio.h /System/Library/Extensions/SCTP.kext /System/Library/Extensions/SCTP.kext/Contents /System/Library/Extensions/SCTP.kext/Contents/Info.plist /System/Library/Extensions/SCTP.kext/Contents/MacOS/SCTP /System/Library/Extensions/SCTP.kext/Contents/Resources/English.lproj /System/Library/Extensions/SCTP.kext/Contents/Resources/English.lproj/InfoPlist.strings
File /System/Library/Extensions/SCTP.kext/Contents/Info.plist must have the correct kernel version or the extension wont load. To load the kernel extension use kextload.
I can also provide an SCTP.pkg which includes a startup script to load it at boot and automatically patch the plist for the likely case there will be a 10.5.4 one day and the API has not changed.
We used the userland implementation for our SS7 GSM-MAP stack a few years ago but moved on to the kernel SCTP extension. The Kernel SCTP is same source as in FreeBSD kernel now (and I think NetBSD too). It is in stable state. We use it daily to transport millions of SMS and we did not had any issues with it since its adaption to Leopard. SCTP is mandatory in many telecommunications areas which is our core business.
For the Apple folks reading this list, Radar #3800302 is the key one which is unfortunately over 3 years old by now.
Its time for Apple to roll in SCTP into the kernel in my opinion. I've had discussions about this with various folks at WWDC 2005/WWDC 2006 and probably again at WWDC2008. The problem with the kext is that there is no public API to install a protocol on top of IP. As there are not that many protocols out there and not likely many coming, that API has always been kept internal but in fact hasn't really changed since 10.4.3 (which saved our lives). So either that API has to be made public so that SCTP implementation won't stay kernel version dependent anymore or Apple adopts it and makes it part of the OS (which I think would be the smarter idea).
Does anyone know its status on Mac? Any 3rd party implementations? Any opinions about the protocol — is it mainstream enough to be worth using?
A definitive Yes. Some applications require it mandatory.
(One aspect I'm leery of is NAT support; I can imagine that most NATs wouldn't know what to do with it.)
NAT is possible to do with SCTP. I'm not too sure if the KEXT implementation has NAT support yet but I know that there has been some code work recently in that direction in the way of MacOS X Server being a NAT server. Passing SCTP through "traditional" NAT should be possible if that NAT can deal with SCTP and if the application on top can deal with that. For example you would have to present your outside IP's to the remote while using the inside IP's. Depends a little bit on the application case.
SCTP can communicate over multiple interfaces and is multihoming and multipath aware (smart for EDGE versus WLAN for example...), so it has to communicate with the peer about its IP's and thats where NAT can interfear.
Best way is to avoid NAT and use IPv6 which is supported by the KEXT and the userspace impelmentation. IPv6 is starting to be widely available in Europe.
Andreas Fink
Fink Consulting GmbH Global Networks Schweiz AG BebbiCell AG IceCell ehf
--------------------------------------------------------------- Tel: +41-61-6666330 Fax: +41-61-6666331 Mobile: +41-79-2457333 Address: Clarastrasse 3, 4058 Basel, Switzerland --------------------------------------------------------------- ICQ: 8239353 MSN: email@hidden AIM: smsrelay Skype: andreasfink Yahoo: finkconsulting SMS: +41792457333
|