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.
> 
> 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
> 
> I am really confused about this problem.
> 
> Thanks.
> 
> --
> 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-unsubscr...@freebsd.org"
> 

_______________________________________________
freebsd-net@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"

Reply via email to