summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2014-11-14 11:25:04 -0800
committerGuy Harris <guy@alum.mit.edu>2014-11-14 19:25:42 +0000
commit4729e13df79d8a1f17542c0f21049c13003c8374 (patch)
tree2a37c3a5af3474b04c537665614a4e4a1966a542
parent42c6e578918f767d167897d6ab96d7c5fb1c4e75 (diff)
downloadwireshark-4729e13df79d8a1f17542c0f21049c13003c8374.tar.gz
Add an optional flag and a type for UUID parameters for stat taps.
For future use, with common code to parse the -z argument. Change-Id: Ib2a11bd5c91b5ac48ced2cd2d112b97c301ff72a Reviewed-on: https://code.wireshark.org/review/5307 Reviewed-by: Guy Harris <guy@alum.mit.edu>
-rw-r--r--epan/stat_tap_ui.h2
-rw-r--r--ui/gtk/afp_stat.c2
-rw-r--r--ui/gtk/bootp_stat.c2
-rw-r--r--ui/gtk/camel_counter.c2
-rw-r--r--ui/gtk/camel_srt.c2
-rw-r--r--ui/gtk/diameter_stat.c2
-rw-r--r--ui/gtk/fc_stat.c2
-rw-r--r--ui/gtk/gtp_stat.c2
-rw-r--r--ui/gtk/h225_counter.c2
-rw-r--r--ui/gtk/h225_ras_srt.c2
-rw-r--r--ui/gtk/ldap_stat.c2
-rw-r--r--ui/gtk/mac_lte_stat_dlg.c2
-rw-r--r--ui/gtk/megaco_stat.c2
-rw-r--r--ui/gtk/mgcp_stat.c2
-rw-r--r--ui/gtk/ncp_stat.c2
-rw-r--r--ui/gtk/radius_stat.c2
-rw-r--r--ui/gtk/rlc_lte_stat_dlg.c2
-rw-r--r--ui/gtk/scsi_stat.c4
-rw-r--r--ui/gtk/sctp_chunk_stat.c2
-rw-r--r--ui/gtk/sip_stat.c2
-rw-r--r--ui/gtk/smb2_stat.c2
-rw-r--r--ui/gtk/smb_stat.c2
-rw-r--r--ui/gtk/stats_tree_stat.c2
-rw-r--r--ui/gtk/tap_param_dlg.c2
-rw-r--r--ui/gtk/wsp_stat.c2
25 files changed, 28 insertions, 24 deletions
diff --git a/epan/stat_tap_ui.h b/epan/stat_tap_ui.h
index defa0c0ae9..05292e5442 100644
--- a/epan/stat_tap_ui.h
+++ b/epan/stat_tap_ui.h
@@ -40,6 +40,7 @@ typedef enum {
PARAM_UINT,
PARAM_STRING,
PARAM_ENUM,
+ PARAM_UUID,
PARAM_FILTER
} param_type;
@@ -47,6 +48,7 @@ typedef struct _tap_param {
param_type type;
const char *title;
const enum_val_t *enum_vals;
+ gboolean optional;
} tap_param;
/*
diff --git a/ui/gtk/afp_stat.c b/ui/gtk/afp_stat.c
index 0a1587c36b..2e82e2279f 100644
--- a/ui/gtk/afp_stat.c
+++ b/ui/gtk/afp_stat.c
@@ -185,7 +185,7 @@ gtk_afpstat_init(const char *opt_arg, void *userdata _U_)
}
static tap_param afp_stat_params[] = {
- { PARAM_FILTER, "Filter", NULL }
+ { PARAM_FILTER, "Filter", NULL, TRUE }
};
static tap_param_dlg afp_stat_dlg = {
diff --git a/ui/gtk/bootp_stat.c b/ui/gtk/bootp_stat.c
index 6948157fe1..b28fe8b7c3 100644
--- a/ui/gtk/bootp_stat.c
+++ b/ui/gtk/bootp_stat.c
@@ -253,7 +253,7 @@ dhcpstat_init(const char *opt_arg, void *userdata _U_)
}
static tap_param bootp_stat_params[] = {
- { PARAM_FILTER, "Filter", NULL }
+ { PARAM_FILTER, "Filter", NULL, TRUE }
};
static tap_param_dlg dhcp_stat_dlg = {
diff --git a/ui/gtk/camel_counter.c b/ui/gtk/camel_counter.c
index 24e9964c15..fc4ccb0d40 100644
--- a/ui/gtk/camel_counter.c
+++ b/ui/gtk/camel_counter.c
@@ -206,7 +206,7 @@ static void gtk_camelcounter_init(const char *opt_arg, void *userdata _U_)
}
static tap_param camel_counter_params[] = {
- { PARAM_FILTER, "Filter", NULL }
+ { PARAM_FILTER, "Filter", NULL, TRUE }
};
static tap_param_dlg camel_counter_dlg = {
diff --git a/ui/gtk/camel_srt.c b/ui/gtk/camel_srt.c
index 6a5c4392f5..55ed903701 100644
--- a/ui/gtk/camel_srt.c
+++ b/ui/gtk/camel_srt.c
@@ -218,7 +218,7 @@ static void gtk_camelsrt_init(const char *opt_arg, void *userdata _U_)
}
static tap_param camel_srt_params[] = {
- { PARAM_FILTER, "Filter", NULL }
+ { PARAM_FILTER, "Filter", NULL, TRUE }
};
static tap_param_dlg camel_srt_dlg = {
diff --git a/ui/gtk/diameter_stat.c b/ui/gtk/diameter_stat.c
index 3bb7d1609e..c3b440bf5e 100644
--- a/ui/gtk/diameter_stat.c
+++ b/ui/gtk/diameter_stat.c
@@ -214,7 +214,7 @@ gtk_diameterstat_init(const char *opt_arg, void *userdata _U_)
}
static tap_param diameter_stat_params[] = {
- { PARAM_FILTER, "Filter", NULL }
+ { PARAM_FILTER, "Filter", NULL, TRUE }
};
static tap_param_dlg diameter_stat_dlg = {
diff --git a/ui/gtk/fc_stat.c b/ui/gtk/fc_stat.c
index 8adab3208f..8a16e384b9 100644
--- a/ui/gtk/fc_stat.c
+++ b/ui/gtk/fc_stat.c
@@ -190,7 +190,7 @@ gtk_fcstat_init(const char *opt_arg, void *userdata _U_)
}
static tap_param fc_stat_params[] = {
- { PARAM_FILTER, "Filter", NULL }
+ { PARAM_FILTER, "Filter", NULL, TRUE }
};
static tap_param_dlg fc_stat_dlg = {
diff --git a/ui/gtk/gtp_stat.c b/ui/gtk/gtp_stat.c
index a6ec3cf4ba..613f3eba0f 100644
--- a/ui/gtk/gtp_stat.c
+++ b/ui/gtk/gtp_stat.c
@@ -209,7 +209,7 @@ gtk_gtpstat_init(const char *opt_arg, void *userdata _U_)
}
static tap_param gtp_stat_params[] = {
- { PARAM_FILTER, "Filter", NULL }
+ { PARAM_FILTER, "Filter", NULL, TRUE }
};
static tap_param_dlg gtp_stat_dlg = {
diff --git a/ui/gtk/h225_counter.c b/ui/gtk/h225_counter.c
index 3a64260545..37e390dc5b 100644
--- a/ui/gtk/h225_counter.c
+++ b/ui/gtk/h225_counter.c
@@ -50,7 +50,7 @@ void register_tap_listener_gtk_h225counter(void);
static void gtk_h225counter_init(const char *opt_arg, void *userdata);
static tap_param h225_counter_params[] = {
- { PARAM_FILTER, "Filter", NULL }
+ { PARAM_FILTER, "Filter", NULL, TRUE }
};
static tap_param_dlg h225_counter_dlg = {
diff --git a/ui/gtk/h225_ras_srt.c b/ui/gtk/h225_ras_srt.c
index 83a0f8f698..55f1fe2b6b 100644
--- a/ui/gtk/h225_ras_srt.c
+++ b/ui/gtk/h225_ras_srt.c
@@ -51,7 +51,7 @@ void register_tap_listener_gtk_h225rassrt(void);
static void gtk_h225rassrt_init(const char *opt_arg, void *userdata);
static tap_param h225_rassrt_params[] = {
- { PARAM_FILTER, "Filter", NULL }
+ { PARAM_FILTER, "Filter", NULL, TRUE }
};
static tap_param_dlg h225_rassrt_dlg = {
diff --git a/ui/gtk/ldap_stat.c b/ui/gtk/ldap_stat.c
index 1b6aa7d9b7..ee05193c5e 100644
--- a/ui/gtk/ldap_stat.c
+++ b/ui/gtk/ldap_stat.c
@@ -223,7 +223,7 @@ gtk_ldapstat_init(const char *opt_arg, void *userdata _U_)
}
static tap_param ldap_stat_params[] = {
- { PARAM_FILTER, "Filter", NULL }
+ { PARAM_FILTER, "Filter", NULL, TRUE }
};
static tap_param_dlg ldap_stat_dlg = {
diff --git a/ui/gtk/mac_lte_stat_dlg.c b/ui/gtk/mac_lte_stat_dlg.c
index 097a6864b3..4bd9045c59 100644
--- a/ui/gtk/mac_lte_stat_dlg.c
+++ b/ui/gtk/mac_lte_stat_dlg.c
@@ -1405,7 +1405,7 @@ static void gtk_mac_lte_stat_init(const char *opt_arg, void *userdata _U_)
static tap_param mac_lte_stat_params[] = {
- { PARAM_FILTER, "Filter", NULL }
+ { PARAM_FILTER, "Filter", NULL, TRUE }
};
static tap_param_dlg mac_lte_stat_dlg = {
diff --git a/ui/gtk/megaco_stat.c b/ui/gtk/megaco_stat.c
index 38c9f5a016..9fc8698f84 100644
--- a/ui/gtk/megaco_stat.c
+++ b/ui/gtk/megaco_stat.c
@@ -209,7 +209,7 @@ gtk_megacostat_init(const char *opt_arg, void *userdata _U_)
}
static tap_param megaco_srt_params[] = {
- { PARAM_FILTER, "Filter", NULL }
+ { PARAM_FILTER, "Filter", NULL, TRUE }
};
static tap_param_dlg megaco_srt_dlg = {
diff --git a/ui/gtk/mgcp_stat.c b/ui/gtk/mgcp_stat.c
index 080408cb8b..5abc83a996 100644
--- a/ui/gtk/mgcp_stat.c
+++ b/ui/gtk/mgcp_stat.c
@@ -296,7 +296,7 @@ gtk_mgcpstat_init(const char *opt_arg, void *userdata _U_)
}
static tap_param mgcp_srt_params[] = {
- { PARAM_FILTER, "Filter", NULL }
+ { PARAM_FILTER, "Filter", NULL, TRUE }
};
static tap_param_dlg mgcp_srt_dlg = {
diff --git a/ui/gtk/ncp_stat.c b/ui/gtk/ncp_stat.c
index 63a44a89b3..fb074b735d 100644
--- a/ui/gtk/ncp_stat.c
+++ b/ui/gtk/ncp_stat.c
@@ -705,7 +705,7 @@ gtk_ncpstat_init(const char *opt_arg, void *userdata _U_)
}
static tap_param ncp_stat_params[] = {
- { PARAM_FILTER, "Filter", NULL }
+ { PARAM_FILTER, "Filter", NULL, TRUE }
};
static tap_param_dlg ncp_stat_dlg = {
diff --git a/ui/gtk/radius_stat.c b/ui/gtk/radius_stat.c
index 604533440b..6b16ef5e63 100644
--- a/ui/gtk/radius_stat.c
+++ b/ui/gtk/radius_stat.c
@@ -365,7 +365,7 @@ gtk_radiusstat_init(const char *opt_arg, void *userdata _U_)
}
static tap_param radius_stat_params[] = {
- { PARAM_FILTER, "Filter", NULL }
+ { PARAM_FILTER, "Filter", NULL, TRUE }
};
static tap_param_dlg radius_srt_dlg = {
diff --git a/ui/gtk/rlc_lte_stat_dlg.c b/ui/gtk/rlc_lte_stat_dlg.c
index d85f1fb14d..ebd8879c38 100644
--- a/ui/gtk/rlc_lte_stat_dlg.c
+++ b/ui/gtk/rlc_lte_stat_dlg.c
@@ -1649,7 +1649,7 @@ static void gtk_rlc_lte_stat_init(const char *opt_arg, void *userdata _U_)
static tap_param rlc_lte_stat_params[] = {
- { PARAM_FILTER, "Filter", NULL }
+ { PARAM_FILTER, "Filter", NULL, TRUE }
};
static tap_param_dlg rlc_lte_stat_dlg = {
diff --git a/ui/gtk/scsi_stat.c b/ui/gtk/scsi_stat.c
index c3afac9195..05d2303399 100644
--- a/ui/gtk/scsi_stat.c
+++ b/ui/gtk/scsi_stat.c
@@ -283,8 +283,8 @@ static const enum_val_t scsi_command_sets[] = {
};
static tap_param scsi_stat_params[] = {
- { PARAM_ENUM, "Command set", scsi_command_sets },
- { PARAM_FILTER, "Filter", NULL }
+ { PARAM_ENUM, "Command set", scsi_command_sets, FALSE },
+ { PARAM_FILTER, "Filter", NULL, TRUE }
};
static tap_param_dlg scsi_stat_dlg = {
diff --git a/ui/gtk/sctp_chunk_stat.c b/ui/gtk/sctp_chunk_stat.c
index f0e8dcdbc3..814eb1f4d9 100644
--- a/ui/gtk/sctp_chunk_stat.c
+++ b/ui/gtk/sctp_chunk_stat.c
@@ -53,7 +53,7 @@ void register_tap_listener_sctpstat(void);
static void sctpstat_init(const char *opt_arg, void *userdata);
static tap_param sctp_stat_params[] = {
- { PARAM_FILTER, "Filter", NULL }
+ { PARAM_FILTER, "Filter", NULL, TRUE }
};
static tap_param_dlg sctp_stat_dlg = {
diff --git a/ui/gtk/sip_stat.c b/ui/gtk/sip_stat.c
index 8aba5daca6..f7e1d7b719 100644
--- a/ui/gtk/sip_stat.c
+++ b/ui/gtk/sip_stat.c
@@ -675,7 +675,7 @@ gtk_sipstat_init(const char *opt_arg, void *userdata _U_)
}
static tap_param sip_stat_params[] = {
- { PARAM_FILTER, "Filter", NULL }
+ { PARAM_FILTER, "Filter", NULL, TRUE }
};
static tap_param_dlg sip_stat_dlg = {
diff --git a/ui/gtk/smb2_stat.c b/ui/gtk/smb2_stat.c
index 53b148039f..f0144e745f 100644
--- a/ui/gtk/smb2_stat.c
+++ b/ui/gtk/smb2_stat.c
@@ -198,7 +198,7 @@ gtk_smb2stat_init(const char *opt_arg, void *userdata _U_)
}
static tap_param smb2_stat_params[] = {
- { PARAM_FILTER, "Filter", NULL }
+ { PARAM_FILTER, "Filter", NULL, TRUE }
};
static tap_param_dlg smb2_stat_dlg = {
diff --git a/ui/gtk/smb_stat.c b/ui/gtk/smb_stat.c
index b1c387a3b6..1734e1af66 100644
--- a/ui/gtk/smb_stat.c
+++ b/ui/gtk/smb_stat.c
@@ -227,7 +227,7 @@ gtk_smbstat_init(const char *opt_arg, void *userdata _U_)
}
static tap_param smb_stat_params[] = {
- { PARAM_FILTER, "Filter", NULL }
+ { PARAM_FILTER, "Filter", NULL, TRUE }
};
static tap_param_dlg smb_stat_dlg = {
diff --git a/ui/gtk/stats_tree_stat.c b/ui/gtk/stats_tree_stat.c
index 952ee0b1e5..3056f1b157 100644
--- a/ui/gtk/stats_tree_stat.c
+++ b/ui/gtk/stats_tree_stat.c
@@ -541,7 +541,7 @@ init_gtk_tree(const char* opt_arg, void *userdata _U_)
}
static tap_param tree_stat_params[] = {
- { PARAM_FILTER, "Filter", NULL }
+ { PARAM_FILTER, "Filter", NULL, TRUE }
};
static void
diff --git a/ui/gtk/tap_param_dlg.c b/ui/gtk/tap_param_dlg.c
index c81924c7d6..624d121566 100644
--- a/ui/gtk/tap_param_dlg.c
+++ b/ui/gtk/tap_param_dlg.c
@@ -180,6 +180,7 @@ tap_param_dlg_start_button_clicked(GtkWidget *item _U_, gpointer dialog_data)
break;
case PARAM_STRING:
+ case PARAM_UUID: /* XXX - do as multiple fixed-length boxes */
case PARAM_FILTER:
g_string_append(params,
gtk_entry_get_text(GTK_ENTRY(dlg_data->param_items[i])));
@@ -377,6 +378,7 @@ tap_param_dlg_cb(GtkAction *action _U_, gpointer data)
case PARAM_STRING:
case PARAM_FILTER:
+ case PARAM_UUID:
dlg_set_activate(current_dlg->param_items[i], start_button);
break;
}
diff --git a/ui/gtk/wsp_stat.c b/ui/gtk/wsp_stat.c
index a24f611bed..14cf87dff1 100644
--- a/ui/gtk/wsp_stat.c
+++ b/ui/gtk/wsp_stat.c
@@ -399,7 +399,7 @@ gtk_wspstat_init(const char *opt_arg, void *userdata _U_)
}
static tap_param wsp_stat_params[] = {
- { PARAM_FILTER, "Filter", NULL }
+ { PARAM_FILTER, "Filter", NULL, TRUE }
};
static tap_param_dlg wsp_stat_dlg = {