Age | Commit message (Collapse) | Author |
|
Which motivates the avp_dictionaries config that will be added in
a subsequent commit.
|
|
To remove the requirement that dictionary modules be recompiled whenever
the encode/decode implementation changes. The included diameter_gen.hrl
now only contains trivial functions that call info diameter_gen.erl.
|
|
This and subsequent commits are destined for OTP 20.0.
|
|
The transport interface documented in diameter_transport(3) is used to
start/stop accepting/connecting transport processes: they're started
with a function call, and told to die with their parent process. In the
accepting case, both diameter_tcp and diameter_sctp start a listening
process when the first accepting transport is started. However, there's
no way for a listening process to find out that that it should stop
listening when transport configuration is removed.
Both diameter_tcp and diameter_sctp have used a timer to terminate the
listening process after all existing accepting processes have died as a
consequence of transport removal. The problem with this is that nothing
stops a new client from connecting before this, and also that no new
transport can succeed in opening the same listening port (eg.
reconfiguration) until the old listener dies.
This commit solves the problem by adding diameter_reg:subscribe/2, to
allow callers to subscribe to messages about added/removed associations.
A call to diameter:add_transport/2 results in a new child process that
registers a term that a listening process subscribes to. Transport
removal results in the death of the child, and the resulting
notification to the listener causes the latter to close its socket and
terminate.
This is still an internal interface, but the subscription mechanism
should probably be made external (eg. a diameter:subscribe/1 that can
be used to subscribe to specified messages), so that transport modules
other than diameter's own can make use of it. There is no support for
soft upgrade.
|
|
|
|
Which hasn't received any attention for some time. Clean it up, rename
the poorly named peer.erl (it's Diameter *nodes* that are implemented),
and make the it possible to specify arbitrary transport configuration.
|
|
Possibly overkill for two modules but it mirrors their different
treatment by the makefile.
|
|
Albeit as comments. This is just to make it more obvious that these
aren't include in the modules list, since they typically aren't
needed/wanted on a target system. Also add comments for the
corresponding dependencies on syntax_tools and runtime_tools, as well as
the optional runtime dependency on ssl.
|
|
The workaround (commit 57d5564f) was to dialyzer only understanding
nowarn_unused_function on individual functions. This is no longer the
case as of R15B01 (commit 477fd95a).
|
|
Traffic handling is connected to the service implementation through the
pick_peer callback and failover but diameter_service was getting
unwieldy as home to both the service process and traffic handling.
|
|
The RFC 6733 accounting dictionary includes rfc6733 in its name. The RFC
3588 dictionary doesn't and is left as-is for backwards compatibility.
|
|
This was simply missed.
|
|
|
|
Module contains a transport start function that calls an a
specified function, and more.
|
|
|
|
|
|
Depending on the dictionary, generated dictionary modules may contain
unused functions included from diameter_gen.hrl. There may still be
warnings however since even used functions can contain code that
isn't reached for a given dictionary.
It would be useful for diameter to generate spec attributes for
a dictionary's generated records but the format of these is currently
undocumented.
|
|
The module was originally just intended as a minimal callback
implementation that could be used as a template. Being able to order
just a subset of callbacks (with reasonable defaults) makes for
simpler code in many cases however so ready support for this can be
useful.
|
|
|
|
Errors are now detected after the parse with format_error/1
providing understandable error messages, pointing to the
offending line number(s) in the dictionary source.
|
|
The previous parse was very adhoc and simply crashed on any kind
of input error, providing no identification of the objectionable input
that caused the parse to fail. The new parser is generated from a yecc
grammar, making it easier both to understand what it is that's being
parsed and to provide useful diagnostics to the user in case of error.
|
|
Tweak some comments and variable names, move things around a bit
(default src target is now opt, not debug), only clean what's built,
use +warn_export_vars.
|
|
Simpler, no duplication of similar makefiles and makes for
better dependencies. (Aka, recursive make considered harmful.)
|