Ethereal-dev: Re: [Ethereal-dev] Consistency checks for hf_ elements

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

From: Ulf Lamping <ulf.lamping@xxxxxx>
Date: Mon, 29 Aug 2005 11:11:31 +0200
Joerg Mayer wrote:

One thing I've wanted to write for a while: The attached script checkhf.pl
tries to find out which hf_ variables are used inside a dissector but never
added to the hf_register_info array. It's far from perfect (lots of false
alarms) but some of the finds are real.  Put the script into the dissectors
directory and run "./checkhf.pl packet-*.c | grep ^NO" to find possibly
missing entries. Without the grep it will also report potentially unused array entries as well. You may give only one filename as well of course
(e.g. packet-afs.c).  Should this script be put into the tools/ directory?

Why not?

But please add the comments you've provided above into the script. This way no one has to search for this mail to get the limitations.

In the past I've found some of the problems caused by these kind of bugs, so it's probably a good idea to automatically check for it.

Regards, ULFL