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.
"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>
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>
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>
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>
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>
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