Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 9 Mar 2020 03:57:41 -0700
From:      Doug Hardie <bc979@lafn.org>
To:        freebsd-net@freebsd.org
Subject:   Re: SCTP sendmsgx
Message-ID:  <3A0F2F1C-EB50-45A1-B0AB-8914535ED35F@mail.sermon-archive.info>
In-Reply-To: <BF6123E9-89CB-4E67-9B8A-7927EFF2D7A0@lurchi.franken.de>
References:  <1C234055-9CDD-4A72-A027-1BD4F8A2FC71@mail.sermon-archive.info> <BF6123E9-89CB-4E67-9B8A-7927EFF2D7A0@lurchi.franken.de>

next in thread | previous in thread | raw e-mail | index | archive | help
>=20
>> On 9. Mar 2020, at 11:01, Doug Hardie <bc979@lafn.org> wrote:
>>=20
>>> I am trying to get sctp_sendmsgx to work and not having a lot of =
success.  I have not been able to find any examples on the web of using =
it.  I have a client using sctp_sendmsg working fine.  I need to make =
use of the multihoming feature which requires sctp_sendmsgx.    I =
changed the call to sctp_sendmsgx, and changed the address count to 2.  =
However, all I get is an EINVAL response.  Looking through the code =
there are at least 2 different possible causes, but I can't distinguish =
between them. I do have two address structures in the address field.  =
Are there any examples of how to build a client with sctp_sendmsgx?
>>=20
>> I am now making some progress.  If you are using the sctp_sendmsg =
function the sa_len or sin_len field is not used.  However, sctp_sendx =
does use it.  Leaving it at zero causes
> Yepp, filling out the sa_len field is important.
>> the problem.  sendx now sends a connection init to the remote host.  =
There is no server running there yet.  It hangs for quite some time and =
doesn't try the multihome address.  I seem to recall reading something =
about that so will investigate that tomorrow.=20
> What do you see on the wire? I would expect INIT chunks to be sent to =
the two addresses you provided.

If I have both network connections working, there is an INIT chunk on =
the primary network followed by a ABORT chunk response.  Then the client =
sits waiting for a response which never comes.  If I disconnect the =
primary network cable, then after about 5 seconds of starting the =
client, I get the INIT and ABORT chunks on the secondary network.  I =
haven't figured out how to control the time, or how to make it switch to =
the secondary when the network connection is there, but the server is =
not responding.

>=20
> Please note that sctp_sendx() is deprecated (like sctp_sendmsg()). =
Please consider using sctp_sendv().
> See https://tools.ietf.org/html/rfc6458#section-9.12

Thats quite interesting.  This must have occurred after the Steven's =
book came out.  There is no man entry for sctp_sendv in FBSD 12.1.  =
However, I do see it in sctp_sys_calls.c so I will have to figure it out =
from there.  Likewise there is no indication those calls are depreciated =
in the man pages.

-- Doug




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3A0F2F1C-EB50-45A1-B0AB-8914535ED35F>