From owner-freebsd-net@freebsd.org Mon Mar 9 10:40:34 2020 Return-Path: Delivered-To: freebsd-net@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AFA6625E904 for ; Mon, 9 Mar 2020 10:40:34 +0000 (UTC) (envelope-from michael.tuexen@lurchi.franken.de) Received: from drew.franken.de (mail-n.franken.de [193.175.24.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.franken.de", Issuer "COMODO RSA Domain Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 48bZW438Zqz3GZR for ; Mon, 9 Mar 2020 10:40:31 +0000 (UTC) (envelope-from michael.tuexen@lurchi.franken.de) Received: from [IPv6:2a02:8109:1140:c3d:b43e:c732:2dc8:7e2a] (unknown [IPv6:2a02:8109:1140:c3d:b43e:c732:2dc8:7e2a]) (Authenticated sender: lurchi) by drew.franken.de (Postfix) with ESMTPSA id 652C972106C26; Mon, 9 Mar 2020 11:40:27 +0100 (CET) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 13.0 \(3608.60.0.2.5\)) Subject: Re: SCTP sendmsgx From: Michael Tuexen In-Reply-To: <1C234055-9CDD-4A72-A027-1BD4F8A2FC71@mail.sermon-archive.info> Date: Mon, 9 Mar 2020 11:40:26 +0100 Cc: freebsd-net@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <1C234055-9CDD-4A72-A027-1BD4F8A2FC71@mail.sermon-archive.info> To: Doug Hardie X-Mailer: Apple Mail (2.3608.60.0.2.5) X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00, URIBL_BLOCKED autolearn=disabled version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on mail-n.franken.de X-Rspamd-Queue-Id: 48bZW438Zqz3GZR X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of michael.tuexen@lurchi.franken.de has no SPF policy when checking 193.175.24.27) smtp.mailfrom=michael.tuexen@lurchi.franken.de X-Spamd-Result: default: False [-2.13 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; NEURAL_HAM_MEDIUM(-0.92)[-0.916,0]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; MV_CASE(0.50)[]; IP_SCORE(-1.51)[ip: (-7.47), ipnet: 193.174.0.0/15(-0.16), asn: 680(0.08), country: DE(-0.02)]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[franken.de]; AUTH_NA(1.00)[]; NEURAL_HAM_LONG(-1.00)[-0.999,0]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; R_SPF_NA(0.00)[]; RCVD_IN_DNSWL_LOW(-0.10)[27.24.175.193.list.dnswl.org : 127.0.5.1]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:680, ipnet:193.174.0.0/15, country:DE]; MID_RHS_MATCH_FROM(0.00)[]; RCVD_TLS_ALL(0.00)[]; FROM_EQ_ENVFROM(0.00)[] X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Mar 2020 10:40:34 -0000 > On 9. Mar 2020, at 11:01, Doug Hardie 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. 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 Best regards Michael >=20 > -- Doug >=20 > _______________________________________________ > freebsd-net@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org"