summaryrefslogtreecommitdiff
path: root/tools/convert_proto_tree_add_text.pl
AgeCommit message (Collapse)AuthorFilesLines
2015-01-07tvb_bytes_to_ep_str -> tvb_bytes_to_strMichael Mann1-2/+1
Change-Id: I79c613cbdd8dc939dd4c29ebc477fb6eefd5bfc4 Reviewed-on: https://code.wireshark.org/review/6371 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-01-07Add tvb_address_to_str.Michael Mann1-4/+1
This is intended to handle ALL address types retrieved from a tvbuff. One of the (good) side effects of this function is that it can replace a lot of the "hidden" ep_alloc calls used to allocate memory for the address string. A few existing "popular" helper tvb_ functions were turned into pure macros calling tvb_address_to_str. Some of the "less used" helper tvb_ functions were just directly replaced with tvb_address_to_str. Change-Id: I361d991c4ad90142173e63eae02a94d68af3ec43 Reviewed-on: https://code.wireshark.org/review/6333 Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-01-02Add sanity check to ensure integer types don't get set to BASE_NONE.Michael Mann1-0/+15
This is checked by Wireshark, but the script should catch it earlier in case Wireshark/TShark isn't run after the script is executed (a mistake I've made several times). Change-Id: I1d113871b10fcae5a6d3e9036cc80d7b1ec1ae57 Reviewed-on: https://code.wireshark.org/review/6245 Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-01-02Have hf variables outputted in the order they were found in the file.Michael Mann1-8/+5
Previously they were "randomly sorted" in the hash table. The hf "array" is outputted in the order found, so have the hf variable declaration match. Change-Id: I4b078a6328ba7c2781f07bb41d701412fc74ba22 Reviewed-on: https://code.wireshark.org/review/6219 Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-11-20Give better hints as to where the "expert info" fields go.Michael Mann1-2/+2
Change-Id: I9b1cee43ef9280504745b136b87507c2b6bb5369 Reviewed-on: https://code.wireshark.org/review/5406 Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-10-31Improve the "guessing" of the hf_ field and encoding values.Michael Mann1-7/+29
Change-Id: Iaa042ef8b794c265870a04f6659720c321978697 Reviewed-on: https://code.wireshark.org/review/5026 Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-10-30convert_proto_tree_add_text.pl - missed adding an else statement to logic.Michael Mann1-2/+2
Change-Id: I7f31e9ba47d2e94887bd01a84bab356c0c835d92 Reviewed-on: https://code.wireshark.org/review/4998 Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-10-30Add logic to determine if a "tvb get" call is used as a parameter to a ↵Michael Mann1-1/+24
proto_tree_add_text call. convert_proto_tree_add_text.pl has an easier time determining hf_ field values with a "tvb get" call present, so it's more likely those dissectors will be picked first in eliminating their proto_tree_add_text calls. Change-Id: I3dd57a73c8e60d8075a6bb987efd52b96b38445c Reviewed-on: https://code.wireshark.org/review/4997 Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-15acknowledge BASE_RANGE_STRINGMichael Mann1-0/+1
Change-Id: I3e899f79a3d58b8a2e72b88253a7e9ec51a314b5 Reviewed-on: https://code.wireshark.org/review/2222 Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-02-14Remove $Id$ and other Subversion leftovers from the tools.Jeff Morriss1-2/+0
There are a few things in here which could still use attention. Don't regenerate anything now. Change-Id: I283c224d3523212144707fca3d6265916cb11792 Reviewed-on: https://code.wireshark.org/review/205 Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
2013-12-19proto_tree_add_text -> proto_tree_add_xxx conversion.Michael Mann1-0/+3
svn path=/trunk/; revision=54274
2013-10-06Add support for RELATIVE-OID ASN.1 type. Bug 9192 ↵Michael Mann1-1/+1
(https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9192) From Ed Beroset. svn path=/trunk/; revision=52393
2013-09-09Have conversion tools use the "new" expert_add_info_format.Michael Mann1-2/+2
svn path=/trunk/; revision=51857
2013-08-24If the proto_tree_add_text string is just "%s", assume it won't be converted ↵Michael Mann1-6/+14
(it's usually a header that has the same field filterable in its subtree) svn path=/trunk/; revision=51505
2013-08-09Allow display base, not field type to have multiple ORed entries (for things ↵Michael Mann1-8/+8
like BASE_EXT_STRING) svn path=/trunk/; revision=51235
2013-08-05Add support for determining BASE_EXT_STRING.Michael Mann1-5/+18
svn path=/trunk/; revision=51149
2013-07-28Make many items filterable for Vines dissectors.Michael Mann1-3/+6
Add support for FT_VINES type. svn path=/trunk/; revision=50962
2013-07-26The descriptive name for a field is the field full name; the name usedGuy Harris1-4/+4
in packet-matching expressions and TShark's -e flag and... is the field's abbreviated name. svn path=/trunk/; revision=50927
2013-07-26Add support for common FT_ETHER cases.Michael Mann1-2/+5
Bugfix gauging where the "field text" argument when parsing the proto_tree_add_text call. svn path=/trunk/; revision=50925
2013-07-24fix "compile" errorMichael Mann1-1/+1
svn path=/trunk/; revision=50874
2013-07-24Add "usage" for expert optionMichael Mann1-0/+4
svn path=/trunk/; revision=50864
2013-07-22fix "compiler errors"Michael Mann1-4/+5
Add better support for IP field detection. svn path=/trunk/; revision=50781
2013-07-21Add ability to convert proto_tree_add_text to "expert" API. It's a little ↵Michael Mann1-98/+327
hacky because the first pass doesn't know that a proto_tree_add_text call will be converted into an expert API call, so there is some "field reappropriation" (but not enough to have a different field layout) in the .proto_tree_input file. svn path=/trunk/; revision=50762
2013-07-18Add better detection of strings and byte arrays.Michael Mann1-4/+11
svn path=/trunk/; revision=50714
2013-07-16Add in basic error checking of the .proto_tree_input file to prevent some ↵Michael Mann1-5/+27
issues with updated dissector. svn path=/trunk/; revision=50658
2013-07-15Set convert_proto_tree_add_text has executableAlexis La Goutte1-0/+0
svn path=/trunk/; revision=50607
2013-07-14Generate better hf_ nameMichael Mann1-77/+81
Generate initial filter name Apply consistent whitespace svn path=/trunk/; revision=50567
2013-07-13set svn propertiesMartin Kaiser1-419/+419
svn path=/trunk/; revision=50561
2013-07-13Here's a tool to help in the conversion of proto_tree_add_text to ↵Michael Mann1-0/+419
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) svn path=/trunk/; revision=50559