This is a static archive of our old Q&A Site. Please post any new questions and answers at ask.wireshark.org.

diameter dictionaries and xmllint

0

Update: small dtd tweak - change avp name from IDREF to ID will eliminate one set of issues related to missing reference, but it will generate hundred of errors for every reuse of names like "Unassigned", "Reserved" etc.

======================================================================

I am adding diameter dictionary to wireshark Version 1.8.4 (SVN Rev 46250 from /trunk-1.8).

I would like to run xmllint validation. I tried unchanged directory first and I see that it could not find types and vendor-ids, defined in base. I suppose I am missing something.

Example failures from running command: 'xmllint --dtdvalid dictionary.dtd dictionary.xml sip.xml'

sip.xml:39: element type: validity error : IDREF attribute type-name references an unknown ID "Unsigned32" sip.xml:42: element type: validity error : IDREF attribute type-name references an unknown ID "Unsigned32"

asked 06 Feb '15, 08:35

alex4747's gravatar image

alex4747
6113
accept rate: 0%

edited 19 Feb '15, 06:42


2 Answers:

0

Well, my only thought would be: the Diameter dictionary is more XML-like than proper XML. Wireshark has its own custom parser for reading the Diameter dictionaries so I'm not sure xmllint is going to help you much anyway.

answered 18 Feb '15, 07:29

JeffMorriss's gravatar image

JeffMorriss ♦
6.2k572
accept rate: 27%

Perhaps you should tell us what problem you are trying to fix by running xmllint - like your custom .xml not beeing loaded or something like that...

(18 Feb '15, 08:25) Anders ♦

Custom xml is being loaded but one would never know whether all the parts were loaded or not - I could not find a way to get wireshark diagnostic on dictionary loads.

It seems that I am very naive to assume dictionary.dtd file implied compliance check.

(19 Feb '15, 03:41) alex4747

0

Make three small tweaks in dictionary.dtd:

  1. Avp name should be CDATA (we cannot use avp name as ID because there are too many duplicates)
  2. Gavp name should be CDATA (we cannot use gavp name as IDREF for the same reason)
  3. Gavp set could be empty (Failed-AVP definition has empty gavp set and it is correct)

Add missing types (Float32, Flag64, Address) to dictionary.xml

And you will see xmllint validation pass.

answered 19 Feb '15, 20:02

alex4747's gravatar image

alex4747
6113
accept rate: 0%