aboutsummaryrefslogtreecommitdiffstats
path: root/lib/diameter/doc
AgeCommit message (Collapse)Author
2017-08-29Merge branch 'anders/diameter/config_consistency/OTP-14555' into maintAnders Svensson
* anders/diameter/config_consistency/OTP-14555: Let strict_mbit and incoming_maxlen be configured per transport Let a service configure default transport options Rename type evaluable -> eval
2017-08-29Merge branch 'anders/diameter/strict_capx/OTP-14546' into maintAnders Svensson
* anders/diameter/strict_capx/OTP-14546: Document transport_opt() strict_capx Rename transport_opt() capx_strictness to strict_capx
2017-08-29Merge branch 'anders/diameter/performance/OTP-14521' into maintAnders Svensson
* anders/diameter/performance/OTP-14521: Fix influence of decode_format on service events Work around more common_test woe
2017-08-29Merge branch 'anders/diameter/loopback_any/OTP-14544' into maintAnders Svensson
* anders/diameter/loopback_any/OTP-14544: Use loopback/any config in examples suite Handle loopback/any as local address in diameter_tcp/sctp
2017-08-28Fix influence of decode_format on service eventsAnders Svensson
Decoded CER/CEA messages are passed in events messages that can be subscribed to using diameter:subscribe/1. A configured decode_format was not reflected in these, messages always being passed as records. Clarify that strict_arities only applies to message callbacks.
2017-08-25Let strict_mbit and incoming_maxlen be configured per transportAnders Svensson
Since these can make sense per peer. The remaining service-only options either belong there or make little sense being configured per transport.
2017-08-25Let a service configure default transport optionsAnders Svensson
Only a default spawn_opt has been possible to configure, but there's no reason why most others should need to be configured per transport. Those options that still only make sense on a transport are transport_module/config (because of the semantics of multiple values), applications/capabilities (since these override service options), and private (since it's only to allow user-specific options in a backwards compatible way).
2017-08-24Rename type evaluable -> evalAnders Svensson
Export the old type as a synonym for backwards compatability. The name evaluable is a bit too awkward.
2017-08-24Document transport_opt() strict_capxAnders Svensson
2017-08-19Handle loopback/any as local address in diameter_tcp/sctpAnders Svensson
The support is implied by documentation, but wasn't handled in code. Be consistent in retrieving the address from the sock rather than the configuration, and in accepting both ip and ifaddr for a local address.
2017-08-10Add service_opt() traffic_countersAnders Svensson
To be able to disable the counting of messages for which application callbacks take place. Messages sent/handled by diameter itself are always counted.
2017-08-03Add service_opt() strict_aritiesAnders Svensson
To be able to disable the relatively expensive check that the number of AVPs received in a message or grouped AVP agrees with the dictionary in question. The may well be easier for the user in handle_request/answer callbacks, when digesting the received message, and in some cases may not be important. The check at encode can also be disabled, allowing messages that don't agree with the dictionary in question to be sent, which can be useful in test (at least).
2017-08-03Tweak map-valued decodeAnders Svensson
Use the same [MsgName | Avps] representation as for the list decode, but with Avps a map instead of a AVP name/values list. As a result, don't set the message/AVP name on an additional key in the map, which felt a bit odd. Messages are [MsgName :: atom() | map()], Grouped AVPs are just map(). Fix at least one problem in the traffic suite along the way: with decode_format false, the own decode in to_map/2 didn't know whether or not to decode strings, resulting on some failures.
2017-08-03Rename record_decode -> decode_formatAnders Svensson
{record_decode, map} is a bit too quirky.
2017-08-03Let messages and grouped AVPs be decoded to listsAnders Svensson
That is, decode to the same format that encode already accepts. Only a message has its name at the head of the list since AVPs are already name/value pairs.
2017-08-03Let messages and grouped AVPs be encoded/decoded from/to mapsAnders Svensson
With {record_decode, map}. The option name is arguably a bit misleading now, but not too objectionable given that the encode/decode in question has historically only been of records. One advantage of the map decode is that the map only contains values for those AVPs existing in the message or grouped AVP in question. The name of the message or grouped AVP is stored in with key ':name', the leading colon ensuring that the key isn't a diameter-name. Decoding to maps makes the hrl files generated from dictionary files largely irrelevant. There are value defines generated into these, but they're typically so long as to be unusable.
2017-08-03Add service_opt() record_decodeAnders Svensson
To control whether or not messages and grouped AVPs are decoded to records, in #diameter_packet.msg and #diameter_avp.value respectively. The decode became unnecessary for diameter's needs in parent commit, which decoupled it from the checking of AVP arities.
2017-06-21Prepare releaseErlang/OTP
2017-06-14Merge branch 'anders/diameter/capx_vs_dpr/OTP-14338'Anders Svensson
* anders/diameter/capx_vs_dpr/OTP-14338: Let candidate peers be passed to diameter:call/4 Comment on RFC ambiguity regarding application identifiers Remove trailing whitespace
2017-06-14Merge branch 'anders/diameter/performance/OTP-14343'Anders Svensson
* anders/diameter/performance/OTP-14343: (50 commits) Let spawn_opt config replace erlang:spawn_opt/2 for request processes Move (most of) diameter_gen.hrl to diameter_gen.erl Change signature associated with dictionary @custom_type/@codecs Avoid sending answer terms between processes unnecessarily Refactor handling of incoming requests Restore diameter_codec:decode/2, update diameter_codec(3) Add diameter_codec option ordered_encode Restore undocumented Failed-AVP setting convenience Fix/simplify setting of one Failed-AVP Avoid recreating records Avoid recreating records Avoid recreating records Avoid recreating records Adapt test suites to modified encode/decode Simplify diameter_caps construction Don't compute URI defaults unnecessarily Don't deconstruct {TPid, Caps} unnecessarily Remove use of process dictionary in decode Remove minor diameter_config bloat Fix maximum AVP arity check ...
2017-06-13Let candidate peers be passed to diameter:call/4Anders Svensson
To solve the problem of being able to send messages to a peer that hasn't advertised support for the application in question, as discussed in the parent commit. diameter:call/4 can be passed 'peer' options to identify candidates, and the only requirement is that an appropriate dictionary be configured for encode. Filters are applied as if candidates had been selected by advertised application.
2017-06-13Change signature associated with dictionary @custom_type/@codecsAnders Svensson
To pass the options map through the encode. This is not backwards compatible, and dictionaries supporting @custom_types or @codecs will need to be updated.
2017-06-13Restore diameter_codec:decode/2, update diameter_codec(3)Anders Svensson
The documentation has been out of date since the string_decode option was added in commit 1590920c. The optionless decode/2 was removed in the commit that removed the use of the process dictionary in decode.
2017-05-05Revert "Prepare release"Raimo Niskanen
This reverts commit dc57404252c47520f352834ad9be45ad684f96c9.
2017-05-04Prepare releaseErlang/OTP
2017-05-04Update copyright yearRaimo Niskanen
2017-03-14Prepare releaseErlang/OTP
2017-03-13Fix xml warnings in old release notesRickard Green
2016-09-20Prepare releaseErlang/OTP
2016-08-26Fix xmllint errors in documentationAnders Svensson
2016-08-26Remove documentation overkillAnders Svensson
"Defaults to X" isn't clarified by "if unspecified".
2016-06-21Prepare releaseErlang/OTP
2016-06-02Revert "Prepare release"Erlang/OTP
This reverts commit e020f75c10410a6943cd055bfa072a2641eab7da.
2016-06-02Prepare releaseErlang/OTP
2016-05-12Revert "Prepare release"Erlang/OTP
This reverts commit bd64ad8e15d66e48b36dbe3584315dd5cfc8b59a.
2016-05-11Prepare releaseErlang/OTP
2016-05-10Merge branch 'anders/diameter/19.0-rc1/OTP-12913'Anders Svensson
* anders/diameter/19.0-rc1/OTP-12913: vsn -> 1.12 Update appup for 19.0-rc1 Update documentation for CEA/DWA/DPA Result-Code counters
2016-05-09Update documentation for CEA/DWA/DPA Result-Code countersAnders Svensson
Missed in commit d6b3b84a.
2016-03-15update copyright-yearHenrik Nord
2016-03-14Prepare releaseErlang/OTP
2016-01-27Merge branch 'maint-17' into maintAnders Svensson
2016-01-26Update release notesErlang/OTP
2015-12-21Make peer handling more efficientAnders Svensson
Each service process maintains a dictionary of peers, mapping an application alias to a {pid(), #diameter_caps{}} list of connected peers. These lists are potentially large, peers were appended to the end of the list for no particular reason, and these long lists were constructed/deconstructed when filtering them for pick_peer callbacks. Many simultaneous outgoing request could then slow the VM to a crawl, with many scheduled processes mired in list manipulation. The pseudo-dicts are now replaced by plain ets tables. The reason for them was (once upon a time) to have an interface interchangeable with a plain dict for debugging purposes, but strict swapablity hasn't been the case for some time now, and in practice a swap has never taken place. Additional tables mapping Origin-Host/Realm have also been introduced, to minimize the size of the peers lists when peers are filtered on host/realm. For example, a filter like {any, [{all, [realm, host]}, realm]} is probably a very common case: preferring a Destination-Realm/Host match before falling back on Destination-Realm alone. This is now more efficiently (but not equivalently) expressed as {first, [{all, [realm, host]}, realm]} to stop the search when the best match is made, and extracts peers from host/realm tables instead of searching through the list of all peers supporting the application in question. The code to try and start with a lookup isn't exhaustive, and the 'any' filter is still as inefficient as previously.
2015-12-20Update release notesErlang/OTP
2015-12-15Update release notesErlang/OTP
2015-09-21Prepare releaseErlang/OTP
2015-09-21Merge branch 'anders/diameter/18.1/OTP-12978' into maintAnders Svensson
* anders/diameter/18.1/OTP-12978: Remove 1.11 release notes
2015-09-17Remove 1.11 release notesAnders Svensson
These were added manually in merge commit 8c5d719a, but that was wrong: the notes will be generated. Note that OTP-12791 in the comment for commit 5a339bcb is wrong: it's OTP-12891.
2015-09-14Merge branch 'anders/diameter/M-bit/OTP-12947' into maintAnders Svensson
* anders/diameter/M-bit/OTP-12947: Add service_opt() strict_mbit
2015-08-25Add service_opt() strict_mbitAnders Svensson
There are differing opinions on whether or not reception of an arbitrary AVP setting the M-bit is an error. 1.3.4 of RFC 6733 says this about how an existing Diameter application may be modified: o The M-bit allows the sender to indicate to the receiver whether or not understanding the semantics of an AVP and its content is mandatory. If the M-bit is set by the sender and the receiver does not understand the AVP or the values carried within that AVP, then a failure is generated (see Section 7). It is the decision of the protocol designer when to develop a new Diameter application rather than extending Diameter in other ways. However, a new Diameter application MUST be created when one or more of the following criteria are met: M-bit Setting An AVP with the M-bit in the MUST column of the AVP flag table is added to an existing Command/Application. An AVP with the M-bit in the MAY column of the AVP flag table is added to an existing Command/Application. The point here is presumably interoperability: that the command grammar should specify explicitly what mandatory AVPs much be understood, and that anything more is an error. On the other hand, 3.2 says thus about command grammars: avp-name = avp-spec / "AVP" ; The string "AVP" stands for *any* arbitrary AVP ; Name, not otherwise listed in that Command Code ; definition. The inclusion of this string ; is recommended for all CCFs to allow for ; extensibility. This renders 1.3.4 pointless unless "*any* AVP" is qualified by "not setting the M-bit", since the sender can effectively violate 1.3.4 without this necessitating an error at the receiver. If clients add arbitrary AVPs setting the M-bit then request handling becomes more implementation-dependent. The current interpretation in diameter is strict: if a command grammar doesn't explicitly allow an AVP setting the M-bit then reception of such an AVP is regarded as an error. The strict_mbit option now allows this behaviour to be changed, false turning all responsibility for the M-bit over to the user.