Wireshark-dev: Re: [Wireshark-dev] Replace TRUE/FALSE with proper ENC_* in proto_tree_add_item(
On 10/4/2011 1:53 PM, Bill Meier wrote:
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:
OK: To summarize: (Note ??? at end)
Fixes done (when possible):
FT_NONE Always use ENC_NA
FT_BYTES ...
FT_IPv6 ...
FT_IPXNET ...
FT_OID ...
FT_UINT8 0/FALSE=>ENC_BIG_ENDIAN; 1/TRUE=>ENC_LITTLE_ENDIAN
FT_UINT16 ...
FT_UINT24 ...
FT_UINT32 ...
FT_UINT64 ...
FT_INT8 ...
FT_INT16 ...
FT_INT24 ...
FT_INT32 ...
FT_INT64 ...
FT_FLOAT ...
FT_DOUBLE ...
FT_IPv4 ...
FT_BOOLEAN ...
FT_GUID ...
FT_EUI64 ...
FT_STRING Always use ENC_NA;
Also: if-no-character-encoding use ENC_ASCII
FT_STRINGZ ...
FT_UINT_STRING 0/FALSE=>ENC_BIG_ENDIAN; 1/TRUE=>ENC_LITTLE_ENDIAN
Also: if-no-character-encoding use ENC_ASCII
FT_ABSOLUTE_TIME Fixes done by hand:
No fixes required:
FT_RELATIVE_TIME
FT_FRAMENUM
FT_PCRE
TBD/ToDo:
FT_ETHER Not yet fixed: Should always be ENC_NA ???
FT_PROTOCOL Not yet fixed: Should be ???
FT_UINT_BYTES presumably 0/FALSE, 1/TRUE => ENC_[BIG|LITTLE]_ENDIAN
To be reviewed: may not be any cases requiring
fixes
Remaining not doable via a script:
Cases wherein a variable is used in proto_tree_add_item()
for either the hf_index_name arg or the encoding arg.