From 6530d6b10490311d37080da982282a3b69bad059 Mon Sep 17 00:00:00 2001
From: Anders Svensson
Date: Wed, 29 Aug 2012 11:49:46 +0200
Subject: Add SCTP warning, more references
---
lib/diameter/doc/src/diameter_sctp.xml | 48 +++++++++++++++++++---------
lib/diameter/doc/src/diameter_tcp.xml | 49 ++++++++++++++++++-----------
lib/diameter/doc/src/diameter_transport.xml | 2 +-
3 files changed, 64 insertions(+), 35 deletions(-)
(limited to 'lib/diameter')
diff --git a/lib/diameter/doc/src/diameter_sctp.xml b/lib/diameter/doc/src/diameter_sctp.xml
index 03e2f1f6be..7e02a07bb4 100644
--- a/lib/diameter/doc/src/diameter_sctp.xml
+++ b/lib/diameter/doc/src/diameter_sctp.xml
@@ -60,9 +60,9 @@ and implements the behaviour documented in
Type = connect | accept
Ref = diameter:transport_ref()
Svc = #diameter_service{}
-Opt = {raddr, inet:ip_address()} | {rport, integer()} | term()
+Opt = {raddr, inet:ip_address()} | {rport, integer()} | term()
Pid = pid()
-LAddr = inet:ip_address()
+LAddr = inet:ip_address()
Reason = term()
@@ -75,12 +75,13 @@ marker="diameter_transport#start">diameter_transport(3).
The only diameter_sctp-specific argument is the options list.
Options raddr and rport 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.
+transport: the former is required while latter defaults to 3868 if
+unspecified.
More than one raddr 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
+Remaining options are any accepted by gen_sctp:open/1, with the exception
of options mode, binary, list, active
and sctp_events.
Note that options ip and port specify the local address
@@ -88,30 +89,45 @@ and port respectively.
Multiple ip 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.)
+If none are specified then the values of Host-IP-Address
+in the #diameter_service{} record are used.
+(In particular, one of these must be specified.)
Option port defaults to 3868 for a listening transport and 0 for a
connecting transport.
+
+
+An insufficiently large receive buffer may result in a peer having to
+resend incoming messages: set the inet option recbuf to increase
+the buffer size.
+
+
+An insufficiently large send buffer may result in outgoing messages
+being discarded: set the inet option sndbuf to increase
+the buffer size.
+
+
diameter_sctp uses the transport_data field of
-the diameter_packet record to communicate the stream on which an
+the #diameter_packet{} 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 {stream, Id}
on an inbound message passed to a handle_request or handle_answer callback.
-For an outbound message, either undefined (explicitly of
-by specifying the outbound message as a binary()) or a tuple
+For an outbound message, either undefined (explicitly or
+by receiving the outbound message as a binary()) or a tuple
should be set in the return value of handle_request
(typically by retaining the value passed into this function)
or prepare_request.
-The value undefined uses a "next outbound stream" id and then
-increments this modulo the total number outbound streams. That
-is, successive values of undefined cycle through all outbound
-streams.
+The value undefined uses a "next outbound stream" id and
+increments this modulo the total number outbound streams.
+That is, successive values of undefined cycle through all
+outbound streams.
@@ -128,7 +144,9 @@ streams.
SEE ALSO
-diameter_transport(3)
+diameter_transport(3),
+gen_sctp(3),
+inet(3)
diff --git a/lib/diameter/doc/src/diameter_tcp.xml b/lib/diameter/doc/src/diameter_tcp.xml
index 6ad98c8640..b42d65701e 100644
--- a/lib/diameter/doc/src/diameter_tcp.xml
+++ b/lib/diameter/doc/src/diameter_tcp.xml
@@ -38,8 +38,9 @@ under the License.
-This module implements diameter transport over TCP using gen_tcp.
-It can be specified as the value of a transport_module option to
+This module implements diameter transport over TCP using gen_tcp.
+It can be specified as the value of a transport_module option to
diameter:add_transport/2
and implements the behaviour documented in
@@ -67,15 +68,15 @@ before configuring TLS capability on diameter transports.
Type = connect | accept
Ref = diameter:transport_ref()
Svc = #diameter_service{}
-Opt = OwnOpt | SslOpt | OtherOpt
+Opt = OwnOpt | SslOpt | TcpOpt
Pid = pid()
-LAddr = inet:ip_address()
+LAddr = inet:ip_address()
Reason = term()
-OwnOpt = {raddr, inet:ip_address()}
+OwnOpt = {raddr, inet:ip_address()}
| {rport, integer()}
| {port, integer()}
SslOpt = {ssl_options, true | list()}
-OtherOpt = term()
+TcpOpt = term()
@@ -89,25 +90,32 @@ Options raddr and rport specify the remote address
and port for a connecting transport and are not valid for a listening
transport.
Option ssl_options must be specified for a transport
-that must be able to support TLS: a value of true results in a
+that should support TLS: a value of true 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
+list() specifies options to be passed to ssl:connect/2 or
+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
+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 {ssl_options, true}
has been specified.
-Options binary, packet and active cannot be specified.
+Options binary,
+packet and active cannot be specified.
Also, option port can be specified for a listening transport
to specify the local listening port, the default being the standardized
3868 if unspecified.
-Note that option ip specifies the local address.
+Note that the option ip specifies the local address.
An ssl_options 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
-Inband-Security-Id to
+1 (TLS), as
+specified to either start_service/2 or
add_transport/2,
@@ -122,9 +130,9 @@ that will not be forthcoming, which will eventually cause the RFC 3539
watchdog to take down the connection.
-If the service specifies more than one Host-IP-Address and
-option ip is unspecified then the
-first of the service's addresses is used as the local address.
+If the #diameter_service{} record has more than one
+Host-IP-Address and option ip is unspecified then the
+first of the these addresses is used as the local address.
The returned local address list has length one.
@@ -142,7 +150,10 @@ The returned local address list has length one.
diameter(3),
-diameter_transport(3)
+diameter_transport(3),
+gen_tcp(3),
+inet(3),
+ssl(3)
diff --git a/lib/diameter/doc/src/diameter_transport.xml b/lib/diameter/doc/src/diameter_transport.xml
index 4890333669..e852041278 100644
--- a/lib/diameter/doc/src/diameter_transport.xml
+++ b/lib/diameter/doc/src/diameter_transport.xml
@@ -63,7 +63,7 @@ parent).
Svc = #diameter_service{}
Opts = term()
Pid = pid()
-LAddrs = [inet:ip_address()]
+LAddrs = [inet:ip_address()]
Reason = term()
--
cgit v1.2.3