Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 5 Dec 2011 15:34:53 +0100
From:      =?iso-8859-1?Q?Michael_T=FCxen?= <Michael.Tuexen@lurchi.franken.de>
To:        jyl_2006 <yilinjing2006@gmail.com>
Cc:        freebsd-net@freebsd.org
Subject:   Re: the return value of sctp_connectx do not match any error
Message-ID:  <CD847153-0AA2-4772-82A9-BF63A276770B@lurchi.franken.de>
In-Reply-To: <1323093598044-5048925.post@n5.nabble.com>
References:  <1322966561294-5045598.post@n5.nabble.com> <F9593CD9-520A-49D4-9093-7DA02DDEE521@lurchi.franken.de> <1323000072198-5046113.post@n5.nabble.com> <ED9B11CB-4442-44C2-86EC-A2F7AC86C8E4@lurchi.franken.de> <1323001847851-5046165.post@n5.nabble.com> <3E25BC69-1FC8-487E-BBAD-8BAF2552623B@lurchi.franken.de> <1323004488998-5046216.post@n5.nabble.com> <F2E9EABF-175E-418C-8E52-0DDF4BF483F0@lurchi.franken.de> <1323054646502-5047743.post@n5.nabble.com> <C5C720EB-1EA7-432A-B34E-3BD558C9BC4F@lurchi.franken.de> <1323093598044-5048925.post@n5.nabble.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CD847153-0AA2-4772-82A9-BF63A276770B>