From 7721c6ab406aaf29cf1b2d782c5baf65d2b0e2da Mon Sep 17 00:00:00 2001
From: Anders Svensson
Date: Thu, 13 Oct 2011 01:34:07 +0200
Subject: Update documentation
---
lib/diameter/doc/src/diameter.xml | 123 +++++++++++++++++++++++++++++++++++---
1 file changed, 116 insertions(+), 7 deletions(-)
(limited to 'lib/diameter/doc/src')
diff --git a/lib/diameter/doc/src/diameter.xml b/lib/diameter/doc/src/diameter.xml
index 43c497f50a..2d8edb1301 100644
--- a/lib/diameter/doc/src/diameter.xml
+++ b/lib/diameter/doc/src/diameter.xml
@@ -431,7 +431,7 @@ eval(F) ->
-Evaluating an evaluable() E on an argument list A
+Applying an evaluable() E to an argument list A
is meant in the sense of eval([E|A]).
@@ -565,7 +565,7 @@ Pkt = #diameter_packet{}
-Reports that the RFC 3539 watchdog state machine has
+The RFC 3539 watchdog state machine has
transitioned into (up) or out of (down) the open
state.
If a diameter_packet record is present in an up tuple
@@ -576,9 +576,9 @@ connectivity.
Note that a single up/down event for a given peer corresponds to
-as many peer_up/down callbacks as there are Diameter
-applications shared by the peer, as determined during capablilities
-exchange.
+as many peer_up/peer_down
+callbacks as there are Diameter applications shared by the peer,
+as determined during capablilities exchange.
That is, the event communicates connectivity with the
peer as a whole while the callbacks communicate connectivity with
respect to individual Diameter applications.
@@ -597,12 +597,96 @@ transport connection with a peer following reconnect_timer or
watchdog_timer expiry.
+{closed, Ref, Reason, Config}
+-
+
+Ref = transport_ref()
+Config = {connect|listen, [transport_opt()]}
+
+
+
+Capabilities exchange has failed. Reason can be one of
+the following.
+
+
+
+{'CER', Result, Caps, Pkt}
+-
+
+Result = ResultCode | {capabilities_cb, CB, ResultCode|discard}
+Caps = #diameter_caps{}
+Pkt = #diameter_packet{}
+ResultCode = integer()
+CB = evaluable()
+
+
+
+An incoming CER has been answered with the indicated result code or
+discarded.
+The capabilities record contains pairs of values for the the local
+node and remote peer.
+The packet record contains the CER in question.
+In the case of rejection by a capabilities callback, the tuple
+indicates the rejecting callback.
+
+
+{'CER', Caps, {ResultCode, Pkt}}
+-
+
+ResultCode = integer()
+Caps = #diameter_caps{}
+Pkt = #diameter_packet{}
+
+
+
+An incoming CER contained errors and has been answered with the
+indicated result code.
+The capabilities record contains only values for the the local
+node.
+The packet record contains the CER in question.
+
+
+{'CEA', Result, Caps, Pkt}
+-
+
+Result = integer() | atom() | {capabilities_cb, CB, ResultCode|discard}
+Caps = #diameter_caps{}
+Pkt = #diameter_packet{}
+ResultCode = integer()
+
+
+
+An incoming CEA has been rejected for the indicated reason.
+An integer-valued Result indicates the result code sent
+by the peer.
+The capabilities record contains pairs of values for the the local
+node and remote peer.
+The packet record contains the CEA in question.
+In the case of rejection by a capabilities callback, the tuple
+indicates the rejecting callback.
+
+
+{'CEA', Caps, Pkt}
+-
+
+Caps = #diameter_caps{}
+Pkt = #diameter_packet{}
+
+
+
+An incoming CER contained errors and has been rejected.
+The capabilities record contains only values for the the local node.
+The packet record contains the CEA in question.
+
+
+
+
+
For forward compatibility, a subscriber should be prepared to receive
-diameter_event.info of forms other than those documented
-above.
+info fields of forms other than the above.
@@ -706,6 +790,31 @@ not over SCTP as implemented by
diameter_sctp(3).
+{capabilities_cb, evaluable()}
+-
+
+A callback invoked upon reception of CER/CEA during capabilities
+exchange in order to ask whether or not the connection should
+be accepted.
+Applied to the transport reference (as returned by add_transport/2) and
+diameter_caps record of the connection.
+Returning ok accepts the connection.
+Returning integer() causes an incoming
+CER to be answered with the specified Result-Code.
+Returning discard causes an incoming CER to
+be discarded.
+Returning unknown is equivalent to returning 3010,
+DIAMETER_UNKNOWN_PEER.
+Returning anything but ok or a 2xxx series result
+code causes the transport connection to be broken.
+
+
+Multiple capabilities_cb options can be specified, in which
+case the corresponding callbacks are applied until either all return
+ok or one does not.
+
+
{watchdog_timer, TwInit}
-
--
cgit v1.2.3