aboutsummaryrefslogtreecommitdiffstats
path: root/lib/diameter/include/diameter.hrl
diff options
context:
space:
mode:
authorAnders Svensson <[email protected]>2011-11-28 12:13:56 +0100
committerAnders Svensson <[email protected]>2011-12-06 18:58:14 +0100
commit8e178ed5796628bd21a5c85fdc2c864a7b06ae70 (patch)
tree464694cbc601b3b401dc23465343ee2318988e49 /lib/diameter/include/diameter.hrl
parentf2a4059d06f8b76d2c1da14197f170deebd64f45 (diff)
downloadotp-8e178ed5796628bd21a5c85fdc2c864a7b06ae70.tar.gz
otp-8e178ed5796628bd21a5c85fdc2c864a7b06ae70.tar.bz2
otp-8e178ed5796628bd21a5c85fdc2c864a7b06ae70.zip
Smarter diameter_callback
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.
Diffstat (limited to 'lib/diameter/include/diameter.hrl')
-rw-r--r--lib/diameter/include/diameter.hrl15
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/diameter/include/diameter.hrl b/lib/diameter/include/diameter.hrl
index 0fa7fd406f..4273262015 100644
--- a/lib/diameter/include/diameter.hrl
+++ b/lib/diameter/include/diameter.hrl
@@ -107,6 +107,21 @@
transport = sctp, %% | tcp,
protocol = diameter}). %% | radius | 'tacacs+'
+%% A diameter_callback record can be specified as an application
+%% module in order to selectively receive callbacks or alter their
+%% form.
+-record(diameter_callback,
+ {peer_up,
+ peer_down,
+ pick_peer,
+ prepare_request,
+ prepare_retransmit,
+ handle_request,
+ handle_answer,
+ handle_error,
+ default,
+ extra = []}).
+
%% The diameter service and diameter_apps records are only passed
%% through the transport interface when starting a transport process,
%% although typically a transport implementation will (and probably