From 71217a80071adae12b53253e3025b2220e6c89f5 Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Sat, 1 Jan 2005 02:57:02 +0000 Subject: As we've made the tap_specific_data field of a tap_packet_t structure a const pointer (so that we don't get complaints when we make the tap-specific data argument to "tap_queue_packet()" a const pointer, allowing dissectors to hand const data to a tap without a complaint), we should make the tap per-packet function take a const pointer as an argument as well. Do so. In some taps, use _U_, or actually use the argument, rather than sticking in dummy "X = X" assignments to fake use of parameters. (This means that the tap functions in question no longer have the notion that they act on a particular static structure wired in.) svn path=/trunk/; revision=12910 --- epan/dissectors/packet-bootp.c | 2 +- epan/dissectors/packet-smb-sidsnooping.c | 6 ++-- epan/tap.h | 2 +- gtk/ansi_a_stat.c | 29 ++++++++---------- gtk/ansi_map_stat.c | 31 ++++++++----------- gtk/bootp_stat.c | 4 +-- gtk/dcerpc_stat.c | 4 +-- gtk/fc_stat.c | 4 +-- gtk/gsm_a_stat.c | 52 +++++++++++++++----------------- gtk/gsm_map_stat.c | 47 +++++++++++++---------------- gtk/h225_counter.c | 4 +-- gtk/h225_ras_srt.c | 4 +-- gtk/h323_analysis.c | 8 ++--- gtk/http_stat.c | 4 +-- gtk/io_stat.c | 2 +- gtk/isup_stat.c | 25 ++++++--------- gtk/ldap_stat.c | 4 +-- gtk/mgcp_stat.c | 4 +-- gtk/mtp3_stat.c | 45 ++++++++++++--------------- gtk/rtp_analysis.c | 26 ++++++++++------ gtk/service_response_time_table.c | 2 +- gtk/service_response_time_table.h | 2 +- gtk/sip_stat.c | 4 +-- gtk/smb_stat.c | 4 +-- gtk/wsp_stat.c | 4 +-- tap-ansi_astat.c | 8 ++--- tap-bootpstat.c | 4 +-- tap-dcerpcstat.c | 4 +-- tap-gsm_astat.c | 9 ++---- tap-h225counter.c | 4 +-- tap-h225rassrt.c | 4 +-- tap-httpstat.c | 4 +-- tap-mgcpstat.c | 4 +-- tap-protocolinfo.c | 2 +- tap-protohierstat.c | 2 +- tap-rpcprogs.c | 4 +-- tap-rpcstat.c | 4 +-- tap-sipstat.c | 4 +-- tap-smbsids.c | 2 +- tap-smbstat.c | 4 +-- tap-wspstat.c | 4 +-- 41 files changed, 181 insertions(+), 209 deletions(-) diff --git a/epan/dissectors/packet-bootp.c b/epan/dissectors/packet-bootp.c index 58bb88187e..5b2cea898d 100644 --- a/epan/dissectors/packet-bootp.c +++ b/epan/dissectors/packet-bootp.c @@ -2894,7 +2894,7 @@ dissect_bootp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) if (tree) proto_tree_add_boolean_hidden(bp_tree, hf_bootp_dhcp, tvb, 0, 0, 1); - tap_queue_packet( bootp_dhcp_tap, pinfo, (gpointer) dhcp_type); + tap_queue_packet( bootp_dhcp_tap, pinfo, dhcp_type); } /* diff --git a/epan/dissectors/packet-smb-sidsnooping.c b/epan/dissectors/packet-smb-sidsnooping.c index bf3929c109..c706c76239 100644 --- a/epan/dissectors/packet-smb-sidsnooping.c +++ b/epan/dissectors/packet-smb-sidsnooping.c @@ -105,9 +105,9 @@ add_sid_name_mapping(char *sid, char *name) * level 1 : user displayinfo 1 */ static int -samr_query_dispinfo(void *dummy _U_, packet_info *pinfo, epan_dissect_t *edt, void *pri) +samr_query_dispinfo(void *dummy _U_, packet_info *pinfo, epan_dissect_t *edt, const void *pri) { - dcerpc_info *ri=pri; + const dcerpc_info *ri=pri; void *old_ctx=NULL; char *pol_name; char *sid; @@ -227,7 +227,7 @@ samr_query_dispinfo(void *dummy _U_, packet_info *pinfo, epan_dissect_t *edt, vo * level 12 : DNS_DOMAIN_INFO lsa.domain_sid -> lsa.domain */ static int -lsa_policy_information(void *dummy _U_, packet_info *pinfo _U_, epan_dissect_t *edt, void *pri _U_) +lsa_policy_information(void *dummy _U_, packet_info *pinfo _U_, epan_dissect_t *edt, const void *pri _U_) { GPtrArray *gp; field_info *fi; diff --git a/epan/tap.h b/epan/tap.h index 4ecb1fb91d..e8b27f2e9d 100644 --- a/epan/tap.h +++ b/epan/tap.h @@ -33,7 +33,7 @@ ETH_VAR_IMPORT int num_tap_filters; typedef void (*tap_reset_cb)(void *tapdata); -typedef int (*tap_packet_cb)(void *tapdata, packet_info *pinfo, epan_dissect_t *edt, void *data); +typedef int (*tap_packet_cb)(void *tapdata, packet_info *pinfo, epan_dissect_t *edt, const void *data); typedef void (*tap_draw_cb)(void *tapdata); diff --git a/gtk/ansi_a_stat.c b/gtk/ansi_a_stat.c index 5f1d000523..4f78e3e754 100644 --- a/gtk/ansi_a_stat.c +++ b/gtk/ansi_a_stat.c @@ -83,33 +83,30 @@ static void ansi_a_stat_reset( void *tapdata) { - tapdata = tapdata; + ansi_a_stat_t *stat_p = tapdata; - memset((void *) &stat, 0, sizeof(ansi_a_stat_t)); + memset(stat_p, 0, sizeof(ansi_a_stat_t)); } static int ansi_a_stat_packet( void *tapdata, - packet_info *pinfo, + packet_info *pinfo _U_, epan_dissect_t *edt _U_, - void *data) + const void *data) { - ansi_a_tap_rec_t *data_p = data; - - - tapdata = tapdata; - pinfo = pinfo; + ansi_a_stat_t *stat_p = tapdata; + const ansi_a_tap_rec_t *data_p = data; switch (data_p->pdu_type) { case BSSAP_PDU_TYPE_BSMAP: - stat.bsmap_message_type[data_p->message_type]++; + stat_p->bsmap_message_type[data_p->message_type]++; break; case BSSAP_PDU_TYPE_DTAP: - stat.dtap_message_type[data_p->message_type]++; + stat_p->dtap_message_type[data_p->message_type]++; break; default: @@ -127,12 +124,10 @@ static void ansi_a_stat_draw( void *tapdata) { + ansi_a_stat_t *stat_p = tapdata; int i, j; char *strp; - - tapdata = tapdata; - if (dlg_bsmap.win != NULL) { i = 0; @@ -142,7 +137,7 @@ ansi_a_stat_draw( j = gtk_clist_find_row_from_data(GTK_CLIST(dlg_bsmap.table), (gpointer) i); strp = g_strdup_printf("%d", - stat.bsmap_message_type[ansi_a_ios401_bsmap_strings[i].value]); + stat_p->bsmap_message_type[ansi_a_ios401_bsmap_strings[i].value]); gtk_clist_set_text(GTK_CLIST(dlg_bsmap.table), j, 2, strp); g_free(strp); @@ -161,7 +156,7 @@ ansi_a_stat_draw( j = gtk_clist_find_row_from_data(GTK_CLIST(dlg_dtap.table), (gpointer) i); strp = g_strdup_printf("%d", - stat.dtap_message_type[ansi_a_ios401_dtap_strings[i].value]); + stat_p->dtap_message_type[ansi_a_ios401_dtap_strings[i].value]); gtk_clist_set_text(GTK_CLIST(dlg_dtap.table), j, 2, strp); g_free(strp); @@ -470,7 +465,7 @@ register_tap_listener_gtkansi_a_stat(void) memset((void *) &stat, 0, sizeof(ansi_a_stat_t)); err_p = - register_tap_listener("ansi_a", NULL, NULL, + register_tap_listener("ansi_a", &stat, NULL, ansi_a_stat_reset, ansi_a_stat_packet, ansi_a_stat_draw); diff --git a/gtk/ansi_map_stat.c b/gtk/ansi_map_stat.c index a4375c398f..d54850dfd7 100644 --- a/gtk/ansi_map_stat.c +++ b/gtk/ansi_map_stat.c @@ -96,24 +96,21 @@ static void ansi_map_stat_reset( void *tapdata) { - tapdata = tapdata; + ansi_map_stat_t *stat_p = tapdata; - memset((void *) &stat, 0, sizeof(ansi_map_stat_t)); + memset(stat_p, 0, sizeof(ansi_map_stat_t)); } static int ansi_map_stat_packet( void *tapdata, - packet_info *pinfo, + packet_info *pinfo _U_, epan_dissect_t *edt _U_, - void *data) + const void *data) { - ansi_map_tap_rec_t *data_p = data; - - - tapdata = tapdata; - pinfo = pinfo; + ansi_map_stat_t *stat_p = tapdata; + const ansi_map_tap_rec_t *data_p = data; #if 0 /* always false because message_type is 8 bit value */ if (data_p->message_type >= ANSI_MAP_MAX_NUM_MESSAGE_TYPES) @@ -125,8 +122,8 @@ ansi_map_stat_packet( } #endif - stat.message_type[data_p->message_type]++; - stat.size[data_p->message_type] += data_p->size; + stat_p->message_type[data_p->message_type]++; + stat_p->size[data_p->message_type] += data_p->size; return(1); } @@ -136,12 +133,10 @@ static void ansi_map_stat_draw( void *tapdata) { + ansi_map_stat_t *stat_p = tapdata; int i, j; char *strp; - - tapdata = tapdata; - if (dlg.win != NULL) { i = 0; @@ -151,15 +146,15 @@ ansi_map_stat_draw( j = gtk_clist_find_row_from_data(GTK_CLIST(dlg.table), (gpointer) i); strp = g_strdup_printf("%d", - stat.message_type[ansi_map_opr_code_strings[i].value]); + stat_p->message_type[ansi_map_opr_code_strings[i].value]); gtk_clist_set_text(GTK_CLIST(dlg.table), j, 2, strp); g_free(strp); - strp = g_strdup_printf("%.0f", stat.size[ansi_map_opr_code_strings[i].value]); + strp = g_strdup_printf("%.0f", stat_p->size[ansi_map_opr_code_strings[i].value]); gtk_clist_set_text(GTK_CLIST(dlg.table), j, 3, strp); g_free(strp); - strp = g_strdup_printf("%.2f", stat.size[ansi_map_opr_code_strings[i].value]/stat.message_type[ansi_map_opr_code_strings[i].value]); + strp = g_strdup_printf("%.2f", stat_p->size[ansi_map_opr_code_strings[i].value]/stat_p->message_type[ansi_map_opr_code_strings[i].value]); gtk_clist_set_text(GTK_CLIST(dlg.table), j, 4, strp); g_free(strp); @@ -434,7 +429,7 @@ register_tap_listener_gtkansi_map_stat(void) memset((void *) &stat, 0, sizeof(ansi_map_stat_t)); err_p = - register_tap_listener("ansi_map", NULL, NULL, + register_tap_listener("ansi_map", &stat, NULL, ansi_map_stat_reset, ansi_map_stat_packet, ansi_map_stat_draw); diff --git a/gtk/bootp_stat.c b/gtk/bootp_stat.c index a6df442882..d7b718e7ca 100644 --- a/gtk/bootp_stat.c +++ b/gtk/bootp_stat.c @@ -116,10 +116,10 @@ dhcpstat_reset(void *psp) g_hash_table_foreach( sp->hash, (GHFunc)dhcp_reset_hash, NULL); } static int -dhcpstat_packet(void *psp, packet_info *pinfo _U_, epan_dissect_t *edt _U_, void *pri) +dhcpstat_packet(void *psp, packet_info *pinfo _U_, epan_dissect_t *edt _U_, const void *pri) { dhcpstat_t *sp=psp; - bootp_info_value_t value=pri; + const bootp_info_value_t value=pri; dhcp_message_type_t *sc; if (sp==NULL) diff --git a/gtk/dcerpc_stat.c b/gtk/dcerpc_stat.c index 6c0d67cdc9..34e95fee8f 100644 --- a/gtk/dcerpc_stat.c +++ b/gtk/dcerpc_stat.c @@ -114,10 +114,10 @@ dcerpcstat_reset(void *rs_arg) static int -dcerpcstat_packet(void *rs_arg, packet_info *pinfo, epan_dissect_t *edt _U_, void *ri_arg) +dcerpcstat_packet(void *rs_arg, packet_info *pinfo, epan_dissect_t *edt _U_, const void *ri_arg) { rpcstat_t *rs = rs_arg; - dcerpc_info *ri = ri_arg; + const dcerpc_info *ri = ri_arg; if(!ri->call_data){ return 0; diff --git a/gtk/fc_stat.c b/gtk/fc_stat.c index 8e177effc1..c62b355bd3 100644 --- a/gtk/fc_stat.c +++ b/gtk/fc_stat.c @@ -81,9 +81,9 @@ fcstat_reset(void *pfc) } static int -fcstat_packet(void *pfc, packet_info *pinfo, epan_dissect_t *edt _U_, void *psi) +fcstat_packet(void *pfc, packet_info *pinfo, epan_dissect_t *edt _U_, const void *psi) { - fc_hdr *fc=(fc_hdr *)psi; + const fc_hdr *fc=psi; fcstat_t *fs=(fcstat_t *)pfc; /* we are only interested in reply packets */ diff --git a/gtk/gsm_a_stat.c b/gtk/gsm_a_stat.c index 97428341d1..b39ba53e1a 100644 --- a/gtk/gsm_a_stat.c +++ b/gtk/gsm_a_stat.c @@ -95,54 +95,51 @@ static void gsm_a_stat_reset( void *tapdata) { - tapdata = tapdata; + gsm_a_stat_t *stat_p = tapdata; - memset((void *) &stat, 0, sizeof(gsm_a_stat_t)); + memset(stat_p, 0, sizeof(gsm_a_stat_t)); } static int gsm_a_stat_packet( void *tapdata, - packet_info *pinfo, + packet_info *pinfo _U_, epan_dissect_t *edt _U_, - void *data) + const void *data) { - gsm_a_tap_rec_t *data_p = data; - - - tapdata = tapdata; - pinfo = pinfo; + gsm_a_stat_t *stat_p = tapdata; + const gsm_a_tap_rec_t *data_p = data; switch (data_p->pdu_type) { case BSSAP_PDU_TYPE_BSSMAP: - stat.bssmap_message_type[data_p->message_type]++; + stat_p->bssmap_message_type[data_p->message_type]++; break; case BSSAP_PDU_TYPE_DTAP: switch (data_p->protocol_disc) { case PD_CC: - stat.dtap_cc_message_type[data_p->message_type]++; + stat_p->dtap_cc_message_type[data_p->message_type]++; break; case PD_MM: - stat.dtap_mm_message_type[data_p->message_type]++; + stat_p->dtap_mm_message_type[data_p->message_type]++; break; case PD_RR: - stat.dtap_rr_message_type[data_p->message_type]++; + stat_p->dtap_rr_message_type[data_p->message_type]++; break; case PD_GMM: - stat.dtap_gmm_message_type[data_p->message_type]++; + stat_p->dtap_gmm_message_type[data_p->message_type]++; break; case PD_SMS: - stat.dtap_sms_message_type[data_p->message_type]++; + stat_p->dtap_sms_message_type[data_p->message_type]++; break; case PD_SM: - stat.dtap_sm_message_type[data_p->message_type]++; + stat_p->dtap_sm_message_type[data_p->message_type]++; break; case PD_SS: - stat.dtap_ss_message_type[data_p->message_type]++; + stat_p->dtap_ss_message_type[data_p->message_type]++; break; default: /* @@ -196,62 +193,61 @@ static void gsm_a_stat_draw( void *tapdata) { - - tapdata = tapdata; + gsm_a_stat_t *stat_p = tapdata; if (dlg_bssmap.win != NULL) { gsm_a_stat_draw_aux(&dlg_bssmap, - stat.bssmap_message_type, + stat_p->bssmap_message_type, gsm_a_bssmap_msg_strings); } if (dlg_dtap_mm.win != NULL) { gsm_a_stat_draw_aux(&dlg_dtap_mm, - stat.dtap_mm_message_type, + stat_p->dtap_mm_message_type, gsm_a_dtap_msg_mm_strings); } if (dlg_dtap_rr.win != NULL) { gsm_a_stat_draw_aux(&dlg_dtap_rr, - stat.dtap_rr_message_type, + stat_p->dtap_rr_message_type, gsm_a_dtap_msg_rr_strings); } if (dlg_dtap_cc.win != NULL) { gsm_a_stat_draw_aux(&dlg_dtap_cc, - stat.dtap_cc_message_type, + stat_p->dtap_cc_message_type, gsm_a_dtap_msg_cc_strings); } if (dlg_dtap_gmm.win != NULL) { gsm_a_stat_draw_aux(&dlg_dtap_gmm, - stat.dtap_gmm_message_type, + stat_p->dtap_gmm_message_type, gsm_a_dtap_msg_gmm_strings); } if (dlg_dtap_sms.win != NULL) { gsm_a_stat_draw_aux(&dlg_dtap_sms, - stat.dtap_sms_message_type, + stat_p->dtap_sms_message_type, gsm_a_dtap_msg_sms_strings); } if (dlg_dtap_sm.win != NULL) { gsm_a_stat_draw_aux(&dlg_dtap_sm, - stat.dtap_sm_message_type, + stat_p->dtap_sm_message_type, gsm_a_dtap_msg_sm_strings); } if (dlg_dtap_ss.win != NULL) { gsm_a_stat_draw_aux(&dlg_dtap_ss, - stat.dtap_ss_message_type, + stat_p->dtap_ss_message_type, gsm_a_dtap_msg_ss_strings); } } @@ -627,7 +623,7 @@ register_tap_listener_gtkgsm_a_stat(void) memset((void *) &stat, 0, sizeof(gsm_a_stat_t)); err_p = - register_tap_listener("gsm_a", NULL, NULL, + register_tap_listener("gsm_a", &stat, NULL, gsm_a_stat_reset, gsm_a_stat_packet, gsm_a_stat_draw); diff --git a/gtk/gsm_map_stat.c b/gtk/gsm_map_stat.c index b8a0e4df74..a154c20bf4 100644 --- a/gtk/gsm_map_stat.c +++ b/gtk/gsm_map_stat.c @@ -101,27 +101,24 @@ static void gsm_map_stat_reset( void *tapdata) { - tapdata = tapdata; + gsm_map_stat_t *stat_p = tapdata; - memset((void *) &gsm_map_stat, 0, sizeof(gsm_map_stat_t)); + memset(stat_p, 0, sizeof(gsm_map_stat_t)); } static int gsm_map_stat_packet( void *tapdata, - packet_info *pinfo, + packet_info *pinfo _U_, epan_dissect_t *edt _U_, - void *data) + const void *data) { - gsm_map_tap_rec_t *data_p = data; - - - tapdata = tapdata; - pinfo = pinfo; + gsm_map_stat_t *stat_p = tapdata; + const gsm_map_tap_rec_t *data_p = data; #if 0 /* always false because message_type is 8 bit value */ - if (data_p->opr_code_idx > sizeof(gsm_map_stat.opr_code)) + if (data_p->opr_code_idx > sizeof(stat_p->opr_code)) { /* * unknown message type !!! @@ -132,13 +129,13 @@ gsm_map_stat_packet( if (data_p->invoke) { - gsm_map_stat.opr_code[data_p->opr_code_idx]++; - gsm_map_stat.size[data_p->opr_code_idx] += data_p->size; + stat_p->opr_code[data_p->opr_code_idx]++; + stat_p->size[data_p->opr_code_idx] += data_p->size; } else { - gsm_map_stat.opr_code_rr[data_p->opr_code_idx]++; - gsm_map_stat.size_rr[data_p->opr_code_idx] += data_p->size; + stat_p->opr_code_rr[data_p->opr_code_idx]++; + stat_p->size_rr[data_p->opr_code_idx] += data_p->size; } return(1); @@ -149,12 +146,10 @@ static void gsm_map_stat_draw( void *tapdata) { + gsm_map_stat_t *stat_p = tapdata; int i, j; char *strp; - - tapdata = tapdata; - if (dlg.win != NULL) { i = 0; @@ -163,36 +158,36 @@ gsm_map_stat_draw( { j = gtk_clist_find_row_from_data(GTK_CLIST(dlg.table), (gpointer) i); - strp = g_strdup_printf("%d", gsm_map_stat.opr_code[i]); + strp = g_strdup_printf("%d", stat_p->opr_code[i]); gtk_clist_set_text(GTK_CLIST(dlg.table), j, 2, strp); g_free(strp); - strp = g_strdup_printf("%.0f", gsm_map_stat.size[i]); + strp = g_strdup_printf("%.0f", stat_p->size[i]); gtk_clist_set_text(GTK_CLIST(dlg.table), j, 3, strp); g_free(strp); - strp = g_strdup_printf("%.2f", gsm_map_stat.size[i]/gsm_map_stat.opr_code[i]); + strp = g_strdup_printf("%.2f", stat_p->size[i]/stat_p->opr_code[i]); gtk_clist_set_text(GTK_CLIST(dlg.table), j, 4, strp); g_free(strp); - strp = g_strdup_printf("%u", gsm_map_stat.opr_code_rr[i]); + strp = g_strdup_printf("%u", stat_p->opr_code_rr[i]); gtk_clist_set_text(GTK_CLIST(dlg.table), j, 5, strp); g_free(strp); - strp = g_strdup_printf("%.0f", gsm_map_stat.size_rr[i]); + strp = g_strdup_printf("%.0f", stat_p->size_rr[i]); gtk_clist_set_text(GTK_CLIST(dlg.table), j, 6, strp); g_free(strp); - strp = g_strdup_printf("%.2f", gsm_map_stat.size_rr[i]/gsm_map_stat.opr_code_rr[i]); + strp = g_strdup_printf("%.2f", stat_p->size_rr[i]/stat_p->opr_code_rr[i]); gtk_clist_set_text(GTK_CLIST(dlg.table), j, 7, strp); g_free(strp); - strp = g_strdup_printf("%.0f", gsm_map_stat.size[i] + gsm_map_stat.size_rr[i]); + strp = g_strdup_printf("%.0f", stat_p->size[i] + stat_p->size_rr[i]); gtk_clist_set_text(GTK_CLIST(dlg.table), j, 8, strp); g_free(strp); strp = g_strdup_printf("%.2f", - (gsm_map_stat.size[i] + gsm_map_stat.size_rr[i])/(gsm_map_stat.opr_code[i] + gsm_map_stat.opr_code_rr[i])); + (stat_p->size[i] + stat_p->size_rr[i])/(stat_p->opr_code[i] + stat_p->opr_code_rr[i])); gtk_clist_set_text(GTK_CLIST(dlg.table), j, 9, strp); g_free(strp); @@ -468,7 +463,7 @@ register_tap_listener_gtkgsm_map_stat(void) memset((void *) &gsm_map_stat, 0, sizeof(gsm_map_stat_t)); err_p = - register_tap_listener("gsm_map", NULL, NULL, + register_tap_listener("gsm_map", &gsm_map_stat, NULL, gsm_map_stat_reset, gsm_map_stat_packet, gsm_map_stat_draw); diff --git a/gtk/h225_counter.c b/gtk/h225_counter.c index 46a27faf42..d746343eb7 100644 --- a/gtk/h225_counter.c +++ b/gtk/h225_counter.c @@ -157,10 +157,10 @@ h225counter_reset(void *phs) } static int -h225counter_packet(void *phs, packet_info *pinfo _U_, epan_dissect_t *edt _U_, void *phi) +h225counter_packet(void *phs, packet_info *pinfo _U_, epan_dissect_t *edt _U_, const void *phi) { h225counter_t *hs=(h225counter_t *)phs; - h225_packet_info *pi=phi; + const h225_packet_info *pi=phi; switch (pi->msg_type) { diff --git a/gtk/h225_ras_srt.c b/gtk/h225_ras_srt.c index 0787ed6c1d..4aff0d1695 100644 --- a/gtk/h225_ras_srt.c +++ b/gtk/h225_ras_srt.c @@ -142,10 +142,10 @@ h225rassrt_reset(void *phs) static int -h225rassrt_packet(void *phs, packet_info *pinfo _U_, epan_dissect_t *edt _U_, void *phi) +h225rassrt_packet(void *phs, packet_info *pinfo _U_, epan_dissect_t *edt _U_, const void *phi) { h225rassrt_t *hs=(h225rassrt_t *)phs; - h225_packet_info *pi=phi; + const h225_packet_info *pi=phi; ras_type rasmsg_type = RAS_OTHER; ras_category rascategory = RAS_OTHERS; diff --git a/gtk/h323_analysis.c b/gtk/h323_analysis.c index ba1b211177..349d3cfafe 100644 --- a/gtk/h323_analysis.c +++ b/gtk/h323_analysis.c @@ -156,10 +156,10 @@ static void add_to_clist1(GtkCList *clist1, guint32 number, gchar *time, /****************************************************************************/ /* whenever a h225 packet is seen by the tap listener */ -static int h225_packet(void *user_data_arg, packet_info *pinfo, epan_dissect_t *edt _U_, void *h225info_arg) +static int h225_packet(void *user_data_arg, packet_info *pinfo, epan_dissect_t *edt _U_, const void *h225info_arg) { user_data_t *user_data = user_data_arg; - h225_packet_info *h225ptr_info = h225info_arg; + const h225_packet_info *h225ptr_info = h225info_arg; GdkColor color = COLOR_DEFAULT; gchar timeStr[32]; @@ -215,11 +215,11 @@ static int h225_packet(void *user_data_arg, packet_info *pinfo, epan_dissect_t * /****************************************************************************/ /* whenever a h245 packet is seen by the tap listener */ -static int h245_packet(void *user_data_arg, packet_info *pinfo, epan_dissect_t *edt _U_, void *h245info_arg) +static int h245_packet(void *user_data_arg, packet_info *pinfo, epan_dissect_t *edt _U_, const void *h245info_arg) { user_data_t *user_data = user_data_arg; - h245_packet_info *h245ptr_info = h245info_arg; + const h245_packet_info *h245ptr_info = h245info_arg; GdkColor color = COLOR_DEFAULT; gchar timeStr[32]; diff --git a/gtk/http_stat.c b/gtk/http_stat.c index 32ad427fd0..1aceaf69d8 100644 --- a/gtk/http_stat.c +++ b/gtk/http_stat.c @@ -268,9 +268,9 @@ httpstat_reset(void *psp ) } static int -httpstat_packet(void *psp , packet_info *pinfo _U_, epan_dissect_t *edt _U_, void *pri) +httpstat_packet(void *psp , packet_info *pinfo _U_, epan_dissect_t *edt _U_, const void *pri) { - http_info_value_t *value=pri; + const http_info_value_t *value=pri; httpstat_t *sp=(httpstat_t *) psp; /* total number of packets, including HTTP continuation packets */ diff --git a/gtk/io_stat.c b/gtk/io_stat.c index 3fbcd1b06d..1dcd4577d0 100644 --- a/gtk/io_stat.c +++ b/gtk/io_stat.c @@ -218,7 +218,7 @@ gtk_iostat_reset(void *g) } static int -gtk_iostat_packet(void *g, packet_info *pinfo, epan_dissect_t *edt, void *dummy _U_) +gtk_iostat_packet(void *g, packet_info *pinfo, epan_dissect_t *edt, const void *dummy _U_) { io_stat_graph_t *git=g; io_item_t *it; diff --git a/gtk/isup_stat.c b/gtk/isup_stat.c index 286fb9532b..beda73bc53 100644 --- a/gtk/isup_stat.c +++ b/gtk/isup_stat.c @@ -80,24 +80,21 @@ static void isup_stat_reset( void *tapdata) { - tapdata = tapdata; + isup_stat_t *stat_p = tapdata; - memset((void *) &stat, 0, sizeof(isup_stat_t)); + memset(stat_p, 0, sizeof(isup_stat_t)); } static int isup_stat_packet( void *tapdata, - packet_info *pinfo, + packet_info *pinfo _U_, epan_dissect_t *edt _U_, - void *data) + const void *data) { - isup_tap_rec_t *data_p = data; - - - tapdata = tapdata; - pinfo = pinfo; + isup_stat_t *stat_p = tapdata; + const isup_tap_rec_t *data_p = data; #if 0 /* always false because message_type is 8 bit value */ if (data_p->message_type >= ISUP_MAX_NUM_MESSAGE_TYPES) @@ -109,7 +106,7 @@ isup_stat_packet( } #endif - stat.message_type[data_p->message_type]++; + stat_p->message_type[data_p->message_type]++; return(1); } @@ -119,12 +116,10 @@ static void isup_stat_draw( void *tapdata) { + isup_stat_t *stat_p = tapdata; int i, j; char *strp; - - tapdata = tapdata; - if (dlg.win != NULL) { i = 0; @@ -134,7 +129,7 @@ isup_stat_draw( j = gtk_clist_find_row_from_data(GTK_CLIST(dlg.table), (gpointer) i); strp = g_strdup_printf("%d", - stat.message_type[isup_message_type_value[i].value]); + stat_p->message_type[isup_message_type_value[i].value]); gtk_clist_set_text(GTK_CLIST(dlg.table), j, 3, strp); g_free(strp); @@ -408,7 +403,7 @@ register_tap_listener_gtkisup_stat(void) memset((void *) &stat, 0, sizeof(isup_stat_t)); err_p = - register_tap_listener("isup", NULL, NULL, + register_tap_listener("isup", &stat, NULL, isup_stat_reset, isup_stat_packet, isup_stat_draw); diff --git a/gtk/ldap_stat.c b/gtk/ldap_stat.c index 9e04068530..595a26140e 100644 --- a/gtk/ldap_stat.c +++ b/gtk/ldap_stat.c @@ -81,9 +81,9 @@ ldapstat_reset(void *pldap) } static int -ldapstat_packet(void *pldap, packet_info *pinfo, epan_dissect_t *edt _U_, void *psi) +ldapstat_packet(void *pldap, packet_info *pinfo, epan_dissect_t *edt _U_, const void *psi) { - ldap_call_response_t *ldap=(ldap_call_response_t *)psi; + const ldap_call_response_t *ldap=psi; ldapstat_t *fs=(ldapstat_t *)pldap; /* we are only interested in reply packets */ diff --git a/gtk/mgcp_stat.c b/gtk/mgcp_stat.c index 699e9ebc4e..188b335db2 100644 --- a/gtk/mgcp_stat.c +++ b/gtk/mgcp_stat.c @@ -110,10 +110,10 @@ mgcpstat_reset(void *pms) static int -mgcpstat_packet(void *pms, packet_info *pinfo, epan_dissect_t *edt _U_, void *pmi) +mgcpstat_packet(void *pms, packet_info *pinfo, epan_dissect_t *edt _U_, const void *pmi) { mgcpstat_t *ms=(mgcpstat_t *)pms; - mgcp_info_t *mi=pmi; + const mgcp_info_t *mi=pmi; nstime_t delta; switch (mi->mgcp_type) { diff --git a/gtk/mtp3_stat.c b/gtk/mtp3_stat.c index 31838193a3..c77c51d036 100644 --- a/gtk/mtp3_stat.c +++ b/gtk/mtp3_stat.c @@ -95,10 +95,10 @@ static void mtp3_stat_reset( void *tapdata) { - tapdata = tapdata; + mtp3_stat_t (*stat_p)[MTP3_MAX_NUM_OPC_DPC] = tapdata; mtp3_num_used = 0; - memset((void *) mtp3_stat, 0, MTP3_MAX_NUM_OPC_DPC * sizeof(mtp3_stat_t)); + memset(stat_p, 0, MTP3_MAX_NUM_OPC_DPC * sizeof(mtp3_stat_t)); if (dlg.win != NULL) { @@ -110,16 +110,13 @@ mtp3_stat_reset( static int mtp3_stat_packet( void *tapdata, - packet_info *pinfo, + packet_info *pinfo _U_, epan_dissect_t *edt _U_, - void *data) + const void *data) { - mtp3_tap_rec_t *data_p = data; - int i; - - - tapdata = tapdata; - pinfo = pinfo; + mtp3_stat_t (*stat_p)[MTP3_MAX_NUM_OPC_DPC] = tapdata; + const mtp3_tap_rec_t *data_p = data; + int i; if (data_p->si_code >= MTP3_NUM_SI_CODE) { @@ -136,9 +133,9 @@ mtp3_stat_packet( i = 0; while (i < mtp3_num_used) { - if (memcmp(&data_p->addr_opc, &mtp3_stat[i].addr_opc, sizeof(mtp3_addr_pc_t)) == 0) + if (memcmp(&data_p->addr_opc, &(*stat_p)[i].addr_opc, sizeof(mtp3_addr_pc_t)) == 0) { - if (memcmp(&data_p->addr_dpc, &mtp3_stat[i].addr_dpc, sizeof(mtp3_addr_pc_t)) == 0) + if (memcmp(&data_p->addr_dpc, &(*stat_p)[i].addr_dpc, sizeof(mtp3_addr_pc_t)) == 0) { break; } @@ -160,10 +157,10 @@ mtp3_stat_packet( mtp3_num_used++; } - mtp3_stat[i].addr_opc = data_p->addr_opc; - mtp3_stat[i].addr_dpc = data_p->addr_dpc; - mtp3_stat[i].si_code[data_p->si_code].num_msus++; - mtp3_stat[i].si_code[data_p->si_code].size += data_p->size; + (*stat_p)[i].addr_opc = data_p->addr_opc; + (*stat_p)[i].addr_dpc = data_p->addr_dpc; + (*stat_p)[i].si_code[data_p->si_code].num_msus++; + (*stat_p)[i].si_code[data_p->si_code].size += data_p->size; return(1); } @@ -173,12 +170,10 @@ static void mtp3_stat_draw( void *tapdata) { + mtp3_stat_t (*stat_p)[MTP3_MAX_NUM_OPC_DPC] = tapdata; int i, j, row_offset; char str[256]; - - tapdata = tapdata; - if (dlg.win == NULL) { return; @@ -190,23 +185,23 @@ mtp3_stat_draw( { row_offset = i * MTP3_NUM_SI_CODE; - mtp3_addr_to_str_buf((guint8 *) &mtp3_stat[i].addr_opc, str); + mtp3_addr_to_str_buf((guint8 *) &(*stat_p)[i].addr_opc, str); dlg.entries[0] = g_strdup(str); - mtp3_addr_to_str_buf((guint8 *) &mtp3_stat[i].addr_dpc, str); + mtp3_addr_to_str_buf((guint8 *) &(*stat_p)[i].addr_dpc, str); dlg.entries[1] = g_strdup(str); for (j=0; j < MTP3_NUM_SI_CODE; j++) { dlg.entries[2] = g_strdup(mtp3_service_indicator_code_short_vals[j].strptr); - dlg.entries[3] = g_strdup_printf("%u", mtp3_stat[i].si_code[j].num_msus); + dlg.entries[3] = g_strdup_printf("%u", (*stat_p)[i].si_code[j].num_msus); - dlg.entries[4] = g_strdup_printf("%.0f", mtp3_stat[i].si_code[j].size); + dlg.entries[4] = g_strdup_printf("%.0f", (*stat_p)[i].si_code[j].size); dlg.entries[5] = g_strdup_printf("%.2f", - mtp3_stat[i].si_code[j].size/mtp3_stat[i].si_code[j].num_msus); + (*stat_p)[i].si_code[j].size/(*stat_p)[i].si_code[j].num_msus); gtk_clist_insert(GTK_CLIST(dlg.table), row_offset + j, dlg.entries); } @@ -457,7 +452,7 @@ register_tap_listener_gtkmtp3_stat(void) memset((void *) &mtp3_stat, 0, sizeof(mtp3_stat_t)); err_p = - register_tap_listener("mtp3", NULL, NULL, + register_tap_listener("mtp3", &mtp3_stat, NULL, mtp3_stat_reset, mtp3_stat_packet, mtp3_stat_draw); diff --git a/gtk/rtp_analysis.c b/gtk/rtp_analysis.c index 246d732bb8..1f315e2b9b 100644 --- a/gtk/rtp_analysis.c +++ b/gtk/rtp_analysis.c @@ -533,20 +533,23 @@ static void add_to_clist(GtkCList *clist, guint32 number, guint16 seq_num, gchar *timeStr, guint32 pkt_len, GdkColor *color); static int rtp_packet_analyse(tap_rtp_stat_t *statinfo, - packet_info *pinfo, struct _rtp_info *rtpinfo); + packet_info *pinfo, + const struct _rtp_info *rtpinfo); static int rtp_packet_add_info(GtkCList *clist, - tap_rtp_stat_t *statinfo, packet_info *pinfo, struct _rtp_info *rtpinfo); + tap_rtp_stat_t *statinfo, packet_info *pinfo, + const struct _rtp_info *rtpinfo); static int rtp_packet_save_payload(tap_rtp_save_info_t *saveinfo, - tap_rtp_stat_t *statinfo, - packet_info *pinfo, struct _rtp_info *rtpinfo); + tap_rtp_stat_t *statinfo, + packet_info *pinfo, + const struct _rtp_info *rtpinfo); /****************************************************************************/ /* whenever a RTP packet is seen by the tap listener */ -static int rtp_packet(void *user_data_arg, packet_info *pinfo, epan_dissect_t *edt _U_, void *rtpinfo_arg) +static int rtp_packet(void *user_data_arg, packet_info *pinfo, epan_dissect_t *edt _U_, const void *rtpinfo_arg) { user_data_t *user_data = user_data_arg; - struct _rtp_info *rtpinfo = rtpinfo_arg; + const struct _rtp_info *rtpinfo = rtpinfo_arg; #ifdef USE_CONVERSATION_GRAPH value_pair_t vp; #endif @@ -593,7 +596,8 @@ static int rtp_packet(void *user_data_arg, packet_info *pinfo, epan_dissect_t *e /****************************************************************************/ static int rtp_packet_analyse(tap_rtp_stat_t *statinfo, - packet_info *pinfo, struct _rtp_info *rtpinfo) + packet_info *pinfo, + const struct _rtp_info *rtpinfo) { double current_time; double current_jitter; @@ -759,7 +763,8 @@ static const GdkColor COLOR_CN = {0, 0xbfff, 0xbfff, 0xffff}; /****************************************************************************/ /* adds statistics information from the packet to the clist */ static int rtp_packet_add_info(GtkCList *clist, - tap_rtp_stat_t *statinfo, packet_info *pinfo, struct _rtp_info *rtpinfo) + tap_rtp_stat_t *statinfo, packet_info *pinfo, + const struct _rtp_info *rtpinfo) { guint16 msecs; gchar timeStr[32]; @@ -842,8 +847,9 @@ static int rtp_packet_add_info(GtkCList *clist, /****************************************************************************/ static int rtp_packet_save_payload(tap_rtp_save_info_t *saveinfo, - tap_rtp_stat_t *statinfo, - packet_info *pinfo, struct _rtp_info *rtpinfo) + tap_rtp_stat_t *statinfo, + packet_info *pinfo, + const struct _rtp_info *rtpinfo) { guint i; const guint8 *data; diff --git a/gtk/service_response_time_table.c b/gtk/service_response_time_table.c index 25e632c01d..ec66036c25 100644 --- a/gtk/service_response_time_table.c +++ b/gtk/service_response_time_table.c @@ -465,7 +465,7 @@ init_srt_table_row(srt_stat_table *rst, int index, char *procedure) } void -add_srt_table_data(srt_stat_table *rst, int index, nstime_t *req_time, packet_info *pinfo) +add_srt_table_data(srt_stat_table *rst, int index, const nstime_t *req_time, packet_info *pinfo) { srt_procedure_t *rp; nstime_t delta; diff --git a/gtk/service_response_time_table.h b/gtk/service_response_time_table.h index 223c9e8998..108cd91a00 100644 --- a/gtk/service_response_time_table.h +++ b/gtk/service_response_time_table.h @@ -75,7 +75,7 @@ void init_srt_table_row(srt_stat_table *rst, int index, char *procedure); * @param req_time the time of the corresponding request * @param pinfo current packet info */ -void add_srt_table_data(srt_stat_table *rst, int index, nstime_t *req_time, packet_info *pinfo); +void add_srt_table_data(srt_stat_table *rst, int index, const nstime_t *req_time, packet_info *pinfo); /** Draw the srt table data. * diff --git a/gtk/sip_stat.c b/gtk/sip_stat.c index efd2e9a5cd..ca43e640ef 100644 --- a/gtk/sip_stat.c +++ b/gtk/sip_stat.c @@ -338,9 +338,9 @@ sipstat_reset(void *psp) /* Main entry point to SIP tap */ static int -sipstat_packet(void *psp, packet_info *pinfo _U_, epan_dissect_t *edt _U_, void *pri) +sipstat_packet(void *psp, packet_info *pinfo _U_, epan_dissect_t *edt _U_, const void *pri) { - sip_info_value_t *value=pri; + const sip_info_value_t *value=pri; sipstat_t *sp = (sipstat_t *)psp; /* Total number of packets, including continuation packets */ diff --git a/gtk/smb_stat.c b/gtk/smb_stat.c index 97ea3497d6..4c36dea76b 100644 --- a/gtk/smb_stat.c +++ b/gtk/smb_stat.c @@ -85,10 +85,10 @@ smbstat_reset(void *pss) } static int -smbstat_packet(void *pss, packet_info *pinfo, epan_dissect_t *edt _U_, void *psi) +smbstat_packet(void *pss, packet_info *pinfo, epan_dissect_t *edt _U_, const void *psi) { smbstat_t *ss=(smbstat_t *)pss; - smb_info_t *si=psi; + const smb_info_t *si=psi; /* we are only interested in reply packets */ if(si->request){ diff --git a/gtk/wsp_stat.c b/gtk/wsp_stat.c index 45868c3235..9319a12bde 100644 --- a/gtk/wsp_stat.c +++ b/gtk/wsp_stat.c @@ -157,10 +157,10 @@ index2pdut(gint pdut) } static int -wspstat_packet(void *psp, packet_info *pinfo _U_, epan_dissect_t *edt _U_, void *pri) +wspstat_packet(void *psp, packet_info *pinfo _U_, epan_dissect_t *edt _U_, const void *pri) { wspstat_t *sp=psp; - wsp_info_value_t *value=pri; + const wsp_info_value_t *value=pri; gint index = pdut2index(value->pdut); int retour=0; diff --git a/tap-ansi_astat.c b/tap-ansi_astat.c index 4c5d847efb..6487ae1b85 100644 --- a/tap-ansi_astat.c +++ b/tap-ansi_astat.c @@ -60,16 +60,14 @@ typedef struct _ansi_a_stat_t { static int ansi_a_stat_packet( void *tapdata, - packet_info *pinfo, + packet_info *pinfo _U_, epan_dissect_t *edt _U_, - void *data) + const void *data) { ansi_a_stat_t *stat_p = tapdata; - ansi_a_tap_rec_t *tap_p = data; + const ansi_a_tap_rec_t *tap_p = data; - pinfo = pinfo; - switch (tap_p->pdu_type) { case BSSAP_PDU_TYPE_BSMAP: diff --git a/tap-bootpstat.c b/tap-bootpstat.c index da2a2e29a3..7f75d85024 100644 --- a/tap-bootpstat.c +++ b/tap-bootpstat.c @@ -82,10 +82,10 @@ dhcpstat_reset(void *psp) g_hash_table_foreach( sp->hash, (GHFunc)dhcp_reset_hash, NULL); } static int -dhcpstat_packet(void *psp, packet_info *pinfo _U_, epan_dissect_t *edt _U_, void *pri) +dhcpstat_packet(void *psp, packet_info *pinfo _U_, epan_dissect_t *edt _U_, const void *pri) { dhcpstat_t *sp=psp; - bootp_info_value_t value=pri; + const bootp_info_value_t value=pri; dhcp_message_type_t *sc; if (sp==NULL) diff --git a/tap-dcerpcstat.c b/tap-dcerpcstat.c index 1b824dc89f..70ebf8923a 100644 --- a/tap-dcerpcstat.c +++ b/tap-dcerpcstat.c @@ -60,9 +60,9 @@ typedef struct _rpcstat_t { static int -dcerpcstat_packet(void *prs, packet_info *pinfo, epan_dissect_t *edt _U_, void *pri) +dcerpcstat_packet(void *prs, packet_info *pinfo, epan_dissect_t *edt _U_, const void *pri) { - dcerpc_info *ri=pri; + const dcerpc_info *ri=pri; rpcstat_t *rs=prs; nstime_t delta; rpc_procedure_t *rp; diff --git a/tap-gsm_astat.c b/tap-gsm_astat.c index 07bc874571..ae3bedae6b 100644 --- a/tap-gsm_astat.c +++ b/tap-gsm_astat.c @@ -66,15 +66,12 @@ typedef struct _gsm_a_stat_t { static int gsm_a_stat_packet( void *tapdata, - packet_info *pinfo, + packet_info *pinfo _U_, epan_dissect_t *edt _U_, - void *data) + const void *data) { gsm_a_stat_t *stat_p = tapdata; - gsm_a_tap_rec_t *tap_p = data; - - - pinfo = pinfo; + const gsm_a_tap_rec_t *tap_p = data; switch (tap_p->pdu_type) { diff --git a/tap-h225counter.c b/tap-h225counter.c index 93773c69eb..35e83b5628 100644 --- a/tap-h225counter.c +++ b/tap-h225counter.c @@ -134,10 +134,10 @@ h225counter_reset(void *phs) } static int -h225counter_packet(void *phs, packet_info *pinfo _U_, epan_dissect_t *edt _U_, void *phi) +h225counter_packet(void *phs, packet_info *pinfo _U_, epan_dissect_t *edt _U_, const void *phi) { h225counter_t *hs=(h225counter_t *)phs; - h225_packet_info *pi=phi; + const h225_packet_info *pi=phi; switch (pi->msg_type) { diff --git a/tap-h225rassrt.c b/tap-h225rassrt.c index 998f00c063..2782dcb955 100644 --- a/tap-h225rassrt.c +++ b/tap-h225rassrt.c @@ -114,10 +114,10 @@ h225rassrt_reset(void *phs) } static int -h225rassrt_packet(void *phs, packet_info *pinfo _U_, epan_dissect_t *edt _U_, void *phi) +h225rassrt_packet(void *phs, packet_info *pinfo _U_, epan_dissect_t *edt _U_, const void *phi) { h225rassrt_t *hs=(h225rassrt_t *)phs; - h225_packet_info *pi=phi; + const h225_packet_info *pi=phi; ras_type rasmsg_type = RAS_OTHER; ras_category rascategory = RAS_OTHERS; diff --git a/tap-httpstat.c b/tap-httpstat.c index 3e537d7fd5..2e5e3454ad 100644 --- a/tap-httpstat.c +++ b/tap-httpstat.c @@ -187,9 +187,9 @@ httpstat_reset(void *psp ) } static int -httpstat_packet(void *psp , packet_info *pinfo _U_, epan_dissect_t *edt _U_, void *pri) +httpstat_packet(void *psp , packet_info *pinfo _U_, epan_dissect_t *edt _U_, const void *pri) { - http_info_value_t *value=pri; + const http_info_value_t *value=pri; httpstat_t *sp=(httpstat_t *) psp; /* We are only interested in reply packets with a status code */ diff --git a/tap-mgcpstat.c b/tap-mgcpstat.c index f6853db127..0426a3e264 100644 --- a/tap-mgcpstat.c +++ b/tap-mgcpstat.c @@ -66,10 +66,10 @@ static const value_string mgcp_mesage_type[] = { }; static int -mgcpstat_packet(void *pms, packet_info *pinfo, epan_dissect_t *edt _U_, void *pmi) +mgcpstat_packet(void *pms, packet_info *pinfo, epan_dissect_t *edt _U_, const void *pmi) { mgcpstat_t *ms=(mgcpstat_t *)pms; - mgcp_info_t *mi=pmi; + const mgcp_info_t *mi=pmi; nstime_t delta; switch (mi->mgcp_type) { diff --git a/tap-protocolinfo.c b/tap-protocolinfo.c index fcb4dbb2e4..3e07d6839e 100644 --- a/tap-protocolinfo.c +++ b/tap-protocolinfo.c @@ -48,7 +48,7 @@ typedef struct _pci_t { static int -protocolinfo_packet(void *prs, packet_info *pinfo, epan_dissect_t *edt, void *dummy _U_) +protocolinfo_packet(void *prs, packet_info *pinfo, epan_dissect_t *edt, const void *dummy _U_) { pci_t *rs=prs; GPtrArray *gp; diff --git a/tap-protohierstat.c b/tap-protohierstat.c index bc074c4c37..039f532896 100644 --- a/tap-protohierstat.c +++ b/tap-protohierstat.c @@ -71,7 +71,7 @@ new_phs_t(phs_t *parent) static int -protohierstat_packet(void *prs, packet_info *pinfo, epan_dissect_t *edt, void *dummy _U_) +protohierstat_packet(void *prs, packet_info *pinfo, epan_dissect_t *edt, const void *dummy _U_) { phs_t *rs=prs; phs_t *tmprs; diff --git a/tap-rpcprogs.c b/tap-rpcprogs.c index 2d0129cafb..28e3c86e4d 100644 --- a/tap-rpcprogs.c +++ b/tap-rpcprogs.c @@ -57,9 +57,9 @@ static rpc_program_t *prog_list=NULL; static int already_enabled=0; static int -rpcprogs_packet(void *dummy1 _U_, packet_info *pinfo, epan_dissect_t *edt _U_, void *pri) +rpcprogs_packet(void *dummy1 _U_, packet_info *pinfo, epan_dissect_t *edt _U_, const void *pri) { - rpc_call_info_value *ri=pri; + const rpc_call_info_value *ri=pri; nstime_t delta; rpc_program_t *rp=NULL; diff --git a/tap-rpcstat.c b/tap-rpcstat.c index 6941838c72..a7cb42e1a1 100644 --- a/tap-rpcstat.c +++ b/tap-rpcstat.c @@ -128,10 +128,10 @@ rpcstat_reset(void *prs) * !0: state has changed, call (*draw) sometime later */ static int -rpcstat_packet(void *prs, packet_info *pinfo, epan_dissect_t *edt _U_, void *pri) +rpcstat_packet(void *prs, packet_info *pinfo, epan_dissect_t *edt _U_, const void *pri) { rpcstat_t *rs=prs; - rpc_call_info_value *ri=pri; + const rpc_call_info_value *ri=pri; nstime_t delta; rpc_procedure_t *rp; diff --git a/tap-sipstat.c b/tap-sipstat.c index ac9cd316f5..3bacac0911 100644 --- a/tap-sipstat.c +++ b/tap-sipstat.c @@ -217,9 +217,9 @@ sipstat_reset(void *psp ) /* Main entry point to SIP tap */ static int -sipstat_packet(void *psp, packet_info *pinfo _U_, epan_dissect_t *edt _U_, void *pri) +sipstat_packet(void *psp, packet_info *pinfo _U_, epan_dissect_t *edt _U_, const void *pri) { - sip_info_value_t *value=pri; + const sip_info_value_t *value=pri; sipstat_t *sp = (sipstat_t *)psp; /* Total number of packets, including continuation packets */ diff --git a/tap-smbsids.c b/tap-smbsids.c index 2d0cdf3d0e..234ce09ccc 100644 --- a/tap-smbsids.c +++ b/tap-smbsids.c @@ -46,7 +46,7 @@ static int -smbsids_packet(void *pss _U_, packet_info *pinfo _U_, epan_dissect_t *edt _U_, void *psi _U_) +smbsids_packet(void *pss _U_, packet_info *pinfo _U_, epan_dissect_t *edt _U_, const void *psi _U_) { return 1; } diff --git a/tap-smbstat.c b/tap-smbstat.c index 4c6b4ef4a4..c077f83d19 100644 --- a/tap-smbstat.c +++ b/tap-smbstat.c @@ -55,10 +55,10 @@ typedef struct _smbstat_t { static int -smbstat_packet(void *pss, packet_info *pinfo, epan_dissect_t *edt _U_, void *psi) +smbstat_packet(void *pss, packet_info *pinfo, epan_dissect_t *edt _U_, const void *psi) { smbstat_t *ss=(smbstat_t *)pss; - smb_info_t *si=psi; + const smb_info_t *si=psi; nstime_t delta; timestat_t *sp=NULL; diff --git a/tap-wspstat.c b/tap-wspstat.c index b12255c8b4..8fe193e538 100644 --- a/tap-wspstat.c +++ b/tap-wspstat.c @@ -133,10 +133,10 @@ index2pdut(gint pdut) return 0; } static int -wspstat_packet(void *psp, packet_info *pinfo _U_, epan_dissect_t *edt _U_, void *pri) +wspstat_packet(void *psp, packet_info *pinfo _U_, epan_dissect_t *edt _U_, const void *pri) { wspstat_t *sp=psp; - wsp_info_value_t *value=pri; + const wsp_info_value_t *value=pri; gint index = pdut2index(value->pdut); int retour=0; -- cgit v1.2.3