From 654d3f45431e57512597792376524b56805a1829 Mon Sep 17 00:00:00 2001
From: Anders Svensson
Basic usage consists of creating a representation of a
-locally implemented Diameter peer and its capabilities with
Types corresponding to RFC 3588 AVP Data Formats.
-Defined in
An unique identifier for the application in the scope of the
@@ -166,7 +167,7 @@ documented in
A callback module with which messages of the Diameter application are @@ -253,7 +254,7 @@ itself. Multiple options append to the argument list.
A filter to apply to the list of available peers before passing them to
@@ -264,7 +265,7 @@ corresponding list of filters.
Defaults to
The number of milliseconds after which the request should @@ -304,19 +305,19 @@ precedence over the former.
Value of the Origin-Host AVP in outgoing messages.
Value of the Origin-Realm AVP in outgoing messages.
Values of Host-IP-Address AVPs. @@ -325,26 +326,25 @@ Optional.
The list of addresses is available to the start function of a
transport module, which either uses them as is or returns a new list
-(typically as configured as
Value of the Vendor-Id AVP sent in an outgoing capabilities exchange message.
Value of the Product-Name AVP sent in an outgoing capabilities exchange message.
Value of Origin-State-Id to be included in outgoing messages sent by @@ -361,7 +361,7 @@ can be used as to retrieve a value that is set when the diameter application is started.
Values of Supported-Vendor-Id AVPs sent in an outgoing @@ -369,7 +369,7 @@ capabilities exchange message. Optional, defaults to the empty list.
Values of Auth-Application-Id AVPs sent in an outgoing @@ -377,7 +377,7 @@ capabilities exchange message. Optional, defaults to the empty list.
Values of Inband-Security-Id AVPs sent in an outgoing @@ -390,7 +390,7 @@ If 1 (= TLS) is specified then TLS is selected if the CER/CEA received from the peer offers it.
Values of Acct-Application-Id AVPs sent in an outgoing @@ -398,7 +398,7 @@ capabilities exchange message. Optional, defaults to the empty list.
Values of Vendor-Specific-Application-Id AVPs sent in @@ -406,7 +406,7 @@ an outgoing capabilities exchange message. Optional, defaults to the empty list.
Value of the Firmware-Revision AVP sent in an outgoing capabilities
@@ -490,41 +490,42 @@ or any peer if the request does not contain
a
Matches only those peers whose
Matches only those peers whose
-Matches only those peers for which the specified evaluable() returns
+Matches only those peers for which the specified
Matches only those peers not matched by the specified filter.
Matches only those peers matched by each filter of the specified list.
Matches only those peers matched by at least one filter of the @@ -536,10 +537,11 @@ specified list.
Note that the
-Ref = transport_ref()
-Peer = diameter_app:peer()
-Config = {connect|listen, [transport_opt()]}
+Ref = transport_ref()
+Peer = diameter_app:peer()
+Config = {connect|listen, [transport_opt() ]}
Pkt = #diameter_packet{}
@@ -587,8 +589,8 @@ connectivity.
Note that a single up/down event for a given peer corresponds to
as many
-Ref = transport_ref()
-Opts = [transport_opt()]
+Ref = transport_ref()
+Opts = [transport_opt() ]
@@ -610,8 +612,8 @@ transport connection with a peer following
@@ -627,7 +629,7 @@ Result = ResultCode | {capabilities_cb, CB, ResultCode|discard}
Caps = #diameter_caps{}
Pkt = #diameter_packet{}
ResultCode = integer()
-CB = evaluable()
+CB =
@@ -732,12 +734,12 @@ that is somewhat unique.
Options accepted by
Defines a Diameter application supported by the service.
-Ref = transport_ref()
-Config = {connect|listen, [transport_opt()]}
+Ref =
A term passed as the third argument to the
The list of Diameter applications to which usage of the transport should be restricted. Defaults to all applications configured on the service -in question.
+in question. +Must only specify applications defined on the service to which +the transport is added.
AVP's used to construct outgoing CER/CEA messages.
@@ -843,7 +848,7 @@ not over SCTP as implemented by
A callback invoked upon reception of CER/CEA during capabilities
@@ -871,7 +876,7 @@ case the corresponding callbacks are applied until either all return
-TwInit = Unsigned32()
+TwInit =
@@ -892,7 +897,7 @@ Defaults to 30000 if unspecified.
-Tc = Unsigned32()
+Tc = Unsigned32()
@@ -911,11 +916,12 @@ causing the RFC 3539 state machine to pass to state OPEN rather than REOPEN. Note that these semantics are not goverened by the RFC and that a listening transport's reconnect_timer should be greater than its -peers's Tc plus jitter.
+peer's Tc plus jitter.Defaults to 30000 for a connecting transport and 60000 for a listening transport.
+
+An reference returned by
-The service will start a transport process(es) in order to establish a
-connection with the peer, either by connecting to the peer
+The service will start transport processes as required in order to
+establish a connection with the peer, either by connecting to the peer
(
@@ -1112,7 +1127,7 @@ transport.
@@ -1121,7 +1136,7 @@ outgoing messages.
The value returned is the number of seconds since 19680120T031408Z,
-the first value that can be encoded as a Diameter Time(),
+the first value that can be encoded as a Diameter
-Pred = fun(reference(), list()): fun(Ref, _, Opts) -> Pred(Ref, Opts) end
-Pred = fun(list()): fun(_, _, Opts) -> Pred(Opts) end
-Pred = reference(): fun(Ref, _, _) -> Pred == Ref end
-Pred = list(): fun(_, _, Opts) -> [] == Pred -- Opts end
-Pred = true: fun(_, _, _) -> true end
-Pred = false: fun(_, _, _) -> false end
+Pred = fun(transport_ref(), list()): fun(Ref, _, Opts) -> Pred(Ref, Opts) end
+Pred = fun(list()): fun(_, _, Opts) -> Pred(Opts) end
+Pred = transport_ref(): fun(Ref, _, _) -> Pred == Ref end
+Pred = list(): fun(_, _, Opts) -> [] == Pred -- Opts end
+Pred = true: fun(_, _, _) -> true end
+Pred = false: fun(_, _, _) -> false end
Pred = {M,F,A}: fun(Ref, Type, Opts) -> apply(M, F, [Ref, Type, Opts | A]) end
@@ -1186,7 +1201,7 @@ DPA or timeout.
@@ -1216,10 +1231,10 @@ Return the list of started services.
@@ -1244,7 +1259,7 @@ Start the diameter application.
The diameter application must be started before starting a service.
-In a production system this will typically be accomplished by a boot
+In a production system this is typically accomplished by a boot
file, not by calling
-A service defines a locally-implemented Diameter peer, specifying the
-capabilities of the peer to be used during capabilities exchange and
+A service defines a locally-implemented Diameter node, specifying the
+capabilities of the node to be used during capabilities exchange and
the Diameter applications that it supports.
Transports are added to a service using
+A transport can both override its service's +capabilities and restrict its supported Diameter applications so +"service = Diameter node as identified by Origin-Host" is not +necessarily the case.
+
-Subscribe to
It is not an error to subscribe to events from a service -that does not yet exist.
+that does not yet exist. +Doing so before adding transports is required to guarantee the +reception of all related events.
diff --git a/lib/diameter/doc/src/diameter_app.xml b/lib/diameter/doc/src/diameter_app.xml
index a786443fa1..6e5c957eec 100644
--- a/lib/diameter/doc/src/diameter_app.xml
+++ b/lib/diameter/doc/src/diameter_app.xml
@@ -45,8 +45,8 @@ A diameter service as started by
A record containing the identities of
-the local and remote Diameter peers having an established transport
+the local Diameter node and the remote Diameter peer having an established transport
connection, as well as the capabilities as
determined by capabilities exchange.
Each field of the record is a 2-tuple consisting of
@@ -119,6 +121,8 @@ Optional or possibly multiple values are encoded as lists of values,
mandatory values as the bare value.
@@ -149,6 +153,8 @@ are sent exactly as specified.
@@ -158,6 +164,8 @@ Fields of a packet() record should not be set in return values except
as documented.
@@ -165,12 +173,16 @@ A term identifying a transport connection with a Diameter peer.
Should be treated opaquely.
A tuple representing a Diameter peer connection.
@@ -180,6 +192,8 @@ marker="diameter#start_service">diameter:start_service/2
when starting the service.
@@ -211,9 +225,9 @@ process.
@@ -230,9 +244,9 @@ the callback module in question has been configured.
@@ -248,10 +262,10 @@ call to
@@ -278,7 +292,8 @@ equivalent when callback state is mutable, as are
@@ -334,13 +349,13 @@ callback need not be limited to this usage.
Many implementations may simply want to return
-A returned packet() should set the request to be encoded in its
+A returned
@@ -375,7 +390,7 @@ Invoked to return a request for encoding and retransmission.
Has the same role as
@@ -394,10 +409,10 @@ discarded}.
The decoded answer record is in the
@@ -501,13 +516,13 @@ itself as defining either the application in question or the Relay application.
-The argument packet() has the following signature.
+The argument
#diameter_packet{header = #diameter_header{},
avps = [#diameter_avp{}],
msg = record() | undefined,
- errors = ['Unsigned32'() | {'Unsigned32'(), #diameter_avp{}}],
+ errors = [Unsigned32() | {Unsigned32() , #diameter_avp{}}],
bin = binary(),
transport_data = term()}
@@ -524,8 +539,8 @@ The Send the specified answer message to the peer.
diff --git a/lib/diameter/doc/src/diameter_sctp.xml b/lib/diameter/doc/src/diameter_sctp.xml index c1e839b8e1..03e2f1f6be 100644 --- a/lib/diameter/doc/src/diameter_sctp.xml +++ b/lib/diameter/doc/src/diameter_sctp.xml @@ -58,11 +58,11 @@ and implements the behaviour documented in
If the service specifies more than one Host-IP-Address and
-option
diff --git a/lib/diameter/doc/src/diameter_transport.xml b/lib/diameter/doc/src/diameter_transport.xml index 087a90b099..4ed02e3881 100644 --- a/lib/diameter/doc/src/diameter_transport.xml +++ b/lib/diameter/doc/src/diameter_transport.xml @@ -59,11 +59,11 @@ parent).