[erlang-questions] gen_sctp:connect() always fail
Anders Nygren
anders.nygren@REDACTED
Thu Nov 10 15:07:34 CET 2011
Hi
Did You enable SCTP when You built erlang?
e.g.
./configure --enable-sctp
Also what OS are You using, on Linux You must have
lksctp and lksctp-devel installed, exact names may vary depending
on the distribution.
-Anders
On Thu, Nov 10, 2011 at 7:08 AM, Victoria Pometsko
<victoria.pometsko@REDACTED> wrote:
>
> Hello,
>
> I'm trying to work with sctp sockets using gen_sctp module, and faced the
> following problem:
>
> Client side code:
>
> {ok, S}=gen_sctp:open(5555, [{ip,{127,0,0,1}}, binary, inet, {active,
> true}, {reuseaddr, true}]).
> %% res : {ok,#Port<0.5931>}
>
> gen_sctp:connect(S, {127,0,0,1}, 6666,[]).
> %% res : {error,{sctp_assoc_change,cant_assoc,0,0,0,0}}
>
> (if I'm using connect_init(), recv() result is the same)
>
>
> The thing that I also do not understand why example code from
> http://www.erlang.org/doc/man/gen_sctp.html
> Is also not working for me:
> client(localhost, 2006) when is_integer(Port) ->
> {ok,S} = gen_sctp:open(),
> {ok,Assoc} = gen_sctp:connect(S, Host, Port,
> [{sctp_initmsg,#sctp_initmsg{num_ostreams=5}}]) ....
> %% It fails with: {error,{sctp_assoc_change,cant_assoc,0,0,0,0}}
> ?
>
>
> The environment is:
> SUSE Linux Enterprise Desktop 10 (i586)
> VERSION = 10
> PATCHLEVEL = 1
> LSB_VERSION="core-2.0-noarch:core-3.0-noarch:core-2.0-ia32:core-3.0-ia32"
>
>
> I read at http://www.erlang.org/doc/man/gen_sctp.html that gen_sctp
> implementation has only been tested on several Linux versions.
>
> So the questions are:
> Can I have such results because of the environment?
> If no, then how do you think, what am I missing?
>
>
>
> With best regards,
> Vic
>
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
>
>
More information about the erlang-questions
mailing list