diff options
-rw-r--r-- | lib/diameter/doc/src/diameter.xml | 442 | ||||
-rw-r--r-- | lib/diameter/doc/src/diameter_app.xml | 256 | ||||
-rw-r--r-- | lib/diameter/doc/src/diameter_compile.xml | 7 | ||||
-rw-r--r-- | lib/diameter/doc/src/diameter_dict.xml | 21 | ||||
-rw-r--r-- | lib/diameter/doc/src/diameter_sctp.xml | 29 | ||||
-rw-r--r-- | lib/diameter/doc/src/diameter_tcp.xml | 25 | ||||
-rw-r--r-- | lib/diameter/doc/src/diameter_transport.xml | 30 |
7 files changed, 339 insertions, 471 deletions
diff --git a/lib/diameter/doc/src/diameter.xml b/lib/diameter/doc/src/diameter.xml index ea540562af..0392bd9bb7 100644 --- a/lib/diameter/doc/src/diameter.xml +++ b/lib/diameter/doc/src/diameter.xml @@ -1,5 +1,8 @@ <?xml version="1.0" encoding="latin1" ?> -<!DOCTYPE erlref SYSTEM "erlref.dtd"> +<!DOCTYPE erlref SYSTEM "erlref.dtd" [ + <!ENTITY % ents SYSTEM "diameter.ent" > + %ents; +]> <erlref> <header> @@ -49,15 +52,12 @@ Diameter protocol as defined in RFC 3588.</p> <p> Basic usage consists of creating a representation of a -locally implemented Diameter node and its capabilities with <seealso -marker="#start_service">start_service/2</seealso>, adding transport -capability using <seealso -marker="#add_transport">add_transport/2</seealso> and sending Diameter -requests and receiving Diameter answers with <seealso -marker="#call">call/4</seealso>. +locally implemented Diameter node and its capabilities with +&start_service;, adding transport capability using +&add_transport; and sending Diameter +requests and receiving Diameter answers with &call;. Incoming Diameter requests are communicated as callbacks to a -<seealso -marker="diameter_app">diameter_app(3)</seealso> callback modules as +&man_app; callback modules as specified in the service configuration.</p> <p> @@ -90,7 +90,7 @@ in this module.</p> <item> <p> Types corresponding to RFC 3588 AVP Data Formats. -Defined in <seealso marker="diameter_dict#DATA_TYPES">diameter_dict(4)</seealso>.</p> +Defined in &dict_data_types;.</p> <marker id="application_alias"/> </item> @@ -100,7 +100,7 @@ Defined in <seealso marker="diameter_dict#DATA_TYPES">diameter_dict(4)</seealso> <p> A name identifying a Diameter application in service configuration. -Passed to <seealso marker="#call">call/4</seealso> when sending requests +Passed to &call; when sending requests defined by the application.</p> <marker id="application_module"/> @@ -116,17 +116,16 @@ ExtraArgs = list() </pre> <p> -A module implementing the callback interface defined in <seealso -marker="diameter_app">diameter_app(3)</seealso>, along with any +A module implementing the callback interface defined in &man_app;, +along with any extra arguments to be appended to those documented for the interface. Note that extra arguments specific to an outgoing request can be -specified to <seealso marker="#call">call/4</seealso>, in which case +specified to &call;, in which case those are are appended to any module-specific extra arguments.</p> <p> Specifying a <c>#diameter_callback{}</c> record allows individual -functions to be configured in place of the usual <seealso -marker="diameter_app">diameter_app(3)</seealso> callbacks. +functions to be configured in place of the usual &man_app; callbacks. See that module for details.</p> <marker id="application_opt"/> @@ -141,7 +140,7 @@ Has one the following types.</p> <taglist> -<tag><c>{alias, <seealso marker="#application_alias">application_alias()</seealso>}</c></tag> +<tag><c>{alias, &application_alias;}</c></tag> <item> <p> An unique identifier for the application in the scope of the @@ -156,17 +155,15 @@ unspecified.</p> The name of an encode/decode module for the Diameter messages defined by the application. These modules are generated from a specification file whose format is -documented in <seealso -marker="diameter_dict">diameter_dict(4)</seealso>.</p> +documented in &man_dict;.</p> </item> -<tag><c>{module, <seealso marker="#application_module">application_module()</seealso>}</c></tag> +<tag><c>{module, &application_module;}</c></tag> <item> <p> The callback module with which messages of the Diameter application are handled. -See <seealso marker="diameter_app">diameter_app(3)</seealso> for -the required interface and semantics.</p> +See &man_app; for the required interface and semantics.</p> </item> <tag><c>{state, term()}</c></tag> @@ -174,7 +171,7 @@ the required interface and semantics.</p> <p> The initial callback state. The prevailing state is passed to some -<seealso marker="diameter_app">diameter_app(3)</seealso> +&man_app; callbacks, which can then return a new state. Defaults to the value of the <c>alias</c> option if unspecified.</p> </item> @@ -182,14 +179,13 @@ Defaults to the value of the <c>alias</c> option if unspecified.</p> <tag><c>{call_mutates_state, true|false}</c></tag> <item> <p> -Specifies whether or not the <seealso -marker="diameter_app#pick_peer">pick_peer/4</seealso> +Specifies whether or not the &app_pick_peer; application callback can modify the application state, Defaults to <c>false</c> if unspecified.</p> <note> <p> -<seealso marker="diameter_app#pick_peer">pick_peer</seealso> callbacks +&app_pick_peer; callbacks are serialized when these are allowed to modify state, which is a potential performance bottleneck. A simple Diameter client may suffer no ill effects from using mutable @@ -203,10 +199,8 @@ probably avoid it.</p> <p> Determines the manner in which incoming answer messages containing decode errors are handled. -If <c>callback</c> then errors result in a <seealso -marker="diameter_app#handle_answer">handle_answer/4</seealso> -callback in the same fashion as for <seealso -marker="diameter_app#handle_request">handle_request/3</seealso>, with +If <c>callback</c> then errors result in a &app_handle_answer; +callback in the same fashion as for &app_handle_request;, with errors communicated in the <c>errors</c> field of the <c>#diameter_packet{}</c> record passed to the callback. If <c>report</c> then an answer containing errors is discarded @@ -214,7 +208,7 @@ without a callback and a warning report is written to the log. If <c>discard</c> then an answer containing errors is silently discarded without a callback. In both the <c>report</c> and <c>discard</c> cases the return value -for the <seealso marker="#call">call/4</seealso> invocation in +for the &call; invocation in question is as if a callback had taken place and returned <c>{error, failure}</c>.</p> @@ -231,7 +225,7 @@ Defaults to <c>report</c> if unspecified.</p> <item> <p> -Options available to <seealso marker="#call">call/4</seealso> when +Options available to &call; when sending an outgoing Diameter request. Has one of the following types.</p> @@ -247,18 +241,18 @@ itself. Multiple options append to the argument list.</p> </item> -<tag><c>{filter, <seealso marker="#peer_filter">peer_filter()</seealso>}</c></tag> +<tag><c>{filter, &peer_filter;}</c></tag> <item> <p> A filter to apply to the list of available peers before passing them to -the <seealso marker="diameter_app#pick_peer">pick_peer/4</seealso> +the &app_pick_peer; callback for the application in question. Multiple options are equivalent a single <c>all</c> filter on the corresponding list of filters. Defaults to <c>none</c>.</p> </item> -<tag><c>{timeout, <seealso marker="diameter_dict#DATA_TYPES">Unsigned32()</seealso>}</c></tag> +<tag><c>{timeout, &dict_Unsigned32;}</c></tag> <item> <p> The number of milliseconds after which the request should @@ -269,21 +263,17 @@ Defaults to 5000.</p> <tag><c>detach</c></tag> <item> <p> -Causes <seealso marker="#call">call/4</seealso> to return <c>ok</c> as +Causes &call; to return <c>ok</c> as soon as the request in question has been encoded instead of waiting for and returning -the result from a subsequent -<seealso marker="diameter_app#handle_answer">handle_answer/4</seealso> -or <seealso -marker="diameter_app#handle_error">handle_error/4</seealso> -callback.</p> +the result from a subsequent &app_handle_answer; or +&app_handle_error; callback.</p> </item> </taglist> <p> -An invalid option will cause <seealso marker="#call">call/4</seealso> -to fail.</p> +An invalid option will cause &call; to fail.</p> <marker id="capability"/> </item> @@ -300,9 +290,9 @@ Has one of the following types.</p> <taglist> -<tag><c>{'Origin-Host', <seealso marker="diameter_dict#DATA_TYPES">DiameterIdentity()</seealso>}</c></tag> -<tag><c>{'Origin-Realm', <seealso marker="diameter_dict#DATA_TYPES">DiameterIdentity()</seealso>}</c></tag> -<tag><c>{'Host-IP-Address', [<seealso marker="diameter_dict#DATA_TYPES">Address()</seealso>]}</c></tag> +<tag><c>{'Origin-Host', &dict_DiameterIdentity;}</c></tag> +<tag><c>{'Origin-Realm', &dict_DiameterIdentity;}</c></tag> +<tag><c>{'Host-IP-Address', [&dict_Address;]}</c></tag> <item> <p> An address list is available to the start function of a @@ -312,24 +302,23 @@ Host-IP-Address need not be specified if the transport start function returns an address list.</p> </item> -<tag><c>{'Vendor-Id', <seealso marker="diameter_dict#DATA_TYPES">Unsigned32()</seealso>}</c></tag> -<tag><c>{'Product-Name', <seealso marker="diameter_dict#DATA_TYPES">UTF8String()</seealso>}</c></tag> -<tag><c>{'Origin-State-Id', <seealso marker="diameter_dict#DATA_TYPES">Unsigned32()</seealso>}</c></tag> +<tag><c>{'Vendor-Id', &dict_Unsigned32;}</c></tag> +<tag><c>{'Product-Name', &dict_UTF8String;}</c></tag> +<tag><c>{'Origin-State-Id', &dict_Unsigned32;}</c></tag> <item> <p> Origin-State-Id is optional but will be included in outgoing messages sent by diameter itself: CER/CEA, DWR/DWA and DPR/DPA. Setting a value of <c>0</c> (zero) is equivalent to not setting a value as documented in RFC 3588. -The function <seealso -marker="#origin_state_id">origin_state_id/0</seealso> +The function &origin_state_id; can be used as to retrieve a value that is computed when the diameter application is started.</p> </item> -<tag><c>{'Supported-Vendor-Id', [<seealso marker="diameter_dict#DATA_TYPES">Unsigned32()</seealso>]}</c></tag> -<tag><c>{'Auth-Application-Id', [<seealso marker="diameter_dict#DATA_TYPES">Unsigned32()</seealso>]}</c></tag> -<tag><c>{'Inband-Security-Id', [<seealso marker="diameter_dict#DATA_TYPES">Unsigned32()</seealso>]}</c></tag> +<tag><c>{'Supported-Vendor-Id', [&dict_Unsigned32;]}</c></tag> +<tag><c>{'Auth-Application-Id', [&dict_Unsigned32;]}</c></tag> +<tag><c>{'Inband-Security-Id', [&dict_Unsigned32;]}</c></tag> <item> <p> Inband-Security-Id defaults to the empty list, which is equivalent to a @@ -338,9 +327,9 @@ If 1 (= TLS) is specified then TLS is selected if the CER/CEA received from the peer offers it.</p> </item> -<tag><c>{'Acct-Application-Id', [<seealso marker="diameter_dict#DATA_TYPES">Unsigned32()</seealso>]}</c></tag> -<tag><c>{'Vendor-Specific-Application-Id', [<seealso marker="diameter_dict#DATA_TYPES">Grouped()</seealso>]}</c></tag> -<tag><c>{'Firmware-Revision', <seealso marker="diameter_dict#DATA_TYPES">Unsigned32()</seealso>}</c></tag> +<tag><c>{'Acct-Application-Id', [&dict_Unsigned32;]}</c></tag> +<tag><c>{'Vendor-Specific-Application-Id', [&dict_Grouped;]}</c></tag> +<tag><c>{'Firmware-Revision', &dict_Unsigned32;}</c></tag> </taglist> @@ -369,7 +358,7 @@ eval(F) -> </pre> <p> -Applying an <c><seealso marker="#evaluable">evaluable()</seealso></c> +Applying an <c>&evaluable;</c> <c>E</c> to an argument list <c>A</c> is meant in the sense of <c>eval([E|A])</c>.</p> @@ -380,10 +369,7 @@ situations in which the fun is not short-lived and code is to be upgraded at runtime since any processes retaining such a fun will have a reference to old code. In particular, such a value is typically inappropriate in -configuration passed to <seealso -marker="#start_service">start_service/2</seealso> or -<seealso -marker="#add_transport">add_transport/2</seealso>.</p> +configuration passed to &start_service; or &add_transport;.</p> </warning> <marker id="peer_filter"/> @@ -392,10 +378,8 @@ marker="#add_transport">add_transport/2</seealso>.</p> <tag><c>peer_filter() = term()</c></tag> <item> <p> -A filter passed to <seealso marker="#call">call/4</seealso> -in order to select candidate peers for a -<seealso marker="diameter_app#pick_peer">pick_peer/4</seealso> -callback. +A filter passed to &call; in order to select candidate peers for a +&app_pick_peer; callback. Has one of the following types.</p> <taglist> @@ -426,42 +410,42 @@ or any peer if the request does not contain a <c>Destination-Realm</c> AVP.</p> </item> -<tag><c>{host, any|<seealso marker="diameter_dict#DATA_TYPES">DiameterIdentity()</seealso>}</c></tag> +<tag><c>{host, any|&dict_DiameterIdentity;}</c></tag> <item> <p> Matches only those peers whose <c>Origin-Host</c> has the specified value, or all peers if the atom <c>any</c>.</p> </item> -<tag><c>{realm, any|<seealso marker="diameter_dict#DATA_TYPES">DiameterIdentity()</seealso></c></tag> +<tag><c>{realm, any|&dict_DiameterIdentity;</c></tag> <item> <p> Matches only those peers whose <c>Origin-Realm</c> has the specified value, or all peers if the atom <c>any</c>.</p> </item> -<tag><c>{eval, <seealso marker="#evaluable">evaluable()</seealso>}</c></tag> +<tag><c>{eval, &evaluable;}</c></tag> <item> <p> -Matches only those peers for which the specified <c><seealso -marker="#evaluable">evaluable()</seealso></c> returns +Matches only those peers for which the specified +<c>&evaluable;</c> returns <c>true</c> on the connection's <c>diameter_caps</c> record. Any other return value or exception is equivalent to <c>false</c>.</p> </item> -<tag><c>{neg, <seealso marker="#peer_filter">peer_filter()</seealso>}</c></tag> +<tag><c>{neg, &peer_filter;}</c></tag> <item> <p> Matches only those peers not matched by the specified filter.</p> </item> -<tag><c>{all, [<seealso marker="#peer_filter">peer_filter()</seealso>]}</c></tag> +<tag><c>{all, [&peer_filter;]}</c></tag> <item> <p> Matches only those peers matched by each filter in the specified list.</p> </item> -<tag><c>{any, [<seealso marker="#peer_filter">peer_filter()</seealso>]}</c></tag> +<tag><c>{any, [&peer_filter;]}</c></tag> <item> <p> Matches only those peers matched by at least one filter in the @@ -477,15 +461,12 @@ that matches no peer.</p> <note> <p> The <c>host</c> and <c>realm</c> filters examine the -outgoing request as passed to <seealso marker="#call">call/4</seealso>, -assuming that this is a record- or list-valued <c><seealso -marker="diameter_app#message">diameter_app:message()</seealso></c>, +outgoing request as passed to &call;, +assuming that this is a record- or list-valued <c>&app_message;</c>, and that the message contains at most one of each AVP. -If this is not the case then the <c>{host|realm, <seealso -marker="diameter_dict#DATA_TYPES">DiameterIdentity()</seealso>}</c> +If this is not the case then the <c>{host|realm, &dict_DiameterIdentity;}</c> filters must be used to achieve the desired result. -An empty <c><seealso -marker="diameter_dict#DATA_TYPES">DiameterIdentity()</seealso></c> +An empty <c>&dict_DiameterIdentity;</c> (which should not be typical) matches all hosts/realms for the purposes of filtering.</p> </note> @@ -504,7 +485,7 @@ candidates list.</p> <item> <p> An event message sent to processes that have subscribed to these using -<seealso marker="#subscribe">subscribe/1</seealso>.</p> +&subscribe;.</p> <p> The <c>info</c> field of the event record can have one of the @@ -528,9 +509,9 @@ implies the termination of all transport processes.</p> <tag><c>{down, Ref, Peer, Config}</c></tag> <item> <pre> -Ref = <seealso marker="#transport_ref">transport_ref()</seealso> -Peer = <seealso marker="diameter_app#peer">diameter_app:peer()</seealso> -Config = {connect|listen, [<seealso marker="#transport_opt">transport_opt()</seealso>]} +Ref = &transport_ref; +Peer = &app_peer; +Config = {connect|listen, [&transport_opt;]} Pkt = #diameter_packet{} </pre> @@ -546,7 +527,8 @@ connectivity.</p> <p> Note that a single <c>up</c>/<c>down</c> event for a given peer -corresponds to one <seealso marker="diameter_app#peer_up">peer_up/peer_down</seealso> +corresponds to one +<seealso marker="diameter_app#peer_up">peer_up/peer_down</seealso> callback for each of the Diameter applications negotiated during capablilities exchange. That is, the event communicates connectivity with the @@ -557,23 +539,21 @@ respect to individual Diameter applications.</p> <tag><c>{reconnect, Ref, Opts}</c></tag> <item> <pre> -Ref = <seealso marker="#transport_ref">transport_ref()</seealso> -Opts = [<seealso marker="#transport_opt">transport_opt()</seealso>] +Ref = &transport_ref; +Opts = [&transport_opt;] </pre> <p> A connecting transport is attempting to establish/reestablish a -transport connection with a peer following <seealso -marker="#reconnect_timer">reconnect_timer</seealso> or -<seealso marker="#watchdog_timer">watchdog_timer</seealso> -expiry.</p> +transport connection with a peer following &reconnect_timer; or +&watchdog_timer; expiry.</p> </item> <tag><c>{closed, Ref, Reason, Config}</c></tag> <item> <pre> -Ref = <seealso marker="#transport_ref">transport_ref()</seealso> -Config = {connect|listen, [<seealso marker="#transport_opt">transport_opt()</seealso>]} +Ref = &transport_ref; +Config = {connect|listen, [&transport_opt;]} </pre> <p> @@ -589,7 +569,7 @@ Result = ResultCode | {capabilities_cb, CB, ResultCode|discard} Caps = #diameter_caps{} Pkt = #diameter_packet{} ResultCode = integer() -CB = <seealso marker="#evaluable">evaluable()</seealso> +CB = &evaluable; </pre> <p> @@ -620,8 +600,7 @@ indicated result code. <tag><c>{'CER', timeout}</c></tag> <item> <p> -An expected CER was not received within <seealso -marker="#capx_timeout">capx_timeout</seealso> of +An expected CER was not received within &capx_timeout; of connection establishment.</p> </item> @@ -661,8 +640,7 @@ An incoming CEA contained errors and has been rejected. <tag><c>{'CEA', timeout}</c></tag> <item> <p> -An expected CEA was not received within <seealso -marker="#capx_timeout">capx_timeout</seealso> +An expected CEA was not received within &capx_timeout; of connection establishment.</p> </item> @@ -672,8 +650,8 @@ of connection establishment.</p> <tag><c>{watchdog, Ref, PeerRef, {From, To}, Config}</c></tag> <item> <pre> -Ref = <seealso marker="#transport_ref">transport_ref()</seealso> -PeerRef = <seealso marker="diameter_app#peer_ref">diameter_app:peer_ref()</seealso> +Ref = &transport_ref; +PeerRef = &app_peer_ref; From, To = initial | okay | suspect | down | reopen Config = {connect|listen, [transport_opt()]} </pre> @@ -694,8 +672,7 @@ info fields of forms other than the above.</p> <tag><c>service_name() = term()</c></tag> <item> <p> -The name of a service as passed to <seealso -marker="#start_service">start_service/2</seealso> and with which the +The name of a service as passed to &start_service; and with which the service is identified. There can be at most one service with a given name on a given node. Note that <seealso marker="erts:erlang#make_ref-0">erlang:make_ref/0</seealso> @@ -707,25 +684,21 @@ can be used to generate a service name that is somewhat unique.</p> <tag><c>service_opt()</c></tag> <item> <p> -An option passed to <seealso -marker="#start_service">start_service/2</seealso>. -Can be any <c><seealso marker="#capability">capability()</seealso></c> as -well as the following.</p> +An option passed to &start_service;. +Can be any <c>&capability;</c> as well as the following.</p> <taglist> -<tag><c>{application, [<seealso marker="#application_opt">application_opt()</seealso>]}</c></tag> +<tag><c>{application, [&application_opt;]}</c></tag> <item> <p> Defines a Diameter application supported by the service.</p> <p> -A service must configure one <seealso -marker="#application">application</seealso> for each Diameter +A service must configure one &application; for each Diameter application it intends to support. -For an outgoing Diameter request, the relevant <c><seealso -marker="#application_alias">application_alias()</seealso></c> is -passed to <seealso marker="#call">call/4</seealso>, while for an +For an outgoing Diameter request, the relevant <c>&application_alias;</c> is +passed to &call;, while for an incoming request the application identifier in the message header determines the application, the identifier being specified in the application's <seealso marker="diameter_dict">dictionary</seealso> @@ -746,7 +719,7 @@ same peer are accepted by the service.</p> If type <c>[node()]</c> then a connection is rejected if another already exists on any of the specified nodes. Values of type <c>false</c>, <c>node</c>, <c>nodes</c> or -<seealso marker="#evaluable">evaluable()</seealso> are equivalent to +&evaluable; are equivalent to values <c>[]</c>, <c>[node()]</c>, <c>[node()|nodes()]</c> and the evaluated value, respectively, evaluation of each expression taking place whenever a new connection is to be established. @@ -761,15 +734,13 @@ by their own peer and watchdog state machines.</p> Defaults to <c>nodes</c>.</p> </item> -<tag><c>{sequence, {H,N} | <seealso - marker="#evaluable">evaluable()</seealso>}</c></tag> +<tag><c>{sequence, {H,N} | &evaluable;}</c></tag> <item> <p> Specifies a constant value <c>H</c> for the topmost <c>32-N</c> bits of of 32-bit End-to-End and Hop-by-Hop identifiers generated by the service, either explicity or as a return value of a function -to be evaluated at <seealso -marker="#start_service">start_service/2</seealso>. +to be evaluated at &start_service;. In particular, an identifier <c>Id</c> is mapped to a new identifier as follows.</p> <pre> @@ -798,13 +769,12 @@ Defaults to <c>{0,32}</c>.</p> <tag><c>transport_opt()</c></tag> <item> <p> -An option passed to <seealso -marker="#add_transport">add_transport/2</seealso>. +An option passed to &add_transport;. Has one of the following types.</p> <taglist> <marker id="applications"/> -<tag><c>{applications, [<seealso marker="#application_alias">application_alias()</seealso>]}</c></tag> +<tag><c>{applications, [&application_alias;]}</c></tag> <item> <p> The list of Diameter applications to which the transport should be @@ -814,7 +784,7 @@ Applications not configured on the service in question are ignored.</p> </item> <marker id="capabilities"/> -<tag><c>{capabilities, [<seealso marker="#capability">capability()</seealso>]}</c></tag> +<tag><c>{capabilities, [&capability;]}</c></tag> <item> <p> AVP's used to construct outgoing CER/CEA messages. @@ -824,19 +794,17 @@ question.</p> <p> Specifying a capability as a transport option may be particularly appropriate for Inband-Security-Id, in case -TLS is desired over TCP as implemented by -<seealso marker="diameter_tcp">diameter_tcp(3)</seealso>.</p> +TLS is desired over TCP as implemented by &man_tcp;.</p> </item> <marker id="capabilities_cb"/> -<tag><c>{capabilities_cb, <seealso marker="#evaluable">evaluable()</seealso>}</c></tag> +<tag><c>{capabilities_cb, &evaluable;}</c></tag> <item> <p> 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 <c><seealso -marker="#transport_ref">transport_ref()</seealso></c> and +Applied to the <c>&transport_ref;</c> and <c>#diameter_caps{}</c> record of the connection.</p> <p> @@ -871,23 +839,22 @@ Equivalent to returning <c>3010</c>, DIAMETER_UNKNOWN_PEER.</p> <p> Returning anything but <c>ok</c> or a 2xxx series result code causes the transport connection to be broken. -Multiple <seealso marker="#capabilities_cb">capabilities_cb</seealso> +Multiple &capabilities_cb; options can be specified, in which case the corresponding callbacks are applied until either all return <c>ok</c> or one does not.</p> </item> <marker id="capx_timeout"/> -<tag><c>{capx_timeout, - <seealso marker="diameter_dict#DATA_TYPES">Unsigned32()</seealso>}</c></tag> +<tag><c>{capx_timeout, &dict_Unsigned32;}</c></tag> <item> <p> The number of milliseconds after which a transport process having an established transport connection will be terminated if the expected capabilities exchange message (CER or CEA) is not received from the peer. For a connecting transport, the timing reconnection attempts is -governed by <seealso marker="#watchdog_timer">watchdog_timer</seealso> or -<seealso marker="#reconnect_timer">reconnect_timer</seealso> expiry. +governed by &watchdog_timer; or +&reconnect_timer; expiry. For a listening transport, the peer determines the timing.</p> <p> @@ -895,21 +862,19 @@ Defaults to 10000.</p> </item> <marker id="disconnect_cb"/> -<tag><c>{disconnect_cb, <seealso marker="#evaluable">evaluable()</seealso>}</c></tag> +<tag><c>{disconnect_cb, &evaluable;}</c></tag> <item> <p> A callback invoked prior to terminating the transport process of a transport connection having watchdog state <c>OKAY</c>. Applied to <c>Reason=transport|service|application</c> and the -<c><seealso marker="#transport_ref">transport_ref()</seealso></c> and -<c><seealso marker="diameter_app#peer">diameter_app:peer()</seealso></c> +<c>&transport_ref;</c> and +<c>&app_peer;</c> in question, <c>Reason</c> indicating whether the the diameter application is being stopped, the service in question is being stopped -at <seealso -marker="#stop_service">stop_service/1</seealso> or -the transport in question is being removed at <seealso -marker="#remove_transport">remove_transport/2</seealso>, +at &stop_service; or +the transport in question is being removed at &remove_transport;, respectively.</p> <p> @@ -934,8 +899,7 @@ Defaults to <c>rebooting</c> for <c>Reason=service|application</c> and <c>goaway</c> for <c>Reason=transport</c>.</p> </item> -<tag><c>{timeout, - <seealso marker="diameter_dict#DATA_TYPES">Unsigned32()</seealso>}</c></tag> +<tag><c>{timeout, &dict_Unsigned32;}</c></tag> <item> <p> The number of milliseconds after which the transport process is @@ -966,7 +930,7 @@ Equivalent to not having configured the callback.</p> </taglist> <p> -Multiple <seealso marker="#disconnect_cb">disconnect_cb</seealso> +Multiple &disconnect_cb; options can be specified, in which case the corresponding callbacks are applied until one of them returns a value other than <c>ignore</c>. @@ -981,7 +945,7 @@ Defaults to a single callback returning <c>dpr</c>.</p> <tag><c>{reconnect_timer, Tc}</c></tag> <item> <pre> -Tc = <seealso marker="diameter_dict#DATA_TYPES">Unsigned32()</seealso> +Tc = &dict_Unsigned32; </pre> <p> @@ -989,8 +953,7 @@ For a connecting transport, the RFC 3588 Tc timer, in milliseconds. Note that this timer determines the frequency with which a transport will attempt to establish a connection with its peer only <em>before</em> an initial connection is established: once there is an initial -connection it's <seealso -marker="#watchdog_timer">watchdog_timer</seealso> that determines the +connection it's &watchdog_timer; that determines the frequency of reconnection attempts, as required by RFC 3539.</p> <p> @@ -1000,8 +963,7 @@ regarded as an initial connection rather than a reestablishment, causing the RFC 3539 state machine to pass to state OKAY rather than REOPEN. Note that these semantics are not governed by the RFC and -that a listening transport's <seealso -marker="#reconnect_timer">reconnect_timer</seealso> should be greater +that a listening transport's &reconnect_timer; should be greater than its peer's Tw plus jitter.</p> <p> @@ -1011,13 +973,11 @@ transport.</p> <marker id="transport_config"/> <tag><c>{transport_config, term()}</c></tag> -<tag><c>{transport_config, term(), <seealso marker="diameter_dict#DATA_TYPES">Unsigned32()</seealso>}</c></tag> +<tag><c>{transport_config, term(), &dict_Unsigned32;}</c></tag> <item> <p> -A term passed as the third argument to the <seealso -marker="diameter_transport#start">start/3</seealso> function of -the relevant <seealso -marker="#transport_module">transport_module</seealso> in order to +A term passed as the third argument to the &transport_start; function of +the relevant &transport_module; in order to start a transport process. Defaults to the empty list if unspecified.</p> @@ -1044,17 +1004,15 @@ To listen on both SCTP and TCP, define one transport for each.</p> <tag><c>{transport_module, atom()}</c></tag> <item> <p> -A module implementing a transport process as defined in <seealso -marker="diameter_transport">diameter_transport(3)</seealso>. +A module implementing a transport process as defined in &man_transport;. Defaults to <c>diameter_tcp</c> if unspecified.</p> <p> -Multiple <c>transport_module</c> and <seealso -marker="#transport_config">transport_config</seealso> +Multiple <c>transport_module</c> and &transport_config; options are allowed. The order of these is significant in this case (and only in this case), a <c>transport_module</c> being paired with the first -<seealso marker="#transport_config">transport_config</seealso> +&transport_config; following it in the options list, or the default value for trailing modules. Transport starts will be attempted with each of the @@ -1066,7 +1024,7 @@ corresponding timeout (see below) or all fail.</p> <tag><c>{watchdog_timer, TwInit}</c></tag> <item> <pre> -TwInit = <seealso marker="diameter_dict#DATA_TYPES">Unsigned32()</seealso> +TwInit = &dict_Unsigned32; | {M,F,A} </pre> @@ -1088,10 +1046,8 @@ Defaults to 30000 if unspecified.</p> <p> Unrecognized options are silently ignored but are returned unmodified -by <seealso -marker="#service_info">service_info/2</seealso> and can be referred to -in predicate functions passed to <seealso -marker="#remove_transport">remove_transport/2</seealso>.</p> +by &service_info; and can be referred to +in predicate functions passed to &remove_transport;.</p> <marker id="transport_ref"/> </item> @@ -1099,8 +1055,7 @@ marker="#remove_transport">remove_transport/2</seealso>.</p> <tag><c>transport_ref() = reference()</c></tag> <item> <p> -An reference returned by <seealso -marker="#add_transport">add_transport/2</seealso> that +An reference returned by &add_transport; that identifies the configuration.</p> </item> @@ -1118,9 +1073,9 @@ identifies the configuration.</p> -> {ok, Ref} | {error, Reason}</name> <fsummary>Add transport capability to a service.</fsummary> <type> -<v>SvcName = <seealso marker="#service_name">service_name()</seealso></v> -<v>Opt = <seealso marker="#transport_opt">transport_opt()</seealso></v> -<v>Ref = <seealso marker="#transport_ref">transport_ref()</seealso></v> +<v>SvcName = &service_name;</v> +<v>Opt = &transport_opt;</v> +<v>Ref = &transport_ref;</v> <v>Reason = term()</v> </type> <desc> @@ -1139,8 +1094,7 @@ one peer, an listening transport potentially with many.</p> The diameter application takes responsibility for exchanging CER/CEA with the peer. Upon successful completion of capabilities exchange the service -calls each relevant application module's <seealso -marker="diameter_app#peer_up">peer_up/3</seealso> callback +calls each relevant application module's &app_peer_up; callback after which the caller can exchange Diameter messages with the peer over the transport. In addition to CER/CEA, the service takes responsibility for the @@ -1169,11 +1123,11 @@ its transports.</p> <name>call(SvcName, App, Request, [Opt]) -> Answer | ok | {error, Reason}</name> <fsummary>Send a Diameter request message.</fsummary> <type> -<v>SvcName = <seealso marker="#service_name">service_name()</seealso></v> -<v>App = <seealso marker="#application_alias">application_alias()</seealso></v> -<v>Request = <seealso marker="diameter_app#message">diameter_app:message()</seealso></v> +<v>SvcName = &service_name;</v> +<v>App = &application_alias;</v> +<v>Request = &app_message;</v> <v>Answer = term()</v> -<v>Opt = <seealso marker="#call_opt">call_opt()</seealso></v> +<v>Opt = &call_opt;</v> </type> <desc> <p> @@ -1182,37 +1136,29 @@ Send a Diameter request message.</p> <p> <c>App</c> specifies the Diameter application in which the request is defined and callbacks to the corresponding callback module -will follow as described below and in <seealso -marker="diameter_app">diameter_app(3)</seealso>. +will follow as described below and in &man_app;. Unless the <c>detach</c> option is specified, the call returns either when an answer message is received from the peer or an error occurs. In the answer case, the return value is as returned by a -<seealso -marker="diameter_app#handle_answer">handle_answer/4</seealso> -callback. +&app_handle_answer; callback. In the error case, whether or not the error is returned directly -by diameter or from a <seealso -marker="diameter_app#handle_error">handle_error/4</seealso> +by diameter or from a &app_handle_error; callback depends on whether or not the outgoing request is successfully encoded for transmission to the peer, the cases being documented below.</p> <p> If there are no suitable peers, or if -<seealso marker="diameter_app#pick_peer">pick_peer/4</seealso> +&app_pick_peer; rejects them by returning <c>false</c>, then <c>{error,no_connection}</c> is returned. -Otherwise <seealso marker="diameter_app#pick_peer">pick_peer/4</seealso> -is followed by a -<seealso -marker="diameter_app#prepare_request">prepare_request/3</seealso> -callback, the message is encoded and then sent.</p> +Otherwise &app_pick_peer; is followed by a +&app_prepare_request; callback, the message is encoded and then sent.</p> <p> There are several error cases which may prevent an answer from being received and passed to a -<seealso marker="diameter_app#handle_answer">handle_answer/4</seealso> -callback:</p> +&app_handle_answer; callback:</p> <list> @@ -1227,16 +1173,14 @@ is returned.</p> <p> If the request is successfully encoded and sent but the answer times out then a -<seealso marker="diameter_app#handle_error">handle_error/4</seealso> -callback takes place with <c>Reason = timeout</c>.</p> +&app_handle_error; callback takes place with <c>Reason = timeout</c>.</p> </item> <item> <p> If the request is successfully encoded and sent but the service in question is stopped before an answer is received then a -<seealso marker="diameter_app#handle_error">handle_error/4</seealso> -callback takes place with <c>Reason = cancel</c>.</p> +&app_handle_error; callback takes place with <c>Reason = cancel</c>.</p> </item> <item> @@ -1245,18 +1189,11 @@ If the transport connection with the peer goes down after the request has been sent but before an answer has been received then an attempt is made to resend the request to an alternate peer. If no such peer is available, or if the subsequent -<seealso marker="diameter_app#pick_peer">pick_peer/4</seealso> -callback rejects the candidates, then a -<seealso marker="diameter_app#handle_error">handle_error/4</seealso> -callback takes place with <c>Reason = failover</c>. -If a peer is selected then a -<seealso -marker="diameter_app#prepare_retransmit">prepare_retransmit/3</seealso> +&app_pick_peer; callback rejects the candidates, then a +&app_handle_error; callback takes place with <c>Reason = failover</c>. +If a peer is selected then a &app_prepare_retransmit; callback takes place, after which the semantics are the same as -following an initial -<seealso marker="diameter_app#prepare_request"> -prepare_request/3</seealso> -callback.</p> +following an initial &app_prepare_request; callback.</p> </item> <item> @@ -1290,7 +1227,7 @@ transport connection.</p> <!-- ===================================================================== --> <func> -<name>origin_state_id() -> <seealso marker="diameter_dict#DATA_TYPES">Unsigned32()</seealso></name> +<name>origin_state_id() -> &dict_Unsigned32;</name> <fsummary>Returns a reasonable Origin-State-Id.</fsummary> <desc> <p> @@ -1299,7 +1236,7 @@ outgoing messages.</p> <p> The value returned is the number of seconds since 19680120T031408Z, -the first value that can be encoded as a Diameter <c><seealso marker="diameter_dict#DATA_TYPES">Time()</seealso></c>, +the first value that can be encoded as a Diameter <c>&dict_Time;</c>, at the time the diameter application was started.</p> <marker id="remove_transport"/> @@ -1312,11 +1249,11 @@ at the time the diameter application was started.</p> <name>remove_transport(SvcName, Pred) -> ok | {error, Reason}</name> <fsummary>Remove previously added transports.</fsummary> <type> -<v>SvcName = <seealso marker="#service_name">service_name()</seealso></v> -<v>Pred = Fun | MFA | <seealso marker="#transport_ref">transport_ref()</seealso> | list() | true | false</v> +<v>SvcName = &service_name;</v> +<v>Pred = Fun | MFA | &transport_ref; | list() | true | false</v> <v></v> -<v>Fun = fun((<seealso marker="#transport_ref">transport_ref()</seealso>, connect|listen, list()) -> boolean())</v> -<v> | fun((<seealso marker="#transport_ref">transport_ref()</seealso>, list()) -> boolean())</v> +<v>Fun = fun((&transport_ref;, connect|listen, list()) -> boolean())</v> +<v> | fun((&transport_ref;, list()) -> boolean())</v> <v> | fun((list()) -> boolean())</v> <v>MFA = {atom(), atom(), list()}</v> <v>Reason = term()</v> @@ -1329,8 +1266,7 @@ Remove previously added transports.</p> <c>Pred</c> determines which transports to remove. An arity-3-valued <c>Pred</c> removes all transports for which <c>Pred(Ref, Type, Opts)</c> returns <c>true</c>, where <c>Type</c> and -<c>Opts</c> are as passed to <seealso -marker="#add_transport">add_transport/2</seealso> and <c>Ref</c> is +<c>Opts</c> are as passed to &add_transport; and <c>Ref</c> is as returned by it. The remaining forms are equivalent to an arity-3 fun as follows.</p> @@ -1348,8 +1284,7 @@ Pred = {M,F,A}: fun(Ref, Type, Opts) -> apply(M, F, [Ref, Type, Opts | A]) end Removing a transport causes the corresponding transport processes to be terminated. Whether or not a DPR message is sent to a peer is -controlled by -value of <seealso marker="disconnect_cb">disconnect_cb</seealso> +controlled by value of &disconnect_cb; configured on the transport.</p> <marker id="service_info"/> @@ -1362,7 +1297,7 @@ configured on the transport.</p> <name>service_info(SvcName, Info) -> term()</name> <fsummary>Return information about a started service.</fsummary> <type> -<v>SvcName = <seealso marker="#service_name">service_name()</seealso></v> +<v>SvcName = &service_name;</v> <v>Info = Item | [Info]</v> <v>Item = atom()</v> </type> @@ -1393,15 +1328,13 @@ returned.</p> <tag><c>'Firmware-Revision'</c></tag> <item> <p> -Return a capability value as configured with <seealso -marker="#start_service">start_service/2</seealso>.</p> +Return a capability value as configured with &start_service;.</p> </item> <tag><c>applications</c></tag> <item> <p> -Return the list of applications as configured with <seealso -marker="#start_service">start_service/2</seealso>. +Return the list of applications as configured with &start_service;. </p> </item> @@ -1409,16 +1342,14 @@ marker="#start_service">start_service/2</seealso>. <item> <p> Return a tagged list of all capabilities values as configured with -<seealso -marker="#start_service">start_service/2</seealso>.</p> +&start_service;.</p> </item> <tag><c>transport</c></tag> <item> <p> Return a list containing one entry for each of the service's transport -as configured with <seealso -marker="#add_transport">add_transport/2</seealso>. +as configured with &add_transport;. Each entry is a tagged list containing both configuration and information about established peer connections. An example return value with for a client service with Origin-Host @@ -1473,20 +1404,15 @@ An example return value with for a client service with Origin-Host </pre> <p> -Here <c>ref</c> is a <c><seealso -marker="#transport_ref">transport_ref()</seealso></c> and <c>options</c> -the corresponding <c><seealso -marker="#transport_opt">transport_opt()</seealso></c> list passed to <seealso -marker="#add_transport">add_transport/2</seealso>. +Here <c>ref</c> is a <c>&transport_ref;</c> and <c>options</c> +the corresponding <c>&transport_opt;</c> list passed to +&add_transport;. The <c>watchdog</c> entry shows the state of a connection's RFC 3539 watchdog state machine. -The <c>peer</c> entry identifies the <c><seealso -marker="diameter_app#peer_ref">diameter_app:peer_ref()</seealso></c> for -which there will have been <seealso -marker="diameter_app#peer_up">peer_up</seealso> callbacks for the +The <c>peer</c> entry identifies the <c>&app_peer_ref;</c> for +which there will have been &app_peer_up; callbacks for the Diameter applications identified by the <c>apps</c> entry, -<c>common</c> being the <c><seealso -marker="#application_alias">application_alias()</seealso></c>. +<c>common</c> being the <c>&application_alias;</c>. The <c>caps</c> entry identifies the capabilities sent by the local node and received from the peer during capabilities exchange. The <c>port</c> entry displays socket-level information about the @@ -1505,8 +1431,8 @@ during the lifetime of the transport configuration.</p> <p> A listening transport presents its information slightly differently -since there may be multiple accepted connections for the same <c><seealso -marker="#transport_ref">transport_ref()</seealso></c>. +since there may be multiple accepted connections for the same +<c>&transport_ref;</c>. The <c>transport</c> info returned by a server with a single client connection might look as follows.</p> @@ -1633,23 +1559,20 @@ contrast to <c>transport</c> info.</p> <item> <p> Return a <c>{{Counter, Ref}, non_neg_integer()}</c> list of counter values. -<c>Ref</c> can be either a <c><seealso -marker="#transport_ref">transport_ref()</seealso></c> -or a <c><seealso -marker="diameter_app#peer_ref">diameter_app:peer_ref()</seealso></c>. +<c>Ref</c> can be either a <c>&transport_ref;</c> +or a <c>&app_peer_ref;</c>. Entries for the latter are folded into corresponding entries for the former as peer connections go down. -Entries for both are removed at <seealso -marker="#remove_transport">remove_transport/2</seealso>. +Entries for both are removed at &remove_transport;. The Diameter-level statistics returned by <c>transport</c> and <c>connections</c> info are based upon these entries.</p> </item> -<tag><c><seealso marker="diameter_app#peer_ref">diameter_app:peer_ref()</seealso></c></tag> +<tag><c>&app_peer_ref;</c></tag> <item> <p> Return transport configuration associated with a single peer, as -passed to <seealso marker="#add_transport">add_transport/2</seealso>. +passed to &add_transport;. The returned list is empty if the peer is unknown. Otherwise it contains the <c>ref</c>, <c>type</c> and <c>options</c> tuples as in <c>transport</c> and <c>connections</c> info above. @@ -1677,7 +1600,7 @@ For example:</p> <name>services() -> [SvcName]</name> <fsummary>Return the list of started services.</fsummary> <type> -<v>SvcName = <seealso marker="#service_name">service_name()</seealso></v> +<v>SvcName = &service_name;</v> </type> <desc> <p> @@ -1690,10 +1613,10 @@ Return the list of started services.</p> <!-- ===================================================================== --> <func> -<name>session_id(Ident) -> <seealso marker="diameter_dict#DATA_TYPES">OctetString()</seealso></name> +<name>session_id(Ident) -> &dict_OctetString;</name> <fsummary>Return a value for a Session-Id AVP.</fsummary> <type> -<v>Ident = <seealso marker="diameter_dict#DATA_TYPES">DiameterIdentity()</seealso></v> +<v>Ident = &dict_DiameterIdentity;</v> </type> <desc> <p> @@ -1730,8 +1653,8 @@ file, not by calling <c>start/0</c> explicitly.</p> <name>start_service(SvcName, Options) -> ok | {error, Reason}</name> <fsummary>Start a Diameter service.</fsummary> <type> -<v>SvcName = <seealso marker="#service_name">service_name()</seealso></v> -<v>Options = [<seealso marker="#service_opt">service_opt()</seealso>]</v> +<v>SvcName = &service_name;</v> +<v>Options = [&service_opt;]</v> <v>Reason = term()</v> </type> <desc> @@ -1741,8 +1664,7 @@ Start a diameter service.</p> <p> A service defines a locally-implemented Diameter node, specifying the capabilities to be advertised during capabilities exchange. -Transports are added to a service using <seealso -marker="#add_transport">add_transport/2</seealso>. +Transports are added to a service using &add_transport;. </p> <note> @@ -1777,7 +1699,7 @@ Stop the diameter application.</p> <name>stop_service(SvcName) -> ok | {error, Reason}</name> <fsummary>Stop a Diameter service.</fsummary> <type> -<v>SvcName = <seealso marker="#service_name">service_name()</seealso></v> +<v>SvcName = &service_name;</v> <v>Reason = term()</v> </type> <desc> @@ -1787,13 +1709,12 @@ Stop a diameter service.</p> <p> Stopping a service causes all associated transport connections to be broken. -A DPR message with be sent as in the case of <seealso -marker="#remove_transport">remove_transport/2</seealso>.</p> +A DPR message with be sent as in the case of &remove_transport;.</p> <note> <p> -Stopping a transport does not remove any associated transports: -<seealso marker="#remove_transport">remove_transport/2</seealso> must +Stopping a service does not remove any associated transports: +&remove_transport; must be called to remove transport configuration.</p> </note> @@ -1807,12 +1728,11 @@ be called to remove transport configuration.</p> <name>subscribe(SvcName) -> true</name> <fsummary>Subscribe to event messages.</fsummary> <type> -<v>SvcName = <seealso marker="#service_name">service_name()</seealso></v> +<v>SvcName = &service_name;</v> </type> <desc> <p> -Subscribe to <c><seealso -marker="#service_event">service_event()</seealso></c> messages from +Subscribe to <c>&service_event;</c> messages from a service.</p> <p> @@ -1831,7 +1751,7 @@ reception of all related events.</p> <name>unsubscribe(SvcName) -> true</name> <fsummary>Unsubscribe to event messages.</fsummary> <type> -<v>SvcName = <seealso marker="#service_name">service_name()</seealso></v> +<v>SvcName = &service_name;</v> </type> <desc> <p> @@ -1848,9 +1768,7 @@ Unsubscribe to event messages from a service.</p> <title>SEE ALSO</title> <p> -<seealso marker="diameter_app">diameter_app(3)</seealso>, -<seealso marker="diameter_transport">diameter_transport(3)</seealso>, -<seealso marker="diameter_dict">diameter_dict(4)</seealso></p> +&man_app;, &man_transport;, &man_dict;</p> </section> diff --git a/lib/diameter/doc/src/diameter_app.xml b/lib/diameter/doc/src/diameter_app.xml index 290b8a3984..c0aa2518af 100644 --- a/lib/diameter/doc/src/diameter_app.xml +++ b/lib/diameter/doc/src/diameter_app.xml @@ -1,5 +1,8 @@ <?xml version="1.0" encoding="latin1" ?> -<!DOCTYPE erlref SYSTEM "erlref.dtd"> +<!DOCTYPE erlref SYSTEM "erlref.dtd" [ + <!ENTITY % ents SYSTEM "diameter.ent" > + %ents; +]> <erlref> <header> @@ -41,15 +44,13 @@ Callback module of a Diameter application.</modulesummary> <description> <p> -A diameter service as started by <seealso -marker="diameter#start_service">diameter:start_service/2</seealso> +A diameter service as started by &mod_start_service; configures one of more Diameter applications, each of whose configuration specifies a callback that handles messages specific to the application. The messages and AVPs of the application are defined in a dictionary file whose format is documented in -<seealso marker="diameter_dict">diameter_dict(4)</seealso> -while the callback module is documented here. +&man_dict; while the callback module is documented here. The callback module implements the Diameter application-specific functionality of a service.</p> @@ -60,26 +61,24 @@ The functions themselves are of three distinct flavours:</p> <list> <item> <p> -<seealso marker="#peer_up">peer_up/3</seealso> and -<seealso marker="#peer_down">peer_down/3</seealso> signal the +&peer_up; and &peer_down; signal the attainment or loss of connectivity with a Diameter peer.</p> </item> <item> <p> -<seealso marker="#pick_peer">pick_peer/4</seealso>, -<seealso marker="#prepare_request">prepare_request/3</seealso>, -<seealso marker="#prepare_retransmit">prepare_retransmit/3</seealso>, -<seealso marker="#handle_answer">handle_answer/4</seealso> -and <seealso marker="#handle_error">handle_error/4</seealso> are (or may -be) called as a consequence of a call to <seealso -marker="diameter#call">diameter:call/4</seealso> to send an outgoing +&pick_peer;, +&prepare_request;, +&prepare_retransmit;, +&handle_answer; +and &handle_error; are (or may be) called as a consequence of a call +to &mod_call; to send an outgoing Diameter request message.</p> </item> <item> <p> -<seealso marker="#handle_request">handle_request/3</seealso> +&handle_request; is called in response to an incoming Diameter request message.</p> </item> @@ -92,10 +91,9 @@ is called in response to an incoming Diameter request message.</p> The arities given for the the callback functions here assume no extra arguments. All functions will also be passed any extra arguments configured with -the callback module itself when calling <seealso -marker="diameter#start_service">diameter:start_service/2</seealso> +the callback module itself when calling &mod_start_service; and, for the call-specific callbacks, any extra arguments passed to -<seealso marker="diameter#call">diameter:call/4</seealso>.</p> +&mod_call;.</p> </note> <!-- ===================================================================== --> @@ -128,7 +126,7 @@ mandatory values as the bare value.</p> <item> <p> The representation of a Diameter message as passed to -<seealso marker="diameter#call">diameter:call/4</seealso>. +&mod_call;. The record representation is as outlined in <seealso marker="diameter_dict#MESSAGE_RECORDS">diameter_dict(4)</seealso>: @@ -145,7 +143,7 @@ whose head is a <c>#diameter_header{}</c> record and whose tail is a list of <c>#diameter_avp{}</c> records. This representation is used by diameter itself when relaying requests as directed by the return value of a -<seealso marker="#handle_request">handle_request/3</seealso> +&handle_request; callback. It differs from the other other two in that it bypasses the checks for messages that do not agree with their definitions in the dictionary in @@ -174,9 +172,7 @@ A term identifying a transport connection with a Diameter peer.</p> <marker id="peer"/> -<tag><c>peer() = - {<seealso marker="#peer_ref">peer_ref()</seealso>, - <seealso marker="#capabilities">capabilities()</seealso>}</c></tag> +<tag><c>peer() = {&peer_ref;, &capabilities;}</c></tag> <item> <p> A tuple representing a Diameter peer connection.</p> @@ -188,13 +184,9 @@ A tuple representing a Diameter peer connection.</p> <item> <p> The state maintained by the application callback functions -<seealso marker="#peer_up">peer_up/3</seealso>, -<seealso marker="#peer_down">peer_down/3</seealso> and (optionally) -<seealso marker="#pick_peer">pick_peer/4</seealso>. +&peer_up;, &peer_down; and (optionally) &pick_peer;. The initial state is configured in the call to -<seealso -marker="diameter#start_service">diameter:start_service/2</seealso> -that configures the application on a service. +&mod_start_service; that configures the application on a service. Callback functions returning a state are evaluated in a common service-specific process while those not returning state are evaluated in a request-specific @@ -215,9 +207,9 @@ process.</p> <name>Mod:peer_up(SvcName, Peer, State) -> NewState</name> <fsummary>Invoked when a transport connection has been established</fsummary> <type> -<v>SvcName = <seealso marker="diameter#service_name">diameter:service_name()</seealso></v> -<v>Peer = <seealso marker="#peer">peer()</seealso></v> -<v>State = NewState = <seealso marker="#state">state()</seealso></v> +<v>SvcName = &mod_service_name;</v> +<v>Peer = &peer;</v> +<v>State = NewState = &state;</v> </type> <desc> <p> @@ -238,11 +230,8 @@ new peer_ref().</p> <note> <p> There is no requirement that a callback return before incoming -requests are received: <seealso -marker="#handle_request">handle_request/3</seealso> callbacks must be -handled independently of <seealso -marker="#peer_up">peer_up/3</seealso> and <seealso -marker="#peer_down">peer_down/3</seealso>.</p> +requests are received: &handle_request; callbacks must be +handled independently of &peer_up; and &peer_down;.</p> </note> <marker id="peer_down"/> @@ -253,19 +242,17 @@ marker="#peer_down">peer_down/3</seealso>.</p> <name>Mod:peer_down(SvcName, Peer, State) -> NewState</name> <fsummary>Invoked when a transport connection has been lost.</fsummary> <type> -<v>SvcName = <seealso marker="diameter#service_name">diameter:service_name()</seealso></v> -<v>Peer = <seealso marker="#peer">peer()</seealso></v> -<v>State = NewState = <seealso marker="#state">state()</seealso></v> +<v>SvcName = &mod_service_name;</v> +<v>Peer = &peer;</v> +<v>State = NewState = &state;</v> </type> <desc> <p> Invoked to signal that a peer connection is no longer available -following a previous call to <seealso -marker="#peer_up">peer_up/3</seealso>. +following a previous call to &peer_up;. In particular, that the RFC 3539 watchdog state machine for the connection has left state <c>OKAY</c> and the peer will no longer be a -candidate in <seealso marker="#pick_peer">pick_peer()</seealso> -callbacks.</p> +candidate in &pick_peer; callbacks.</p> <marker id="pick_peer"/> </desc> @@ -276,16 +263,15 @@ callbacks.</p> -> Selection | false</name> <fsummary>Select a target peer for an outgoing request.</fsummary> <type> -<v>Candidates = [<seealso marker="#peer">peer()</seealso>]</v> -<v>SvcName = <seealso marker="diameter#service_name">diameter:service_name()</seealso></v> -<v>State = NewState = <seealso marker="#state">state()</seealso></v> +<v>Candidates = [&peer;]</v> +<v>SvcName = &mod_service_name;</v> +<v>State = NewState = &state;</v> <v>Selection = {ok, Peer} | {Peer, NewState}</v> -<v>Peer = <seealso marker="#peer">peer()</seealso> | false</v> +<v>Peer = &peer; | false</v> </type> <desc> <p> -Invoked as a consequence of a call to <seealso -marker="diameter#call">diameter:call/4</seealso> to select a destination +Invoked as a consequence of a call to &mod_call; to select a destination peer for an outgoing request. The return value indicates the selected peer.</p> @@ -293,39 +279,34 @@ The return value indicates the selected peer.</p> The candidate list contains only those peers that have advertised support for the Diameter application in question during capabilities exchange, that have not be excluded by a <c>filter</c> option in -the call to <seealso marker="diameter#call">diameter:call/4</seealso> +the call to &mod_call; and whose watchdog state machine is in the <c>OKAY</c> state. The order of the elements is unspecified except that any peers whose Origin-Host and Origin-Realm matches that of the outgoing request (in the sense of a <c>{filter, {all, [host, realm]}}</c> -option to <seealso marker="diameter#call">diameter:call/4</seealso>) +option to &mod_call;) will be placed at the head of the list.</p> <p> A callback that returns a peer() will be followed by a -<seealso marker="#prepare_request">prepare_request/3</seealso> +&prepare_request; callback and, if the latter indicates that the request should be sent, -by either <seealso marker="#handle_answer">handle_answer/4</seealso> -or <seealso marker="#handle_error">handle_error/4</seealso> depending +by either &handle_answer; +or &handle_error; depending on whether or not an answer message is received from the peer. -If the transport becomes unavailable after <seealso -marker="#prepare_request">prepare_request/3</seealso> then a new <seealso -marker="#pick_peer">pick_peer/4</seealso> callback may take place to -failover to an alternate peer, after which <seealso -marker="#prepare_retransmit">prepare_retransmit/3</seealso> takes the -place of <seealso -marker="#prepare_request">prepare_request/3</seealso> in resending the +If the transport becomes unavailable after &prepare_request; then a +new &pick_peer; callback may take place to +failover to an alternate peer, after which &prepare_retransmit; takes the +place of &prepare_request; in resending the request. -There is no guarantee that a <seealso -marker="#pick_peer">pick_peer/4</seealso> callback to select +There is no guarantee that a &pick_peer; callback to select an alternate peer will be followed by any additional callbacks since a retransmission to an alternate peer is abandoned if an answer is received from a previously selected peer.</p> <p> Returning <c>false</c> or <c>{false, NewState}</c> causes <c>{error, -no_connection}</c> to be returned from <seealso -marker="diameter#call">diameter:call/4</seealso>.</p> +no_connection}</c> to be returned from &mod_call;.</p> <p> The return values <c>false</c> and <c>{false, State}</c> (that is, @@ -335,13 +316,12 @@ The return values <c>false</c> and <c>{false, State}</c> (that is, <note> <p> The return value <c>{Peer, NewState}</c> is only allowed if -the Diameter application in question was configured with the <seealso -marker="diameter#application_opt">diameter:application_opt()</seealso> -<c>{call_mutates_state, true}</c>. +the Diameter application in question was configured with the +&mod_application_opt; <c>{call_mutates_state, true}</c>. Otherwise, the <c>State</c> argument is always the intial value as configured on the application, not any subsequent -value returned by a <seealso marker="#peer_up">peer_up/3</seealso> -or <seealso marker="#peer_down">peer_down/3</seealso> callback.</p> +value returned by a &peer_up; +or &peer_down; callback.</p> </note> <marker id="prepare_request"/> @@ -353,15 +333,13 @@ or <seealso marker="#peer_down">peer_down/3</seealso> callback.</p> <name>Mod:prepare_request(Packet, SvcName, Peer) -> Action</name> <fsummary>Return a request for encoding and transport.</fsummary> <type> -<v>Packet = <seealso marker="#packet">packet()</seealso></v> -<v>SvcName = <seealso marker="diameter#service_name">diameter:service_name()</seealso></v> -<v>Peer = <seealso marker="#peer">peer()</seealso></v> +<v>Packet = &packet;</v> +<v>SvcName = &mod_service_name;</v> +<v>Peer = &peer;</v> <v>Action = Send | Discard | {eval_packet, Action, PostF}</v> -<v>Send = {send, <seealso marker="#packet">packet()</seealso> - | <seealso marker="#message">message()</seealso>}</v> +<v>Send = {send, &packet; | &message;}</v> <v>Discard = {discard, Reason} | discard</v> -<v>PostF = - <seealso marker="diameter#evaluable">diameter:evaluable()</seealso>}</v> +<v>PostF = &mod_evaluable;}</v> </type> <desc> <p> @@ -371,16 +349,15 @@ to modify the outgoing request. Many implementations may simply want to return <c>{send, Packet}</c></p> <p> -A returned <seealso marker="#packet">packet()</seealso> should set the +A returned &packet; should set the request to be encoded in its <c>msg</c> field and can set the <c>transport_data</c> field in order to pass information to the transport process. -Extra arguments passed to <seealso -marker="diameter#call">diameter:call/4</seealso> can be used to +Extra arguments passed to &mod_call; can be used to communicate transport (or any other) data to the callback.</p> <p> -A returned <seealso marker="#packet">packet()</seealso> can set +A returned &packet; can set the <c>header</c> field to a <c>#diameter_header{}</c> to specify values that should be preserved in the outgoing request, values otherwise being those in @@ -396,8 +373,7 @@ The return value is ignored.</p> <p> Returning <c>{discard, Reason}</c> causes the request to be aborted -and the <seealso -marker="diameter#call">diameter:call/4</seealso> for which the +and the &mod_call; for which the callback has taken place to return <c>{error, Reason}</c>. Returning <c>discard</c> is equivalent to returning <c>{discard, discarded}</c>.</p> @@ -410,30 +386,25 @@ discarded}</c>.</p> <name>Mod:prepare_retransmit(Packet, SvcName, Peer) -> Action</name> <fsummary>Return a request for encoding and retransmission.</fsummary> <type> -<v>Packet = <seealso marker="#packet">packet()</seealso></v> -<v>SvcName = <seealso marker="diameter#service_name">diameter:service_name()</seealso></v> -<v>Peer = <seealso marker="#peer">peer()</seealso></v> +<v>Packet = &packet;</v> +<v>SvcName = &mod_service_name;</v> +<v>Peer = &peer;</v> <v>Action = Send | Discard | {eval_packet, Action, PostF}</v> -<v>Send = {send, <seealso marker="#packet">packet()</seealso> - | <seealso marker="#message">message()</seealso>}</v> +<v>Send = {send, &packet; | &message;}</v> <v>Discard = {discard, Reason} | discard</v> -<v>PostF = - <seealso marker="diameter#evaluable">diameter:evaluable()</seealso>}</v> +<v>PostF = &mod_evaluable;}</v> </type> <desc> <p> Invoked to return a request for encoding and retransmission. -Has the same role as <seealso -marker="#prepare_request">prepare_request/3</seealso> in the case that +Has the same role as &prepare_request; in the case that a peer connection is lost an an alternate peer selected but the -argument <seealso marker="#packet">packet()</seealso> is as returned -by the initial <seealso -marker="#prepare_request">prepare_request/3</seealso>.</p> +argument &packet; is as returned +by the initial &prepare_request;.</p> <p> Returning <c>{discard, Reason}</c> causes the request to be aborted -and a <seealso -marker="#handle_error">handle_error/4</seealso> callback to +and a &handle_error; callback to take place with <c>Reason</c> as initial argument. Returning <c>discard</c> is equivalent to returning <c>{discard, discarded}</c>.</p> @@ -446,49 +417,41 @@ discarded}</c>.</p> <name>Mod:handle_answer(Packet, Request, SvcName, Peer) -> Result</name> <fsummary>Receive an answer message from a peer.</fsummary> <type> -<v>Packet = <seealso marker="#packet">packet()</seealso></v> -<v>Request = <seealso marker="#message">message()</seealso></v> -<v>SvcName = <seealso marker="diameter#service_name">diameter:service_name()</seealso></v> -<v>Peer = <seealso marker="#peer">peer()</seealso></v> +<v>Packet = &packet;</v> +<v>Request = &message;</v> +<v>SvcName = &mod_service_name;</v> +<v>Peer = &peer;</v> <v>Result = term()</v> </type> <desc> <p> Invoked when an answer message is received from a peer. -The return value is returned from <seealso -marker="diameter#call">diameter:call/4</seealso> unless the +The return value is returned from &mod_call; unless the <c>detach</c> option was specified.</p> <p> The decoded answer record and undecoded binary are in the <c>msg</c> and <c>bin</c> fields of the argument -<seealso marker="#packet">packet()</seealso> respectively. +&packet; respectively. <c>Request</c> is the outgoing request message as was returned from -<seealso marker="#prepare_request">prepare_request/3</seealso> or -<seealso - marker="#prepare_retransmit">prepare_retransmit/3</seealso>.</p> +&prepare_request; or &prepare_retransmit;.</p> <p> -For any given call to <seealso -marker="diameter#call">diameter:call/4</seealso> there is at most one -<seealso marker="#handle_answer">handle_answer/4</seealso> callback: any +For any given call to &mod_call; there is at most one +&handle_answer; callback: any duplicate answer (due to retransmission or otherwise) is discarded. -Similarly, only one of <seealso -marker="#handle_answer">handle_answer/4</seealso> or -<seealso marker="#handle_error">handle_error/4</seealso> is -called.</p> +Similarly, only one of &handle_answer; or +&handle_error; is called.</p> <p> By default, an incoming answer message that cannot be successfully decoded causes the request process to fail, causing -<seealso marker="diameter#call">diameter:call/4</seealso> +&mod_call; to return <c>{error, failure}</c> unless the <c>detach</c> option was specified. -In particular, there is no <seealso -marker="#handle_error">handle_error/4</seealso> callback in this +In particular, there is no &handle_error; callback in this case. -The <seealso -marker="diameter#application_opt">diameter:application_opt()</seealso> +The &mod_application_opt; <c>answer_errors</c> can be set to change this behaviour.</p> <marker id="handle_error"/> @@ -500,23 +463,21 @@ marker="diameter#application_opt">diameter:application_opt()</seealso> <fsummary>Return an error from a outgoing request.</fsummary> <type> <v>Reason = timeout | failover | term()</v> -<v>Request = <seealso marker="#message">message()</seealso></v> -<v>SvcName = <seealso marker="diameter#service_name">diameter:service_name()</seealso></v> -<v>Peer = <seealso marker="#peer">peer()</seealso></v> +<v>Request = &message;</v> +<v>SvcName = &mod_service_name;</v> +<v>Peer = &peer;</v> <v>Result = term()</v> </type> <desc> <p> Invoked when an error occurs before an answer message is received in response to an outgoing request. -The return value is returned from <seealso -marker="diameter#call">diameter:call/4</seealso> unless the +The return value is returned from &mod_call; unless the <c>detach</c> option was specified.</p> <p> Reason <c>timeout</c> indicates that an answer message has not been -received within the time specified with the corresponding <seealso -marker="diameter#call_opt">diameter:call_opt()</seealso>. +received within the time specified with the corresponding &mod_call_opt;. Reason <c>failover</c> indicates that the transport connection to the peer to which the request has been sent has become unavailable and that not alternate peer was @@ -530,25 +491,23 @@ not selected.</p> <name>Mod:handle_request(Packet, SvcName, Peer) -> Action</name> <fsummary>Receive an incoming request.</fsummary> <type> -<v>Packet = <seealso marker="#packet">packet()</seealso></v> +<v>Packet = &packet;</v> <v>SvcName = term()</v> -<v>Peer = <seealso marker="#peer">peer()</seealso></v> +<v>Peer = &peer;</v> <v>Action = Reply | {relay, [Opt]} | discard | {eval|eval_packet, Action, PostF}</v> -<v>Reply = {reply, <seealso marker="#packet">packet()</seealso> - | <seealso marker="#message">message()</seealso>} +<v>Reply = {reply, &packet; | &message;} | {protocol_error, 3000..3999}</v> -<v>Opt = <seealso marker="diameter#call_opt">diameter:call_opt()</seealso></v> -<v>PostF = <seealso marker="diameter#evaluable">diameter:evaluable()</seealso></v> +<v>Opt = &mod_call_opt;</v> +<v>PostF = &mod_evaluable;</v> </type> <desc> <p> Invoked when a request message is received from a peer. The application in which the callback takes place (that is, the -callback module as configured with <seealso -marker="diameter#start_service">diameter:start_service/2</seealso>) +callback module as configured with &mod_start_service;) is determined by the Application Identifier in the header of the incoming request message, the selected module being the one whose corresponding <seealso @@ -557,13 +516,13 @@ itself as defining either the application in question or the Relay application.</p> <p> -The argument <seealso marker="#packet">packet()</seealso> has the following signature.</p> +The argument &packet; has the following signature.</p> <pre> #diameter_packet{header = #diameter_header{}, avps = [#diameter_avp{}], msg = record() | undefined, - errors = [<seealso marker="diameter_dict#DATA_TYPES">Unsigned32()</seealso> | {<seealso marker="diameter_dict#DATA_TYPES">Unsigned32()</seealso>, #diameter_avp{}}], + errors = [&dict_Unsigned32; | {&dict_Unsigned32;, #diameter_avp{}}], bin = binary(), transport_data = term()} </pre> @@ -580,8 +539,8 @@ The <c>errors</c> field specifies any Result-Code's identifying errors that were encountered in decoding the request. In this case diameter will set both Result-Code and Failed-AVP AVP's in a returned -answer <seealso marker="#message">message()</seealso> before sending it to the peer: -the returned <seealso marker="#message">message()</seealso> need only set any other required AVP's. +answer &message; before sending it to the peer: +the returned &message; need only set any other required AVP's. Note that the errors detected by diameter are all of the 5xxx series (Permanent Failures). The <c>errors</c> list is empty if the request has been received in @@ -591,21 +550,19 @@ the relay application.</p> The <c>transport_data</c> field contains an arbitrary term passed into diameter from the transport module in question, or the atom <c>undefined</c> if the transport specified no data. -The term is preserved if a <seealso -marker="#packet">message()</seealso> is returned but must be set -explicitly in a returned <seealso marker="#packet">packet()</seealso>.</p> +The term is preserved if a &message; is returned but must be set +explicitly in a returned &packet;.</p> <p> The semantics of each of the possible return values are as follows.</p> <taglist> -<tag><c>{reply, <seealso marker="#packet">packet()</seealso> - | <seealso marker="#message">message()</seealso>}</c></tag> +<tag><c>{reply, &packet; | &message;}</c></tag> <item> <p> Send the specified answer message to the peer. -In the case of a <seealso marker="#packet">packet()</seealso>, the +In the case of a &packet;, the message to be sent must be set in the <c>msg</c> field and the <c>header</c> field can be set to a <c>#diameter_header{}</c> to specify values that should be @@ -640,23 +597,22 @@ Relay a request to another peer in the role of a Diameter relay agent. If a routing loop is detected then the request is answered with 3005 (DIAMETER_LOOP_DETECTED). Otherwise a Route-Record AVP (containing the sending peer's Origin-Host) is -added to the request and <seealso marker="#pick_peer">pick_peer/4</seealso> -and subsequent callbacks take place just as if <seealso -marker="diameter#call">diameter:call/4</seealso> had been called +added to the request and &pick_peer; +and subsequent callbacks take place just as if &mod_call; had been called explicitly. The End-to-End Identifier of the incoming request is preserved in the header of the relayed request.</p> <p> The returned <c>Opts</c> should not specify <c>detach</c>. -A subsequent <seealso marker="#handle_answer">handle_answer/4</seealso> +A subsequent &handle_answer; callback for the relayed request must return its first argument, the <c>#diameter_packet{}</c> record containing the answer message. Note that the <c>extra</c> option can be specified to supply arguments that can distinguish the relay case from others if so desired. Any other return value (for example, from a -<seealso marker="#handle_error">handle_error/4</seealso> callback) +&handle_error; callback) causes the request to be answered with 3002 (DIAMETER_UNABLE_TO_DELIVER).</p> </item> diff --git a/lib/diameter/doc/src/diameter_compile.xml b/lib/diameter/doc/src/diameter_compile.xml index 7a6ca48798..5ca8126b83 100644 --- a/lib/diameter/doc/src/diameter_compile.xml +++ b/lib/diameter/doc/src/diameter_compile.xml @@ -1,5 +1,8 @@ <?xml version="1.0" encoding="iso-8859-1" ?> -<!DOCTYPE comref SYSTEM "comref.dtd"> +<!DOCTYPE comref SYSTEM "comref.dtd" [ + <!ENTITY % ents SYSTEM "diameter.ent" > + %ents; +]> <comref> <header> @@ -122,7 +125,7 @@ Returns 0 on success, non-zero on failure.</p> <title>SEE ALSO</title> <p> -<seealso marker="diameter_dict">diameter_dict(4)</seealso></p> +&man_dict;</p> </section> diff --git a/lib/diameter/doc/src/diameter_dict.xml b/lib/diameter/doc/src/diameter_dict.xml index 9d6a6a8f38..4956ff4be0 100644 --- a/lib/diameter/doc/src/diameter_dict.xml +++ b/lib/diameter/doc/src/diameter_dict.xml @@ -1,5 +1,8 @@ <?xml version="1.0" encoding="latin1" ?> -<!DOCTYPE erlref SYSTEM "fileref.dtd"> +<!DOCTYPE erlref SYSTEM "fileref.dtd" [ + <!ENTITY % ents SYSTEM "diameter.ent" > + %ents; +]> <fileref> <header> @@ -40,8 +43,7 @@ under the License. <description> <p> -A diameter service as configured with <seealso -marker="diameter#start_service">diameter:start_service/2</seealso> +A diameter service as configured with &mod_start_service; specifies one or more supported Diameter applications. Each Diameter application specifies a dictionary module that knows how to encode and decode its messages and AVPs. @@ -58,8 +60,7 @@ resulting dictionaries modules on a service.</p> The codec generation also results in a hrl file that defines records for the messages and grouped AVPs defined for the application, these records being what a user of the diameter application sends and receives. -(Modulo other available formats as discussed in <seealso -marker="diameter_app">diameter_app(3)</seealso>.) +(Modulo other available formats as discussed in &man_app;.) These records and the underlying Erlang data types corresponding to Diameter data formats are discussed in <seealso marker="#MESSAGE_RECORDS">MESSAGE RECORDS</seealso> and <seealso @@ -488,11 +489,9 @@ types being described below.</p> The data formats defined in sections 4.2 ("Basic AVP Data Formats") and 4.3 ("Derived AVP Data Formats") of RFC 3588 are encoded as values of the types defined here. -Values are passed to <seealso -marker="diameter#call">diameter:call/4</seealso> +Values are passed to &mod_call; in a request record when sending a request, returned in a resulting -answer record and passed to a <seealso -marker="diameter_app#handle_request">handle_request</seealso> +answer record and passed to a &app_handle_request; callback upon reception of an incoming request.</p> <p> @@ -639,9 +638,7 @@ Values of these types are not currently parsed by diameter.</p> <title>SEE ALSO</title> <p> -<seealso marker="diameterc">diameterc(1)</seealso>, -<seealso marker="diameter">diameter(3)</seealso>, -<seealso marker="diameter_app">diameter_app(3)</seealso></p> +&man_compile;, &man_main;, &man_app;</p> </section> diff --git a/lib/diameter/doc/src/diameter_sctp.xml b/lib/diameter/doc/src/diameter_sctp.xml index 709b17c0d2..053c305978 100644 --- a/lib/diameter/doc/src/diameter_sctp.xml +++ b/lib/diameter/doc/src/diameter_sctp.xml @@ -1,5 +1,8 @@ <?xml version="1.0" encoding="latin1" ?> -<!DOCTYPE erlref SYSTEM "erlref.dtd"> +<!DOCTYPE erlref SYSTEM "erlref.dtd" [ + <!ENTITY % ents SYSTEM "diameter.ent" > + %ents; +]> <erlref> <header> @@ -41,10 +44,9 @@ under the License. This module implements diameter transport over SCTP using <seealso marker="kernel:gen_sctp">gen_sctp</seealso>. It can be specified as the value of a transport_module option to -<seealso -marker="diameter#add_transport">diameter:add_transport/2</seealso> +&mod_add_transport; and implements the behaviour documented in -<seealso marker="diameter_transport">diameter_transport(3)</seealso>.</p> +&man_transport;.</p> <marker id="start"/> </description> @@ -59,7 +61,7 @@ and implements the behaviour documented in <fsummary>Start a transport process.</fsummary> <type> <v>Type = connect | accept</v> -<v>Ref = <seealso marker="diameter#transport_ref">diameter:transport_ref()</seealso></v> +<v>Ref = &mod_transport_ref;</v> <v>Svc = #diameter_service{}</v> <v>Opt = {raddr, <seealso marker="kernel:inet#type-ip_address">inet:ip_address()</seealso>} | {rport, integer()} | term()</v> <v>Pid = pid()</v> @@ -69,8 +71,7 @@ and implements the behaviour documented in <desc> <p> -The start function required by <seealso -marker="diameter_transport#start">diameter_transport(3)</seealso>.</p> +The start function required by &man_transport;.</p> <p> The only diameter_sctp-specific argument is the options list. @@ -115,16 +116,13 @@ diameter_sctp uses the <c>transport_data</c> field of the <c>#diameter_packet{}</c> 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 <c>{stream, Id}</c> -on an inbound message passed to a <seealso -marker="diameter_app#handle_request">handle_request</seealso> or <seealso -marker="diameter_app#handle_answer">handle_answer</seealso> callback. +on an inbound message passed to a &app_handle_request; or +&app_handle_answer; callback. For an outbound message, either <c>undefined</c> (explicitly or by receiving the outbound message as a <c>binary()</c>) or a tuple -should be set in the return value of <seealso -marker="diameter_app#handle_request">handle_request</seealso> +should be set in the return value of &app_handle_request; (typically by retaining the value passed into this function) -or <seealso -marker="diameter_app#prepare_request">prepare_request</seealso>. +or &app_prepare_request;. The value <c>undefined</c> uses a "next outbound stream" id and increments this modulo the total number outbound streams. That is, successive values of <c>undefined</c> cycle through all @@ -145,7 +143,8 @@ outbound streams.</p> <title>SEE ALSO</title> <p> -<seealso marker="diameter_transport">diameter_transport(3)</seealso>, +&man_main;, +&man_transport;, <seealso marker="kernel:gen_sctp">gen_sctp(3)</seealso>, <seealso marker="kernel:inet">inet(3)</seealso></p> diff --git a/lib/diameter/doc/src/diameter_tcp.xml b/lib/diameter/doc/src/diameter_tcp.xml index 3ffcebfd90..1d4196ed61 100644 --- a/lib/diameter/doc/src/diameter_tcp.xml +++ b/lib/diameter/doc/src/diameter_tcp.xml @@ -1,5 +1,8 @@ <?xml version="1.0" encoding="latin1" ?> -<!DOCTYPE erlref SYSTEM "erlref.dtd"> +<!DOCTYPE erlref SYSTEM "erlref.dtd" [ + <!ENTITY % ents SYSTEM "diameter.ent" > + %ents; +]> <erlref> <header> @@ -41,10 +44,9 @@ under the License. This module implements diameter transport over TCP using <seealso marker="kernel:gen_tcp">gen_tcp</seealso>. It can be specified as the value of a <c>transport_module</c> option to -<seealso -marker="diameter#add_transport">diameter:add_transport/2</seealso> +&mod_add_transport; and implements the behaviour documented in -<seealso marker="diameter_transport">diameter_transport(3)</seealso>. +&man_transport;. 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.</p> @@ -66,7 +68,7 @@ before configuring TLS capability on diameter transports.</p> <fsummary>Start a transport process.</fsummary> <type> <v>Type = connect | accept</v> -<v>Ref = <seealso marker="diameter#transport_ref">diameter:transport_ref()</seealso></v> +<v>Ref = &mod_transport_ref;</v> <v>Svc = #diameter_service{}</v> <v>Opt = OwnOpt | SslOpt | TcpOpt</v> <v>Pid = pid()</v> @@ -81,8 +83,7 @@ before configuring TLS capability on diameter transports.</p> <desc> <p> -The start function required by <seealso -marker="diameter_transport#start">diameter_transport(3)</seealso>.</p> +The start function required by &man_transport;.</p> <p> The only diameter_tcp-specific argument is the options list. @@ -115,10 +116,8 @@ Note that the option <c>ip</c> specifies the local address.</p> An <c>ssl_options</c> list must be specified if and only if the transport in question has set <c>Inband-Security-Id</c> to 1 (<c>TLS</c>), as -specified to either <seealso -marker="diameter#start_service">start_service/2</seealso> or -<seealso -marker="diameter#add_transport">add_transport/2</seealso>, +specified to either &mod_start_service; or +&mod_add_transport;, so that the transport process will receive notification of whether or not to commence with a TLS handshake following capabilities exchange. @@ -149,8 +148,8 @@ The returned local address list has length one.</p> <title>SEE ALSO</title> <p> -<seealso marker="diameter">diameter(3)</seealso>, -<seealso marker="diameter_transport">diameter_transport(3)</seealso>, +&man_main;, +&man_transport;, <seealso marker="kernel:gen_tcp">gen_tcp(3)</seealso>, <seealso marker="kernel:inet">inet(3)</seealso>, <seealso marker="ssl:ssl">ssl(3)</seealso></p> diff --git a/lib/diameter/doc/src/diameter_transport.xml b/lib/diameter/doc/src/diameter_transport.xml index 0c8b41397a..a06d8a348b 100644 --- a/lib/diameter/doc/src/diameter_transport.xml +++ b/lib/diameter/doc/src/diameter_transport.xml @@ -1,5 +1,8 @@ <?xml version="1.0" encoding="latin1" ?> -<!DOCTYPE erlref SYSTEM "erlref.dtd"> +<!DOCTYPE erlref SYSTEM "erlref.dtd" [ + <!ENTITY % ents SYSTEM "diameter.ent" > + %ents; +]> <erlref> <header> @@ -38,8 +41,7 @@ under the License. <description> <p> -A module specified as a <c>transport_module</c> to <seealso -marker="diameter#add_transport">diameter:add_transport/2</seealso> +A module specified as a <c>transport_module</c> to &mod_add_transport; must implement the interface documented here. The interface consists of a function with which diameter starts a transport process and a message interface with which @@ -59,7 +61,7 @@ parent).</p> <fsummary>Start a transport process.</fsummary> <type> <v>Type = connect | accept</v> -<v>Ref = <seealso marker="diameter#transport_ref">diameter:transport_ref()</seealso></v> +<v>Ref = &mod_transport_ref;</v> <v>Svc = #diameter_service{}</v> <v>Config = term()</v> <v>Pid = pid()</v> @@ -69,8 +71,7 @@ parent).</p> <desc> <p> Start a transport process. -Called by diameter as a consequence of a call to <seealso -marker="diameter#add_transport">diameter:add_transport/2</seealso> in +Called by diameter as a consequence of a call to &mod_add_transport; in order to establish or accept a transport connection respectively. A transport process maintains a connection with a single remote peer.</p> @@ -82,22 +83,18 @@ In the latter case, transport processes are started as required to accept connections from multiple peers.</p> <p> -Ref is the value that was returned from the call to <seealso -marker="diameter#add_transport">diameter:add_transport/2</seealso> +Ref is the value that was returned from the call to &mod_add_transport; that has lead to starting of a transport process.</p> <p> -<c>Svc</c> contains the capabilities passed to <seealso -marker="diameter#start_service">diameter:start_service/2</seealso> and -<seealso -marker="diameter#add_transport">diameter:add_transport/2</seealso>, +<c>Svc</c> contains the capabilities passed to &mod_start_service; and +&mod_add_transport;, values passed to the latter overriding those passed to the former.</p> <p> <c>Config</c> is as passed in <c>transport_config</c> tuple in the -<seealso marker="diameter#transport_opt">diameter:transport_opt()</seealso> -list passed to <seealso -marker="diameter#add_transport">diameter:add_transport/2</seealso>.</p> +&mod_transport_opt; +list passed to &mod_add_transport;.</p> <p> The start function should use the <c>Host-IP-Address</c> list and/or @@ -245,8 +242,7 @@ A transport must exit if a handshake is not successful.</p> <title>SEE ALSO</title> <p> -<seealso marker="diameter_tcp">diameter_tcp(3)</seealso>, -<seealso marker="diameter_sctp">diameter_sctp(3)</seealso></p> +&man_tcp;, &man_sctp;</p> </section> |