Wireshark-dev: Re: [Wireshark-dev] [Wireshark-commits] rev 22318: /trunk/epan/ /trunk/epan/diss
From: "Martin Mathieson" <martin.r.mathieson@xxxxxxxxxxxxxx>
Date: Wed, 18 Jul 2007 15:13:53 +0100
- Some of the commands are not matching their entries from the XML
files (e.g. 275 which is in dictionary.xml)

I found the cause of this problem.

When running in RFC mode, it looks up only those commands in no_vnd.
What it should be looking up is *all* vendors.  The hack below got
command decoding working for me.  Would a better solution be to create
a separate

GArray* all_cmds;

for use with RFC format frames that would have all commands added to it?

Regards,
Martin

Index: packet-diameter.c
===================================================================
--- packet-diameter.c   (revision 22350)
+++ packet-diameter.c   (working copy)
@@ -884,6 +884,8 @@
                       if ((vnd = g_hash_table_lookup(vendors,c->vendor))) {
                               value_string item = {c->code,c->name};
                               g_array_append_val(vnd->vs_cmds,item);
+                               /* Also add to all case for RFC variant... */
+                               g_array_append_val((&no_vnd)->vs_cmds,item);
                       } else {
                               fprintf(stderr,"Diameter Dictionary:
No Vendor: %s",c->vendor);
                       }