From owner-freebsd-net@FreeBSD.ORG Mon Dec 5 14:34:57 2011 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 19D86106566B for ; Mon, 5 Dec 2011 14:34:57 +0000 (UTC) (envelope-from Michael.Tuexen@lurchi.franken.de) Received: from mail-n.franken.de (drew.ipv6.franken.de [IPv6:2001:638:a02:a001:20e:cff:fe4a:feaa]) by mx1.freebsd.org (Postfix) with ESMTP id F09C38FC08 for ; Mon, 5 Dec 2011 14:34:55 +0000 (UTC) Received: from [192.168.1.200] (p508FB768.dip.t-dialin.net [80.143.183.104]) (Authenticated sender: macmic) by mail-n.franken.de (Postfix) with ESMTP id 0E7101C0B4606; Mon, 5 Dec 2011 15:34:54 +0100 (CET) Mime-Version: 1.0 (Apple Message framework v1251.1) Content-Type: text/plain; charset=us-ascii From: =?iso-8859-1?Q?Michael_T=FCxen?= In-Reply-To: <1323093598044-5048925.post@n5.nabble.com> Date: Mon, 5 Dec 2011 15:34:53 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: References: <1322966561294-5045598.post@n5.nabble.com> <1323000072198-5046113.post@n5.nabble.com> <1323001847851-5046165.post@n5.nabble.com> <3E25BC69-1FC8-487E-BBAD-8BAF2552623B@lurchi.franken.de> <1323004488998-5046216.post@n5.nabble.com> <1323054646502-5047743.post@n5.nabble.com> <1323093598044-5048925.post@n5.nabble.com> To: jyl_2006 X-Mailer: Apple Mail (2.1251.1) Cc: freebsd-net@freebsd.org Subject: Re: the return value of sctp_connectx do not match any error X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 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, 05 Dec 2011 14:34:57 -0000 On Dec 5, 2011, at 2:59 PM, jyl_2006 wrote: > I download freebsd-rc2(Character-based) and use the new Operating = system to > run the code you provide(sctp_client.c and give name of ComputerA to = the > computer it uses).In another computer(named ComputerB) I run > freebsd-beta2(Graphical interface), I use the code(sctp_server.c) and = I use > wireshark to see what happen. >=20 > I do not run sctp_server(means no server to wait for accept) in = ComputerA , > the program of sctp_client in ComputerB use sctp_connectx to init the > association, the return value of sctp_connectx is 0 , that means the > association is set up, but I do not run any server in computerA and = the > wireshark also see the init of association is unsuccessful. No. If sctp_connectx() it means that initiating the setup was = successful, basically the sending on the INIT chunk. It is a non-blocking operation. So I guess this is what happens: 1. You call sctp_connectx(). 2. An INIT is sent. 3. sctp_connectx() returns with 0. The associd is valid. 4. An ABORT comes back. 5. Now the association is closed. If you want a blocking setup, use a one-to-one style socket and a = connect() call. If you want to figure out whether the association setup is = successful or not, you have to subscribe to the corresponding events. You will = either get a notification indicating that the setup is successful or not. I don't think this behavior has changed between RC2 and B2. Best regards Michael >=20 > I am really confused about this problem. >=20 > Thanks. >=20 > -- > View this message in context: = http://freebsd.1045724.n5.nabble.com/the-return-value-of-sctp-connectx-do-= not-match-any-error-tp5041952p5048925.html > Sent from the freebsd-net mailing list archive at Nabble.com. > _______________________________________________ > freebsd-net@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-net > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" >=20