Wireshark mailing list archives

Re: convert_proto_tree_add_text.pl


From: Guy Harris <guy () alum mit edu>
Date: Sun, 14 Jul 2013 12:40:54 -0700


On Jul 13, 2013, at 7:40 PM, mmann78 () netscape net wrote:

I wrote a utlity to help convert proto_tree_add_text calls into proto_tree_add_item calls.  The script is 
convert_proto_tree_add_text.pl and it can be found in the tools directory.  I wanted to share the data (attached) of 
my first test run on packet-dlsw.c as a guide to those interested in using the script.
 
File info:
packet-dlsw.c.original - dlsw dissector file in SVN before I ran convert_proto_tree_add_text.pl
packet-dlsw.c.proto_tree_input.original - original "input" file created when running "generate"
packet-dlsw.c.proto_tree_input - "input" file actually used when running "fix-all"
packet-dlsw.c.proto_tree_add_text.original - output when running "fix-all"
packet-dlsw.c.hf - hf variable declarations that needed to be copied into dissector
packet-dlsw.c.hf_array - hf_register_info items that needed to be copied into dissector
packet-dlsw.c.committed - actual file committed to SVN.  Note that I did some additional "cleanup" in addition to 
merging the hf files

I cleaned up some other issues that showed up.  At least one turned up when running "./tshark -G fields >/dev/null"; 
the others might as well (they were reported as multiple registrations of the same field name when running TShark and 
Wireshark - one was a duplicate, the other was a case where the script thought two different fields, in the same 
location in the packet and with the same length, were the same field).

Running "tshark -G fields" (the standard output can probably be discarded - errors *should* go to the standard error) 
should probably be done after converting a dissector.
___________________________________________________________________________
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: