diff options
-rw-r--r-- | plugins/mate/mate.h | 2 | ||||
-rw-r--r-- | plugins/mate/mate_grammar.lemon | 5 | ||||
-rw-r--r-- | plugins/mate/mate_setup.c | 6 | ||||
-rw-r--r-- | plugins/mate/packet-mate.c | 4 |
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, |