Add a name field to tap_param, for use in error messages.
authorGuy Harris <guy@alum.mit.edu>
Fri, 14 Nov 2014 20:21:12 +0000 (12:21 -0800)
committerGuy Harris <guy@alum.mit.edu>
Fri, 14 Nov 2014 20:21:57 +0000 (20:21 +0000)
Change-Id: Ia4317b61ff30e269eba0ee2ea2c46f1668544b1b
Reviewed-on: https://code.wireshark.org/review/5309
Reviewed-by: Guy Harris <guy@alum.mit.edu>
24 files changed:
epan/stat_tap_ui.h
ui/gtk/afp_stat.c
ui/gtk/bootp_stat.c
ui/gtk/camel_counter.c
ui/gtk/camel_srt.c
ui/gtk/diameter_stat.c
ui/gtk/fc_stat.c
ui/gtk/gtp_stat.c
ui/gtk/h225_counter.c
ui/gtk/h225_ras_srt.c
ui/gtk/ldap_stat.c
ui/gtk/mac_lte_stat_dlg.c
ui/gtk/megaco_stat.c
ui/gtk/mgcp_stat.c
ui/gtk/ncp_stat.c
ui/gtk/radius_stat.c
ui/gtk/rlc_lte_stat_dlg.c
ui/gtk/scsi_stat.c
ui/gtk/sctp_chunk_stat.c
ui/gtk/sip_stat.c
ui/gtk/smb2_stat.c
ui/gtk/smb_stat.c
ui/gtk/stats_tree_stat.c
ui/gtk/wsp_stat.c

