Commit Graph

18 Commits

Author SHA1 Message Date
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 5cf3fd03f1 HTTPS In More Places, update some URLs.
Change-Id: Ice2e1e2e4d94f6c9da7c651866cfa1a8ac4a31d8
Reviewed-on: https://code.wireshark.org/review/34096
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-07-27 07:55:36 +00:00
Peter Wu ed0741ffbd fix-encoding-args.pl: fix terrible performance with large files
"fix-encoding-args.pl epan/dissectors/packet-ieee80211.c" used to take
over 12 seconds to complete. After this change it is reduced to 400ms.
Profiling with Devel::NYTProf showed two issues:
- find_hf_array_entries (5 seconds): matching leading whitespace
  triggers a candidate match against every line. Fix this by removing
  whitespace prior to matching.
- fix_encoding_args_by_hf_type (7.5 seconds): executing 2131 different
  substitution patterns is slow. Fix this by grouping field names and
  execute the substitution only once afterwards (in total 6 calls).

packet-rrc.c is by far the largest file with 215k lines, this used to
take forever (321s) and now completes in 1.3s.

Regression tested by removing "ENC_ASCII" and "ENC_UTF_8" in
dissect_venue_name_info, the expected warnings are still visible.

Change-Id: I071038e8fcb56474ac41223568ce6724258c059d
Reviewed-on: https://code.wireshark.org/review/29789
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-09-22 15:44:20 +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 e172ebb3b4 Add proto_tree_add_bitmask_with_flags.
It's proto_tree_add_bitmask with the ability to control the data appended to header.

Change-Id: Icce97437ba7cfc9158ec204a837da8db8138424a
Reviewed-on: https://code.wireshark.org/review/5533
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-12-08 01:13:02 +00:00
Bill Meier 19d55ca5a2 fix-encoding-args.pl: Don't use a feature available only starting with perl 5.14
Specifically: Window msys git uses an earlier version of Perl (5.8) and thus
	      invoking fix-encoding-args.pl in the pre-commit hook script
	      gives a Perl syntax error.

See https://code.wireshark.org/review/4172 for details

(Also see following for Perl info:
 http://www.perl.com/pub/2011/05/new-features-of-perl-514-non-destructive-substitution.html)

Change-Id: I95a222eaa31942cc6e873ffbde57c5fa5bd2a625
Reviewed-on: https://code.wireshark.org/review/4245
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-09-22 14:32:16 +00:00
Bill Meier 4bdf514512 fix-encoding-args.pl: Add a few additional fixups;
Specifically: A number of cases of the use of the encoding arg
              "ENC_ASCII | ENC_NA" for FT_BYTES FIELDTYPEs seem to
              have crept into Wireshark source.

Also: Add a ToDo comment as to code rework needed to be able to
      better *validate* encoding args.

Change-Id: I9d4b10b869fe2aef3f20bcd2d7ad6531375aba87
Reviewed-on: https://code.wireshark.org/review/4183
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-09-19 01:37:38 +00:00
Bill Meier 051b0000f9 fix-encoding-args.pl: Add a few fixups for FT_UINT_STRING
Change-Id: Ic22e154859877c48a85b808d0029e10e07876b73
Reviewed-on: https://code.wireshark.org/review/4174
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-09-18 15:08:39 +00:00
Bill Meier dbb01af72f fix-encoding-args.pl: Fix bug: certain patterns found only in 1st,3rd,... file checked
Another perl "You can't DO that" ...

Change-Id: I56e11bec19515f883f15286c6aa45018a255ab53
Reviewed-on: https://code.wireshark.org/review/4172
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-09-18 15:06:25 +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 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
Bill Meier 408e6aa279 Minor tweaks ...
svn path=/trunk/; revision=47533
2013-02-07 17:24:32 +00:00
Jakub Zawadzki b18e880040 Update FSF address - part II.
svn path=/trunk/; revision=43538
2012-06-28 23:18:38 +00:00
Bill Meier 2374c799a6 Add encoding arg fix capability for proto_tree_add_bits_item,...,tvb_get_bits,...ptvcursor_add,...
Add 'find-all' capability.

svn path=/trunk/; revision=39567
2011-10-25 17:04:48 +00:00
Bill Meier c1f8fb3935 Fix bug (introduced in SVN #39504) which caused only 1st file of a list to be processed.
svn path=/trunk/; revision=39536
2011-10-24 17:36:20 +00:00
Bill Meier 47f1092404 Exit with number of lines needing an encoding arg change.
svn path=/trunk/; revision=39504
2011-10-21 02:34:05 +00:00
Bill Meier d01023fd7c Add conversion for FT_ETHER hf[] field type;
Add capability to convert encoding arg for 'proto' hf_index_names [the
 variable which stores the return value from proto_register_protocol()].

svn path=/trunk/; revision=39492
2011-10-20 14:43:11 +00:00
Bill Meier 71ecdce1b9 Perl program to fix proto_tree_add_item() encoding args as appropriate (and as possible).
svn path=/trunk/; revision=39471
2011-10-19 17:17:35 +00:00