Wireshark-commits: [Wireshark-commits] rev 50559: /trunk/tools/ /trunk/tools/: convert_proto_tree_a

Date: Sat, 13 Jul 2013 21:28:54 GMT
http://anonsvn.wireshark.org/viewvc/viewvc.cgi?view=rev&revision=50559

User: mmann
Date: 2013/07/13 02:28 PM

Log:
 Here's a tool to help in the conversion of proto_tree_add_text to proto_tree_add_item. It's still rough around the edges, but it's a lot better than doing it all manually.  It targets proto_tree_add_text functions with formatted parameters.  It "guesses" the necessary parameters for proto_tree_add_item and the associated hf_ strictly through proto_tree_add_text parameters, so it does better for cases where the tvb_ function (ie tvb_get_guint8) is one of the printf style parameters in the proto_tree_add_text. 
 
 If there are cleaner ways (better regex) to represent the logic, please feel free to update.
 
 The key is to improve the "defaults" detected so less manual editting of the proto_tree_input file (and subsequent dissector file) is necessary.
 
 I'll be testing it more (and probably updating) as I try to work through the checkAPIs.pl "naughty list" (now that the list has expanded)

Directory: /trunk/tools/
  Changes    Path                              Action
  +419 -0    convert_proto_tree_add_text.pl    Added