Wireshark mailing list archives
Replace TRUE/FALSE with proper ENC_* in proto_tree_add_item() using a script.
From: Bill Meier <wmeier () newsguy com>
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 ___________________________________________________________________________ Sent via: Wireshark-dev mailing list <wireshark-dev () wireshark org> Archives: http://www.wireshark.org/lists/wireshark-dev Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev mailto:wireshark-dev-request () wireshark org?subject=unsubscribe
Current thread:
- Replace TRUE/FALSE with proper ENC_* in proto_tree_add_item() using a script. Bill Meier (Oct 04)
- Re: Replace TRUE/FALSE with proper ENC_* in proto_tree_add_item() using a script. Dirk Jagdmann (Oct 04)
- Re: Replace TRUE/FALSE with proper ENC_* in proto_tree_add_item() using a script. David Young (Oct 04)
- Re: Replace TRUE/FALSE with proper ENC_* in proto_tree_add_item() using a script. Bill Meier (Oct 04)
- Re: [Wireshark-dev] Replace TRUE/FALSE with proper ENC_* in proto_tree_add_item() using a script. Chris Maynard (Oct 05)
- Re: Replace TRUE/FALSE with proper ENC_* in proto_tree_add_item() using a script. Anders Broman (Oct 05)
- Re: Replace TRUE/FALSE with proper ENC_* in proto_tree_add_item() using a script. Bill Meier (Oct 13)
- Re: Replace TRUE/FALSE with proper ENC_* in proto_tree_add_item() using a script. David Young (Oct 04)
- Re: Replace TRUE/FALSE with proper ENC_* in proto_tree_add_item() using a script. Dirk Jagdmann (Oct 04)