index 05292e544256a3010df02282dde326e1c3bda322..3fee0fd6a5436f390049633c9eb934919b2494ab 100644 (file)
@@ -45,10 +45,11 @@ typedef enum {
 } param_type;
 
 typedef struct _tap_param {
-       param_type type;
-       const char *title;
-       const enum_val_t *enum_vals;
-       gboolean optional;
+       param_type type;                /* type of parameter */
+       const char *name;               /* name to use in error messages */
+       const char *title;              /* title to use in GUI widgets */
+       const enum_val_t *enum_vals;    /* values for PARAM_ENUM */
+       gboolean optional;              /* TRUE if the parameter is optional */
 } tap_param;
 
 /*
index 2e82e2279fcae48981a30ae900662ece9d53d2f1..bc59809d58626775f812a080187cb10da0fe7846 100644 (file)
@@ -185,7 +185,7 @@ gtk_afpstat_init(const char *opt_arg, void *userdata _U_)
 }
 
 static tap_param afp_stat_params[] = {
-       { PARAM_FILTER, "Filter", NULL, TRUE }
+       { PARAM_FILTER, "filter", "Filter", NULL, TRUE }
 };
 
 static tap_param_dlg afp_stat_dlg = {
index b28fe8b7c30340ad4118319642ceb60aac6002c5..da140c9267135b20a090337cd8f1b6c2294cd62c 100644 (file)
@@ -253,7 +253,7 @@ dhcpstat_init(const char *opt_arg, void *userdata _U_)
 }
 
 static tap_param bootp_stat_params[] = {
-       { PARAM_FILTER, "Filter", NULL, TRUE }
+       { PARAM_FILTER, "filter", "Filter", NULL, TRUE }
 };
 
 static tap_param_dlg dhcp_stat_dlg = {
index fc4ccb0d401225d79f7bd411592ecaa4296cb930..08d6b721c9ea4fd63cc795f2ae18532b2cd1cd8c 100644 (file)
@@ -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, TRUE }
+  { PARAM_FILTER, "filter", "Filter", NULL, TRUE }
 };
 
 static tap_param_dlg camel_counter_dlg = {
index 55ed903701b51764c5ce4de036167822f1383162..39330ae5fe2751ceda51994373cb8299105c57d4 100644 (file)
@@ -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, TRUE }
+  { PARAM_FILTER, "filter", "Filter", NULL, TRUE }
 };
 
 static tap_param_dlg camel_srt_dlg = {
index c3b440bf5ef87156eb23b2be22c3c22103a43d17..1dd26e594fd8ba8e69037e3935e0f3835e4d059f 100644 (file)
@@ -214,7 +214,7 @@ gtk_diameterstat_init(const char *opt_arg, void *userdata _U_)
 }
 
 static tap_param diameter_stat_params[] = {
-       { PARAM_FILTER, "Filter", NULL, TRUE }
+       { PARAM_FILTER, "filter", "Filter", NULL, TRUE }
 };
 
 static tap_param_dlg diameter_stat_dlg = {
index 8a16e384b9297ff5e01926e059df87e6389d4126..402d2a297ec7a50e9bbd18f9fe6028e9362dc817 100644 (file)
@@ -190,7 +190,7 @@ gtk_fcstat_init(const char *opt_arg, void *userdata _U_)
 }
 
 static tap_param fc_stat_params[] = {
-       { PARAM_FILTER, "Filter", NULL, TRUE }
+       { PARAM_FILTER, "filter", "Filter", NULL, TRUE }
 };
 
 static tap_param_dlg fc_stat_dlg = {
index 613f3eba0f34f4012d5b888672489fcc6ef31599..2e9c8ca33a5ec168b79d260725d367372f042d22 100644 (file)
@@ -209,7 +209,7 @@ gtk_gtpstat_init(const char *opt_arg, void *userdata _U_)
 }
 
 static tap_param gtp_stat_params[] = {
-       { PARAM_FILTER, "Filter", NULL, TRUE }
+       { PARAM_FILTER, "filter", "Filter", NULL, TRUE }
 };
 
 static tap_param_dlg gtp_stat_dlg = {
index 37e390dc5bb11cf2d613afcae94ca241594a5660..794f1074b2651cb1f1f4ff1026a352abb3220cef 100644 (file)
@@ -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, TRUE }
+       { PARAM_FILTER, "filter", "Filter", NULL, TRUE }
 };
 
 static tap_param_dlg h225_counter_dlg = {
index 55f1fe2b6b7b5e7c1560f2bf95c87d583bcbe460..b02f767aef35d77f91f277e21927ce2e8f086f94 100644 (file)
@@ -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, TRUE }
+       { PARAM_FILTER, "filter", "Filter", NULL, TRUE }
 };
 
 static tap_param_dlg h225_rassrt_dlg = {
index ee05193c5eef6ff5849e7ca77e11ca5e0fe1c12e..86ef837efd8819c6ae95f2608765607a51d69693 100644 (file)
@@ -223,7 +223,7 @@ gtk_ldapstat_init(const char *opt_arg, void *userdata _U_)
 }
 
 static tap_param ldap_stat_params[] = {
-       { PARAM_FILTER, "Filter", NULL, TRUE }
+       { PARAM_FILTER, "filter", "Filter", NULL, TRUE }
 };
 
 static tap_param_dlg ldap_stat_dlg = {
index 4bd9045c596ccb6cc221c7dc20b07bcc4b99a144..0e66a5e849d509eb0254b417a9cefc2a67c1ed09 100644 (file)
@@ -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, TRUE }
+    { PARAM_FILTER, "filter", "Filter", NULL, TRUE }
 };
 
 static tap_param_dlg mac_lte_stat_dlg = {
index 9fc8698f84d27d47d896d6582b6e23c398cfb5dd..128c76ab422e6f1e51a7a0a0fbdd985e7ebff65d 100644 (file)
@@ -209,7 +209,7 @@ gtk_megacostat_init(const char *opt_arg, void *userdata _U_)
 }
 
 static tap_param megaco_srt_params[] = {
-       { PARAM_FILTER, "Filter", NULL, TRUE }
+       { PARAM_FILTER, "filter", "Filter", NULL, TRUE }
 };
 
 static tap_param_dlg megaco_srt_dlg = {
index 5abc83a9965a7b3de1f34b9099d99d22db94149d..b4bb2430de3c44e7d1d3e93b66a41bd7ad44054a 100644 (file)
@@ -296,7 +296,7 @@ gtk_mgcpstat_init(const char *opt_arg, void *userdata _U_)
 }
 
 static tap_param mgcp_srt_params[] = {
-       { PARAM_FILTER, "Filter", NULL, TRUE }
+       { PARAM_FILTER, "filter", "Filter", NULL, TRUE }
 };
 
 static tap_param_dlg mgcp_srt_dlg = {
index fb074b735d1513d88684cc4d975ac0c9dc7e6abd..3e3c3649465355e886be2f7a89a18ba87ee386c0 100644 (file)
@@ -705,7 +705,7 @@ gtk_ncpstat_init(const char *opt_arg, void *userdata _U_)
 }
 
 static tap_param ncp_stat_params[] = {
-       { PARAM_FILTER, "Filter", NULL, TRUE }
+       { PARAM_FILTER, "filter", "Filter", NULL, TRUE }
 };
 
 static tap_param_dlg ncp_stat_dlg = {
index 6b16ef5e63e0bfee0a835ae839496fb05e5fdff1..5f4cb1dbdae237e68ced061544e25638c851fc0f 100644 (file)
@@ -365,7 +365,7 @@ gtk_radiusstat_init(const char *opt_arg, void *userdata _U_)
 }
 
 static tap_param radius_stat_params[] = {
-       { PARAM_FILTER, "Filter", NULL, TRUE }
+       { PARAM_FILTER, "filter", "Filter", NULL, TRUE }
 };
 
 static tap_param_dlg radius_srt_dlg = {
index ebd8879c389347da68b863dec426a1a3e3d40fd1..da26d7e6b2745cb6feb2dd9f0369dd640a258bd1 100644 (file)
@@ -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, TRUE }
+    { PARAM_FILTER, "filter", "Filter", NULL, TRUE }
 };
 
 static tap_param_dlg rlc_lte_stat_dlg = {
index 05d23033992c08017a02789dcf00a02ebe1a78ff..3af1a83a06ea3f2143b8dde6b03ed5cd556efd51 100644 (file)
@@ -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, FALSE },
-       { PARAM_FILTER, "Filter", NULL, TRUE }
+       { PARAM_ENUM,   "cmdset", "Command set", scsi_command_sets, FALSE },
+       { PARAM_FILTER, "filter", "Filter", NULL, TRUE }
 };
 
 static tap_param_dlg scsi_stat_dlg = {
index 814eb1f4d9be3064a111b99a7014e71af5619e82..020f0348a71d4afe95647dbfb6b46035ad8ed15d 100644 (file)
@@ -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, TRUE }
+       { PARAM_FILTER, "filter", "Filter", NULL, TRUE }
 };
 
 static tap_param_dlg sctp_stat_dlg = {
index f7e1d7b7190f522af40348c0ffa400505bc855fd..50bc3987957b3d443144bea1390249dcc8f6428e 100644 (file)
@@ -675,7 +675,7 @@ gtk_sipstat_init(const char *opt_arg, void *userdata _U_)
 }
 
 static tap_param sip_stat_params[] = {
-    { PARAM_FILTER, "Filter", NULL, TRUE }
+    { PARAM_FILTER, "filter", "Filter", NULL, TRUE }
 };
 
 static tap_param_dlg sip_stat_dlg = {
index f0144e745fa8015065539f10958363897f7ee338..ab6c5669eb506e63cf554912bc119e19f9ecdc49 100644 (file)
@@ -198,7 +198,7 @@ gtk_smb2stat_init(const char *opt_arg, void *userdata _U_)
 }
 
 static tap_param smb2_stat_params[] = {
-       { PARAM_FILTER, "Filter", NULL, TRUE }
+       { PARAM_FILTER, "filter", "Filter", NULL, TRUE }
 };
 
 static tap_param_dlg smb2_stat_dlg = {
index 1734e1af66d0ee9bc85d5e373af24da6515f7581..2d3606d6df05555b8ca5eb20fb63157f14085a51 100644 (file)
@@ -227,7 +227,7 @@ gtk_smbstat_init(const char *opt_arg, void *userdata _U_)
 }
 
 static tap_param smb_stat_params[] = {
-       { PARAM_FILTER, "Filter", NULL, TRUE }
+       { PARAM_FILTER, "filter", "Filter", NULL, TRUE }
 };
 
 static tap_param_dlg smb_stat_dlg = {
index 3056f1b157cc8e0dd90fc8212ae1074382b856b5..f5228f4df348c1d760101aca9f6ae71dee949889 100644 (file)
@@ -541,7 +541,7 @@ init_gtk_tree(const char* opt_arg, void *userdata _U_)
 }
 
 static tap_param tree_stat_params[] = {
-       { PARAM_FILTER, "Filter", NULL, TRUE }
+       { PARAM_FILTER, "filter", "Filter", NULL, TRUE }
 };
 
 static void
index 14cf87dff1515e6da60eaadc5df4e2fa55cef23a..f32c8929a3c160b176d731dc5b5705b8d4641e18 100644 (file)
@@ -399,7 +399,7 @@ gtk_wspstat_init(const char *opt_arg, void *userdata _U_)
 }
 
 static tap_param wsp_stat_params[] = {
-       { PARAM_FILTER, "Filter", NULL, TRUE }
+       { PARAM_FILTER, "filter", "Filter", NULL, TRUE }
 };
 
 static tap_param_dlg wsp_stat_dlg = {