Subject: Re: [Tsvwg] SCTP support for Solaris

From: Randall Stewart <[email-masked]>
Date: Fri, 2 Jan 2009 09:01:07 -0500

Sorry for seeing this so late :-(

On Nov 25, 2008, at 3:13 PM, Michael Tüxen wrote:

>>
> So the idea is to be able to be able to provide a some cmghdr
> structure, each one for
> - The PPID
> - The stream id
> - Sending ordered/unordered
> - the PR-SCTP policy
> - the PR-SCTP value
> - the SCTP-AUTH keyid
> - the flags (from the sndrcv info flags)
> - the context
> - and a couple more that I forgot...
>
> The experience I had is that people avoid using the the
> cmghdr stuff... That is why we added sctp_sendmsg() which
> was just a wrapper added to handle the cmghdr stuff..

I tend to agree with you here Michael. I have taught
quite a few classes on the SCTP socket API.. where you
get blood curdling screams, groans and moans is when you
try to get folks to use the cmsg stuff. Its real ugly
and quite awkward to use. Most folks just plain do not
want to use it.

No matter what we do, I think having something simple
to use is far better. Even if that means wrapping a library
call to work with the cmsg headers (like lk-sctp does).

R

------------------------------
Randall Stewart
803-317-4952 (cell)
803-345-0391(direct)

---

From: Vlad Yasevich <[email-masked]>
Date: Wed, 07 Jan 2009 10:23:43 -0500

> call to work with the cmsg headers (like lk-sctp does).

Then we'll just have to state that sctp_sendmsg() can not be
used when any new extension that would require additional parameters
to be passed down since it can't really handle them without
an API change.

One such extension that recently came up during implementation
is the new partial reliability policy stuff.  Currently, sctp_sendmsg
can take a pr_value, allowing it to specify the value as applied to
a given policy, but there is no documented way to specify the policy.

Thus one could preserve the old behavior of defaulting to timeout policy,
or one could hack something in an non-interoperable manner using flags or
something else.

As it stands right now, sctp_sendmsg() is underspecified wrt to PR policy.

-vlad