This section describes the tags used in the XML file and includes a DTD file that supports the XML file.
Info | |
---|---|
title | Example - XML Specification fileCCR and CCA command specifications for the Diameter Credit-Control application (Nortel GGSN): ccr_cca.xml |
Anchor | ||||
---|---|---|---|---|
|
The XML file of the Diameter agent contains the following tags:
Table of Contents | ||
---|---|---|
|
<diameter-protocol>
The XML file starts with a diameter-protocol declaration.
Info | |||||||
---|---|---|---|---|---|---|---|
Example - diameter-protocol syntax
|
...
The diameter-protocol tag can contain the following tags:
<avp>
<command>
<avp>
The AVP tag defines an AVP.
Info |
---|
Example - avp syntax
|
Each AVP tag requires an ID and a name. The ID is the AVP code allocated by IANA for this AVP. The name identifies this AVP in grouped AVPs or commands. The vendor attribute is optional and sets the ID of the AVP vendor.
The AVP tag must contain the following tag.
<flag-rules>
The AVP tag must contain one of the following tags.
<simple-type>
<enumeration>
<layout>
The AVP tag may contain the following tag.
<may-encrypt>
<flag-rules>
The flag-rules tag is required for the AVP tag and defines the AVP flags with a number of flag-rule definition tags.
Info |
---|
...
Example - flag-rules syntax
|
<flag-rule>
The flag-rule tag defines the value for one of the valid AVP flags.
Info |
---|
...
Example - flag-rule syntax
|
The flag-rule tag has two required attributes. The name attribute is the flag name, either mandatory or protected. The rule attribute defines the flag value and can be must, may, should_not or must_not.
...
The may-encrypt tag defines if this AVP is to be encrypted or not.
Info |
---|
...
Example - may-encrypt syntax
|
<simple-type>
<simple-type> with its name attribute defines the AVP type as any of the following types:
Unsigned32
Unsigned64
Signed32
Signed64
Float32
Float64
DiameterIdentity
UTF8String
Address
OctetString
Time
DiameterURI
IPFilterRule
Info |
---|
...
Example - simple-type syntax
|
<enumeration>
The enumeration tag defines AVPs of type Enumerated and can have any number of <enumerator> sub-tags.
Info |
---|
...
Example - enumeration syntax
|
<enumerator>
The enumerator tag defines an element in an Enumerated AVP type. It has two required attributes called name and value. For an example of the syntax see the section above, <enumeration>
.
<layout>
The layout tag defines AVPs of type Grouped. A grouped AVP consists of a sequence of AVPs. It is also possible to nest grouped AVPs, that is to include a grouped AVP within a grouped AVP.
Info |
---|
...
Example - layout syntax
The layout tag can contain the following tags.
|
<fixed>
The fixed tag defines the fixed AVPs included in a grouped AVP. For an example of the syntax see the layout syntax example in the section above, <layout>
.
The fixed tag can contain the following tag.
<avp-ref>
<required>
The required tag defines the required AVPs included in a grouped AVP. For an example of the syntax see the example, layout syntax in the section above, <layout>
.
The required tag can contain the following tags.
<avp-ref>
<any-avp>
<optional>
The optional tag defines the optional AVPs included in a grouped AVP. For an example of the syntax see the example, layout syntax in the section above, <layout>
.
The optional tag can contain the following tags.
<avp-ref>
<any-avp>
<avp-ref>
The avp-ref tag contains a reference to an AVP that should be included in a grouped AVP. The tag has a required attribute called name
. It holds the name of the referenced AVP. The optional attributes min
and max
set the qualifiers for the AVP. For an example of the syntax, see the example, layout syntax, in the section above, <layout>
.
...
The command tag defines a command.
Info |
---|
...
Example - command syntax
|
The required attribute id is the command code allocated by IANA for this command. The optional attribute application sets the command application ID.
The command tag requires one of the following tags.
<answer>
<request>
<answer>
This tag defines an answer command. The attribute name is required.
Info |
---|
...
Example - answer syntax
|
The answer tag can contain the following tags.
<header-bits>
<layout>
<header-bits>
This tag defines the header bits of a command.
Info |
---|
...
Example - header-bits syntax
|
The header-bits tag can contain the following tags.
<header-bit>
<header-bit>
This tag defines a command header bit. For an example of the syntax, see the example, header-bits syntax, in the section above, <header-bits>
.
...
diameter.dtd supports the XML file in the section above, XML.
Code Block | ||||
---|---|---|---|---|
| ||||
<?xml version='1.0' encoding='ascii'?> <!ELEMENT diameter-protocol (avp|command)*> <!ATTLIST diameter-protocol name CDATA #REQUIRED> <!ELEMENT avp (flag-rules,enumeration?,layout?)> <!ATTLIST avp id CDATA #REQUIRED> <!ATTLIST avp name CDATA #REQUIRED> <!ATTLIST avp datatype CDATA #IMPLIED> <!ATTLIST avp vendor CDATA #IMPLIED> <!ELEMENT flag-rules (flag-rule*)> <!ELEMENT flag-rule EMPTY> <!ATTLIST flag-rule name CDATA #REQUIRED> <!ATTLIST flag-rule rule CDATA #REQUIRED> <!ELEMENT enumeration (enumerator*)> <!ELEMENT enumerator EMPTY> <!ATTLIST enumerator value CDATA #REQUIRED> <!ATTLIST enumerator name CDATA #REQUIRED> <!ELEMENT layout (fixed?,required?,optional?)> <!ELEMENT fixed (avp-ref*)> <!ELEMENT required (avp-ref*,any-avp?)> <!ELEMENT optional (avp-ref*,any-avp?)> <!ELEMENT avp-ref EMPTY> <!ATTLIST avp-ref name CDATA #REQUIRED> <!ATTLIST avp-ref min CDATA #IMPLIED> <!ATTLIST avp-ref max CDATA #IMPLIED> <!ELEMENT any-avp EMPTY> <!ELEMENT command (request?, answer?)> <!ATTLIST command id CDATA #REQUIRED> <!ATTLIST command application CDATA #IMPLIED> <!ENTITY % command-children "(header-bits, layout)"> <!ELEMENT request %command-children;> <!ATTLIST request name CDATA #REQUIRED> <!ELEMENT answer %command-children;> <!ATTLIST answer name CDATA #REQUIRED> <!ELEMENT header-bits (header-bit*)> <!ELEMENT header-bit EMPTY> <!ATTLIST header-bit value CDATA #REQUIRED> |
...