Wireshark-dev: [Wireshark-dev] Replace TRUE/FALSE with proper ENC_* in proto_tree_add_item() us

From: Bill Meier <wmeier@xxxxxxxxxxx>
Date: Tue, 04 Oct 2011 13:53:57 -0400
I propose to use a perl script to automate as much as reasonable the replacement of TRUE/FALSE in the encoding parameter of the proto_tree_add_item() calls in dissectors as follows:

First step:
 For hf[] entries with type
   FT_NONE
   FT_BYTES
   FT_IPV6
   FT_IPXNET
   FT_UID

   convert the field to ENC_NA.

Obviously there will be exception cases (e.g., something other than TRUE/FALSE/ENC_NA for the param) which I'll need to flag (and presumably handle manually).


If I can do this step then I'll proceed from there.

For the next step is it simply a case of replacing the remaining TRUE/FALSE encoding parameter by ENC_LITTLE_ENDIAN/ENC_BIG_ENDIAN ?

One thing I don't quite understand: In a number of the dissectors why do proto_tree_add_item() encoding parameters for hf items with type FT_STRING have ENC_ASCII *and* ENC_LITTLE_ENDIAN|ENC_BIG_ENDIAN ?
Shouldn't this be ENC_ASCII | ENC_NA in this case ?


Comments ?

Bill