From 1b3b64af3d9a5441b6da37cf4e97b59cb043f33b Mon Sep 17 00:00:00 2001 From: Anders Svensson Date: Thu, 6 Jul 2017 11:02:31 +0200 Subject: Let messages and grouped AVPs be encoded/decoded from/to maps 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. --- lib/diameter/doc/src/diameter.xml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'lib/diameter/doc/src/diameter.xml') diff --git a/lib/diameter/doc/src/diameter.xml b/lib/diameter/doc/src/diameter.xml index 663c9cc785..bfb6da41b5 100644 --- a/lib/diameter/doc/src/diameter.xml +++ b/lib/diameter/doc/src/diameter.xml @@ -539,7 +539,7 @@ that matches no peer.

The host and realm filters cause the Destination-Host and Destination-Realm AVPs to be extracted from the -outgoing request, assuming it to be a record- or list-valued +outgoing request, assuming it to be a record-, list- or map-valued &codec_message;, and assuming at most one of each AVP. If this is not the case then the {host|realm, &dict_DiameterIdentity;} filters must be used to achieve the desired result. @@ -970,13 +970,14 @@ occur in the message in question.

-{record_decode, boolean()} +{record_decode, boolean() | map}

Whether or not to decode message and grouped AVPs to records in the msg field of diameter_packet records and value field of -diameter_avp records respectively. -If false then the fields are set to the same value.

+diameter_avp records respectively, or to an alternate format. +If false then the fields are set to the same value. +See also &codec_message;.

Defaults to true.

-- cgit v1.2.3