diff options
28 files changed, 798 insertions, 666 deletions
diff --git a/lib/diameter/doc/src/.gitignore b/lib/diameter/doc/src/.gitignore index feeb378fd8..5776e1cc76 100644 --- a/lib/diameter/doc/src/.gitignore +++ b/lib/diameter/doc/src/.gitignore @@ -1,2 +1,3 @@ /depend.mk +/seehere.ent diff --git a/lib/diameter/doc/src/Makefile b/lib/diameter/doc/src/Makefile index d1d5e8f869..8ad38ba0d5 100644 --- a/lib/diameter/doc/src/Makefile +++ b/lib/diameter/doc/src/Makefile @@ -34,7 +34,8 @@ XML_REF_FILES = $(XML_REF1_FILES) $(XML_REF3_FILES) $(XML_REF4_FILES) XML_FILES = $(BOOK_FILES) $(XML_APPLICATION_FILES) \ $(XML_REF_FILES) \ - $(XML_PART_FILES) $(XML_CHAPTER_FILES) + $(XML_PART_FILES) $(XML_CHAPTER_FILES) \ + seealso.ent INTERNAL_HTML_FILES = $(TECHNICAL_DESCR_FILES:%.xml=$(HTMLDIR)/%.html) @@ -93,7 +94,7 @@ html: gifs $(HTML_REF_MAN_FILE) clean clean_docs: clean_pdf clean_html clean_man rm -f errs core *~ - rm -f depend.mk + rm -f depend.mk seehere.ent clean_pdf: rm -f $(PDFDIR)/* @@ -170,7 +171,9 @@ release_docs_spec: $(LOCAL)docs release_spec: -depend.mk: depend.sed $(XML_REF_FILES) $(XML_CHAPTER_FILES) Makefile +depend.mk: depend.sed Makefile seealso.ent \ + $(XML_REF_FILES) $(XML_CHAPTER_FILES) + sed -f seehere.sed seealso.ent > seehere.ent (for f in $(XML_REF_FILES) $(XML_CHAPTER_FILES); do \ sed -f $< $$f | sed "s@%FILE%@`basename $$f .xml`@g"; \ done) \ diff --git a/lib/diameter/doc/src/diameter.xml b/lib/diameter/doc/src/diameter.xml index c93a7b2c67..bc42b75c7a 100644 --- a/lib/diameter/doc/src/diameter.xml +++ b/lib/diameter/doc/src/diameter.xml @@ -1,5 +1,10 @@ <?xml version="1.0" encoding="latin1" ?> -<!DOCTYPE erlref SYSTEM "erlref.dtd"> +<!DOCTYPE erlref SYSTEM "erlref.dtd" [ + <!ENTITY % also SYSTEM "seealso.ent" > + <!ENTITY % here SYSTEM "seehere.ent" > + %also; + %here; +]> <erlref> <header> @@ -49,15 +54,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 +92,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 +102,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"/> @@ -110,23 +112,22 @@ defined by the application.</p> | [Mod | ExtraArgs] | #diameter_callback{}</c></tag> <item> -<code> +<pre> Mod = atom() ExtraArgs = list() -</code> +</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 +142,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 +157,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 +173,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 +181,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 +201,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 +210,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 +227,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 +243,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 +265,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 +292,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 +304,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 +329,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> @@ -357,7 +348,7 @@ It is an error to specify duplicate tuples.</p> An expression that can be evaluated as a function in the following sense.</p> -<code> +<pre> eval([{M,F,A} | T]) -> apply(M, F, T ++ A); eval([[F|A] | T]) -> @@ -366,10 +357,10 @@ eval([F|A]) -> apply(F, A); eval(F) -> eval([F]). -</code> +</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 +371,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 +380,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 +412,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 +463,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 +487,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 @@ -527,12 +510,12 @@ implies the termination of all transport processes.</p> <tag><c>{up, Ref, Peer, Config}</c></tag> <tag><c>{down, Ref, Peer, Config}</c></tag> <item> -<code> -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>]} +<pre> +Ref = &transport_ref; +Peer = &app_peer; +Config = {connect|listen, [&transport_opt;]} Pkt = #diameter_packet{} -</code> +</pre> <p> The RFC 3539 watchdog state machine has @@ -546,7 +529,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#Mod:peer_up-3">peer_up/peer_down</seealso> callback for each of the Diameter applications negotiated during capablilities exchange. That is, the event communicates connectivity with the @@ -556,25 +540,23 @@ respect to individual Diameter applications.</p> <tag><c>{reconnect, Ref, Opts}</c></tag> <item> -<code> -Ref = <seealso marker="#transport_ref">transport_ref()</seealso> -Opts = [<seealso marker="#transport_opt">transport_opt()</seealso>] -</code> +<pre> +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> -<code> -Ref = <seealso marker="#transport_ref">transport_ref()</seealso> -Config = {connect|listen, [<seealso marker="#transport_opt">transport_opt()</seealso>]} -</code> +<pre> +Ref = &transport_ref; +Config = {connect|listen, [&transport_opt;]} +</pre> <p> Capabilities exchange has failed. @@ -584,13 +566,13 @@ Capabilities exchange has failed. <tag><c>{'CER', Result, Caps, Pkt}</c></tag> <item> -<code> +<pre> Result = ResultCode | {capabilities_cb, CB, ResultCode|discard} Caps = #diameter_caps{} Pkt = #diameter_packet{} ResultCode = integer() -CB = <seealso marker="#evaluable">evaluable()</seealso> -</code> +CB = &evaluable; +</pre> <p> An incoming CER has been answered with the indicated result code or @@ -604,11 +586,11 @@ contains the rejecting callback.</p> <tag><c>{'CER', Caps, {ResultCode, Pkt}}</c></tag> <item> -<code> +<pre> ResultCode = integer() Caps = #diameter_caps{} Pkt = #diameter_packet{} -</code> +</pre> <p> An incoming CER contained errors and has been answered with the @@ -620,19 +602,18 @@ 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> <tag><c>{'CEA', Result, Caps, Pkt}</c></tag> <item> -<code> +<pre> Result = integer() | atom() | {capabilities_cb, CB, ResultCode|discard} Caps = #diameter_caps{} Pkt = #diameter_packet{} ResultCode = integer() -</code> +</pre> <p> An incoming CEA has been rejected for the indicated reason. @@ -647,10 +628,10 @@ contains the rejecting callback.</p> <tag><c>{'CEA', Caps, Pkt}</c></tag> <item> -<code> +<pre> Caps = #diameter_caps{} Pkt = #diameter_packet{} -</code> +</pre> <p> An incoming CEA contained errors and has been rejected. @@ -661,8 +642,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> @@ -671,12 +651,12 @@ of connection establishment.</p> <tag><c>{watchdog, Ref, PeerRef, {From, To}, Config}</c></tag> <item> -<code> -Ref = <seealso marker="#transport_ref">transport_ref()</seealso> -PeerRef = <seealso marker="diameter_app#peer_ref">diameter_app:peer_ref()</seealso> +<pre> +Ref = &transport_ref; +PeerRef = &app_peer_ref; From, To = initial | okay | suspect | down | reopen Config = {connect|listen, [transport_opt()]} -</code> +</pre> <p> An RFC 3539 watchdog state machine has changed state.</p> @@ -694,8 +674,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 +686,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 tuple 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 +721,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,20 +736,18 @@ 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> -<code> +<pre> (H bsl N) bor (Id band ((1 bsl N) - 1)) -</code> +</pre> <p> Note that RFC 3588 requires that End-to-End identifiers remain unique for a period of at least 4 minutes and that this and the call rate @@ -798,13 +771,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 +786,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 +796,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 +841,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 +864,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 +901,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 +932,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>. @@ -980,17 +946,16 @@ Defaults to a single callback returning <c>dpr</c>.</p> <marker id="reconnect_timer"/> <tag><c>{reconnect_timer, Tc}</c></tag> <item> -<code> -Tc = <seealso marker="diameter_dict#DATA_TYPES">Unsigned32()</seealso> -</code> +<pre> +Tc = &dict_Unsigned32; +</pre> <p> 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 +965,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 +975,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> @@ -1029,12 +991,12 @@ For example, the following options on a connecting transport request a connection with one peer over SCTP or another (typically the same) over TCP.</p> -<code> +<pre> {transport_module, diameter_sctp} {transport_config, SctpOpts, 5000} {transport_module, diameter_tcp} {transport_config, TcpOpts} -</code> +</pre> <p> To listen on both SCTP and TCP, define one transport for each.</p> @@ -1044,17 +1006,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 @@ -1065,10 +1025,10 @@ corresponding timeout (see below) or all fail.</p> <marker id="watchdog_timer"/> <tag><c>{watchdog_timer, TwInit}</c></tag> <item> -<code> -TwInit = <seealso marker="diameter_dict#DATA_TYPES">Unsigned32()</seealso> +<pre> +TwInit = &dict_Unsigned32; | {M,F,A} -</code> +</pre> <p> The RFC 3539 watchdog timer. @@ -1088,10 +1048,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 +1057,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> @@ -1108,7 +1065,6 @@ identifies the configuration.</p> </section> -<marker id="add_transport"/> <funcs> <!-- ===================================================================== --> @@ -1118,9 +1074,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 +1095,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 @@ -1159,7 +1114,6 @@ been configured: a service can be started after configuring its transports.</p> </note> -<marker id="call"/> </desc> </func> @@ -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> @@ -1283,14 +1220,13 @@ Note that <c>{error,encode}</c> is the only return value which guarantees that the request has <em>not</em> been sent over the transport connection.</p> -<marker id="origin_state_id"/> </desc> </func> <!-- ===================================================================== --> <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,10 +1235,9 @@ 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"/> </desc> </func> @@ -1312,11 +1247,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,12 +1264,11 @@ 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> -<code> +<pre> 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 @@ -1342,17 +1276,15 @@ 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 -</code> +</pre> <p> 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"/> </desc> </func> @@ -1362,7 +1294,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 +1325,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,23 +1339,21 @@ 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 "client.example.com" configured with a single transport connected to "server.example.com" might look as follows.</p> -<code> +<pre> [[{ref,#Ref<0.0.0.93>}, {type,connect}, {options,[{transport_module,diameter_tcp}, @@ -1470,23 +1398,18 @@ An example return value with for a client service with Origin-Host {{{0,258,0},recv,{'Result-Code',2001}},3}, {{{0,280,1},recv},2}, {{{0,280,0},send},2}]}]] -</code> +</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,12 +1428,12 @@ 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> -<code> +<pre> [[{ref,#Ref<0.0.0.61>}, {type,listen}, {options,[{transport_module,diameter_tcp}, @@ -1557,7 +1480,7 @@ connection might look as follows.</p> {{{0,280,0},send},5}, {{{0,257,1},recv},1}, {{{0,257,0},send},1}]}]] -</code> +</pre> <p> The information presented here is as in the <c>connect</c> case except @@ -1576,7 +1499,7 @@ connections and for which Diameter-level statistics are accumulated only for the lifetime of the transport connection. A return value for the server above might look as follows.</p> -<code> +<pre> [[{ref,#Ref<0.0.0.61>}, {type,accept}, {options,[{transport_module,diameter_tcp}, @@ -1622,7 +1545,7 @@ A return value for the server above might look as follows.</p> {{{0,280,0},send},66}, {{{0,257,1},recv},1}, {{{0,257,0},send},1}]}]] -</code> +</pre> <p> Note that there may be multiple entries with the same <c>ref</c>, in @@ -1633,41 +1556,37 @@ 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. For example:</p> -<code> +<pre> [{ref,#Ref<0.0.0.61>}, {type,accept}, {options,[{transport_module,diameter_tcp}, {transport_config,[{reuseaddr,true}, {ip,{127,0,0,1}}, {port,3868}]}]}] -</code> +</pre> </item> </taglist> -<marker id="services"/> </desc> </func> @@ -1677,23 +1596,22 @@ 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> Return the list of started services.</p> -<marker id="session_id"/> </desc> </func> <!-- ===================================================================== --> <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> @@ -1704,7 +1622,6 @@ The value has the form required by section 8.8 of RFC 3588. Ident should be the Origin-Host of the peer from which the message containing the returned value will be sent.</p> -<marker id="start"/> </desc> </func> @@ -1721,7 +1638,6 @@ The diameter application must be started before starting a service. In a production system this is typically accomplished by a boot file, not by calling <c>start/0</c> explicitly.</p> -<marker id="start_service"/> </desc> </func> @@ -1730,8 +1646,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 +1657,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> @@ -1753,7 +1668,6 @@ capabilities and restrict its supported Diameter applications so necessarily the case.</p> </note> -<marker id="stop_service"/> </desc> </func> @@ -1768,7 +1682,6 @@ Stop the diameter application.</p> <p> </p> -<marker id="stop_service"/> </desc> </func> @@ -1777,7 +1690,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,17 +1700,15 @@ 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> -<marker id="subscribe"/> </desc> </func> @@ -1807,12 +1718,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> @@ -1821,7 +1731,6 @@ that does not yet exist. Doing so before adding transports is required to guarantee the reception of all related events.</p> -<marker id="unsubscribe"/> </desc> </func> @@ -1831,7 +1740,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 +1757,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 b6870f7c28..304c69ebda 100644 --- a/lib/diameter/doc/src/diameter_app.xml +++ b/lib/diameter/doc/src/diameter_app.xml @@ -1,5 +1,10 @@ <?xml version="1.0" encoding="latin1" ?> -<!DOCTYPE erlref SYSTEM "erlref.dtd"> +<!DOCTYPE erlref SYSTEM "erlref.dtd" [ + <!ENTITY % also SYSTEM "seealso.ent" > + <!ENTITY % here SYSTEM "seehere.ent" > + %also; + %here; +]> <erlref> <header> @@ -41,15 +46,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 +63,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 +93,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 +128,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 +145,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 +174,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 +186,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 +209,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,14 +232,10 @@ 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"/> </desc> </func> @@ -253,21 +243,18 @@ 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> </func> @@ -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,16 +316,14 @@ 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"/> </desc> </func> @@ -353,15 +332,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 +348,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,13 +372,11 @@ 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> -<marker id="prepare_retransmit"/> </desc> </func> @@ -410,35 +384,29 @@ 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> -<marker id="handle_answer"/> </desc> </func> @@ -446,52 +414,43 @@ 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"/> </desc> </func> @@ -500,29 +459,26 @@ 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 not selected.</p> -<marker id="handle_request"/> </desc> </func> @@ -530,25 +486,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,16 +511,16 @@ 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> -<code> +<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()} -</code> +</pre> <p> The <c>msg</c> field will be <c>undefined</c> in case the request has @@ -580,8 +534,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 +545,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 @@ -619,9 +571,9 @@ being set by diameter.</p> Send an answer message to the peer containing the specified protocol error. Equivalent to</p> -<code> +<pre> {reply, ['answer-message' | Avps] -</code> +</pre> <p> where <c>Avps</c> sets the Origin-Host, Origin-Realm, the specified Result-Code and (if the request sent one) Session-Id AVP's.</p> @@ -640,23 +592,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..eb6de80c11 100644 --- a/lib/diameter/doc/src/diameter_compile.xml +++ b/lib/diameter/doc/src/diameter_compile.xml @@ -1,5 +1,10 @@ <?xml version="1.0" encoding="iso-8859-1" ?> -<!DOCTYPE comref SYSTEM "comref.dtd"> +<!DOCTYPE comref SYSTEM "comref.dtd" [ + <!ENTITY % also SYSTEM "seealso.ent" > + <!ENTITY % here SYSTEM "seehere.ent" > + %also; + %here; +]> <comref> <header> @@ -122,7 +127,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 98adebf145..4a6cccc276 100644 --- a/lib/diameter/doc/src/diameter_dict.xml +++ b/lib/diameter/doc/src/diameter_dict.xml @@ -1,5 +1,10 @@ <?xml version="1.0" encoding="latin1" ?> -<!DOCTYPE erlref SYSTEM "fileref.dtd"> +<!DOCTYPE erlref SYSTEM "fileref.dtd" [ + <!ENTITY % also SYSTEM "seealso.ent" > + <!ENTITY % here SYSTEM "seehere.ent" > + %also; + %here; +]> <fileref> <header> @@ -40,8 +45,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 +62,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 @@ -125,9 +128,9 @@ is used to identify the relevant dictionary module.</p> <p> Example:</p> -<code> +<pre> @id 16777231 -</code> +</pre> </item> @@ -146,9 +149,9 @@ with existing modules in the system.</p> <p> Example:</p> -<code> +<pre> @name etsi_e2 -</code> +</pre> </item> @@ -169,9 +172,9 @@ different Diameter applications.</p> <p> Example:</p> -<code> +<pre> @prefix etsi_e2 -</code> +</pre> </item> @@ -189,9 +192,9 @@ The section has empty content.</p> <p> Example:</p> -<code> +<pre> @vendor 13019 ETSI -</code> +</pre> </item> @@ -205,13 +208,13 @@ The section content consists of AVP names.</p> <p> Example:</p> -<code> +<pre> @avp_vendor_id 2937 WWW-Auth Domain-Index Region-Set -</code> +</pre> </item> @@ -244,9 +247,9 @@ All dictionaries should typically inherit RFC3588 AVPs from <p> Example:</p> -<code> +<pre> @inherits diameter_gen_base_rfc3588 -</code> +</pre> </item> @@ -268,12 +271,12 @@ none are to be set.</p> <p> Example:</p> -<code> +<pre> @avp_types Location-Information 350 Grouped MV Requested-Information 353 Enumerated V -</code> +</pre> <warning> <p> @@ -298,11 +301,11 @@ encode/decode.</p> <p> Example:</p> -<code> +<pre> @custom_types rfc4005_avps Framed-IP-Address -</code> +</pre> </item> <tag><c>@codecs Mod</c></tag> @@ -315,11 +318,11 @@ Like <c>@custom_types</c> but requires the specified module to export <p> Example:</p> -<code> +<pre> @codecs rfc4005_avps Framed-IP-Address -</code> +</pre> </item> <tag><c>@messages</c></tag> @@ -330,7 +333,7 @@ The section content consists of definitions of the form specified in section 3.2 of RFC 3588, "Command Code ABNF specification".</p> <!-- RFC 4740 RTR/RTA --> -<code> +<pre> @messages RTR ::= < Diameter Header: 287, REQ, PXY > @@ -363,7 +366,7 @@ RTA ::= < Diameter Header: 287, PXY > * [ Proxy-Info ] * [ Route-Record ] * [ AVP ] -</code> +</pre> </item> @@ -378,14 +381,14 @@ section 4.4 of RFC 3588, "Grouped AVP Values".</p> <p> Example:</p> -<code> +<pre> @grouped SIP-Deregistration-Reason ::= < AVP Header: 383 > { SIP-Reason-Code } [ SIP-Reason-Info ] * [ AVP ] -</code> +</pre> <p> Specifying a Vendor-Id in the definition of a grouped AVP is @@ -408,14 +411,14 @@ otherwise defined in another dictionary.</p> <p> Example:</p> -<code> +<pre> @enum SIP-Reason-Code PERMANENT_TERMINATION 0 NEW_SIP_SERVER_ASSIGNED 1 SIP_SERVER_CHANGE 2 REMOVE_SIP_SERVER 3 -</code> +</pre> </item> <tag><c>@end</c></tag> @@ -450,22 +453,22 @@ contained in the message or grouped AVP in the order specified in the definition in question. For example, the grouped AVP</p> -<code> +<pre> SIP-Deregistration-Reason ::= < AVP Header: 383 > { SIP-Reason-Code } [ SIP-Reason-Info ] * [ AVP ] -</code> +</pre> <p> will result in the following record definition given an empty prefix.</p> -<code> +<pre> -record('SIP-Deregistration-Reason' {'SIP-Reason-Code', 'SIP-Reason-Info', 'AVP'}). -</code> +</pre> <p> The values encoded in the fields of generated records depends on the @@ -488,11 +491,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> @@ -507,7 +508,7 @@ callback upon reception of an incoming request.</p> <marker id="Float64"/> <marker id="Grouped"/> -<code> +<pre> OctetString() = [0..255] Integer32() = -2147483647..2147483647 Integer64() = -9223372036854775807..9223372036854775807 @@ -516,7 +517,7 @@ Unsigned64() = 0..18446744073709551615 Float32() = '-infinity' | float() | infinity Float64() = '-infinity' | float() | infinity Grouped() = record() -</code> +</pre> <p> On encode, an OctetString() can be specified as an iolist(), @@ -530,10 +531,10 @@ section.</p> <em>Derived AVP Data Formats</em></p> <marker id="Address"/> -<code> +<pre> Address() = OctetString() | tuple() -</code> +</pre> <p> On encode, an OctetString() IPv4 address is parsed in the usual @@ -545,7 +546,7 @@ An IPv6 tuple() has length 8 and contains values of type 0..65535. The tuple representation is used on decode.</p> <marker id="Time"/> -<code> +<pre> Time() = {date(), time()} where @@ -559,7 +560,7 @@ where Hour = 0..23 Minute = 0..59 Second = 0..59 -</code> +</pre> <p> Additionally, values that can be encoded are @@ -569,9 +570,9 @@ In particular, only values between <c>{{1968,1,20},{3,14,8}}</c> and <c>{{2104,2,26},{9,42,23}}</c> (both inclusive) can be encoded.</p> <marker id="UTF8String"/> -<code> +<pre> UTF8String() = [integer()] -</code> +</pre> <p> List elements are the UTF-8 encodings of the individual characters @@ -579,15 +580,15 @@ in the string. Invalid codepoints will result in encode/decode failure.</p> <marker id="DiameterIdentity"/> -<code> +<pre> DiameterIdentity() = OctetString() -</code> +</pre> <p> A value must have length at least 1.</p> <marker id="DiameterURI"/> -<code> +<pre> DiameterURI() = OctetString() | #diameter_URI{type = Type, fqdn = FQDN, @@ -602,7 +603,7 @@ where Port = integer() Transport = sctp | tcp Protocol = diameter | radius | 'tacacs+' -</code> +</pre> <p> On encode, fields port, transport and protocol default to 3868, sctp @@ -612,9 +613,9 @@ section 4.3 of RFC 3588. The record representation is used on decode.</p> <marker id="Enumerated"/> -<code> +<pre> Enumerated() = Integer32() -</code> +</pre> <p> On encode, values can be specified using the macros defined in a @@ -622,10 +623,10 @@ dictionary's hrl file.</p> <marker id="IPFilterRule"/> <marker id="QoSFilterRule"/> -<code> +<pre> IPFilterRule() = OctetString() QoSFilterRule() = OctetString() -</code> +</pre> <p> Values of these types are not currently parsed by diameter.</p> @@ -639,9 +640,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..a023a9bc08 100644 --- a/lib/diameter/doc/src/diameter_sctp.xml +++ b/lib/diameter/doc/src/diameter_sctp.xml @@ -1,5 +1,10 @@ <?xml version="1.0" encoding="latin1" ?> -<!DOCTYPE erlref SYSTEM "erlref.dtd"> +<!DOCTYPE erlref SYSTEM "erlref.dtd" [ + <!ENTITY % also SYSTEM "seealso.ent" > + <!ENTITY % here SYSTEM "seehere.ent" > + %also; + %here; +]> <erlref> <header> @@ -41,10 +46,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 +63,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 +73,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 +118,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 +145,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..be8a938115 100644 --- a/lib/diameter/doc/src/diameter_tcp.xml +++ b/lib/diameter/doc/src/diameter_tcp.xml @@ -1,5 +1,10 @@ <?xml version="1.0" encoding="latin1" ?> -<!DOCTYPE erlref SYSTEM "erlref.dtd"> +<!DOCTYPE erlref SYSTEM "erlref.dtd" [ + <!ENTITY % also SYSTEM "seealso.ent" > + <!ENTITY % here SYSTEM "seehere.ent" > + %also; + %here; +]> <erlref> <header> @@ -41,10 +46,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 +70,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 +85,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 +118,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 +150,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..0507af63a8 100644 --- a/lib/diameter/doc/src/diameter_transport.xml +++ b/lib/diameter/doc/src/diameter_transport.xml @@ -1,5 +1,10 @@ <?xml version="1.0" encoding="latin1" ?> -<!DOCTYPE erlref SYSTEM "erlref.dtd"> +<!DOCTYPE erlref SYSTEM "erlref.dtd" [ + <!ENTITY % also SYSTEM "seealso.ent" > + <!ENTITY % here SYSTEM "seehere.ent" > + %also; + %here; +]> <erlref> <header> @@ -38,8 +43,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 +63,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 +73,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 +85,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 +244,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> diff --git a/lib/diameter/doc/src/files.mk b/lib/diameter/doc/src/files.mk index 79d53abceb..89ec1031e6 100644 --- a/lib/diameter/doc/src/files.mk +++ b/lib/diameter/doc/src/files.mk @@ -2,7 +2,7 @@ # %CopyrightBegin% # -# Copyright Ericsson AB 2010-2011. All Rights Reserved. +# Copyright Ericsson AB 2010-2012. All Rights Reserved. # # The contents of this file are subject to the Erlang Public License, # Version 1.1, (the "License"); you may not use this file except in diff --git a/lib/diameter/doc/src/notes.xml b/lib/diameter/doc/src/notes.xml index e57958ac09..b89d84a4f6 100644 --- a/lib/diameter/doc/src/notes.xml +++ b/lib/diameter/doc/src/notes.xml @@ -1,11 +1,17 @@ <?xml version="1.0" encoding="latin1" ?> -<!DOCTYPE chapter SYSTEM "chapter.dtd"> +<!DOCTYPE chapter SYSTEM "chapter.dtd" [ + <!ENTITY % also SYSTEM "seealso.ent" > + <!ENTITY % here SYSTEM "seehere.ent" > + %also; + %here; +]> <chapter> <header> <copyright> <year>2011</year> +<year>2012</year> <holder>Ericsson AB. All Rights Reserved.</holder> </copyright> <legalnotice> @@ -136,6 +142,33 @@ first.</p> </section> +<section><title>Diameter 1.1</title> + + <section><title>Fixed Bugs and Malfunctions</title> + <list> + <item> + <p> + Fix fault in sending of 'closed' events.</p> + <p> + The fault made it possible for the 'closed' event not to + be sent following a failed capabilities exchange.</p> + <p> + Own Id: OTP-9824</p> + </item> + <item> + <p> + Fix faulty diameterc -name/-prefix.</p> + <p> + A minor blunder when introducing the new dictionary + parser in diameter-1.0 broke these options.</p> + <p> + Own Id: OTP-9826</p> + </item> + </list> + </section> + +</section> + <section><title>Diameter 1.0</title> <section><title>Fixed Bugs and Malfunctions</title> @@ -395,8 +428,7 @@ Known issues or limitations:</p> Some agent-related functionality is not entirely complete. In particular, support for proxy agents, that advertise specific Diameter applications but otherwise relay messages in much the same -way as relay agents (for which a <seealso -marker="diameter_app#handle_request">handle_request/3</seealso> +way as relay agents (for which a &handle_request; callback can return a <c>relay</c> tuple), will be completed in an upcoming release. There may also be more explicit support for redirect agents, although @@ -428,8 +460,7 @@ could likely be expanded upon.</p> <item> <p> -The function <seealso -marker="diameter#service_info">diameter:service_info/2</seealso> +The function &service_info; can be used to retrieve information about a started service (statistics, information about connected peers, etc) but this is not yet documented and both the input and output may change diff --git a/lib/diameter/doc/src/seealso.ent b/lib/diameter/doc/src/seealso.ent new file mode 100644 index 0000000000..6f67630220 --- /dev/null +++ b/lib/diameter/doc/src/seealso.ent @@ -0,0 +1,112 @@ +<?xml version="1.0" encoding="iso-8859-1" ?> + +<!-- + +%CopyrightBegin% + +Copyright Ericsson AB 2012. All Rights Reserved. + +The contents of this file are subject to the Erlang Public License, +Version 1.1, (the "License"); you may not use this file except in +compliance with the License. You should have received a copy of the +Erlang Public License along with this software. If not, it can be +retrieved online at http://www.erlang.org/. + +Software distributed under the License is distributed on an "AS IS" +basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See +the License for the specific language governing rights and limitations +under the License. + +%CopyrightEnd% + +--> + +<!-- + +Entities for cross references: less to type, easier to read and +less error prone. + +Additional intra-document entities are generated by seehere.sed. +That each definition is on a single (hideously long) line is +significant. + +--> + +<!-- diameter --> + +<!ENTITY mod_add_transport '<seealso marker="diameter#add_transport-2">diameter:add_transport/2</seealso>'> +<!ENTITY mod_call '<seealso marker="diameter#call-4">diameter:call/4</seealso>'> +<!ENTITY mod_origin_state_id '<seealso marker="diameter#origin_state_id-0">diameter:origin_state_id/0</seealso>'> +<!ENTITY mod_remove_transport '<seealso marker="diameter#remove_transport-2">diameter:remove_transport/2</seealso>'> +<!ENTITY mod_service_info '<seealso marker="diameter#service_info-2">diameter:service_info/2</seealso>'> +<!ENTITY mod_services '<seealso marker="diameter#services-0">diameter:services/0</seealso>'> +<!ENTITY mod_start_service '<seealso marker="diameter#start_service-2">diameter:start_service/2</seealso>'> +<!ENTITY mod_stop_service '<seealso marker="diameter#stop_service-1">diameter:stop_service/1</seealso>'> +<!ENTITY mod_subscribe '<seealso marker="diameter#subscribe-1">diameter:subscribe/1</seealso>'> + +<!ENTITY mod_application_alias '<seealso marker="diameter#application_alias">diameter:application_alias()</seealso>'> +<!ENTITY mod_application_module '<seealso marker="diameter#application_module">diameter:application_module()</seealso>'> +<!ENTITY mod_application_opt '<seealso marker="diameter#application_opt">diameter:application_opt()</seealso>'> +<!ENTITY mod_call_opt '<seealso marker="diameter#call_opt">diameter:call_opt()</seealso>'> +<!ENTITY mod_capability '<seealso marker="diameter#capability">diameter:capability()</seealso>'> +<!ENTITY mod_evaluable '<seealso marker="diameter#evaluable">diameter:evaluable()</seealso>'> +<!ENTITY mod_peer_filter '<seealso marker="diameter#peer_filter">diameter:peer_filter()</seealso>'> +<!ENTITY mod_service_event '<seealso marker="diameter#service_event">diameter:service_event()</seealso>'> +<!ENTITY mod_service_name '<seealso marker="diameter#service_name">diameter:service_name()</seealso>'> +<!ENTITY mod_service_opt '<seealso marker="diameter#service_opt">diameter:service_opt()</seealso>'> +<!ENTITY mod_transport_opt '<seealso marker="diameter#transport_opt">diameter:transport_opt()</seealso>'> +<!ENTITY mod_transport_ref '<seealso marker="diameter#transport_ref">diameter:transport_ref()</seealso>'> + +<!ENTITY capabilities_cb '<seealso marker="#capabilities_cb">capabilities_cb</seealso>'> +<!ENTITY capx_timeout '<seealso marker="#capx_timeout">capx_timeout</seealso>'> +<!ENTITY disconnect_cb '<seealso marker="#disconnect_cb">disconnect_cb</seealso>'> +<!ENTITY transport_config '<seealso marker="#transport_config">transport_config</seealso>'> +<!ENTITY transport_module '<seealso marker="#transport_module">transport_module</seealso>'> +<!ENTITY reconnect_timer '<seealso marker="#reconnect_timer">reconnect_timer</seealso>'> +<!ENTITY watchdog_timer '<seealso marker="#watchdog_timer">watchdog_timer</seealso>'> + +<!-- diameter_app --> + +<!ENTITY app_handle_answer '<seealso marker="diameter_app#Mod:handle_answer-4">handle_answer/4</seealso>'> +<!ENTITY app_handle_request '<seealso marker="diameter_app#Mod:handle_request-3">handle_request/3</seealso>'> +<!ENTITY app_handle_error '<seealso marker="diameter_app#Mod:handle_error-4">handle_error/4</seealso>'> +<!ENTITY app_peer_down '<seealso marker="diameter_app#Mod:peer_down-3">peer_up/3</seealso>'> +<!ENTITY app_peer_up '<seealso marker="diameter_app#Mod:peer_up-3">peer_up/3</seealso>'> +<!ENTITY app_pick_peer '<seealso marker="diameter_app#Mod:pick_peer-4">pick_peer/4</seealso>'> +<!ENTITY app_prepare_retransmit '<seealso marker="diameter_app#Mod:prepare_retransmit-3">prepare_retransmit/3</seealso>'> +<!ENTITY app_prepare_request '<seealso marker="diameter_app#Mod:prepare_request-3">prepare_request/3</seealso>'> + +<!ENTITY app_capabilities '<seealso marker="diameter_app#capabilities">diameter_app:capabilities()</seealso>'> +<!ENTITY app_message '<seealso marker="diameter_app#message">diameter_app:message()</seealso>'> +<!ENTITY app_packet '<seealso marker="diameter_app#packet">diameter_app:packet()</seealso>'> +<!ENTITY app_peer '<seealso marker="diameter_app#peer">diameter_app:peer()</seealso>'> +<!ENTITY app_peer_ref '<seealso marker="diameter_app#peer_ref">diameter_app:peer_ref()</seealso>'> +<!ENTITY app_state '<seealso marker="diameter_app#state">diameter_app:state()</seealso>'> + +<!-- diameter_dict --> + +<!ENTITY dict_data_types '<seealso marker="diameter_dict#DATA_TYPES">diameter_dict(4)</seealso>'> + +<!ENTITY dict_Address '<seealso marker="diameter_dict#DATA_TYPES">Address()</seealso>'> +<!ENTITY dict_DiameterIdentity '<seealso marker="diameter_dict#DATA_TYPES">DiameterIdentity()</seealso>'> +<!ENTITY dict_Grouped '<seealso marker="diameter_dict#DATA_TYPES">Grouped()</seealso>'> +<!ENTITY dict_OctetString '<seealso marker="diameter_dict#DATA_TYPES">OctetString()</seealso>'> +<!ENTITY dict_Time '<seealso marker="diameter_dict#DATA_TYPES">Time()</seealso>'> +<!ENTITY dict_UTF8String '<seealso marker="diameter_dict#DATA_TYPES">UTF8String()</seealso>'> +<!ENTITY dict_Unsigned32 '<seealso marker="diameter_dict#DATA_TYPES">Unsigned32()</seealso>'> + +<!-- diameter_transport --> + +<!ENTITY transport_start + '<seealso marker="diameter_transport#Mod:start-3">start/3</seealso>'> + +<!-- reference pages --> + +<!ENTITY man_compile '<seealso marker="diameterc">diameterc(1)</seealso>'> +<!ENTITY man_main '<seealso marker="diameter">diameter(3)</seealso>'> +<!ENTITY man_app '<seealso marker="diameter_app">diameter_app(3)</seealso>'> +<!ENTITY man_dict '<seealso marker="diameter_dict">diameter_dict(4)</seealso>'> +<!ENTITY man_transport + '<seealso marker="diameter_transport">diameter_transport(3)</seealso>'> +<!ENTITY man_sctp '<seealso marker="diameter_sctp">diameter_sctp(3)</seealso>'> +<!ENTITY man_tcp '<seealso marker="diameter_tcp">diameter_tcp(3)</seealso>'> diff --git a/lib/diameter/doc/src/seehere.sed b/lib/diameter/doc/src/seehere.sed new file mode 100644 index 0000000000..c62a783d40 --- /dev/null +++ b/lib/diameter/doc/src/seehere.sed @@ -0,0 +1,35 @@ +# +# %CopyrightBegin% +# +# Copyright Ericsson AB 2012. All Rights Reserved. +# +# The contents of this file are subject to the Erlang Public License, +# Version 1.1, (the "License"); you may not use this file except in +# compliance with the License. You should have received a copy of the +# Erlang Public License along with this software. If not, it can be +# retrieved online at http://www.erlang.org/. +# +# Software distributed under the License is distributed on an "AS IS" +# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See +# the License for the specific language governing rights and limitations +# under the License. +# +# %CopyrightEnd% + +# +# Map entities for inter-document references to ones for +# intra-document references like this: +# +# <!ENTITY aaa_xxx '<seealso marker="bbb#yyy">ccc:zzz</seealso>'> +# +# ===> +# +# <!ENTITY xxx '<seealso marker="#yyy">zzz</seealso>'> +# + +/<!ENTITY/!d +/#/!d +/"#/d +s@ [^_]*_@ @ +s@"[^#]*#@"#@ +s@>[^:]*:@>@ diff --git a/lib/diameter/src/base/diameter.appup.src b/lib/diameter/src/base/diameter.appup.src index 9b2a7d18ab..5655f98c1b 100644 --- a/lib/diameter/src/base/diameter.appup.src +++ b/lib/diameter/src/base/diameter.appup.src @@ -20,30 +20,38 @@ {"%VSN%", [ - {"0.9", [{restart_application, diameter}]}, - {"0.10", [{restart_application, diameter}]}, - {"1.0", [{restart_application, diameter}]}, - {"1.1", [%% new code - {add_module, diameter_transport}, - %% modified code - {load, diameter_sctp}, - {load, diameter_stats}, - {load, diameter_service}, - {load, diameter_config}, - {load, diameter_codec}, - {load, diameter_watchdog}, - {load, diameter_peer}, - {load, diameter_peer_fsm}, - {load, diameter}, - %% unmodified but including modified diameter.hrl - {load, diameter_callback}, - {load, diameter_capx}, - {load, diameter_types}]} + {"0.9", [{restart_application, diameter}]}, + {"0.10", [{restart_application, diameter}]}, + {"1.0", [{restart_application, diameter}]}, + {"1.1", [{restart_application, diameter}]}, + {"1.2", [{load, diameter}, + {load, diameter_capx}, + {load, diameter_codec}, + {load, diameter_peer}, + {load, diameter_reg}, + %% order significant from here + {load, diameter_session}, + {load, diameter_peer_fsm}, + {load, diameter_service}, + {load, diameter_watchdog}, + {load, diameter_config}]}, + {"1.2.1", [{load, diameter}, + {load, diameter_capx}, + {load, diameter_peer}, + {load, diameter_reg}, + %% order significant from here + {load, diameter_session}, + {load, diameter_peer_fsm}, + {load, diameter_service}, + {load, diameter_watchdog}, + {load, diameter_config}]} ], [ - {"0.9", [{restart_application, diameter}]}, - {"0.10", [{restart_application, diameter}]}, - {"1.0", [{restart_application, diameter}]}, - {"1.1", [{restart_application, diameter}]} + {"0.9", [{restart_application, diameter}]}, + {"0.10", [{restart_application, diameter}]}, + {"1.0", [{restart_application, diameter}]}, + {"1.1", [{restart_application, diameter}]}, + {"1.2", [{restart_application, diameter}]}, + {"1.2.1", [{restart_application, diameter}]} ] }. diff --git a/lib/diameter/src/base/diameter_service.erl b/lib/diameter/src/base/diameter_service.erl index 29046e6462..a4a0b80348 100644 --- a/lib/diameter/src/base/diameter_service.erl +++ b/lib/diameter/src/base/diameter_service.erl @@ -3231,9 +3231,6 @@ peer_acc(ConnT, Acc, #peer{pid = Pid, | info_conn(ConnT, TPid, WS /= ?WD_DOWN)], Acc). -info_conn(ConnT, [TPid], B) -> - info_conn(ConnT, TPid, B); - info_conn(ConnT, TPid, true) when is_pid(TPid) -> try ets:lookup(ConnT, TPid) of diff --git a/lib/diameter/test/diameter_compiler_SUITE.erl b/lib/diameter/test/diameter_compiler_SUITE.erl index 4b792b5426..79bf9d32db 100644 --- a/lib/diameter/test/diameter_compiler_SUITE.erl +++ b/lib/diameter/test/diameter_compiler_SUITE.erl @@ -31,8 +31,8 @@ %% testcases -export([format/1, format/2, replace/1, replace/2, - generate/1, generate/4, generate/0, - examples/1, examples/0]). + generate/1, generate/4, + examples/1]). -export([dict/0]). %% fake dictionary module @@ -339,7 +339,7 @@ %% =========================================================================== suite() -> - [{timetrap, {minutes, 2}}]. + [{timetrap, {minutes, 10}}]. all() -> [format, @@ -407,9 +407,6 @@ re({RE, Repl}, Bin) -> %% %% Ensure success when generating code and compiling. -generate() -> - [{timetrap, {seconds, 2*length(?REPLACE)}}]. - generate(Config) -> Bin = proplists:get_value(base, Config), Rs = lists:zip(?REPLACE, lists:seq(1, length(?REPLACE))), @@ -436,9 +433,6 @@ generate(Mods, Bin, N, Mode) -> %% %% Compile dictionaries extracted from various standards. -examples() -> - [{timetrap, {seconds, 3*length(?EXAMPLES)}}]. - examples(_Config) -> Dir = filename:join([code:lib_dir(diameter, examples), "dict"]), [D || D <- ?EXAMPLES, _ <- [examples(?S(D), Dir)]]. diff --git a/lib/diameter/test/diameter_traffic_SUITE.erl b/lib/diameter/test/diameter_traffic_SUITE.erl index fa9333a226..c157b0e304 100644 --- a/lib/diameter/test/diameter_traffic_SUITE.erl +++ b/lib/diameter/test/diameter_traffic_SUITE.erl @@ -183,14 +183,14 @@ suite() -> all() -> [start, start_services, add_transports, result_codes] - ++ [{group, name([E,C]), P} || E <- ?ENCODINGS, - C <- ?CONNECTIONS, - P <- [[], [parallel]]] + ++ [{group, ?util:name([E,C]), P} || E <- ?ENCODINGS, + C <- ?CONNECTIONS, + P <- [[], [parallel]]] ++ [remove_transports, stop_services, stop]. groups() -> Ts = tc(), - [{name([E,C]), [], Ts} || E <- ?ENCODINGS, C <- ?CONNECTIONS]. + [{?util:name([E,C]), [], Ts} || E <- ?ENCODINGS, C <- ?CONNECTIONS]. init_per_group(Name, Config) -> [{group, Name} | Config]. @@ -559,7 +559,7 @@ call(Config, Req) -> call(Config, Req, Opts) -> Name = proplists:get_value(testcase, Config), - [Encoding, Client] = name(proplists:get_value(group, Config)), + [Encoding, Client] = ?util:name(proplists:get_value(group, Config)), diameter:call(?CLIENT, dict(Req), req(Req, Encoding), @@ -599,17 +599,6 @@ set(Dict, E, FV, Rec) set(_, _, _, Rec) -> Rec. -%% Contruct and deconstruct names to work around group names being -%% restricted to atoms. - -name(Names) - when is_list(Names) -> - ?A(string:join([?L(A) || A <- Names], ",")); - -name(A) - when is_atom(A) -> - [?A(S) || S <- string:tokens(?L(A), ",")]. - %% =========================================================================== %% diameter callbacks diff --git a/lib/diameter/test/diameter_util.erl b/lib/diameter/test/diameter_util.erl index 890d24f6f8..5af4ad9ba5 100644 --- a/lib/diameter/test/diameter_util.erl +++ b/lib/diameter/test/diameter_util.erl @@ -24,7 +24,8 @@ %% %% generic --export([consult/2, +-export([name/1, + consult/2, run/1, fold/3, foldl/3, @@ -45,6 +46,21 @@ -define(L, atom_to_list). + +%% --------------------------------------------------------------------------- +%% name/2 +%% +%% Contruct and deconstruct lists of atoms as atoms to work around +%% group names in common_test being restricted to atoms. + +name(Names) + when is_list(Names) -> + list_to_atom(string:join([atom_to_list(A) || A <- Names], ",")); + +name(A) + when is_atom(A) -> + [list_to_atom(S) || S <- string:tokens(atom_to_list(A), ",")]. + %% --------------------------------------------------------------------------- %% consult/2 %% diff --git a/lib/diameter/vsn.mk b/lib/diameter/vsn.mk index 48e6596e72..c9f74ffcec 100644 --- a/lib/diameter/vsn.mk +++ b/lib/diameter/vsn.mk @@ -18,7 +18,7 @@ # %CopyrightEnd% APPLICATION = diameter -DIAMETER_VSN = 1.2 +DIAMETER_VSN = 1.3 PRE_VSN = APP_VSN = "$(APPLICATION)-$(DIAMETER_VSN)$(PRE_VSN)" diff --git a/lib/erl_docgen/priv/xsl/Makefile b/lib/erl_docgen/priv/xsl/Makefile index 1510387d72..58589672b8 100644 --- a/lib/erl_docgen/priv/xsl/Makefile +++ b/lib/erl_docgen/priv/xsl/Makefile @@ -42,7 +42,8 @@ XSL_FILES = \ db_pdf_params.xsl \ db_html.xsl \ db_html_params.xsl \ - db_man.xsl + db_man.xsl \ + db_eix.xsl # ---------------------------------------------------- diff --git a/lib/erl_docgen/priv/xsl/db_html.xsl b/lib/erl_docgen/priv/xsl/db_html.xsl index 4bc5abb364..ab5f24c406 100644 --- a/lib/erl_docgen/priv/xsl/db_html.xsl +++ b/lib/erl_docgen/priv/xsl/db_html.xsl @@ -578,8 +578,22 @@ <xsl:param name="curModule"/> <html> <head> - <link rel="stylesheet" href="{$topdocdir}/otp_doc.css" type="text/css"/> - <title>Erlang -- <xsl:value-of select="header/title"/></title> + <xsl:choose> + <xsl:when test="string-length($stylesheet) > 0"> + <link rel="stylesheet" href="{$topdocdir}/{$stylesheet}" type="text/css"/> + </xsl:when> + <xsl:otherwise> + <link rel="stylesheet" href="{$topdocdir}/otp_doc.css" type="text/css"/> + </xsl:otherwise> + </xsl:choose> + <xsl:choose> + <xsl:when test="string-length($winprefix) > 0"> + <title><xsl:value-of select="$winprefix"/> -- <xsl:value-of select="header/title"/></title> + </xsl:when> + <xsl:otherwise> + <title>Erlang -- <xsl:value-of select="header/title"/></title> + </xsl:otherwise> + </xsl:choose> </head> <body bgcolor="white" text="#000000" link="#0000ff" vlink="#ff00ff" alink="#ff0000"> @@ -719,7 +733,14 @@ <xsl:template name="menu_top"> - <img alt="Erlang logo" src="{$topdocdir}/erlang-logo.png"/> + <xsl:choose> + <xsl:when test="string-length($logo) > 0"> + <img alt="Erlang logo" src="{$topdocdir}/{$logo}"/> + </xsl:when> + <xsl:otherwise> + <img alt="Erlang logo" src="{$topdocdir}/erlang-logo.png"/> + </xsl:otherwise> + </xsl:choose> <br/> <small> <xsl:if test="boolean(/book/parts/part)"> @@ -731,7 +752,14 @@ <xsl:if test="boolean(/book/releasenotes)"> <a href="release_notes.html">Release Notes</a><br/> </xsl:if> - <a href="{$pdfdir}/{$appname}-{$appver}.pdf">PDF</a><br/> + <xsl:choose> + <xsl:when test="string-length($pdfname) > 0"> + <a href="{$pdfdir}/{$pdfname}.pdf">PDF</a><br/> + </xsl:when> + <xsl:otherwise> + <a href="{$pdfdir}/{$appname}-{$appver}.pdf">PDF</a><br/> + </xsl:otherwise> + </xsl:choose> <a href="{$topdocdir}/index.html">Top</a> </small> </xsl:template> diff --git a/lib/erl_docgen/priv/xsl/db_pdf.xsl b/lib/erl_docgen/priv/xsl/db_pdf.xsl index da96052462..7de5af2a49 100644 --- a/lib/erl_docgen/priv/xsl/db_pdf.xsl +++ b/lib/erl_docgen/priv/xsl/db_pdf.xsl @@ -650,7 +650,7 @@ <fo:flow flow-name="xsl-region-body"> <fo:block xsl:use-attribute-sets="cover.logo"> - <fo:external-graphic src="{$docgen}/priv/images/erlang-logo.gif"/> + <fo:external-graphic src="{$logo}"/> </fo:block> <fo:block xsl:use-attribute-sets="cover.title" id="cover-page"> <xsl:apply-templates/> diff --git a/lib/erl_docgen/priv/xsl/db_pdf_params.xsl b/lib/erl_docgen/priv/xsl/db_pdf_params.xsl index 4d9c08d0c3..4e61f1f476 100644 --- a/lib/erl_docgen/priv/xsl/db_pdf_params.xsl +++ b/lib/erl_docgen/priv/xsl/db_pdf_params.xsl @@ -87,7 +87,7 @@ <xsl:attribute-set name="cover.title"> <xsl:attribute name="border-before-style">solid</xsl:attribute> <xsl:attribute name="border-before-width">10pt</xsl:attribute> - <xsl:attribute name="border-color">#960003</xsl:attribute> + <xsl:attribute name="border-color"><xsl:value-of select="$pdfcolor"/></xsl:attribute> <xsl:attribute name="font-size">2.3em</xsl:attribute> <xsl:attribute name="padding-before">0.5em</xsl:attribute> <xsl:attribute name="text-align">end</xsl:attribute> @@ -101,7 +101,7 @@ <xsl:attribute-set name="cover.inner.copyright"> <xsl:attribute name="border-before-style">solid</xsl:attribute> <xsl:attribute name="border-before-width">1pt</xsl:attribute> - <xsl:attribute name="border-color">#960003</xsl:attribute> + <xsl:attribute name="border-color"><xsl:value-of select="$pdfcolor"/></xsl:attribute> <xsl:attribute name="font-weight">bold</xsl:attribute> <xsl:attribute name="padding-before">0.5em</xsl:attribute> <xsl:attribute name="space-before">200mm</xsl:attribute> @@ -160,7 +160,7 @@ <xsl:attribute-set name="h1"> <xsl:attribute name="border-after-style">solid</xsl:attribute> <xsl:attribute name="border-after-width">1pt</xsl:attribute> - <xsl:attribute name="border-color">#960003</xsl:attribute> + <xsl:attribute name="border-color"><xsl:value-of select="$pdfcolor"/></xsl:attribute> <xsl:attribute name="break-before">page</xsl:attribute> <xsl:attribute name="font-family">sans-serif</xsl:attribute> <xsl:attribute name="font-size">1.83em</xsl:attribute> @@ -226,7 +226,7 @@ <xsl:attribute-set name="page-header"> <xsl:attribute name="border-after-style">solid</xsl:attribute> <xsl:attribute name="border-after-width">2pt</xsl:attribute> - <xsl:attribute name="border-color">#960003</xsl:attribute> + <xsl:attribute name="border-color"><xsl:value-of select="$pdfcolor"/></xsl:attribute> <xsl:attribute name="font-family">sans-serif</xsl:attribute> <xsl:attribute name="font-size">0.9em</xsl:attribute> <xsl:attribute name="font-weight">bold</xsl:attribute> diff --git a/lib/erl_docgen/vsn.mk b/lib/erl_docgen/vsn.mk index b05df254a6..2599dc0ff7 100644 --- a/lib/erl_docgen/vsn.mk +++ b/lib/erl_docgen/vsn.mk @@ -1,2 +1,2 @@ -ERL_DOCGEN_VSN = 0.3.2 +ERL_DOCGEN_VSN = 0.3.3 diff --git a/lib/ssl/src/ssl_connection.erl b/lib/ssl/src/ssl_connection.erl index c1086a09ef..eb71bc61e9 100644 --- a/lib/ssl/src/ssl_connection.erl +++ b/lib/ssl/src/ssl_connection.erl @@ -2478,9 +2478,9 @@ handle_unrecv_data(StateName, #state{socket = Socket, transport_cb = Transport} handle_close_alert(Data, StateName, State) end. -handle_close_alert(Data, StateName, State) -> - case next_tls_record(Data, State) of - #ssl_tls{type = ?ALERT, fragment = EncAlerts} -> +handle_close_alert(Data, StateName, State0) -> + case next_tls_record(Data, State0) of + {#ssl_tls{type = ?ALERT, fragment = EncAlerts}, State} -> [Alert|_] = decode_alerts(EncAlerts), handle_normal_shutdown(Alert, StateName, State); _ -> diff --git a/make/otp.mk.in b/make/otp.mk.in index 756cc85443..d74220588c 100644 --- a/make/otp.mk.in +++ b/make/otp.mk.in @@ -215,6 +215,22 @@ TEXDIR = . SPECDIR = $(DOCDIR)/specs +ifeq ($(CSS_FILE),) +CSS_FILE = otp_doc.css +endif +ifeq ($(WINPREFIX),) +WINPREFIX = Erlang +endif +ifeq ($(HTMLLOGO),) +HTMLLOGO_FILE = erlang-logo.png +endif +ifeq ($(PDFLOGO),) +PDFLOGO_FILE = $(DOCGEN)/priv/images/erlang-logo.gif +endif +ifeq ($(PDFCOLOR),) +PDFCOLOR = \#960003 +endif + # HTML & GIF files that always are generated and must be delivered SGML_COLL_FILES = $(SGML_APPLICATION_FILES) $(SGML_PART_FILES) XML_COLL_FILES = $(XML_APPLICATION_FILES) $(XML_PART_FILES) @@ -256,12 +272,10 @@ $(MAN1DIR)/%.1: %.xml date=`date +"%B %e %Y"`; \ xsltproc --output "$@" --stringparam company "Ericsson AB" --stringparam docgen "$(DOCGEN)" --stringparam gendate "$$date" --stringparam appname "$(APPLICATION)" --stringparam appver "$(VSN)" --xinclude -path $(DOCGEN)/priv/dtd -path $(DOCGEN)/priv/dtd_man_entities $(DOCGEN)/priv/xsl/db_man.xsl $< - $(MAN2DIR)/%.2: %.xml date=`date +"%B %e %Y"`; \ xsltproc --output "$@" --stringparam company "Ericsson AB" --stringparam docgen "$(DOCGEN)" --stringparam gendate "$$date" --stringparam appname "$(APPLICATION)" --stringparam appver "$(VSN)" --xinclude -path $(DOCGEN)/priv/dtd -path $(DOCGEN)/priv/dtd_man_entities $(DOCGEN)/priv/xsl/db_man.xsl $< - ifneq ($(wildcard $(SPECDIR)),) $(MAN3DIR)/%.3: %.xml $(SPECDIR)/specs_%.xml date=`date +"%B %e %Y"`; \ diff --git a/make/otp_release_targets.mk b/make/otp_release_targets.mk index 67243b5ffd..0be0a2de56 100644 --- a/make/otp_release_targets.mk +++ b/make/otp_release_targets.mk @@ -42,17 +42,34 @@ $(HTMLDIR)/index.html: $(XML_FILES) $(SPECS_FILES) --stringparam gendate "$$date" \ --stringparam appname "$(APPLICATION)" \ --stringparam appver "$(VSN)" \ + --stringparam stylesheet "$(CSS_FILE)" \ + --stringparam winprefix "$(WINPREFIX)" \ + --stringparam logo "$(HTMLLOGO_FILE)" \ + --stringparam pdfname "$(PDFNAME)" \ -path $(DOCGEN)/priv/dtd \ -path $(DOCGEN)/priv/dtd_html_entities \ $(DOCGEN)/priv/xsl/db_html.xsl book.xml + endif $(HTMLDIR)/users_guide.html: $(XML_FILES) date=`date +"%B %e %Y"`; \ - $(XSLTPROC) --noout --stringparam outdir $(HTMLDIR) --stringparam docgen "$(DOCGEN)" --stringparam topdocdir "$(TOPDOCDIR)" \ + $(XSLTPROC) --noout \ + --stringparam outdir $(HTMLDIR) \ + --stringparam docgen "$(DOCGEN)" \ + --stringparam topdocdir "$(TOPDOCDIR)" \ --stringparam pdfdir "$(PDFDIR)" \ - --stringparam gendate "$$date" --stringparam appname "$(APPLICATION)" --stringparam appver "$(VSN)" --xinclude \ - -path $(DOCGEN)/priv/dtd -path $(DOCGEN)/priv/dtd_html_entities $(DOCGEN)/priv/xsl/db_html.xsl book.xml + --stringparam gendate "$$date" \ + --stringparam appname "$(APPLICATION)" \ + --stringparam appver "$(VSN)" \ + --stringparam stylesheet "$(CSS_FILE)" \ + --stringparam winprefix "$(WINPREFIX)" \ + --stringparam logo "$(HTMLLOGO_FILE)" \ + --stringparam pdfname "$(PDFNAME)" \ + --xinclude \ + -path $(DOCGEN)/priv/dtd \ + -path $(DOCGEN)/priv/dtd_html_entities \ + $(DOCGEN)/priv/xsl/db_html.xsl book.xml %.fo: $(XML_FILES) $(SPECS_FILES) date=`date +"%B %e %Y"`; \ @@ -61,6 +78,8 @@ $(HTMLDIR)/users_guide.html: $(XML_FILES) --stringparam gendate "$$date" \ --stringparam appname "$(APPLICATION)" \ --stringparam appver "$(VSN)" \ + --stringparam logo "$(PDFLOGO_FILE)" \ + --stringparam pdfcolor "$(PDFCOLOR)" \ --xinclude $(TOP_SPECS_PARAM) \ -path $(DOCGEN)/priv/dtd \ -path $(DOCGEN)/priv/dtd_html_entities \ @@ -77,8 +96,13 @@ ifneq ($(XML_FILES),) $(HTMLDIR)/$(APPLICATION).eix: $(XML_FILES) $(SPECS_FILES) date=`date +"%B %e %Y"`; \ $(XSLTPROC) --stringparam docgen "$(DOCGEN)" \ - --stringparam gendate "$$date" --stringparam appname "$(APPLICATION)" --stringparam appver "$(VSN)" --xinclude $(TOP_SPECS_PARAM) \ - -path $(DOCGEN)/priv/dtd -path $(DOCGEN)/priv/dtd_html_entities $(DOCGEN)/priv/xsl/db_eix.xsl book.xml > $@ + --stringparam gendate "$$date" \ + --stringparam appname "$(APPLICATION)" \ + --stringparam appver "$(VSN)" \ + -xinclude $(TOP_SPECS_PARAM) \ + -path $(DOCGEN)/priv/dtd \ + -path $(DOCGEN)/priv/dtd_html_entities \ + $(DOCGEN)/priv/xsl/db_eix.xsl book.xml > $@ docs: $(HTMLDIR)/$(APPLICATION).eix diff --git a/system/doc/top/Makefile b/system/doc/top/Makefile index 9b305eb13b..673ba44c94 100644 --- a/system/doc/top/Makefile +++ b/system/doc/top/Makefile @@ -163,17 +163,34 @@ $(MAN_INDEX): $(MAN_INDEX_SCRIPT) $(HTMLDIR)/highlights.html: highlights.xml date=`date +"%B %e %Y"`; \ - $(XSLTPROC) --output $(@) --stringparam docgen "$(DOCGEN)" --stringparam topdocdir "$(TOPDOCDIR)" \ - --stringparam pdfdir "$(PDFREFDIR)" --stringparam gendate "$$date" --stringparam appname "$(APPLICATION)" \ - --stringparam appver "$(VSN)" -path $(DOCGEN)/priv/dtd -path $(DOCGEN)/priv/dtd_html_entities \ + $(XSLTPROC) --output $(@) \ + --stringparam docgen "$(DOCGEN)" \ + --stringparam topdocdir "$(TOPDOCDIR)" \ + --stringparam pdfdir "$(PDFREFDIR)" \ + --stringparam gendate "$$date" \ + --stringparam appname "$(APPLICATION)" \ + --stringparam appver "$(VSN)" \ + --stringparam stylesheet "$(CSS_FILE)" \ + --stringparam winprefix "$(WINPREFIX)" \ + --stringparam logo "$(HTMLLOGO_FILE)" \ + -path $(DOCGEN)/priv/dtd \ + -path $(DOCGEN)/priv/dtd_html_entities \ $(DOCGEN)/priv/xsl/db_html.xsl $< $(HTMLDIR)/incompatible.html: incompatible.xml date=`date +"%B %e %Y"`; \ - $(XSLTPROC) --output $(@) --stringparam docgen "$(DOCGEN)" --stringparam topdocdir "$(TOPDOCDIR)" \ - --stringparam pdfdir "$(PDFREFDIR)" --stringparam gendate "$$date" --stringparam appname "$(APPLICATION)" \ - --stringparam appver "$(VSN)" -path $(DOCGEN)/priv/dtd -path $(DOCGEN)/priv/dtd_html_entities \ + $(XSLTPROC) --output $(@) --stringparam docgen "$(DOCGEN)" \ + --stringparam topdocdir "$(TOPDOCDIR)" \ + --stringparam pdfdir "$(PDFREFDIR)" \ + --stringparam gendate "$$date" \ + --stringparam appname "$(APPLICATION)" \ + --stringparam appver "$(VSN)" \ + --stringparam stylesheet "$(CSS_FILE)" \ + --stringparam winprefix "$(WINPREFIX)" \ + --stringparam logo "$(HTMLLOGO_FILE)" \ + -path $(DOCGEN)/priv/dtd \ + -path $(DOCGEN)/priv/dtd_html_entities \ $(DOCGEN)/priv/xsl/db_html.xsl $< #-------------------------------------------------------------------------- |