.TH diameter_sctp 3erl "diameter 1.1" "Ericsson AB" "Erlang Module Definition" .SH NAME diameter_sctp \- Diameter transport over SCTP. .SH DESCRIPTION .LP This module implements diameter transport over SCTP using gen_sctp\&. It can be specified as the value of a transport_module option to \fBdiameter:add_transport/2\fR\& and implements the behaviour documented in \fBdiameter_transport(3erl)\fR\&\&. .SH EXPORTS .LP .B start({Type, Ref}, Svc, [Opt]) -> {ok, Pid, [LAddr]} | {error, Reason} .br .RS .LP Types: .RS 3 Type = connect | accept .br Ref = reference() .br Svc = #diameter_service{} .br Opt = {raddr, ip_address()} | {rport, integer()} | term() .br Pid = pid() .br LAddr = ip_address() .br Reason = term() .br .RE .RE .RS .LP The start function required by \fBdiameter_transport(3erl)\fR\&\&. .LP The only diameter_sctp-specific argument is the options list\&. Options \fIraddr\fR\& and \fIrport\fR\& specify the remote address and port for a connecting transport and not valid for a listening transport\&. The former is required while latter defaults to 3868 if unspecified\&. More than one \fIraddr\fR\& option can be specified, in which case the connecting transport in question attempts each in sequence until an association is established\&. Remaining options are any accepted by gen_sctp:open/1, with the exception of options \fImode\fR\&, \fIbinary\fR\&, \fIlist\fR\&, \fIactive\fR\& and \fIsctp_events\fR\&\&. Note that options \fIip\fR\& and \fIport\fR\& specify the local address and port respectively\&. .LP Multiple \fIip\fR\& options can be specified for a multihomed peer\&. If none are specified then the values of Host-IP-Address on the service are used\&. (In particular, one of these must be specified\&.) Option \fIport\fR\& defaults to 3868 for a listening transport and 0 for a connecting transport\&. .LP diameter_sctp uses the \fItransport_data\fR\& field of the \fIdiameter_packet\fR\& record to communicate the stream on which an inbound message has been received, or on which an outbound message should be sent: the value will be of the form \fI{stream, Id}\fR\& on an inbound message passed to a \fBhandle_request\fR\& or \fBhandle_answer\fR\& callback\&. For an outbound message, either \fIundefined\fR\& (explicitly of by specifying the outbound message as a \fIbinary()\fR\&) or a tuple should be set in the return value of \fBhandle_request\fR\& (typically by retaining the value passed into this function) or \fBprepare_request\fR\&\&. The value \fIundefined\fR\& uses a "next outbound stream" id and then increments this modulo the total number outbound streams\&. That is, successive values of \fIundefined\fR\& cycle through all outbound streams\&. .RE .SH "SEE ALSO" .LP \fBdiameter_transport(3erl)\fR\&