diff options
author | etxrab <etxrab@f5534014-38df-0310-8fa8-9805f1628bb7> | 2008-11-06 21:49:21 +0000 |
---|---|---|
committer | etxrab <etxrab@f5534014-38df-0310-8fa8-9805f1628bb7> | 2008-11-06 21:49:21 +0000 |
commit | a36ef87b8e650fb4fd260764db1c94f3919d1b0d (patch) | |
tree | 9c8654031ddaffa75bff53d71d3b87dc9ac8da83 | |
parent | 68a0a4a7e39ad220aa48d2281f350fb5b19e1439 (diff) |
From Pascal Quantin:
Add 3GPP Special Conformance Testing Procedures to GSM statistics
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@26716 f5534014-38df-0310-8fa8-9805f1628bb7
-rw-r--r-- | epan/dissectors/packet-gsm_a_common.h | 3 | ||||
-rw-r--r-- | epan/libwireshark.def | 1 | ||||
-rw-r--r-- | gtk/gsm_a_stat.c | 33 | ||||
-rw-r--r-- | tap-gsm_astat.c | 21 |
4 files changed, 57 insertions, 1 deletions
diff --git a/epan/dissectors/packet-gsm_a_common.h b/epan/dissectors/packet-gsm_a_common.h index 8c6140cc5c..a9c6f6ccba 100644 --- a/epan/dissectors/packet-gsm_a_common.h +++ b/epan/dissectors/packet-gsm_a_common.h @@ -441,7 +441,7 @@ typedef enum PD_LCS, PD_UNK_2, PD_RSVD_EXT, - PD_RSVD_TEST + PD_TP } gsm_a_pd_str_e; @@ -511,6 +511,7 @@ WS_VAR_IMPORT const value_string gsm_a_dtap_msg_gmm_strings[]; WS_VAR_IMPORT const value_string gsm_a_dtap_msg_sms_strings[]; WS_VAR_IMPORT const value_string gsm_a_dtap_msg_sm_strings[]; WS_VAR_IMPORT const value_string gsm_a_dtap_msg_ss_strings[]; +WS_VAR_IMPORT const value_string gsm_a_dtap_msg_tp_strings[]; WS_VAR_IMPORT const gchar *gsm_a_pd_str[]; extern const value_string gsm_a_qos_del_of_err_sdu_vals[]; diff --git a/epan/libwireshark.def b/epan/libwireshark.def index 62bcac64f0..0544e5ee52 100644 --- a/epan/libwireshark.def +++ b/epan/libwireshark.def @@ -503,6 +503,7 @@ gsm_a_dtap_msg_rr_strings DATA gsm_a_dtap_msg_sm_strings DATA gsm_a_dtap_msg_sms_strings DATA gsm_a_dtap_msg_ss_strings DATA +gsm_a_dtap_msg_tp_strings DATA gsm_a_pd_str DATA gsm_map_opr_code_strings DATA gtcap_StatSRT DATA diff --git a/gtk/gsm_a_stat.c b/gtk/gsm_a_stat.c index b2f508fd1e..77a5d985f4 100644 --- a/gtk/gsm_a_stat.c +++ b/gtk/gsm_a_stat.c @@ -81,6 +81,7 @@ typedef struct _gsm_a_stat_t { int dtap_sms_message_type[0xff]; int dtap_sm_message_type[0xff]; int dtap_ss_message_type[0xff]; + int dtap_tp_message_type[0xff]; } gsm_a_stat_t; @@ -92,6 +93,7 @@ static gsm_a_stat_dlg_t dlg_dtap_gmm; static gsm_a_stat_dlg_t dlg_dtap_sms; static gsm_a_stat_dlg_t dlg_dtap_sm; static gsm_a_stat_dlg_t dlg_dtap_ss; +static gsm_a_stat_dlg_t dlg_dtap_tp; static gsm_a_stat_t gsm_a_stat; @@ -145,6 +147,9 @@ gsm_a_stat_packet( case PD_SS: stat_p->dtap_ss_message_type[data_p->message_type]++; break; + case PD_TP: + stat_p->dtap_tp_message_type[data_p->message_type]++; + break; default: /* * unsupported PD @@ -256,6 +261,13 @@ gsm_a_stat_draw( stat_p->dtap_ss_message_type, gsm_a_dtap_msg_ss_strings); } + + if (dlg_dtap_tp.win != NULL) + { + gsm_a_stat_draw_aux(&dlg_dtap_tp, + stat_p->dtap_tp_message_type, + gsm_a_dtap_msg_tp_strings); + } } @@ -661,6 +673,23 @@ gsm_a_stat_gtk_dtap_ss_init( gsm_a_stat_gtk_dtap_ss_cb(NULL, NULL); } +static void +gsm_a_stat_gtk_dtap_tp_cb( + GtkWidget *w _U_, + gpointer d _U_) +{ + gsm_a_stat_gtk_dtap_cb(w, d, &dlg_dtap_tp, + "GSM A-I/F DTAP Special Conformance Testing Functions Statistics", + gsm_a_dtap_msg_tp_strings); +} + +static void +gsm_a_stat_gtk_dtap_tp_init( + const char *optarg _U_, + void *userdata _U_) +{ + gsm_a_stat_gtk_dtap_tp_cb(NULL, NULL); +} void register_tap_listener_gtkgsm_a_stat(void) @@ -715,4 +744,8 @@ register_tap_listener_gtkgsm_a_stat(void) register_stat_menu_item("GSM/A-Interface DTAP/Supplementary Services", REGISTER_STAT_GROUP_TELEPHONY, gsm_a_stat_gtk_dtap_ss_cb, NULL, NULL, NULL); register_stat_cmd_arg("gsm_a,dtap_ss", gsm_a_stat_gtk_dtap_ss_init,NULL); + + register_stat_menu_item("GSM/A-Interface DTAP/Special Conformance Testing Functions", REGISTER_STAT_GROUP_TELEPHONY, + gsm_a_stat_gtk_dtap_tp_cb, NULL, NULL, NULL); + register_stat_cmd_arg("gsm_a,dtap_tp", gsm_a_stat_gtk_dtap_tp_init,NULL); } diff --git a/tap-gsm_astat.c b/tap-gsm_astat.c index 9c2c85fd7c..e00fce7809 100644 --- a/tap-gsm_astat.c +++ b/tap-gsm_astat.c @@ -57,6 +57,7 @@ typedef struct _gsm_a_stat_t { int dtap_sms_message_type[0xff]; int dtap_sm_message_type[0xff]; int dtap_ss_message_type[0xff]; + int dtap_tp_message_type[0xff]; } gsm_a_stat_t; @@ -100,6 +101,9 @@ gsm_a_stat_packet( case PD_SS: stat_p->dtap_ss_message_type[tap_p->message_type]++; break; + case PD_TP: + stat_p->dtap_tp_message_type[tap_p->message_type]++; + break; default: /* * unsupported PD @@ -265,6 +269,23 @@ gsm_a_stat_draw( i++; } + printf("\nDTAP %s\n", gsm_a_pd_str[PD_TP]); + printf("Message (ID)Type Number\n"); + + i = 0; + while (gsm_a_dtap_msg_tp_strings[i].strptr) + { + if (stat_p->dtap_tp_message_type[gsm_a_dtap_msg_tp_strings[i].value] > 0) + { + printf("0x%02x %-50s%d\n", + gsm_a_dtap_msg_tp_strings[i].value, + gsm_a_dtap_msg_tp_strings[i].strptr, + stat_p->dtap_tp_message_type[gsm_a_dtap_msg_tp_strings[i].value]); + } + + i++; + } + printf("==============================================================\n"); } |