SCTP PPID change

Ahmed Ali <>
Wed Oct 14 01:09:33 CEST 2009


Hi,

I'm experminting with SCTP support in Erlang. I'm using Solaris 10
with Erlang R13B02. SCTP support is enabled during compiling Erlang.

I'm having problem with changing ppid to 3 (M3UA). The first thing I
did is to add sctp_default_send_param in gen_sctp:connect/4. However,
I got the error below. I've tried to used gen_sctp:send/3 instead of
send/4 as below but I get exactly the same error. I also tried to
troubleshoot the issue and found out the error is generated from
module prim_inet.erl in erts code. My guess is that type_value/3
function checks that the values of the supplied #sctp_sndrcvinfo{} are
valid but appearntly, something is not correct in #sctp_sndrcvinfo{}
record I'm sending.

Without setting PPID, everything works and I could see traffic is sent
and received correctly. Any help is appreciated.

gen_sctp:send(S, #sctp_sndrcvinfo{stream=Stream,
                                      assoc_id=Assoc,
                                      ppid=3}, Data)

{error,
      {type,
          {record,set,
              {sctp_sndrcvinfo,
                  [uint16,0],
                  [],
                  [{bitenumlist,
                       [{unordered,1},{addr_over,2},{abort,4},{eof,8}],
                       uint16},
                   []],
                  [uint32,0],
                  [uint32,0],
                  [uint32,0],
                  [],[],
                  [sctp_assoc_id,0]},
              {sctp_sndrcvinfo,0,undefined,undefined,3,undefined,undefined,
                  undefined,undefined,
                  {sctp_assoc_change,comm_up,0,5,17,1}},
              10
	  }
       }
}

Best regards,

Ahmed


More information about the erlang-questions mailing list