Commit Graph

33 Commits

Author SHA1 Message Date
Chuck Craft 54baebad48 Lua: reconcile expert info groups; add PI_ASSUMPTION 2021-06-21 15:27:51 +00:00
Guy Harris b61fd6d76a dfilter, ftypes: get rid of FT_PCRE.
It's not a valid field type, it's only a hack to support regular
expression matching in packet-matching expressions.

Instead, in the packet-matching code, have a separate syntax tree type
for Perl-compatible regular expressions, and a separate instruction to
load one into a register, and have the "matching" operator for field
types take a GRegex * as the second argument.
2021-03-21 03:27:44 -07:00
Guy Harris 1075054a10 Add new encoding names for seconds/{micro,nano}second time stamps.
Add ENC_TIME_SECS_NSECS and ENC_TIME_SECS_USECS; they make it more
explicit (especially to those not familiar with UN*X data types) what
the representation is, allow for ENC_TIME_SECS_MSECS etc. if they're
needed, and match names such as ENC_TIME_SECS and ENC_TIME_MSECS.

Change-Id: I6ab36fb4da70563587141cd65ffff8523477b0c4
Reviewed-on: https://code.wireshark.org/review/28564
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-07-02 04:09:21 +00:00
Dario Lombardo fe71e26af2 spdx: more licenses converted.
Change-Id: I3861061ec261e63b23621799e020e811ed78a343
Reviewed-on: https://code.wireshark.org/review/26333
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-03-07 15:56:44 +00:00
Michael Mann 64a7bac641 tvb_bytes_to_ep_str -> tvb_bytes_to_str
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-07 18:16:23 +00:00
Michael Mann 47d670d3d7 Add tvb_address_to_str.
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-07 04:25:07 +00:00
Michael Mann b90f7846f4 Add sanity check to ensure integer types don't get set to BASE_NONE.
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-02 17:38:18 +00:00
Michael Mann 06a1f4670e Have hf variables outputted in the order they were found in the file.
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>
2015-01-02 01:37:56 +00:00
Michael Mann ead585fda7 Give better hints as to where the "expert info" fields go.
Change-Id: I9b1cee43ef9280504745b136b87507c2b6bb5369
Reviewed-on: https://code.wireshark.org/review/5406
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-11-20 12:29:10 +00:00
Michael Mann 54efe5dad1 Improve the "guessing" of the hf_ field and encoding values.
Change-Id: Iaa042ef8b794c265870a04f6659720c321978697
Reviewed-on: https://code.wireshark.org/review/5026
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-10-31 13:02:35 +00:00
Michael Mann 62831ba914 convert_proto_tree_add_text.pl - missed adding an else statement to logic.
Change-Id: I7f31e9ba47d2e94887bd01a84bab356c0c835d92
Reviewed-on: https://code.wireshark.org/review/4998
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-10-30 15:36:31 +00:00
Michael Mann fea733e82b Add logic to determine if a "tvb get" call is used as a parameter to a 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-10-30 15:20:48 +00:00
Michael Mann e9dea8542b acknowledge BASE_RANGE_STRING
Change-Id: I3e899f79a3d58b8a2e72b88253a7e9ec51a314b5
Reviewed-on: https://code.wireshark.org/review/2222
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-15 03:18:14 +00:00
Jeff Morriss 82e2865739 Remove $Id$ and other Subversion leftovers from the tools.
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>
2014-02-14 01:35:57 +00:00
Michael Mann 959a290961 proto_tree_add_text -> proto_tree_add_xxx conversion.
svn path=/trunk/; revision=54274
2013-12-19 21:51:09 +00:00
Michael Mann ee208c8dcc Add support for RELATIVE-OID ASN.1 type. Bug 9192 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9192)
From Ed Beroset.

svn path=/trunk/; revision=52393
2013-10-06 02:31:10 +00:00
Michael Mann 25bb947bdb Have conversion tools use the "new" expert_add_info_format.
svn path=/trunk/; revision=51857
2013-09-09 02:19:27 +00:00
Michael Mann e123d27ca9 If the proto_tree_add_text string is just "%s", assume it won't be converted (it's usually a header that has the same field filterable in its subtree)
svn path=/trunk/; revision=51505
2013-08-24 01:38:43 +00:00
Michael Mann 5ffa911a6b Allow display base, not field type to have multiple ORed entries (for things like BASE_EXT_STRING)
svn path=/trunk/; revision=51235
2013-08-09 13:55:35 +00:00
Michael Mann 635d8d4f2c Add support for determining BASE_EXT_STRING.
svn path=/trunk/; revision=51149
2013-08-05 12:16:50 +00:00
Michael Mann a87f47c02c Make many items filterable for Vines dissectors.
Add support for FT_VINES type.

svn path=/trunk/; revision=50962
2013-07-28 00:07:49 +00:00
Guy Harris 8d81fe9a0e The descriptive name for a field is the field full name; the name used
in packet-matching expressions and TShark's -e flag and... is the
field's abbreviated name.

svn path=/trunk/; revision=50927
2013-07-26 21:06:38 +00:00
Michael Mann 2675472389 Add support for common FT_ETHER cases.
Bugfix gauging where the "field text" argument when parsing the proto_tree_add_text call.

svn path=/trunk/; revision=50925
2013-07-26 18:30:10 +00:00
Michael Mann c5ab45f678 fix "compile" error
svn path=/trunk/; revision=50874
2013-07-24 20:16:44 +00:00
Michael Mann 4795803614 Add "usage" for expert option
svn path=/trunk/; revision=50864
2013-07-24 15:44:49 +00:00
Michael Mann cf4e08bdf2 fix "compiler errors"
Add better support for IP field detection.

svn path=/trunk/; revision=50781
2013-07-22 01:56:35 +00:00
Michael Mann 2e5561d9c5 Add ability to convert proto_tree_add_text to "expert" API. It's a little 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-21 19:03:36 +00:00
Michael Mann 617925c482 Add better detection of strings and byte arrays.
svn path=/trunk/; revision=50714
2013-07-18 02:49:06 +00:00
Michael Mann f2e1a979fa Add in basic error checking of the .proto_tree_input file to prevent some issues with updated dissector.
svn path=/trunk/; revision=50658
2013-07-16 02:59:16 +00:00
Alexis La Goutte 09d68c76e6 Set convert_proto_tree_add_text has executable
svn path=/trunk/; revision=50607
2013-07-15 07:39:26 +00:00
Michael Mann 79aea4b295 Generate better hf_ name
Generate initial filter name
Apply consistent whitespace

svn path=/trunk/; revision=50567
2013-07-14 02:13:07 +00:00
Martin Kaiser fb177c2fe9 set svn properties
svn path=/trunk/; revision=50561
2013-07-13 22:51:55 +00:00
Michael Mann 94f44f7601 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)

svn path=/trunk/; revision=50559
2013-07-13 21:28:53 +00:00