[erlang-questions] gen_sctp:connect() always fail

Victoria Pometsko victoria.pometsko@REDACTED
Thu Nov 10 14:08:35 CET 2011


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


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20111110/ee69781a/attachment.htm>


More information about the erlang-questions mailing list