wireshark/epan
John Thacker 1b82eda9eb epan: Register dynamic column fields and make them filterable
Make the text of each registered column a FT_STRING field that can be
filtered, prefixed with _ws.col - these work in display filters, filters
in taps, coloring rules, Wireshark read filters, and in the -Y, -R, -e,
and -j options to tshark. Use them as the default "Apply as Filter" value
for the columns that aren't handled by anything else currently.

Because only the columns formats that actually correspond to columns
get filled in (invisible columns work), register and deregister the
fields when the columns change.

Use the lower case version of the rest of the COL_* define for each
column as the field name.

This adds a number of conditions to "when are the columns needed",
including when the main display filter or any filter on a tap is
using one of these fields.

Custom columns are currently not implemented. For custom columns, the
tree then has to be further primed with any fields used by the custom
columns as well. (Perhaps that should happen in epan_dissect_run() -
are there any cases where we construct the columns and don't want to
prime with any field that custom columns contains? Possibly in taps
that we know only use build in columns.)

Thus, for performance reasons, you're better off matching an ordinary
field if possible; it takes extra time to generate the columns and many
of them are numeric types. (Note that you can always convert a non-string
field to a string field if you want regex matching, consult the
*wireshark-filter(4)* man page.) It does save a bit on typing (especially
for a multifield custom column) and remembering the column title might
be easier in some cases.

The columns are set before the color filters, which means that you
can have a color filter that depends on a built-in column like Info or
Protocol.

