aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mate
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2017-04-16 18:29:26 -0700
committerGuy Harris <guy@alum.mit.edu>2017-04-17 01:30:00 +0000
commit1bfc8580e322450f8afaaf797e236469b948c984 (patch)
treeb646871da93ec5a0820c891e74391131d65b0713 /plugins/mate
parent0cc454359cadcb0ff2f11e53c39f50367254412e (diff)
Include protocols in the list of wanted hfids.
That's currently required to get the fields we want. Bug: 12161 Change-Id: Ic1066334358c58fa915ef886b2658902393172c7 Reviewed-on: https://code.wireshark.org/review/21153 Reviewed-by: Guy Harris <guy@alum.mit.edu>
Diffstat (limited to 'plugins/mate')
-rw-r--r--plugins/mate/mate.h2
-rw-r--r--plugins/mate/mate_grammar.lemon5
-rw-r--r--plugins/mate/mate_setup.c6
-rw-r--r--plugins/mate/packet-mate.c4
4 files changed, 11 insertions, 6 deletions
diff --git a/plugins/mate/mate.h b/plugins/mate/mate.h
index 1ec77b96af..8278a6ca38 100644
--- a/plugins/mate/mate.h
+++ b/plugins/mate/mate.h
@@ -197,7 +197,7 @@ typedef struct _mate_config {
int hfid_mate;
- GArray *wanted_fields; /* hfids of fields MATE needs */
+ GArray *wanted_hfids; /* hfids of protocols and fields MATE needs */
GString* fields_filter; /* "ip.addr || dns.id || ... " for the tap */
GString* protos_filter; /* "dns || ftp || ..." for the tap */
diff --git a/plugins/mate/mate_grammar.lemon b/plugins/mate/mate_grammar.lemon
index c7e084230d..1235a2dd3d 100644
--- a/plugins/mate/mate_grammar.lemon
+++ b/plugins/mate/mate_grammar.lemon
@@ -435,6 +435,11 @@ pdu_decl ::=
cfg->discard = DistcardPduData;
cfg->drop_unassigned = DropUnassigned;
+ /*
+ * Add this protocol to our table of wanted hfids.
+ */
+ mc->wanted_hfids = g_array_append_val(mc->wanted_hfids, Field->id);
+
g_string_append_printf(mc->protos_filter,"||%s",Field->abbrev);
/* flip the transport_stack */
diff --git a/plugins/mate/mate_setup.c b/plugins/mate/mate_setup.c
index ee1d63fa8a..c52001ddd0 100644
--- a/plugins/mate/mate_setup.c
+++ b/plugins/mate/mate_setup.c
@@ -259,9 +259,9 @@ static void analyze_pdu_hfids(gpointer k, gpointer v, gpointer p) {
new_attr_hfri(mc, cfg->name,cfg->my_hfids,(gchar*) v);
/*
- * Add this hfid to our table of hfids.
+ * Add this hfid to our table of wanted hfids.
*/
- mc->wanted_fields = g_array_append_val(mc->wanted_fields, *(int *)k);
+ mc->wanted_hfids = g_array_append_val(mc->wanted_hfids, *(int *)k);
g_string_append_printf(mc->fields_filter,"||%s",my_protoname(*(int*)k));
}
@@ -594,7 +594,7 @@ extern mate_config* mate_make_config(const gchar* filename, int mate_hfid) {
mc->hfid_mate = mate_hfid;
- mc->wanted_fields = g_array_new(FALSE, FALSE, (guint)sizeof(int));
+ mc->wanted_hfids = g_array_new(FALSE, FALSE, (guint)sizeof(int));
mc->fields_filter = g_string_new("");
mc->protos_filter = g_string_new("");
diff --git a/plugins/mate/packet-mate.c b/plugins/mate/packet-mate.c
index d14dbdd45c..2334826c49 100644
--- a/plugins/mate/packet-mate.c
+++ b/plugins/mate/packet-mate.c
@@ -360,10 +360,10 @@ proto_reg_handoff_mate(void)
register_init_routine(initialize_mate);
/*
- * Set the list of fields we want.
+ * Set the list of hfids we want.
*/
set_postdissector_wanted_fields(mate_handle,
- mc->wanted_fields);
+ mc->wanted_hfids);
tap_error = register_tap_listener("frame", &mate_tap_data,
(char*) mc->tap_filter,