.TH diameter_tcp 3erl "diameter 1.1" "Ericsson AB" "Erlang Module Definition" .SH NAME diameter_tcp \- Diameter transport over TCP. .SH DESCRIPTION .LP This module implements diameter transport over TCP using gen_tcp\&. 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\&\&. TLS security is supported, both as an upgrade following capabilities exchange as specified by RFC 3588 and at connection establishment as in the current draft standard\&. .LP Note that the ssl application is required for TLS and must be started before configuring TLS capability on diameter transports\&. .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 = OwnOpt | SslOpt | OtherOpt .br Pid = pid() .br LAddr = ip_address() .br Reason = term() .br OwnOpt = {raddr, ip_address()} | {rport, integer()} | {port, integer()} .br SslOpt = {ssl_options, true | list()} .br OtherOpt = term() .br .RE .RE .RS .LP The start function required by \fBdiameter_transport(3erl)\fR\&\&. .LP The only diameter_tcp-specific argument is the options list\&. Options \fIraddr\fR\& and \fIrport\fR\& specify the remote address and port for a connecting transport and are not valid for a listening transport\&. Option \fIssl_options\fR\& must be specified for a transport that must be able to support TLS: a value of \fItrue\fR\& results in a TLS handshake immediately upon connection establishment while list() specifies options to be passed to ssl:connect/2 of ssl:ssl_accept/2 after capabilities exchange if TLS is negotiated\&. Remaining options are any accepted by ssl:connect/3 or gen_tcp:connect/3 for a connecting transport, or ssl:listen/3 or gen_tcp:listen/2 for a listening transport, depending on whether or not \fI{ssl_options, true}\fR\& has been specified\&. Options \fIbinary\fR\&, \fIpacket\fR\& and \fIactive\fR\& cannot be specified\&. Also, option \fIport\fR\& can be specified for a listening transport to specify the local listening port, the default being the standardized 3868 if unspecified\&. Note that option \fIip\fR\& specifies the local address\&. .LP An \fIssl_options\fR\& list must be specified if and only if the transport in question has specified an Inband-Security-Id AVP with value TLS on the relevant call to \fBstart_service/2\fR\& or \fBadd_transport/2\fR\&, so that the transport process will receive notification of whether or not to commence with a TLS handshake following capabilities exchange\&. Failing to specify an options list on a TLS-capable transport for which TLS is negotiated will cause TLS handshake to fail\&. Failing to specify TLS capability when \fIssl_options\fR\& has been specified will cause the transport process to wait for a notification that will not be forthcoming, which will eventually cause the RFC 3539 watchdog to take down the connection\&. .LP If the service specifies more than one Host-IP-Address and option \fIip\fR\& is unspecified then then the first of the service\&'s addresses is used as the local address\&. .LP The returned local address list has length one\&. .RE .SH "SEE ALSO" .LP \fBdiameter(3erl)\fR\&, \fBdiameter_transport(3erl)\fR\&