Ethereal-dev: [Ethereal-dev] Autogenerating the Code for the DOCSIS TLV dissector

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: "Anand V. Narwani" <anarwani@xxxxxxxxx>
Date: Tue, 16 Jul 2002 11:42:36 -0400
Folks,
After talking to others regarding this, I think there may be some value in coming up with some mechanism to automagically generate the dissector for DOCSIS Appendix C Type/Length/Value fields. One mechanism that was suggested was to use an XML document to describe the fields and then generate the code based on that. Another suggestion was to read the XML document at runtime. I prefer the former solution as it appears that libxml2 may not exist on all platforms (Someone, please correct me if I'm mistaken).
My questions are as follows:
1. Does this sound like a reasonable solution? Can anyone provide a better one? 2. Does anyone know if an XML parser is available by default in Perl or Python ? My concern is for users who attempt to build this without Perl or Python on their system. I suppose we could distribute the generated C files just like we do for the generated C files for Lex/Yacc.

Thanks in advance,

Anand

--
Anand V. Narwani,  CCIE 3892
Advanced Engineering Services
Cisco Systems, Inc.
Direct/Fax: 919.392.3404
Email: anarwani@xxxxxxxxx

"Meddle not in the affairs of dragons, for you are crunchy and taste good with ketchup"