SCTP Part #1
This commit is contained in:
45
2006-02-26-sctp-part-1.html
Normal file
45
2006-02-26-sctp-part-1.html
Normal file
@@ -0,0 +1,45 @@
|
||||
<p>htmhtmll<!--# set var="title" value="SCTP Part #1" -->
|
||||
<!--# set var="date" value="February 26, 2006" --></p>
|
||||
|
||||
<!--# include file="include/top.html" -->
|
||||
|
||||
<p>I’ve been doing some work with SCTP lately. I’m 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 I’d post a few things here showing, from examples, the nifty stuff that the protocol does. Here’s 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
|
||||
-----> msg_flags = 0
|
||||
recvmsg(11, MSG_DONTWAIT) = 11
|
||||
-----> msg_flags = 0
|
||||
recvmsg(11, MSG_DONTWAIT) = -1
|
||||
-----> 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
|
||||
-----> msg_flags = 0
|
||||
recvmsg(11, MSG_DONTWAIT) = 3
|
||||
-----> msg_flags = 128
|
||||
recvmsg(11, MSG_DONTWAIT) = 8
|
||||
-----> msg_flags = 128
|
||||
</code></pre>
|
||||
|
||||
<!--# include file="include/bottom.html" -->
|
||||
@@ -38,6 +38,7 @@
|
||||
<li>2010-Mar-26: <a href="2010-03-26-fun-with-map-visualizations.html">Fun with map visualizations</a></li>
|
||||
<li>2010-Mar-09: <a href="2010-03-09-karaoke-project.html">Karaoke project</a></li>
|
||||
<li>2009-Sep-11: <a href="2009-09-11-confusing-bind-with-cnames.html">Confusing BIND with CNAMEs</a></li>
|
||||
<li>2009-Feb-26: <a href="2006-02-26-sctp-part-1.html">SCTP Part #1</a></li>
|
||||
<li>2009-Feb-19: <a href="2019-02-19-the-odd-case-of-my-mugging.html">The odd case of my mugging</a></li>
|
||||
<li>2009-Feb-03: <a href="2009-02-03-5-packet-tcp-connection.html">5-packet TCP connection?</a></li>
|
||||
<li>2006-Feb-13: <a href="2006-02-13-is-sleep-effected-by-time-changes.html">Is sleep(3) effected by time changes?</a></li>
|
||||
|
||||
42
markdown/2006-02-26-sctp-part-1.md
Normal file
42
markdown/2006-02-26-sctp-part-1.md
Normal file
@@ -0,0 +1,42 @@
|
||||
htmhtmll<!--# set var="title" value="SCTP Part #1" -->
|
||||
<!--# set var="date" value="February 26, 2006" -->
|
||||
|
||||
<!--# include file="include/top.html" -->
|
||||
|
||||
I’ve been doing some work with SCTP lately. I’m 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 I’d post a few things here showing, from examples, the nifty stuff that the protocol does. Here’s the first, dealing with message length preservation:
|
||||
|
||||
MSG_EOR = 128
|
||||
|
||||
IPV6/TCP:
|
||||
|
||||
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
|
||||
-----> msg_flags = 0
|
||||
recvmsg(11, MSG_DONTWAIT) = 11
|
||||
-----> msg_flags = 0
|
||||
recvmsg(11, MSG_DONTWAIT) = -1
|
||||
-----> msg_flags = 0
|
||||
|
||||
IPV6/SCTP:
|
||||
|
||||
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
|
||||
-----> msg_flags = 0
|
||||
recvmsg(11, MSG_DONTWAIT) = 3
|
||||
-----> msg_flags = 128
|
||||
recvmsg(11, MSG_DONTWAIT) = 8
|
||||
-----> msg_flags = 128
|
||||
|
||||
<!--# include file="include/bottom.html" -->
|
||||
@@ -37,6 +37,7 @@
|
||||
1. 2010-Mar-26: [Fun with map visualizations](2010-03-26-fun-with-map-visualizations.html)
|
||||
1. 2010-Mar-09: [Karaoke project](2010-03-09-karaoke-project.html)
|
||||
1. 2009-Sep-11: [Confusing BIND with CNAMEs](2009-09-11-confusing-bind-with-cnames.html)
|
||||
1. 2009-Feb-26: [SCTP Part #1](2006-02-26-sctp-part-1.html)
|
||||
1. 2009-Feb-19: [The odd case of my mugging](2019-02-19-the-odd-case-of-my-mugging.html)
|
||||
1. 2009-Feb-03: [5-packet TCP connection?](2009-02-03-5-packet-tcp-connection.html)
|
||||
1. 2006-Feb-13: [Is sleep(3) effected by time changes?](2006-02-13-is-sleep-effected-by-time-changes.html)
|
||||
|
||||
Reference in New Issue
Block a user