Navigation


Legacy XML dictionary files

This dict_legacy_xml.fdx extension provides an easy way to define new objects in the dictionary, although this mechanism is both less powerful and less efficient than the native C definitions format, which should be preferred when possible.

The original intent is to provide support for existing dictionary files coming from the OpenDiameter? implementation. However, these files will probably not be re-usable "as-is" without a few modifications. The XML format expected by the extension is detailed in the remaining of this page.

Configuration

dict_legacy_xml.fdx configuration file is mandatory. The complete configuration documentation can be found in the source package: [source:freeDiameter/doc/dict_legacy_xml.conf.sample dict_legacy_xml.conf.sample].

The configuration consists in a simple list of XML files that must be loaded. Each XML file that is referrenced from the configuration will be parsed and the definitions added to the global dictionary and usable from other extensions. Beware that conflicts are not allowed (for example two AVPs defined with the same code and flags but different names).

Usage

The DTD for XML format is provided for information here: [source:freeDiameter/contrib/dict_legacy/dictionary.dtd dictionary.dtd].

Here is a complete example that defines the same objects as the test_app.fdx application:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE dictionary SYSTEM "dictionary.dtd">

<dictionary>

  <vendor id="999999" name="app_test vendor" />

  <application id="16777215" name="app_test application" 
               uri="http://www.freediameter.net">

    <avp name="Test-AVP" code="16777215" vendor-id="999999" mandatory="must">
      <type type-name="Integer32" />
    </avp>

    <command name="Test" code="16777214" pbit="1">
      <requestrules>
        <fixed>
          <avprule name="Session-Id" minimum="1" maximum="1" />
        </fixed>
        <required>
          <avprule name="Destination-Realm" minimum="1" maximum="1" />
          <avprule name="Origin-Host" minimum="1" maximum="1" />
          <avprule name="Origin-Realm" minimum="1" maximum="1" />
          <avprule name="Test-AVP" minimum="1" maximum="1" />
        </required>
        <optional>
           <avprule name="Destination-Host" minimum="1" maximum="1" />
       </optional>
      </requestrules>

      <answerrules>
        <fixed>
          <avprule name="Session-Id" minimum="1" maximum="1" />
        </fixed>
        <required>
          <avprule name="Result-Code" minimum="1" maximum="1" />
          <avprule name="Origin-Host" minimum="1" maximum="1" />
          <avprule name="Origin-Realm" minimum="1" maximum="1" />
          <avprule name="Test-AVP" minimum="1" maximum="1" />
        </required>
      </answerrules>
    </command>

  </application>

</dictionary>

Output

This application does not produce any particular output, except for entries in the dictionary.

Troubleshooting

Last modified 12 years ago Last modified on Sep 10, 2012, 4:03:23 AM