aboutsummaryrefslogtreecommitdiffstats
path: root/lib/diameter/src
AgeCommit message (Collapse)Author
2014-03-20Introduce runtime_dependencies in .app filesRickard Green
Most dependencies introduced are exactly the dependencies to other applications found by xref. That is, there might be real dependencies missing. There might also be pure debug dependencies listed that probably should be removed. Each application has to be manually inspected in order to ensure that all real dependencies are listed. All dependencies introduced are to application versions used in OTP 17.0. This since the previously used version scheme wasn't designed for this, and in order to minimize the work of introducing the dependencies.
2014-02-19Use inet:{peer,sock}names/1 in diameter_sctpAnders Svensson
OTP-10229 (commit c4592b69) added these function to give access to all addresses on a multihomed endpoint, their singular siblings not returning anything useful in this case. This fixes {accept, Match} config, which matches peer addresses against configured addresses or regexps to decide whether or not a newly established association should be retained. The functionality was added in OTP-10893 (commit 9bbf27eb) but predated OTP-10229 by a few months. It also fixes the addresses shown for SCTP associations in diameter:service_info/2 output.
2014-01-28Merge branch 'anders/diameter/17.0_release/OTP-11605'Anders Svensson
* anders/diameter/17.0_release/OTP-11605: vsn -> 1.6 Remove upgrade-related code Update appup for 17.0 Avoid type gen_sctp:open_option() until it actually exists
2014-01-27Remove upgrade-related codeAnders Svensson
No longer needed to update code in runtime since the emulator is restarted at a major release.
2014-01-27Update appup for 17.0Anders Svensson
Plan to make use of the emulator restart implied by a major release to clean out some upgrade-related code.
2014-01-27Avoid type gen_sctp:open_option() until it actually existsAnders Svensson
The type's existence is the subject of OTP-11139, which has been gathering dust since R16B. http://erlang.org/pipermail/erlang-bugs/2013-September/003765.html
2014-01-27Merge branch 'anders/diameter/sctp_streams/OTP-11593'Anders Svensson
* anders/diameter/sctp_streams/OTP-11593: Change interface for communicating outbound stream id to diameter_sctp
2014-01-24Change interface for communicating outbound stream id to diameter_sctpAnders Svensson
The module uses the transport_data field of record diameter_packet to communicate the stream on which the an incoming message is received and on which an outgoing message should be sent, the previous interface being that both are communicated as a tuple of the form {stream, Id}. However, since diameter retains the value of an incoming request's transport_data unless the corresponding answer message specifies otherwise, the behaviour in this case is to send an answer on the outbound stream with the same identifier as the that of the inbound stream on which the request was received. If the inbound stream id is greater than or equal to the number of outbound streams then this is guaranteed to fail, causing the transport process in question to terminate. There is no relationship between inbound and outbound stream identifiers so diameter_sctp's imposition of one is simply wrong. Outbound stream ids are now communicated with a different tuple: {outstream, Id}, interpreted modulo the number of outbound streams. Thus, retention of an inbound request's transport_data has no effect on the selection of an outbound stream. The change in interface is not strictly backwards compatible because of the new atom for the outbound stream. However, as there is currently no documented way of obtaining the available number of outbound streams for a peer connection, there is no way for a client to have known the range of ids from which it could reliably have chosen with the previous interface, so any setting of the outbound stream has probably been unintentional. Not explicitly specifying an outbound stream now results in a round-robin selection.
2014-01-16Ensure that Grouped AVP's are fully defined in dictionariesAnders Svensson
The case in which an AVP was defined as having type Grouped in @avp_types without a corresponding specification in @grouped was missing.
2014-01-16Don't format diameter_make:codec/2 errorsAnders Svensson
Instead, add diameter_make:format_error/1 to allow the caller to format if desired, which is what applications like compiler and yecc do. Use this to check that the expected error is the one actually generated in the compiler suite.
2013-12-02Merge branch 'anders/diameter/R16B03_release/OTP-11499' into maintAnders Svensson
* anders/diameter/R16B03_release/OTP-11499: vsn -> 1.5 Update appup for OTP-11168 Update appup for OTP-11361 Add makefile to build example dictionaries Add recent Diameter-related RFCs Generate diameterc.1, not diameter_compile.1 Fix documentation typos Fix appup blunder
2013-12-02Merge branch 'anders/diameter/timer_confusion/OTP-11168' into maintAnders Svensson
* anders/diameter/timer_confusion/OTP-11168: Rename reconnect_timer -> connect_timer
2013-12-02Merge branch 'anders/diameter/dictionary_make/OTP-11348' into maintAnders Svensson
* anders/diameter/dictionary_make/OTP-11348: Return compilable forms instead of beam Document diameter_make:format/1 and diameter_make:flatten/1 Fix diameter_make:flatten/1 Modify type that currently causes dialyzer woe Simplify and extend diameter_make interface Add diameter_make:flatten/1, remove reformat/1 Adapt compiler suite to diameter_make Remove dead code from codec suite Extend diameter_make:codec/2 Don't pollute process dictionary in diameter_codegen:from_dict/4 Make forms a separate output from diameter_codegen Remove last remnants of "spec" Write as last step in code generation Change extensions for debug output: .spec/forms -> .D/F
2013-12-01Return compilable forms instead of beamAnders Svensson
That is, preprocessed forms that can be passed to compile:forms/1,2.
2013-12-01Fix diameter_make:flatten/1Anders Svensson
To set @avp_vendor_id, @codecs and @custom_types as required for imported avps.
2013-12-01Modify type that currently causes dialyzer woeAnders Svensson
The intention was that the type would represent an improper list whose head was an integer and whose tail was an orddict but that doesn't seem to be dialyzer's interpretation anyway.
2013-12-01Simplify and extend diameter_make interfaceAnders Svensson
In particular, make codec/2 flexible as to what's generated, the formats (erl, hrl, parse, forms and beam) being passed in the options list and defaulting to [erl, hrl]. The 'parse' format is the internal format to which dictionaries are parsed, which can be manipulated by flatten/1 before being passed back to codec/2 or format/1. Remove the (undocumented) dict/1,2 since codec/2 now subsumes it with the 'parse' option.
2013-12-01Add diameter_make:flatten/1, remove reformat/1Anders Svensson
The latter is now unnecessary given that codec/2 can return a parse and format/1 can return the dictionary format.
2013-11-30Update appup for OTP-11168Anders Svensson
2013-11-30Update appup for OTP-11361Anders Svensson
2013-11-29Rename reconnect_timer -> connect_timerAnders Svensson
The former was misleading since the timer only applies to initial connection attempts, reconnection attempts being governed by watchdog_timer. The name is a historic remnant from a (dark, pre-OTP) time in which RFC 3539 was followed less slavishly than it is now, and the timer actually did apply to reconnection attempts. Note that connect_timer corresponds to RFC 6733 Tc, while watchdog_timer corresponds to RFC 3539 TwInit. The latter RFC makes clear that TwInit should apply to reconnection attempts. It's less clear if only RFC 6733 is read. Note also that reconnect_timer is still accepted for backwards compatibility. It would be possible to add an option to make reconnect_timer behave strictly as the name suggests (ie. ignore RFC 3539 and interpret RFC 6733 at face value; something that has some value for testing at least) but no such option is implemented in this commit.
2013-11-29Merge branch 'anders/diameter/capx_dictionary/OTP-11361' into maintAnders Svensson
* anders/diameter/capx_dictionary/OTP-11361: Don't hardcode diameter_base @prefix on common dictionary
2013-11-28Extend diameter_make:codec/2Anders Svensson
Function can now take a literal dictionary as input, instead of a path, and can return results instead of writing them to the filesystem.
2013-11-28Don't pollute process dictionary in diameter_codegen:from_dict/4Anders Svensson
Didn't matter before diameter_make since the module was only called from diameterc(1).
2013-11-28Make forms a separate output from diameter_codegenAnders Svensson
Instead of being output as a consequence of a debug option.
2013-11-28Remove last remnants of "spec"Anders Svensson
2013-11-28Write as last step in code generationAnders Svensson
In preparation for allowing return instead of write.
2013-11-28Don't hardcode diameter_base @prefix on common dictionaryAnders Svensson
2013-11-28Change extensions for debug output: .spec/forms -> .D/FAnders Svensson
"spec" is an old term the internal representation of a dictionary. The new extensions are in the style or those that compile(3) can generate.
2013-11-28Fix appup blunderAnders Svensson
Should have been part of commit af682258.
2013-11-03Update appup, vsn -> 1.4.4Anders Svensson
2013-11-03Merge branch 'anders/diameter/5014_failure/OTP-11395' into ↵Anders Svensson
anders/diameter/patch_release/OTP-11459 * anders/diameter/5014_failure/OTP-11395: Fix handling of 5014, DIAMETER_INVALID_AVP_LENGTH
2013-11-03Fix handling of 5014, DIAMETER_INVALID_AVP_LENGTHAnders Svensson
The error was detected as 5004 (DIAMETER_INVALID_AVP_VALUE) for stringish Diameter types, in which case an AVP length that pointed past the end of a message resulted in encode failure of the suggested Failed-AVP. Should have been fixed in commit 4ce2d3a6.
2013-10-07Fix broken DWAAnders Svensson
Commit e762d7d1 broke outgoing DWA by setting new Hop-by-Hop and End-to-End identifiers instead of those of the incoming DWR.
2013-09-12Update appup for diameter-1.4.3 in R16B02Anders Svensson
2013-09-09Merge branch 'anders/diameter/spawn_opt/OTP-11299' into maintAnders Svensson
* anders/diameter/spawn_opt/OTP-11299: Fix broken spawn_opt
2013-09-09Merge branch 'anders/diameter/failed_avp/OTP-11293' into maintAnders Svensson
* anders/diameter/failed_avp/OTP-11293: Fix Failed-AVP construction for CEA/DWA/DPA
2013-09-04Fix Failed-AVP construction for CEA/DWA/DPAAnders Svensson
Send of Failed-AVP resulted in encode failure.
2013-09-04Fix broken spawn_optAnders Svensson
The option was morphed into a boolean() and then ignored.
2013-07-30Simplify Address encode/decodeAnders Svensson
By using binary comprehensions. Add string-valued addresses to codec suite.
2013-07-30Use module unicode for UTF8String encode/decodeAnders Svensson
The original code predates that module but there's no reason not to use it now.
2013-07-30Fix UTF8String encodeAnders Svensson
To accept any nested list of codepoints and binaries. A list containing a binary was previously misinterpreted and the documentation was incomplete. Also, rework codec suite slightly to be able to specify values for which decode o encode is the identity map, for which encode should succeed, and for which encode should fail.
2013-07-12Ensure DWR isn't sent immediately after DWAAnders Svensson
Having the peer_fsm process answer DWR meant that watchdog timer expiry could result in an outgoing DWR despite the fact that an incoming DWR was just answered. Having the watchdog process answer avoids this. diameter_peer_fsm must be loaded before diameter_watchdog. It's possible for one incoming DWR to go unanswered but a subsequent DWR will be answered so no harm is done.
2013-06-13Fix list-valued Vendor-Specific-Application-Id configAnders Svensson
Commit f0a36c79 broke the handling of such configuration, resulting in a function clause error in diameter_capx if the list was not of length 3, and faulty extraction of application id's otherwise. Only record-valued config was properly interpreted.
2013-06-11Merge branch 'anders/diameter/release/R16B01/OTP-11120' into maintAnders Svensson
* anders/diameter/release/R16B01/OTP-11120: vsn -> 1.4.2 Update appup for R16B01 Trailing whitespace and copyright fixes Minor macro simplification Move app/appsrc from src/base into src
2013-06-11Merge branch 'anders/diameter/request_spawn/OTP-11060' into maintAnders Svensson
* anders/diameter/request_spawn/OTP-11060: Make spawn options for request processes configurable
2013-06-10Update appup for R16B01Anders Svensson
Tickets and corresponding runtime modules, in order merged: OTP-9610 (distribution) diameter diameter_config diameter_peer diameter_service diameter_traffic diameter_service must precede diameter_peer. OTP-10972 (app_not_configured) diameter diameter_config diameter_lib diameter_peer_fsm diameter_watchdog Load order is unimportant. OTP-11017 (service_config) diameter_config OTP-10986 (address_config) diameter_peer diameter_peer_fsm diameter_tcp diameter_tcp must follow the others. OTP-11019 (watchdog_leak) diameter_service OTP-11026 (avp_length_failure) diameter_codec OTP-11007 (avp_decode) diameter_gen.hrl => diameter_gen_* diameter_codec diameter_traffic diameter_traffic must precede diameter_gen_*. OTP-11087 (missed_5001) diameter_gen.hrl => diameter_gen_* OTP-11115 (watchdog_function_clause) diameter_watchdog OTP-11050 (inband_security) diameter_peer_fsm diameter_capx This order is required. OTP-11045 (host_ip_address) diameter_peer_fsm OTP-11092 (5xxx_failed_avp) diameter_traffic OTP-11127 (one_failed_avp) diameter_peer_fsm OTP-10893 (peer_address_config) diameter_peer diameter_tcp diameter_sctp diameter_peer must precede the others. OTP-11060 (request_spawn) diameter_service diameter_traffic diameter_config diameter diameter_traffic should precede diameter_service, diameter_config should follow. Tickets without code: OTP-10903 (examples_suite) OTP-11014 (release_notes) OTP-11051 (mkdir_race) OTP-10914 (timetraps)
2013-06-10Make spawn options for request processes configurableAnders Svensson
That is, for the process that's spawned for each incoming Diameter request message.
2013-06-10Let diameter_{tcp,sctp} be configured with permissible remote addressesAnders Svensson
Option 'accept' allows remote addresses to be configured as tuples or regular expressions. The remote addresses for any incoming (aka accepted) connection/association are matched against the configured values, any non-matching address causing the connection/association to be aborted.
2013-06-10Fix diameter_{tcp,sctp} specAnders Svensson
The third argument to start/3 was just wrong.