From 8e178ed5796628bd21a5c85fdc2c864a7b06ae70 Mon Sep 17 00:00:00 2001 From: Anders Svensson Date: Mon, 28 Nov 2011 12:13:56 +0100 Subject: 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. --- lib/diameter/include/diameter.hrl | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'lib/diameter/include') 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 -- cgit v1.2.3