aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2018-10-20 01:56:59 -0700
committerGuy Harris <guy@alum.mit.edu>2018-10-20 08:57:41 +0000
commit69b5325044dd3b2101cc09da7d0f979d0b907934 (patch)
treed60f371842272817ed2a286eed5e9045bd1b634c /plugins
parent7e88bb5e5372fc3454735e6ac840390341bf3d20 (diff)
Include transport protocols' hfids in the list of wanted hfids.
We need to get the fields corresponding to those protocols, so we know the range within the packet that those protocols cover. Improve a debugging message while we're at it. Bug: 15208 Change-Id: Idc329079584e8d035622b148503a2ec1a295ccaa Reviewed-on: https://code.wireshark.org/review/30280 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'plugins')
-rw-r--r--plugins/epan/mate/mate_runtime.c2
-rw-r--r--plugins/epan/mate/mate_setup.c7
2 files changed, 8 insertions, 1 deletions
diff --git a/plugins/epan/mate/mate_runtime.c b/plugins/epan/mate/mate_runtime.c
index 2bb31eb941..049fa6835b 100644
--- a/plugins/epan/mate/mate_runtime.c
+++ b/plugins/epan/mate/mate_runtime.c
@@ -666,7 +666,7 @@ static void get_pdu_fields(gpointer k, gpointer v, gpointer p) {
start = fi->start;
end = fi->start + fi->length;
- dbg_print(dbg_pdu,5,dbg_facility,"get_pdu_fields: found field %i-%i",start,end);
+ dbg_print(dbg_pdu,5,dbg_facility,"get_pdu_fields: found field %s, %i-%i, length %i", fi->hfinfo->abbrev, start, end, fi->length);
for (j = 0; j < data->ranges->len; j++) {
diff --git a/plugins/epan/mate/mate_setup.c b/plugins/epan/mate/mate_setup.c
index f402f14c09..6cc0f480e1 100644
--- a/plugins/epan/mate/mate_setup.c
+++ b/plugins/epan/mate/mate_setup.c
@@ -298,6 +298,13 @@ static void analyze_pdu_config(mate_config* mc, mate_cfg_pdu* cfg) {
arg.cfg = cfg;
g_hash_table_foreach(cfg->hfids_attr,analyze_pdu_hfids,&arg);
+ /* Add the hfids of transport protocols as wanted hfids */
+ for (guint i = 0; i < cfg->transport_ranges->len; i++) {
+ int hfid = *((int*)g_ptr_array_index(cfg->transport_ranges,i));
+ mc->wanted_hfids = g_array_append_val(mc->wanted_hfids, hfid);
+ mc->num_fields_wanted++;
+ }
+
ett = &cfg->ett;
g_array_append_val(mc->ett,ett);