Files
firestuff/2006-02-26-sctp-part-1.html
2019-04-25 02:45:09 +00:00

46 lines
1.3 KiB
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!--# set var="title" value="SCTP Part #1" -->
<!--# set var="date" value="2006-02-26" -->
<!--# include file="include/top.html" -->
<p>Ive been doing some work with SCTP lately. Im working through some of the intricacies of the protocol and the brain damage of the APIs (there are two of them, and they both suck). As I write my own API, I thought Id post a few things here showing, from examples, the nifty stuff that the protocol does. Heres the first, dealing with message length preservation:</p>
<pre><code>MSG_EOR = 128
</code></pre>
<p>IPV6/TCP:</p>
<pre><code>send("ABCDEFGH", 8) = 8
send("01234567", 8) = 8
recv(16, MSG_DONTWAIT) = 16
recv(16, MSG_DONTWAIT) = -1
========
send("ABCDEFGH", 8) = 8
send("01234567", 8) = 8
recvmsg(5, MSG_DONTWAIT) = 5
-----&gt; msg_flags = 0
recvmsg(11, MSG_DONTWAIT) = 11
-----&gt; msg_flags = 0
recvmsg(11, MSG_DONTWAIT) = -1
-----&gt; msg_flags = 0
</code></pre>
<p>IPV6/SCTP:</p>
<pre><code>send("ABCDEFGH", 8) = 8
send("01234567", 8) = 8
recv(16, MSG_DONTWAIT) = 8
recv(16, MSG_DONTWAIT) = 8
========
send("ABCDEFGH", 8) = 8
send("01234567", 8) = 8
recvmsg(5, MSG_DONTWAIT) = 5
-----&gt; msg_flags = 0
recvmsg(11, MSG_DONTWAIT) = 3
-----&gt; msg_flags = 128
recvmsg(11, MSG_DONTWAIT) = 8
-----&gt; msg_flags = 128
</code></pre>
<!--# include file="include/bottom.html" -->