forked from osmocom/wireshark
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>
This commit is contained in:
parent
0cc454359c
commit
1bfc8580e3
|
@ -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 */
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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("");
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue