forked from osmocom/wireshark
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.) git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@12910 f5534014-38df-0310-8fa8-9805f1628bb7
This commit is contained in:
parent
8bee6b7ac4
commit
e363d0992e
|
@ -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);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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) {
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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];
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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.
|
||||
*
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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){
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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) {
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue