From 67ffc483c80d29334c6c7739bcf1be756f374dfb Mon Sep 17 00:00:00 2001
From: Anders Svensson
-
+Calls to this module are made by diameter itself as a consequence of +configuration passed to &mod_start_service;. +The encode/decode functions may also be useful for other purposes (eg. +test) but the diameter user does not need to call them explicitly when +sending and receiving messages using &mod_call; and the callback +interface documented in &man_app;.
++The &header; and &packet; records below +are defined in diameter.hrl, which can be included as follows.
+ ++-include_lib("diameter/include/diameter.hrl"). ++ +
+Application-specific records are definied in the hrl +files resulting from dictionary file compilation.
++8-bit, 24-bit and 32-bit integers occurring in Diameter and AVP +headers.
++The application-neutral representation of an AVP. +Primarily intended for use by relay applications that need to handle +arbitrary Diameter applications. +A service implementing a specific Diameter application +(for which it configures a dictionary) can manipulate values of type +&message; instead.
+ ++Fields have the following types.
+ +
+Values in the AVP header, corresponding to AVP Code, the M flag, P
+flags and Vendor-ID respectivelty.
+A Vendor-ID other than
+The data bytes of the AVP.
+
+The name of the AVP as defined in the dictionary file in question, or
+
+The decoded value of an AVP.
+Will be
+The type of the AVP as specified in the dictionary file in question
+(or one it inherits).
+Possible types are
+The name of a generated dictionary module as generated by &man_compile; +or &make_codec;. +The interface provided by a dictionary module is an +implementation detail that may change.
+
+The record representation of the Diameter header.
+Values in a &packet; returned by &decode; are as extracted from the
+incoming message.
+Values set in an &packet; passed to &encode; are preserved in the
+encoded binary(), with the exception of
+It is not necessary to set header fields explicitly in outgoing +messages as diameter itself will set appropriate values. +Setting inappropriate values can be useful for test purposes.
++Fields have the following types.
+ ++Values of the Version, Message Length, Command-Code, Application-ID, +Hop-by-Hop Identifier and End-to-End Identifier fields of the Diameter +header.
++Values correspoding to the R(equest), P(roxiable), E(rror) +and T(Potentially re-transmitted message) flags of the Diameter +header.
+
+The representation of a Diameter message as passed to
+&mod_call; or returned from a &app_handle_request; callback.
+The record representation is as outlined in &records;:
+a message as defined in a dictionary file is encoded as a record with
+one field for each component AVP.
+Equivalently, a message can also be encoded as a list whose head is
+the atom-valued message name (as specified in the relevant dictionary
+file) and whose tail is a list of
+Another list-valued representation allows a message to be specified +as a list whose head is a &header; and whose tail is an &avp; list. +This representation is used by diameter itself when relaying requests +as directed by the return value of a &app_handle_request; callback. +It differs from the other other two in that it bypasses the checks for +messages that do not agree with their definitions in the dictionary in +question: messages are sent exactly as specified.
+ ++A container for incoming and outgoing Diameter messages. +Fields have the following types.
+ +-
+Decode a Diameter message.+Encode a Diameter message.
-&man_main;, -&man_dict;
+&man_compile;, &man_app;, &man_dict;, &man_make; -- cgit v1.2.3