Remove the special handling for the -e option to tshark. Note that
the behavior is a little different now, because fixed field names
are used instead of the titles (using the titles allowed illegal
filter names, because it wasn't going through the filter engine.)
For default names, this means that they're no longer capitalized,
so "_ws.col.info" instead of "_ws.col.Info" - hopefully a small
price in exchange for the filters working everywhere.

The output format for -T fields remains the same; all that special
handling is removed (except for remembering if someone asked for
a column field to know that columns should be constructed.)

They're also set before the postdissectors, so postdissectors can
have access.

Anything that depends on whether a packet and previous packets are
displayed (COL_DELTA_TIME_DIS or COL_CUMULATIVE_BYTES) doesn't work
the way most people expect, so don't register fields for those.
(The same is already true of color filters that use those, along with
color filters that use the color filter fields.)

Fix #16576. Fix #17971. Fix #4684. Fix #13491. Fix #13941.
2023-07-25 00:49:52 +00:00
..
crypt Convert epan/crypt to C99 types 2023-06-22 23:41:04 +00:00
dfilter epan: Register dynamic column fields and make them filterable 2023-07-25 00:49:52 +00:00
dissectors epan: Register dynamic column fields and make them filterable 2023-07-25 00:49:52 +00:00
ftypes Add Unix time support for absolute time field type 2023-07-03 21:45:50 +00:00
wslua [19131] wslua: make `pinfo.in_error_pkt` writable 2023-07-15 13:39:31 +00:00
.editorconfig Convert to_str.[ch] to 4-space and fix some style issues 2023-06-30 14:12:50 +01:00
CMakeLists.txt Replace services file with static array 2023-07-08 23:06:49 +01:00
addr_and_mask.c
addr_and_mask.h
addr_resolv.c Keep global enterprises file as optional 2023-07-09 16:15:52 +00:00
addr_resolv.h
address.h
address_types.c Get rid of one last g_snprintf() call. 2023-06-18 15:29:17 -07:00
address_types.h
afn.c
afn.h
aftypes.c
aftypes.h
app_mem_usage.c
app_mem_usage.h
arcnet_pids.h
arptypes.h
asn1.c
asn1.h
ax25_pids.h
bridged_pids.h
capture_dissectors.c
capture_dissectors.h
charsets.c epan: Add ENC_BOM modifier for UTF-16, UCS-2, UCS-4 2023-06-08 11:25:54 +00:00
charsets.h epan: Add ENC_BOM modifier for UTF-16, UCS-2, UCS-4 2023-06-08 11:25:54 +00:00
chdlctypes.h
cisco_pid.h
color_filters.c Include errno.h in a few files 2023-06-28 18:41:42 -04:00
color_filters.h
column-info.h epan: Register dynamic column fields and make them filterable 2023-07-25 00:49:52 +00:00
column-utils.c epan: Register dynamic column fields and make them filterable 2023-07-25 00:49:52 +00:00
column-utils.h
column.c epan: Register dynamic column fields and make them filterable 2023-07-25 00:49:52 +00:00
column.h epan: Register dynamic column fields and make them filterable 2023-07-25 00:49:52 +00:00
conv_id.h
conversation.c
conversation.h
conversation_debug.h
conversation_filter.c
conversation_filter.h
conversation_table.c Convert wmem to C99 types 2023-06-17 17:38:53 +00:00
conversation_table.h
crc6-tvb.c
crc6-tvb.h
crc8-tvb.c
crc8-tvb.h
crc10-tvb.c
crc10-tvb.h
crc16-tvb.c
crc16-tvb.h
crc32-tvb.c
crc32-tvb.h
dccpservicecodes.h
decode_as.c ftypes: Rename IS_FT_* macros 2023-06-20 00:22:57 +01:00
decode_as.h
diam_dict.h
diam_dict.l
disabled_protos.c Allow disabling unused dissectors from PHS dialog 2023-06-13 17:12:26 +00:00
disabled_protos.h Allow disabling unused dissectors from PHS dialog 2023-06-13 17:12:26 +00:00
dtd.h
dtd_grammar.lemon
dtd_parse.h
dtd_parse.l
dtd_preparse.l
dvb_chartbl.c
dvb_chartbl.h
eap.h
eapol_keydes_types.h
enterprises.c make_enterprises: some minor changes 2023-07-23 00:16:26 +00:00
enterprises.h Rename enterprises files 2023-07-06 09:46:23 +00:00
epan.c epan: Fix some indent TAB issues 2023-05-28 15:23:39 +00:00
epan.h
epan_dissect.h
etypes.h CFM: overhaul dissector 2023-05-31 07:13:19 +00:00
ex-opt.c
ex-opt.h
except.c
except.h
exceptions.h
exntest.c
expert.c
expert.h
export_object.c
export_object.h epan: Fix a comment 2023-05-25 11:43:25 +00:00
exported_pdu.c
exported_pdu.h
fifo_string_cache.c Add a preference for ignoring duplicate frames 2023-06-09 07:21:08 +00:00
fifo_string_cache.h Add a preference for ignoring duplicate frames 2023-06-09 07:21:08 +00:00
fifo_string_cache_test.c Add a preference for ignoring duplicate frames 2023-06-09 07:21:08 +00:00
filter_expressions.c
filter_expressions.h
follow.c
follow.h Qt: Follow stream show as recent 2023-06-17 17:49:03 +00:00
frame_data.c Don't have every dissector include wtap.h 2023-06-08 11:05:42 +00:00
frame_data.h Don't have every dissector include wtap.h 2023-06-08 11:05:42 +00:00
frame_data_sequence.c
frame_data_sequence.h
funnel.c
funnel.h
golay.c
golay.h
guid-utils.c
guid-utils.h
iana_charsets.c
iana_charsets.h epan: Add ENC_BOM modifier for UTF-16, UCS-2, UCS-4 2023-06-08 11:25:54 +00:00
iax2_codec_type.h
in_cksum.c
in_cksum.h
introspection-enums.c [Automatic update for 2023-07-09] 2023-07-09 22:48:13 +00:00
introspection.c
introspection.h
ip_opts.h
ipproto.c
ipproto.h
ipv4.h
ipv6.h
lapd_sapi.h
llcsaps.h
maxmind_db.c
maxmind_db.h
media_params.c
media_params.h
next_tvb.c
next_tvb.h
nlpid.h
oids.c
oids.h
oids_test.c
osi-utils.c Get rid of unnecessary casts. 2023-06-18 16:07:35 -07:00
osi-utils.h
oui.h
packet.c epan: Decrease dependent frame hash table size 2023-07-18 12:03:54 +00:00
packet.h Add "-G dissectors" to TShark, to dump the registered dissectors. 2023-06-22 00:10:04 -07:00
packet_info.h JSON 3GPP: use http2_get_header_value() to fetch HTTP2 path 2023-06-12 18:11:54 +02:00
params.h
pci-ids.c [Automatic update for 2023-07-23] 2023-07-23 18:17:07 +00:00
pci-ids.h Convert pci-ids.[ch] to C99 2023-06-18 10:32:09 -07:00
plugin_if.c
plugin_if.h
ppptypes.h
prefs-int.h prefs: Remove type of GUI preference 2023-05-08 16:30:07 +00:00
prefs.c epan: Register dynamic column fields and make them filterable 2023-07-25 00:49:52 +00:00
prefs.h Add a preference for ignoring duplicate frames 2023-06-09 07:21:08 +00:00
print.c epan: Register dynamic column fields and make them filterable 2023-07-25 00:49:52 +00:00
print.h print: Move protocolfilter inside output_fields 2023-06-14 23:58:02 +00:00
print.ps
print_stream.c In print_stream_ops_t, put print_line_color right aftr print_line. 2023-06-29 14:50:52 -07:00
print_stream.h In print_stream_ops_t, put print_line_color right aftr print_line. 2023-06-29 14:50:52 -07:00
proto.c epan: Register dynamic column fields and make them filterable 2023-07-25 00:49:52 +00:00
proto.h RTPS: Added CRC32 and MD5 checksum check and deleted unused hfs 2023-07-16 15:14:52 +00:00
proto_data.c
proto_data.h
protobuf-helper.c
protobuf-helper.h
protobuf_lang_parser.lemon Protobuf: improve the speed of loading protobuf language files 2023-07-14 13:30:55 +00:00
protobuf_lang_scanner.l
protobuf_lang_tree.c Protobuf: improve the speed of loading protobuf language files 2023-07-14 13:30:55 +00:00
protobuf_lang_tree.h Protobuf: improve the speed of loading protobuf language files 2023-07-14 13:30:55 +00:00
ps.h
ptvcursor.h
radius_dict.l
range.c
range.h
reassemble.c Reassembly: make streaming reassembly support DESEGMENT_ONE_MORE_SEGMENT 2023-06-13 21:03:43 +00:00
reassemble.h Reassembly: Clarify comments to use streaming reassembly func 2023-06-22 16:21:37 +00:00
reassemble_test.c
reedsolomon.c
reedsolomon.h
register-int.h
register.c
register.h
req_resp_hdrs.c
req_resp_hdrs.h
rtd_table.c
rtd_table.h
rtp_pt.h
sctpppids.c
sctpppids.h
secrets.c
secrets.h
sequence_analysis.c Qt: Fix leaks VOIP Calls Dialog 2023-05-12 20:07:58 +00:00
sequence_analysis.h Qt: Fix leaks VOIP Calls Dialog 2023-05-12 20:07:58 +00:00
services-data.c Replace services file with static array 2023-07-08 23:06:49 +01:00
services.c Replace services file with static array 2023-07-08 23:06:49 +01:00
services.h Replace services file with static array 2023-07-08 23:06:49 +01:00
show_exception.c
show_exception.h
slow_protocol_subtypes.h
sminmpec.h
srt_table.c
srt_table.h
stat_groups.h
stat_tap_ui.c
stat_tap_ui.h
stats_tree.c Get rid of unnecessary casts. 2023-06-18 16:07:35 -07:00
stats_tree.h
stats_tree_priv.h
stream.c
stream.h
strutil.c
strutil.h
t35.c
t35.h
tap-voip.h
tap.c epan: Register dynamic column fields and make them filterable 2023-07-25 00:49:52 +00:00
tap.h epan: Register dynamic column fields and make them filterable 2023-07-25 00:49:52 +00:00
test_epan.c
tfs.c
tfs.h
timestamp.c
timestamp.h
timestats.c
timestats.h
to_str.c Add Unix time support for absolute time field type 2023-07-03 21:45:50 +00:00
to_str.h Add Unix time support for absolute time field type 2023-07-03 21:45:50 +00:00
tvbparse.c Convert wmem to C99 types 2023-06-17 17:38:53 +00:00
tvbparse.h
tvbtest.c
tvbuff-int.h
tvbuff.c epan: Add ENC_BOM modifier for UTF-16, UCS-2, UCS-4 2023-06-08 11:25:54 +00:00
tvbuff.h
tvbuff_base64.c
tvbuff_brotli.c
tvbuff_composite.c
tvbuff_lz77.c
tvbuff_lz77huff.c
tvbuff_lznt1.c
tvbuff_rdp.c
tvbuff_rdp.h
tvbuff_real.c
tvbuff_subset.c
tvbuff_zlib.c
tvbuff_zstd.c
uat-int.h
uat.c
uat.h Qt: Fix crash when changing dfilter macro 2023-06-09 15:34:44 +00:00
uat_load.l
unit_strings.c
unit_strings.h
value_string.c
value_string.h
wmem_scopes.c
wmem_scopes.h
ws_printf.h
wscbor.c ftypes: Rename IS_FT_* macros 2023-06-20 00:22:57 +01:00
wscbor.h
wscbor_test.c
x264_prt_id.h
xdlc.c
xdlc.h