Wireshark mailing list archives

Re: 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 16:35:51 -0400

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:

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

convert the field to ENC_NA.


OK: I've just about got the code working for this step.

There seem to be 293 (non-autogenerated) epan/dissector/packet-*.c files with TRUE|FALSE|ENC_LITTLE_ENDIAN|ENC_BIG_ENDIAN proto_tree_add_item() calls associated with hf[] entries of the above types.

I'll run this step and commit the changes a little later this evening when things have quieted down.

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: