From fcf7b3789cec5595880d27e0109387e2d8733b38 Mon Sep 17 00:00:00 2001 From: Luis Ontanon Date: Sat, 11 Feb 2006 13:05:24 +0000 Subject: add an userdata argument to register_stat_cmd_arg() and its callback to use the callback for multiple registrations. svn path=/trunk/; revision=17252 --- epan/stat_cmd_args.c | 9 ++++++--- epan/stat_cmd_args.h | 2 +- gtk/ansi_a_stat.c | 9 +++++---- gtk/ansi_map_stat.c | 5 +++-- gtk/conversations_eth.c | 6 +++--- gtk/conversations_fc.c | 6 +++--- gtk/conversations_fddi.c | 6 +++--- gtk/conversations_ip.c | 6 +++--- gtk/conversations_ipx.c | 6 +++--- gtk/conversations_jxta.c | 8 ++++---- gtk/conversations_ncp.c | 6 +++--- gtk/conversations_rsvp.c | 6 +++--- gtk/conversations_sctp.c | 6 +++--- gtk/conversations_tcpip.c | 6 +++--- gtk/conversations_tr.c | 6 +++--- gtk/conversations_udpip.c | 6 +++--- gtk/conversations_wlan.c | 6 +++--- gtk/dcerpc_stat.c | 6 +++--- gtk/expert_comp_dlg.c | 6 +++--- gtk/expert_dlg.c | 6 +++--- gtk/flow_graph.c | 8 ++++---- gtk/funnel_stat.c | 16 ++++++++++++++-- gtk/graph_analysis.c | 14 ++++++++++++++ gtk/gsm_a_stat.c | 43 ++++++++++++++++++++++--------------------- gtk/gsm_map_stat.c | 6 +++--- gtk/hostlist_eth.c | 7 ++++--- gtk/hostlist_fc.c | 6 +++--- gtk/hostlist_fddi.c | 6 +++--- gtk/hostlist_ip.c | 6 +++--- gtk/hostlist_ipx.c | 6 +++--- gtk/hostlist_jxta.c | 6 +++--- gtk/hostlist_rsvp.c | 6 +++--- gtk/hostlist_tcpip.c | 6 +++--- gtk/hostlist_tr.c | 6 +++--- gtk/hostlist_udpip.c | 6 +++--- gtk/hostlist_wlan.c | 6 +++--- gtk/io_stat.c | 6 +++--- gtk/mtp3_stat.c | 5 ++--- gtk/rpc_progs.c | 6 +++--- gtk/rpc_stat.c | 6 +++--- gtk/rtp_analysis.c | 4 ++-- gtk/t38_analysis.c | 4 ++-- gtk/tap_dfilter_dlg.c | 4 ++-- gtk/voip_calls_dlg.c | 6 +++--- tap-afpstat.c | 4 ++-- tap-ansi_astat.c | 4 ++-- tap-bootpstat.c | 4 ++-- tap-dcerpcstat.c | 4 ++-- tap-gsm_astat.c | 4 ++-- tap-h225counter.c | 4 ++-- tap-h225rassrt.c | 4 ++-- tap-httpstat.c | 4 ++-- tap-iostat.c | 4 ++-- tap-iousers.c | 4 ++-- tap-mgcpstat.c | 4 ++-- tap-protocolinfo.c | 4 ++-- tap-protohierstat.c | 4 ++-- tap-rpcprogs.c | 4 ++-- tap-rpcstat.c | 4 ++-- tap-sctpchunkstat.c | 4 ++-- tap-sipstat.c | 4 ++-- tap-smbsids.c | 4 ++-- tap-smbstat.c | 4 ++-- tap-stats_tree.c | 6 +++--- tap-wspstat.c | 4 ++-- tap_dfilter_dlg.h | 2 +- 66 files changed, 219 insertions(+), 187 deletions(-) diff --git a/epan/stat_cmd_args.c b/epan/stat_cmd_args.c index 7499228b46..e116032095 100644 --- a/epan/stat_cmd_args.c +++ b/epan/stat_cmd_args.c @@ -39,8 +39,10 @@ */ typedef struct _stat_cmd_arg { const char *cmd; - void (*func)(const char *arg); + void (*func)(const char *arg, void* userdata); + void* userdata; } stat_cmd_arg; + static GSList *stat_cmd_arg_list=NULL; /* structure to keep track of what stats have been specified on the @@ -63,13 +65,14 @@ sort_by_name(gconstpointer a, gconstpointer b) ((const stat_cmd_arg *)b)->cmd); } void -register_stat_cmd_arg(const char *cmd, void (*func)(const char *arg)) +register_stat_cmd_arg(const char *cmd, void (*func)(const char*, void*),void* userdata) { stat_cmd_arg *newsca; newsca=g_malloc(sizeof(stat_cmd_arg)); newsca->cmd=cmd; newsca->func=func; + newsca->userdata=userdata; stat_cmd_arg_list=g_slist_insert_sorted(stat_cmd_arg_list, newsca, sort_by_name); } @@ -122,7 +125,7 @@ start_requested_stats(void) while(stats_requested){ sr=stats_requested->data; - (*sr->sca->func)(sr->arg); + (*sr->sca->func)(sr->arg,sr->sca->userdata); g_free(sr->arg); g_free(sr); stats_requested=g_slist_remove(stats_requested, sr); diff --git a/epan/stat_cmd_args.h b/epan/stat_cmd_args.h index d0314f5405..20297eb4dd 100644 --- a/epan/stat_cmd_args.h +++ b/epan/stat_cmd_args.h @@ -27,7 +27,7 @@ #define _STAT_H_ extern void register_stat_cmd_arg(const char *cmd, - void (*func)(const char *arg)); + void (*func)(const char *arg,void* userdata), void* userdata); extern gboolean process_stat_cmd_arg(char *optarg); extern void list_stat_cmd_args(void); extern void start_requested_stats(void); diff --git a/gtk/ansi_a_stat.c b/gtk/ansi_a_stat.c index 52ec6deccd..033d283d5f 100644 --- a/gtk/ansi_a_stat.c +++ b/gtk/ansi_a_stat.c @@ -404,7 +404,7 @@ ansi_a_stat_gtk_bsmap_cb( static void ansi_a_stat_gtk_bsmap_init( - const char *optarg _U_) + const char *optarg _U_, void* userdata _U_) { ansi_a_stat_gtk_bsmap_cb(NULL, NULL); } @@ -451,7 +451,8 @@ ansi_a_stat_gtk_dtap_cb( static void ansi_a_stat_gtk_dtap_init( - const char *optarg _U_) + const char *optarg _U_, + void* userdata _U_) { ansi_a_stat_gtk_dtap_cb(NULL, NULL); } @@ -481,9 +482,9 @@ register_tap_listener_gtkansi_a_stat(void) register_stat_menu_item("ANSI/A-Interface BSMAP", REGISTER_STAT_GROUP_TELEPHONY, ansi_a_stat_gtk_bsmap_cb, NULL, NULL ,NULL); - register_stat_cmd_arg("ansi_a,bsmap", ansi_a_stat_gtk_bsmap_init); + register_stat_cmd_arg("ansi_a,bsmap", ansi_a_stat_gtk_bsmap_init,NULL); register_stat_menu_item("ANSI/A-Interface DTAP", REGISTER_STAT_GROUP_TELEPHONY, ansi_a_stat_gtk_dtap_cb, NULL, NULL ,NULL); - register_stat_cmd_arg("ansi_a,dtap", ansi_a_stat_gtk_dtap_init); + register_stat_cmd_arg("ansi_a,dtap", ansi_a_stat_gtk_dtap_init, NULL); } diff --git a/gtk/ansi_map_stat.c b/gtk/ansi_map_stat.c index 529d2caa7e..fd53825158 100644 --- a/gtk/ansi_map_stat.c +++ b/gtk/ansi_map_stat.c @@ -408,7 +408,8 @@ ansi_map_stat_gtk_cb( static void ansi_map_stat_gtk_init( - const char *optarg _U_) + const char *optarg _U_, + void* userdata _U_ ) { ansi_map_stat_gtk_cb(NULL, NULL); } @@ -438,5 +439,5 @@ register_tap_listener_gtkansi_map_stat(void) register_stat_menu_item("ANSI/MAP Operation", REGISTER_STAT_GROUP_TELEPHONY, ansi_map_stat_gtk_cb, NULL, NULL, NULL); - register_stat_cmd_arg("ansi_map", ansi_map_stat_gtk_init); + register_stat_cmd_arg("ansi_map", ansi_map_stat_gtk_init,NULL); } diff --git a/gtk/conversations_eth.c b/gtk/conversations_eth.c index 1d2d0f093a..1caa95854f 100644 --- a/gtk/conversations_eth.c +++ b/gtk/conversations_eth.c @@ -55,7 +55,7 @@ eth_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_, static void -eth_conversation_init(const char *optarg) +eth_conversation_init(const char *optarg, void* userdata _U_) { const char *filter=NULL; @@ -73,14 +73,14 @@ eth_conversation_init(const char *optarg) static void eth_endpoints_cb(GtkWidget *w _U_, gpointer d _U_) { - eth_conversation_init("conv,eth"); + eth_conversation_init("conv,eth",NULL); } void register_tap_listener_eth_conversation(void) { - register_stat_cmd_arg("conv,eth", eth_conversation_init); + register_stat_cmd_arg("conv,eth", eth_conversation_init,NULL); register_stat_menu_item("Ethernet", REGISTER_STAT_GROUP_CONVERSATION_LIST, eth_endpoints_cb, NULL, NULL, NULL); diff --git a/gtk/conversations_fc.c b/gtk/conversations_fc.c index 45f1c89e6a..b5bd0715da 100644 --- a/gtk/conversations_fc.c +++ b/gtk/conversations_fc.c @@ -55,7 +55,7 @@ fc_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_, c static void -fc_conversation_init(const char *optarg) +fc_conversation_init(const char *optarg, void* userdata _U_) { const char *filter=NULL; @@ -73,14 +73,14 @@ fc_conversation_init(const char *optarg) static void fc_endpoints_cb(GtkWidget *w _U_, gpointer d _U_) { - fc_conversation_init("conv,fc"); + fc_conversation_init("conv,fc",NULL); } void register_tap_listener_fc_conversation(void) { - register_stat_cmd_arg("conv,fc", fc_conversation_init); + register_stat_cmd_arg("conv,fc", fc_conversation_init, NULL); register_stat_menu_item("Fibre Channel", REGISTER_STAT_GROUP_CONVERSATION_LIST, fc_endpoints_cb, NULL, NULL, NULL); diff --git a/gtk/conversations_fddi.c b/gtk/conversations_fddi.c index 7687b79ed5..320a625e69 100644 --- a/gtk/conversations_fddi.c +++ b/gtk/conversations_fddi.c @@ -55,7 +55,7 @@ fddi_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_, static void -fddi_conversation_init(const char *optarg) +fddi_conversation_init(const char *optarg, void* userdata _U_ ) { const char *filter=NULL; @@ -73,14 +73,14 @@ fddi_conversation_init(const char *optarg) static void fddi_endpoints_cb(GtkWidget *w _U_, gpointer d _U_) { - fddi_conversation_init("conv,fddi"); + fddi_conversation_init("conv,fddi",NULL); } void register_tap_listener_fddi_conversation(void) { - register_stat_cmd_arg("conv,fddi", fddi_conversation_init); + register_stat_cmd_arg("conv,fddi", fddi_conversation_init,NULL); register_stat_menu_item("FDDI", REGISTER_STAT_GROUP_CONVERSATION_LIST, fddi_endpoints_cb, NULL, NULL, NULL); diff --git a/gtk/conversations_ip.c b/gtk/conversations_ip.c index 119ca4897d..dd46f5cd48 100644 --- a/gtk/conversations_ip.c +++ b/gtk/conversations_ip.c @@ -53,7 +53,7 @@ ip_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_, c } static void -ip_conversation_init(const char *optarg) +ip_conversation_init(const char *optarg, void* userdata _U_) { const char *filter=NULL; @@ -71,14 +71,14 @@ ip_conversation_init(const char *optarg) static void ip_endpoints_cb(GtkWidget *w _U_, gpointer d _U_) { - ip_conversation_init("conv,ip"); + ip_conversation_init("conv,ip",NULL); } void register_tap_listener_ip_conversation(void) { - register_stat_cmd_arg("conv,ip", ip_conversation_init); + register_stat_cmd_arg("conv,ip", ip_conversation_init,NULL); register_stat_menu_item("IPv4", REGISTER_STAT_GROUP_CONVERSATION_LIST, ip_endpoints_cb, NULL, NULL, NULL); diff --git a/gtk/conversations_ipx.c b/gtk/conversations_ipx.c index 87b37f58d0..83444cec9c 100644 --- a/gtk/conversations_ipx.c +++ b/gtk/conversations_ipx.c @@ -55,7 +55,7 @@ ipx_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_, static void -ipx_conversation_init(const char *optarg) +ipx_conversation_init(const char *optarg, void* userdata _U_) { const char *filter=NULL; @@ -73,14 +73,14 @@ ipx_conversation_init(const char *optarg) static void ipx_endpoints_cb(GtkWidget *w _U_, gpointer d _U_) { - ipx_conversation_init("conv,ipx"); + ipx_conversation_init("conv,ipx",NULL); } void register_tap_listener_ipx_conversation(void) { - register_stat_cmd_arg("conv,ipx", ipx_conversation_init); + register_stat_cmd_arg("conv,ipx", ipx_conversation_init,NULL); register_stat_menu_item("IPX", REGISTER_STAT_GROUP_CONVERSATION_LIST, ipx_endpoints_cb, NULL, NULL, NULL); diff --git a/gtk/conversations_jxta.c b/gtk/conversations_jxta.c index 3ec61b694c..4ff3b380bf 100644 --- a/gtk/conversations_jxta.c +++ b/gtk/conversations_jxta.c @@ -44,7 +44,7 @@ static int -jxta_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_, const void *vip) +jxta_conversation_packet(void *pct, packet_info *pinfo _U_, epan_dissect_t *edt _U_, const void *vip) { const jxta_tap_header *jxtahdr = (const jxta_tap_header *) vip; @@ -63,7 +63,7 @@ jxta_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_, } static void -jxta_conversation_init(const char *optarg) +jxta_conversation_init(const char *optarg, void* userdata _U_) { const char *filter=NULL; @@ -81,14 +81,14 @@ jxta_conversation_init(const char *optarg) static void jxta_conversation_cb(GtkWidget *w _U_, gpointer d _U_) { - jxta_conversation_init("conv,jxta"); + jxta_conversation_init("conv,jxta",NULL); } void register_tap_listener_jxta_conversation(void) { - register_stat_cmd_arg("conv,jxta", jxta_conversation_init); + register_stat_cmd_arg("conv,jxta", jxta_conversation_init,NULL); register_stat_menu_item("JXTA", REGISTER_STAT_GROUP_CONVERSATION_LIST, jxta_conversation_cb, NULL, NULL, NULL); diff --git a/gtk/conversations_ncp.c b/gtk/conversations_ncp.c index dc933a1af2..456289ece3 100644 --- a/gtk/conversations_ncp.c +++ b/gtk/conversations_ncp.c @@ -56,7 +56,7 @@ ncp_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_, } static void -ncp_conversation_init(const char *optarg) +ncp_conversation_init(const char *optarg, void* userdata _U_) { const char *filter=NULL; @@ -73,14 +73,14 @@ ncp_conversation_init(const char *optarg) static void ncp_endpoints_cb(GtkWidget *w _U_, gpointer d _U_) { - ncp_conversation_init("conv,ncp"); + ncp_conversation_init("conv,ncp",NULL); } void register_tap_listener_ncp_conversation(void) { - register_stat_cmd_arg("conv,ncp", ncp_conversation_init); + register_stat_cmd_arg("conv,ncp", ncp_conversation_init,NULL); register_stat_menu_item("NCP", REGISTER_STAT_GROUP_CONVERSATION_LIST, ncp_endpoints_cb, NULL, NULL, NULL); diff --git a/gtk/conversations_rsvp.c b/gtk/conversations_rsvp.c index 664724a97a..cef4d41a00 100644 --- a/gtk/conversations_rsvp.c +++ b/gtk/conversations_rsvp.c @@ -53,7 +53,7 @@ rsvp_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_, } static void -rsvp_conversation_init(const char *optarg) +rsvp_conversation_init(const char *optarg, void* userdata _U_) { const char *filter=NULL; @@ -72,14 +72,14 @@ rsvp_conversation_init(const char *optarg) static void rsvp_endpoints_cb(GtkWidget *w _U_, gpointer d _U_) { - rsvp_conversation_init("conv,rsvp"); + rsvp_conversation_init("conv,rsvp",NULL); } void register_tap_listener_rsvp_conversation(void) { - register_stat_cmd_arg("conv,rsvp", rsvp_conversation_init); + register_stat_cmd_arg("conv,rsvp", rsvp_conversation_init,NULL); register_stat_menu_item("RSVP", REGISTER_STAT_GROUP_CONVERSATION_LIST, rsvp_endpoints_cb, NULL, NULL, NULL); diff --git a/gtk/conversations_sctp.c b/gtk/conversations_sctp.c index 69427710dc..f9c859cbff 100644 --- a/gtk/conversations_sctp.c +++ b/gtk/conversations_sctp.c @@ -64,7 +64,7 @@ sctp_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_, static void -sctp_conversation_init(const char *optarg) +sctp_conversation_init(const char *optarg, void* userdata _U_) { const char *filter=NULL; @@ -82,14 +82,14 @@ sctp_conversation_init(const char *optarg) static void sctp_conversation_cb(GtkWidget *w _U_, gpointer d _U_) { - sctp_conversation_init("conv,sctp"); + sctp_conversation_init("conv,sctp",NULL); } void register_tap_listener_sctp_conversation(void) { - register_stat_cmd_arg("conv,sctp", sctp_conversation_init); + register_stat_cmd_arg("conv,sctp", sctp_conversation_init,NULL); register_stat_menu_item("SCTP", REGISTER_STAT_GROUP_CONVERSATION_LIST, sctp_conversation_cb, NULL, NULL, NULL); diff --git a/gtk/conversations_tcpip.c b/gtk/conversations_tcpip.c index f3a099f787..67f932968f 100644 --- a/gtk/conversations_tcpip.c +++ b/gtk/conversations_tcpip.c @@ -55,7 +55,7 @@ tcpip_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_ static void -tcpip_conversation_init(const char *optarg) +tcpip_conversation_init(const char *optarg, void* userdata _U_) { const char *filter=NULL; @@ -73,14 +73,14 @@ tcpip_conversation_init(const char *optarg) static void tcpip_conversation_cb(GtkWidget *w _U_, gpointer d _U_) { - tcpip_conversation_init("conv,tcp"); + tcpip_conversation_init("conv,tcp",NULL); } void register_tap_listener_tcpip_conversation(void) { - register_stat_cmd_arg("conv,tcp", tcpip_conversation_init); + register_stat_cmd_arg("conv,tcp", tcpip_conversation_init,NULL); register_stat_menu_item("TCP (IPv4 & IPv6)", REGISTER_STAT_GROUP_CONVERSATION_LIST, tcpip_conversation_cb, NULL, NULL, NULL); diff --git a/gtk/conversations_tr.c b/gtk/conversations_tr.c index 38a08de96b..f678ae50bd 100644 --- a/gtk/conversations_tr.c +++ b/gtk/conversations_tr.c @@ -55,7 +55,7 @@ tr_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_, c static void -tr_conversation_init(const char *optarg) +tr_conversation_init(const char *optarg, void* userdata _U_) { const char *filter=NULL; @@ -73,14 +73,14 @@ tr_conversation_init(const char *optarg) static void tr_conversation_cb(GtkWidget *w _U_, gpointer d _U_) { - tr_conversation_init("conv,tr"); + tr_conversation_init("conv,tr",NULL); } void register_tap_listener_tr_conversation(void) { - register_stat_cmd_arg("conv,tr", tr_conversation_init); + register_stat_cmd_arg("conv,tr", tr_conversation_init, NULL); register_stat_menu_item("Token Ring", REGISTER_STAT_GROUP_CONVERSATION_LIST, tr_conversation_cb, NULL, NULL, NULL); diff --git a/gtk/conversations_udpip.c b/gtk/conversations_udpip.c index da05d77932..345ef6fcde 100644 --- a/gtk/conversations_udpip.c +++ b/gtk/conversations_udpip.c @@ -55,7 +55,7 @@ udpip_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_ static void -udpip_conversation_init(const char *optarg) +udpip_conversation_init(const char *optarg, void* userdata _U_) { const char *filter=NULL; @@ -73,14 +73,14 @@ udpip_conversation_init(const char *optarg) static void udpip_conversation_cb(GtkWidget *w _U_, gpointer d _U_) { - udpip_conversation_init("conv,udp"); + udpip_conversation_init("conv,udp",NULL); } void register_tap_listener_udpip_conversation(void) { - register_stat_cmd_arg("conv,udp", udpip_conversation_init); + register_stat_cmd_arg("conv,udp", udpip_conversation_init, NULL); register_stat_menu_item("UDP (IPv4 & IPv6)", REGISTER_STAT_GROUP_CONVERSATION_LIST, udpip_conversation_cb, NULL, NULL, NULL); diff --git a/gtk/conversations_wlan.c b/gtk/conversations_wlan.c index 9b7e04cbbb..8d5a2a62c6 100644 --- a/gtk/conversations_wlan.c +++ b/gtk/conversations_wlan.c @@ -55,7 +55,7 @@ wlan_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_, static void -wlan_conversation_init(const char *optarg) +wlan_conversation_init(const char *optarg, void* userdata _U_) { const char *filter=NULL; @@ -73,14 +73,14 @@ wlan_conversation_init(const char *optarg) static void wlan_endpoints_cb(GtkWidget *w _U_, gpointer d _U_) { - wlan_conversation_init("conv,wlan"); + wlan_conversation_init("conv,wlan",NULL); } void register_tap_listener_wlan_conversation(void) { - register_stat_cmd_arg("conv,wlan", wlan_conversation_init); + register_stat_cmd_arg("conv,wlan", wlan_conversation_init,NULL); register_stat_menu_item("WLAN", REGISTER_STAT_GROUP_CONVERSATION_LIST, wlan_endpoints_cb, NULL, NULL, NULL); diff --git a/gtk/dcerpc_stat.c b/gtk/dcerpc_stat.c index 1116690057..9764ac9f1f 100644 --- a/gtk/dcerpc_stat.c +++ b/gtk/dcerpc_stat.c @@ -186,7 +186,7 @@ win_destroy_cb(GtkWindow *win _U_, gpointer data) /* When called, this function will create a new instance of gtk-dcerpcstat. */ static void -gtk_dcerpcstat_init(const char *optarg) +gtk_dcerpcstat_init(const char *optarg, void* userdata _U_) { rpcstat_t *rs; guint32 i, max_procs; @@ -371,7 +371,7 @@ dcerpcstat_start_button_clicked(GtkWidget *item _U_, gpointer data _U_) g_string_sprintfa(str, ",%s", filter); } - gtk_dcerpcstat_init(str->str); + gtk_dcerpcstat_init(str->str,NULL); g_string_free(str, TRUE); } @@ -678,7 +678,7 @@ gtk_dcerpcstat_cb(GtkWidget *w _U_, gpointer d _U_) void register_tap_listener_gtkdcerpcstat(void) { - register_stat_cmd_arg("dcerpc,srt,", gtk_dcerpcstat_init); + register_stat_cmd_arg("dcerpc,srt,", gtk_dcerpcstat_init,NULL); register_stat_menu_item("DCE-RPC...", REGISTER_STAT_GROUP_RESPONSE_TIME, gtk_dcerpcstat_cb, NULL, NULL, NULL); diff --git a/gtk/expert_comp_dlg.c b/gtk/expert_comp_dlg.c index 7693298f11..75d84fb517 100644 --- a/gtk/expert_comp_dlg.c +++ b/gtk/expert_comp_dlg.c @@ -154,7 +154,7 @@ win_destroy_cb(GtkWindow *win _U_, gpointer data) } static void -expert_comp_init(const char *optarg) +expert_comp_init(const char *optarg, void* userdata _U_) { expert_comp_dlg_t *ss; const char *filter=NULL; @@ -241,13 +241,13 @@ expert_comp_init(const char *optarg) static void expert_comp_dlg_cb(GtkWidget *w _U_, gpointer d _U_) { - expert_comp_init(""); + expert_comp_init("", NULL); } void register_tap_listener_expert_comp(void) { - register_stat_cmd_arg("expert_comp", expert_comp_init); + register_stat_cmd_arg("expert_comp", expert_comp_init,NULL); register_stat_menu_item("Expert Info _Composite", REGISTER_ANALYZE_GROUP_NONE, expert_comp_dlg_cb, NULL, NULL, NULL); } diff --git a/gtk/expert_dlg.c b/gtk/expert_dlg.c index 7ad0765efa..85f2ed598c 100644 --- a/gtk/expert_dlg.c +++ b/gtk/expert_dlg.c @@ -475,7 +475,7 @@ expert_dlg_severity_cb(GtkWidget *w, gpointer data) static void -expert_dlg_init(const char *optarg) +expert_dlg_init(const char *optarg, void* userdata _U_) { expert_tapdata_t * etd; const char *filter=NULL; @@ -583,7 +583,7 @@ expert_dlg_init(const char *optarg) static void expert_dlg_cb(GtkWidget *w _U_, gpointer d _U_) { - expert_dlg_init(""); + expert_dlg_init("", NULL); } @@ -592,7 +592,7 @@ expert_dlg_cb(GtkWidget *w _U_, gpointer d _U_) void register_tap_listener_expert(void) { - register_stat_cmd_arg("expert", expert_dlg_init); + register_stat_cmd_arg("expert", expert_dlg_init,NULL); register_stat_menu_item("E_xpert Info", REGISTER_ANALYZE_GROUP_NONE, expert_dlg_cb, NULL, NULL, NULL); diff --git a/gtk/flow_graph.c b/gtk/flow_graph.c index b43683a17d..f99820f4f4 100644 --- a/gtk/flow_graph.c +++ b/gtk/flow_graph.c @@ -1,5 +1,5 @@ /* flow_graph.c - * $Id:$ + * $Id$ * Allows to display a flow graph of the currently displayed packets * * Copyright 2004, Ericsson , Spain @@ -628,7 +628,7 @@ static void flow_graph_dlg_create (void) /* init function for tap */ static void -flow_graph_init_tap(const char *dummy _U_) +flow_graph_init_tap(const char *dummy _U_, void* userdata _U_) { /* initialize graph items store */ @@ -653,14 +653,14 @@ flow_graph_init_tap(const char *dummy _U_) /* entry point when called via the GTK menu */ static void flow_graph_launch(GtkWidget *w _U_, gpointer data _U_) { - flow_graph_init_tap(""); + flow_graph_init_tap("",NULL); } /****************************************************************************/ void register_tap_listener_flow_graph(void) { - register_stat_cmd_arg("flow_graph",flow_graph_init_tap); + register_stat_cmd_arg("flow_graph",flow_graph_init_tap,NULL); register_stat_menu_item("Flo_w Graph...", REGISTER_STAT_GROUP_NONE, flow_graph_launch, NULL, NULL, NULL); diff --git a/gtk/funnel_stat.c b/gtk/funnel_stat.c index 78d86d0e6a..e14c15d058 100644 --- a/gtk/funnel_stat.c +++ b/gtk/funnel_stat.c @@ -269,12 +269,13 @@ static void text_window_set_text(funnel_text_window_t* tw, const gchar* text) static void text_window_prepend(funnel_text_window_t* tw, const char *str _U_) { if (! tw->win) return; - + /* XXX todo */ } static const gchar* text_window_get_text(funnel_text_window_t* tw) { if (! tw->win) return ""; + /* XXX todo */ return ""; } @@ -404,6 +405,16 @@ static void funnel_new_dialog(const gchar* title, gtk_widget_show(win); } + +/* XXX: finish this */ +static void funnel_logger(const gchar *log_domain _U_, + GLogLevelFlags log_level _U_, + const gchar *message, + gpointer user_data _U_) { + fputs(message,stderr); +} + + static const funnel_ops_t funnel_ops = { new_text_window, text_window_set_text, @@ -414,7 +425,8 @@ static const funnel_ops_t funnel_ops = { text_window_set_close_cb, text_window_destroy, /*...,*/ - funnel_new_dialog + funnel_new_dialog, + funnel_logger }; diff --git a/gtk/graph_analysis.c b/gtk/graph_analysis.c index ff4716a56f..02a16ca80f 100644 --- a/gtk/graph_analysis.c +++ b/gtk/graph_analysis.c @@ -922,6 +922,7 @@ static void dialog_graph_draw(graph_analysis_data_t* user_data) top_y_border+current_item*ITEM_HEIGHT+ITEM_HEIGHT/2+label_height/4, label_string); #else + /* pango_layout_set_text(small_layout, label_string, -1); pango_layout_get_pixel_size(small_layout, &label_width, &label_height); if (GDK_IS_DRAWABLE(user_data->dlg.pixmap_comments)) { @@ -931,6 +932,7 @@ static void dialog_graph_draw(graph_analysis_data_t* user_data) top_y_border+current_item*ITEM_HEIGHT+ITEM_HEIGHT/2-label_height/2, small_layout); } + */ #endif /* select colors */ if ( current_item+first_item == user_data->dlg.selected_item ){ @@ -973,8 +975,12 @@ static void dialog_graph_draw(graph_analysis_data_t* user_data) label_width=gdk_string_width(big_font, label_string); label_height=gdk_string_height(big_font, label_string); #else + /* pango_layout_set_text(big_layout, label_string, -1); pango_layout_get_pixel_size(big_layout, &label_width, &label_height); + */ + + label_width = label_height = 0; #endif if (start_arrowdlg.pixmap)) { gdk_draw_layout(user_data->dlg.pixmap, frame_fg_color, @@ -1005,6 +1012,7 @@ static void dialog_graph_draw(graph_analysis_data_t* user_data) top_y_border+current_item*ITEM_HEIGHT+ITEM_HEIGHT/2-label_height/2-3, big_layout); } + */ #endif @@ -1014,8 +1022,10 @@ static void dialog_graph_draw(graph_analysis_data_t* user_data) label_width=gdk_string_width(small_font, label_string); label_height=gdk_string_height(small_font, label_string); #else + /* pango_layout_set_text(small_layout, label_string, -1); pango_layout_get_pixel_size(small_layout, &label_width, &label_height); + */ #endif if (start_arrowdlg.pixmap)) { gdk_draw_layout(user_data->dlg.pixmap, div_line_color, @@ -1038,6 +1049,7 @@ static void dialog_graph_draw(graph_analysis_data_t* user_data) top_y_border+current_item*ITEM_HEIGHT+ITEM_HEIGHT-2-label_height/2-2, small_layout); } + */ #endif /* draw the destination port number */ @@ -1046,8 +1058,10 @@ static void dialog_graph_draw(graph_analysis_data_t* user_data) label_width=gdk_string_width(small_font, label_string); label_height=gdk_string_height(small_font, label_string); #else + /* pango_layout_set_text(small_layout, label_string, -1); pango_layout_get_pixel_size(small_layout, &label_width, &label_height); + */ #endif if (start_arrowstr); + gtk_rpcstat_init(str->str,NULL); g_string_free(str, TRUE); } @@ -538,7 +538,7 @@ gtk_rpcstat_cb(GtkWidget *w _U_, gpointer d _U_) void register_tap_listener_gtkrpcstat(void) { - register_stat_cmd_arg("rpc,srt,", gtk_rpcstat_init); + register_stat_cmd_arg("rpc,srt,", gtk_rpcstat_init, NULL); register_stat_menu_item("ONC-RPC...", REGISTER_STAT_GROUP_RESPONSE_TIME, gtk_rpcstat_cb, NULL, NULL, NULL); diff --git a/gtk/rtp_analysis.c b/gtk/rtp_analysis.c index 966f50ef1b..0c0c0437fe 100644 --- a/gtk/rtp_analysis.c +++ b/gtk/rtp_analysis.c @@ -3874,7 +3874,7 @@ static void rtp_analysis_cb(GtkWidget *w _U_, gpointer data _U_) /****************************************************************************/ static void -rtp_analysis_init(const char *dummy _U_) +rtp_analysis_init(const char *dummy _U_,void* userdata _U_) { rtp_analysis_cb(NULL, NULL); } @@ -3883,7 +3883,7 @@ rtp_analysis_init(const char *dummy _U_) void register_tap_listener_rtp_analysis(void) { - register_stat_cmd_arg("rtp", rtp_analysis_init); + register_stat_cmd_arg("rtp", rtp_analysis_init,NULL); register_stat_menu_item("RTP/Stream Analysis...", REGISTER_STAT_GROUP_TELEPHONY, rtp_analysis_cb, NULL, NULL, NULL); diff --git a/gtk/t38_analysis.c b/gtk/t38_analysis.c index bff645b8c9..fe5589fb26 100644 --- a/gtk/t38_analysis.c +++ b/gtk/t38_analysis.c @@ -74,7 +74,7 @@ static void t38_analysis_cb(GtkWidget *w _U_, gpointer data _U_) /****************************************************************************/ static void -t38_analysis_init(const char *dummy _U_) +t38_analysis_init(const char *dummy _U_, void* userdata _U_) { t38_analysis_cb(NULL, NULL); } @@ -83,7 +83,7 @@ t38_analysis_init(const char *dummy _U_) void register_tap_listener_t38_analysis(void) { - register_stat_cmd_arg("t38", t38_analysis_init); + register_stat_cmd_arg("t38", t38_analysis_init,NULL); register_stat_menu_item("Fax T38 Analysis...", REGISTER_STAT_GROUP_TELEPHONY, diff --git a/gtk/tap_dfilter_dlg.c b/gtk/tap_dfilter_dlg.c index 8781b29cc0..6134c6cef2 100644 --- a/gtk/tap_dfilter_dlg.c +++ b/gtk/tap_dfilter_dlg.c @@ -75,7 +75,7 @@ register_dfilter_stat(tap_dfilter_dlg *info, const char *name, { char *full_name; - register_stat_cmd_arg(info->init_string, info->tap_init_cb); + register_stat_cmd_arg(info->init_string, info->tap_init_cb, NULL); /* * This menu item will pop up a dialog box, so append "..." @@ -123,7 +123,7 @@ tap_dfilter_dlg_start_button_clicked(GtkWidget *item _U_, gpointer dialog_data) } else { g_snprintf(str, sizeof(str), "%s,%s", dlg_data->cont.init_string, filter); } - (dlg_data->cont.tap_init_cb)(str); + (dlg_data->cont.tap_init_cb)(str,NULL); } diff --git a/gtk/voip_calls_dlg.c b/gtk/voip_calls_dlg.c index 8adef12f08..87ba447eed 100644 --- a/gtk/voip_calls_dlg.c +++ b/gtk/voip_calls_dlg.c @@ -746,7 +746,7 @@ void voip_calls_dlg_reset(void *ptr _U_) /* init function for tap */ /* Made extern only for "Fax T38 Analysis..." */ void -voip_calls_init_tap(const char *dummy _U_) +voip_calls_init_tap(const char *dummy _U_, void* userdata _U_) { gint c; gchar *data[NUM_COLS]; @@ -808,14 +808,14 @@ voip_calls_init_tap(const char *dummy _U_) /* entry point when called via the GTK menu */ static void voip_calls_launch(GtkWidget *w _U_, gpointer data _U_) { - voip_calls_init_tap(""); + voip_calls_init_tap("",NULL); } /****************************************************************************/ void register_tap_listener_voip_calls_dlg(void) { - register_stat_cmd_arg("voip,calls",voip_calls_init_tap); + register_stat_cmd_arg("voip,calls",voip_calls_init_tap,NULL); register_stat_menu_item("VoIP Calls", REGISTER_STAT_GROUP_TELEPHONY, voip_calls_launch, NULL, NULL, NULL); diff --git a/tap-afpstat.c b/tap-afpstat.c index 93e529e0de..7001081a04 100644 --- a/tap-afpstat.c +++ b/tap-afpstat.c @@ -118,7 +118,7 @@ afpstat_draw(void *pss) static void -afpstat_init(const char *optarg) +afpstat_init(const char *optarg, void* userdata _U_) { afpstat_t *ss; guint32 i; @@ -167,5 +167,5 @@ afpstat_init(const char *optarg) void register_tap_listener_afpstat(void) { - register_stat_cmd_arg("afp,rtt", afpstat_init); + register_stat_cmd_arg("afp,rtt", afpstat_init,NULL); } diff --git a/tap-ansi_astat.c b/tap-ansi_astat.c index 8b285eaa70..0a045e7bc4 100644 --- a/tap-ansi_astat.c +++ b/tap-ansi_astat.c @@ -135,7 +135,7 @@ ansi_a_stat_draw( static void -ansi_a_stat_init(const char *optarg _U_) +ansi_a_stat_init(const char *optarg _U_, void* userdata _U_) { ansi_a_stat_t *stat_p; GString *err_p; @@ -163,5 +163,5 @@ ansi_a_stat_init(const char *optarg _U_) void register_tap_listener_ansi_astat(void) { - register_stat_cmd_arg("ansi_a,", ansi_a_stat_init); + register_stat_cmd_arg("ansi_a,", ansi_a_stat_init,NULL); } diff --git a/tap-bootpstat.c b/tap-bootpstat.c index 10a3d11aac..e4092771ed 100644 --- a/tap-bootpstat.c +++ b/tap-bootpstat.c @@ -137,7 +137,7 @@ dhcpstat_draw(void *psp) /* When called, this function will create a new instance of tap-boopstat. */ static void -dhcpstat_init(const char *optarg) +dhcpstat_init(const char *optarg, void* userdata _U_) { dhcpstat_t *sp; const char *filter=NULL; @@ -182,6 +182,6 @@ dhcpstat_init(const char *optarg) void register_tap_listener_gtkdhcpstat(void) { - register_stat_cmd_arg("bootp,stat,", dhcpstat_init); + register_stat_cmd_arg("bootp,stat,", dhcpstat_init,NULL); } diff --git a/tap-dcerpcstat.c b/tap-dcerpcstat.c index 32c0cab777..1700317b13 100644 --- a/tap-dcerpcstat.c +++ b/tap-dcerpcstat.c @@ -182,7 +182,7 @@ dcerpcstat_draw(void *prs) static void -dcerpcstat_init(const char *optarg) +dcerpcstat_init(const char *optarg, void* userdata _U_) { rpcstat_t *rs; guint32 i, max_procs; @@ -301,5 +301,5 @@ dcerpcstat_init(const char *optarg) void register_tap_listener_dcerpcstat(void) { - register_stat_cmd_arg("dcerpc,rtt,", dcerpcstat_init); + register_stat_cmd_arg("dcerpc,rtt,", dcerpcstat_init,NULL); } diff --git a/tap-gsm_astat.c b/tap-gsm_astat.c index 3d90d7c45d..f461e0d5f5 100644 --- a/tap-gsm_astat.c +++ b/tap-gsm_astat.c @@ -270,7 +270,7 @@ gsm_a_stat_draw( static void -gsm_a_stat_init(const char *optarg _U_) +gsm_a_stat_init(const char *optarg _U_,void* userdata _U_) { gsm_a_stat_t *stat_p; GString *err_p; @@ -298,5 +298,5 @@ gsm_a_stat_init(const char *optarg _U_) void register_tap_listener_gsm_astat(void) { - register_stat_cmd_arg("gsm_a,", gsm_a_stat_init); + register_stat_cmd_arg("gsm_a,", gsm_a_stat_init,NULL); } diff --git a/tap-h225counter.c b/tap-h225counter.c index 694cffae8a..c31e6fc349 100644 --- a/tap-h225counter.c +++ b/tap-h225counter.c @@ -388,7 +388,7 @@ h225counter_draw(void *phs) static void -h225counter_init(const char *optarg) +h225counter_init(const char *optarg, void* userdata _U_) { h225counter_t *hs; const char *filter=NULL; @@ -423,5 +423,5 @@ h225counter_init(const char *optarg) void register_tap_listener_h225counter(void) { - register_stat_cmd_arg("h225,counter", h225counter_init); + register_stat_cmd_arg("h225,counter", h225counter_init,NULL); } diff --git a/tap-h225rassrt.c b/tap-h225rassrt.c index 937edc1480..0ecb339637 100644 --- a/tap-h225rassrt.c +++ b/tap-h225rassrt.c @@ -212,7 +212,7 @@ h225rassrt_draw(void *phs) static void -h225rassrt_init(const char *optarg) +h225rassrt_init(const char *optarg, void* userdata _U_) { h225rassrt_t *hs; const char *filter=NULL; @@ -247,5 +247,5 @@ h225rassrt_init(const char *optarg) void register_tap_listener_h225rassrt(void) { - register_stat_cmd_arg("h225,srt", h225rassrt_init); + register_stat_cmd_arg("h225,srt", h225rassrt_init,NULL); } diff --git a/tap-httpstat.c b/tap-httpstat.c index e957588b0d..34a266a549 100644 --- a/tap-httpstat.c +++ b/tap-httpstat.c @@ -281,7 +281,7 @@ httpstat_draw(void *psp ) /* When called, this function will create a new instance of gtk_httpstat. */ static void -gtk_httpstat_init(const char *optarg) +gtk_httpstat_init(const char *optarg,void* userdata _U_) { httpstat_t *sp; const char *filter=NULL; @@ -326,5 +326,5 @@ gtk_httpstat_init(const char *optarg) void register_tap_listener_gtkhttpstat(void) { - register_stat_cmd_arg("http,stat,", gtk_httpstat_init); + register_stat_cmd_arg("http,stat,", gtk_httpstat_init,NULL); } diff --git a/tap-iostat.c b/tap-iostat.c index 1fd567a60c..033812144d 100644 --- a/tap-iostat.c +++ b/tap-iostat.c @@ -589,7 +589,7 @@ CALC_TYPE_AVG 5 } void -iostat_init(const char *optarg) +iostat_init(const char *optarg, void* userdata _U_) { float interval_float; gint32 interval; @@ -665,5 +665,5 @@ iostat_init(const char *optarg) void register_tap_listener_iostat(void) { - register_stat_cmd_arg("io,stat,", iostat_init); + register_stat_cmd_arg("io,stat,", iostat_init, NULL); } diff --git a/tap-iousers.c b/tap-iousers.c index 2ae1e96359..d7c779b981 100644 --- a/tap-iousers.c +++ b/tap-iousers.c @@ -579,7 +579,7 @@ iousers_draw(void *arg) } void -iousers_init(const char *optarg) +iousers_init(const char *optarg, void* userdata _U_) { const char *filter=NULL; const char *tap_type, *tap_type_name; @@ -710,5 +710,5 @@ iousers_init(const char *optarg) void register_tap_listener_iousers(void) { - register_stat_cmd_arg("conv,", iousers_init); + register_stat_cmd_arg("conv,", iousers_init, NULL); } diff --git a/tap-mgcpstat.c b/tap-mgcpstat.c index 255970b7d4..8ffe2c4fc6 100644 --- a/tap-mgcpstat.c +++ b/tap-mgcpstat.c @@ -177,7 +177,7 @@ mgcpstat_draw(void *pms) static void -mgcpstat_init(const char *optarg) +mgcpstat_init(const char *optarg, void* userdata _U_) { mgcpstat_t *ms; int i; @@ -230,7 +230,7 @@ register_tap_listener_mgcpstat(void) { /* We don't register this tap, if we don't have the mgcp plugin loaded.*/ if (find_tap_id("mgcp")) { - register_stat_cmd_arg("mgcp,rtd", mgcpstat_init); + register_stat_cmd_arg("mgcp,rtd", mgcpstat_init, NULL); } } diff --git a/tap-protocolinfo.c b/tap-protocolinfo.c index 909ac8c240..05837b91de 100644 --- a/tap-protocolinfo.c +++ b/tap-protocolinfo.c @@ -87,7 +87,7 @@ protocolinfo_packet(void *prs, packet_info *pinfo, epan_dissect_t *edt, const vo static void -protocolinfo_init(const char *optarg) +protocolinfo_init(const char *optarg, void* userdata _U_) { pci_t *rs; const char *field=NULL; @@ -142,6 +142,6 @@ protocolinfo_init(const char *optarg) void register_tap_listener_protocolinfo(void) { - register_stat_cmd_arg("proto,colinfo,", protocolinfo_init); + register_stat_cmd_arg("proto,colinfo,", protocolinfo_init,NULL); } diff --git a/tap-protohierstat.c b/tap-protohierstat.c index 7b79a70a8b..ac67765025 100644 --- a/tap-protohierstat.c +++ b/tap-protohierstat.c @@ -173,7 +173,7 @@ protohierstat_draw(void *prs) static void -protohierstat_init(const char *optarg) +protohierstat_init(const char *optarg, void* userdata _U_) { phs_t *rs; int pos=0; @@ -223,6 +223,6 @@ protohierstat_init(const char *optarg) void register_tap_listener_protohierstat(void) { - register_stat_cmd_arg("io,phs", protohierstat_init); + register_stat_cmd_arg("io,phs", protohierstat_init, NULL); } diff --git a/tap-rpcprogs.c b/tap-rpcprogs.c index 533db827fa..1bf6c72c45 100644 --- a/tap-rpcprogs.c +++ b/tap-rpcprogs.c @@ -216,7 +216,7 @@ rpcprogs_draw(void *dummy _U_) static void -rpcprogs_init(const char *optarg _U_) +rpcprogs_init(const char *optarg _U_, void* userdata _U_) { GString *error_string; @@ -238,7 +238,7 @@ rpcprogs_init(const char *optarg _U_) void register_tap_listener_rpcprogs(void) { - register_stat_cmd_arg("rpc,programs", rpcprogs_init); + register_stat_cmd_arg("rpc,programs", rpcprogs_init, NULL); } diff --git a/tap-rpcstat.c b/tap-rpcstat.c index b443116bb2..cb60c243e3 100644 --- a/tap-rpcstat.c +++ b/tap-rpcstat.c @@ -273,7 +273,7 @@ rpcstat_find_procs(gpointer *key, gpointer *value _U_, gpointer *user_data _U_) * new instance for the rpc tap. */ static void -rpcstat_init(const char *optarg) +rpcstat_init(const char *optarg, void* userdata _U_) { rpcstat_t *rs; guint32 i; @@ -356,6 +356,6 @@ rpcstat_init(const char *optarg) void register_tap_listener_rpcstat(void) { - register_stat_cmd_arg("rpc,rtt,", rpcstat_init); + register_stat_cmd_arg("rpc,rtt,", rpcstat_init,NULL); } diff --git a/tap-sctpchunkstat.c b/tap-sctpchunkstat.c index c5b61fb68b..d27afa8391 100644 --- a/tap-sctpchunkstat.c +++ b/tap-sctpchunkstat.c @@ -220,7 +220,7 @@ sctpstat_draw(void *phs) static void -sctpstat_init(const char *optarg) +sctpstat_init(const char *optarg, void* userdata _U_) { sctpstat_t *hs; const char *filter=NULL; @@ -257,5 +257,5 @@ sctpstat_init(const char *optarg) void register_tap_listener_sctpstat(void) { - register_stat_cmd_arg("sctp,stat", sctpstat_init); + register_stat_cmd_arg("sctp,stat", sctpstat_init,NULL); } diff --git a/tap-sipstat.c b/tap-sipstat.c index be943031ff..8202224faf 100644 --- a/tap-sipstat.c +++ b/tap-sipstat.c @@ -345,7 +345,7 @@ sipstat_draw(void *psp ) } static void -sipstat_init(const char *optarg) +sipstat_init(const char *optarg, void* userdata _U_) { sipstat_t *sp; const char *filter=NULL; @@ -391,5 +391,5 @@ sipstat_init(const char *optarg) void register_tap_listener_sipstat(void) { - register_stat_cmd_arg("sip,stat", sipstat_init); + register_stat_cmd_arg("sip,stat", sipstat_init,NULL); } diff --git a/tap-smbsids.c b/tap-smbsids.c index cb601a7c19..43cfa0f431 100644 --- a/tap-smbsids.c +++ b/tap-smbsids.c @@ -69,7 +69,7 @@ smbsids_draw(void *pss _U_) static void -smbsids_init(const char *optarg _U_) +smbsids_init(const char *optarg _U_, void* userdata _U_) { GString *error_string; @@ -96,6 +96,6 @@ smbsids_init(const char *optarg _U_) void register_tap_listener_smbsids(void) { - register_stat_cmd_arg("smb,sids", smbsids_init); + register_stat_cmd_arg("smb,sids", smbsids_init,NULL); } diff --git a/tap-smbstat.c b/tap-smbstat.c index c8c6c88594..f4469427bf 100644 --- a/tap-smbstat.c +++ b/tap-smbstat.c @@ -206,7 +206,7 @@ smbstat_draw(void *pss) static void -smbstat_init(const char *optarg) +smbstat_init(const char *optarg,void* userdata _U_) { smbstat_t *ss; guint32 i; @@ -276,6 +276,6 @@ smbstat_init(const char *optarg) void register_tap_listener_smbstat(void) { - register_stat_cmd_arg("smb,rtt", smbstat_init); + register_stat_cmd_arg("smb,rtt", smbstat_init,NULL); } diff --git a/tap-stats_tree.c b/tap-stats_tree.c index c7996fd80d..c6e1aeccac 100644 --- a/tap-stats_tree.c +++ b/tap-stats_tree.c @@ -69,7 +69,7 @@ static void draw_stats_tree(void *psp) { } -static void init_stats_tree(const char *optarg) { +static void init_stats_tree(const char *optarg,void* userdata _U_) { guint8* abbr = stats_tree_get_abbr(optarg); GString *error_string; stats_tree_cfg *cfg = NULL; @@ -92,7 +92,7 @@ static void init_stats_tree(const char *optarg) { g_free(abbr); } else { - report_failure("could not obtain stats_tree abbr (%s) from optarg '%s'",abbr,optarg); + report_failure("could not obtain stats_tree abbr (%s) from grg '%s'",abbr,optarg); return; } @@ -118,7 +118,7 @@ void register_stats_tree_tap (gpointer k _U_, gpointer v, gpointer p _U_) { cfg->pr = g_malloc(sizeof(tree_cfg_pres)); cfg->pr->init_string = g_strdup_printf("%s,tree",cfg->abbr); - register_stat_cmd_arg(cfg->pr->init_string, init_stats_tree); + register_stat_cmd_arg(cfg->pr->init_string, init_stats_tree, NULL); } diff --git a/tap-wspstat.c b/tap-wspstat.c index 1e77dd4657..e3e76b56c6 100644 --- a/tap-wspstat.c +++ b/tap-wspstat.c @@ -214,7 +214,7 @@ wspstat_draw(void *psp) * new instance for the wsp tap. */ static void -wspstat_init(const char *optarg) +wspstat_init(const char *optarg, void* userdata _U_) { wspstat_t *sp; const char *filter=NULL; @@ -281,5 +281,5 @@ wspstat_init(const char *optarg) void register_tap_listener_wspstat(void) { - register_stat_cmd_arg("wsp,stat,", wspstat_init); + register_stat_cmd_arg("wsp,stat,", wspstat_init,NULL); } diff --git a/tap_dfilter_dlg.h b/tap_dfilter_dlg.h index 427502cd82..5946caa61b 100644 --- a/tap_dfilter_dlg.h +++ b/tap_dfilter_dlg.h @@ -58,7 +58,7 @@ typedef struct _tap_dfilter_dlg { const char *win_title; /* title */ const char *init_string; /* the string to call the tap without a filter via "-z" option */ - void (* tap_init_cb)(const char *); /* callback to init function of the tap */ + void (* tap_init_cb)(const char *,void*); /* callback to init function of the tap */ gint index; /* initiate this value always with "-1" */ } tap_dfilter_dlg; -- cgit v1.2.3