Add a REGISTER_STAT_GROUP_TELEPHONY_SCTP, make the SCTP chunk counter

register itself in that group, and get rid of its hardcoded menu item.

Also, as the H.225 counter is registering itself, get rid of its
hardcoded menu item.

svn path=/trunk/; revision=49662
This commit is contained in:
Guy Harris 2013-05-31 23:00:39 +00:00
parent d5e30ea820
commit e8947ae24d
6 changed files with 5 additions and 20 deletions

View File

@ -53,6 +53,7 @@ typedef enum {
REGISTER_STAT_GROUP_TELEPHONY, /* telephony specific */
REGISTER_STAT_GROUP_TELEPHONY_GSM, /* GSM (and UMTS?) */
REGISTER_STAT_GROUP_TELEPHONY_LTE, /* name says it all */
REGISTER_STAT_GROUP_TELEPHONY_SCTP, /* name says it all */
REGISTER_TOOLS_GROUP_UNSORTED /* unsorted tools */
} register_stat_group_t;

View File

@ -122,7 +122,6 @@ void mtp3_sum_gtk_sum_cb(GtkAction *action, gpointer user_data);
void rtp_analysis_cb(GtkAction *action, gpointer user_data);
void rtpstream_launch(GtkAction *action, gpointer user_data);
void sctp_analyse_start(GtkAction *action, gpointer user_data);
void sctp_chunk_counter_cb(GtkAction *action, gpointer user_data);
void sctp_stat_start(GtkAction *action, gpointer user_data);
void gui_iostat_cb(GtkAction *action, gpointer user_data);
@ -133,7 +132,6 @@ void ansi_a_stat_gtk_bsmap_cb(GtkAction *action, gpointer user_data);
void ansi_a_stat_gtk_dtap_cb(GtkAction *action, gpointer user_data);
void ansi_map_stat_gtk_cb(GtkAction *action, gpointer user_data);
void h225_counter_cb(GtkAction *action, gpointer user_data);
void gsm_a_stat_gtk_bssmap_cb(GtkAction *action, gpointer user_data);
void gsm_a_stat_gtk_dtap_mm_cb(GtkAction *action, gpointer user_data);
void gsm_a_stat_gtk_dtap_rr_cb(GtkAction *action, gpointer user_data);

View File

@ -568,8 +568,3 @@ register_tap_listener_gtk_h225counter(void)
register_param_stat(&h225_counter_dlg, "_H.225",
REGISTER_STAT_GROUP_TELEPHONY);
}
void h225_counter_cb(GtkAction *action, gpointer user_data _U_)
{
tap_param_dlg_cb(action, &h225_counter_dlg);
}

View File

@ -1254,7 +1254,6 @@ static const char *ui_desc_menubar =
" <menuitem name='MAP-OP' action='/Telephony/GSM/MAP-OP'/>\n"
" <menuitem name='MAP-Summary' action='/Telephony/GSM/MAPSummary'/>\n"
" </menu>\n"
" <menuitem name='H225' action='/Telephony/H225'/>\n"
" <menu name= 'IAX2menu' action='/Telephony/IAX2'>\n"
" <menuitem name='StreamAnalysis' action='/Telephony/IAX2/StreamAnalysis'/>\n"
" </menu>\n"
@ -1276,7 +1275,6 @@ static const char *ui_desc_menubar =
" <menu name= 'SCTPmenu' action='/Telephony/SCTP'>\n"
" <menuitem name='AnalysethisAssociation' action='/Telephony/SCTP/AnalysethisAssociation'/>\n"
" <menuitem name='ShowAllAssociations' action='/Telephony/SCTP/ShowAllAssociations'/>\n"
" <menuitem name='ChunkCounter' action='/Telephony/SCTP/ChunkCounter'/>\n"
" </menu>\n"
" <menuitem name='SIP' action='/Telephony/SIP'/>\n"
" <menuitem name='SMPP' action='/Telephony/smpp_commands'/>\n"
@ -1705,8 +1703,6 @@ static const GtkActionEntry main_menu_bar_entries[] = {
{ "/Telephony/GSM/MAP-OP", NULL, "MAP Operation", NULL, NULL, G_CALLBACK(gsm_map_stat_gtk_cb) },
{ "/Telephony/GSM/MAPSummary", NULL, "MAP Summary", NULL, NULL, G_CALLBACK(gsm_map_stat_gtk_sum_cb) },
{ "/Telephony/H225", NULL, "_H.225...", NULL, NULL, G_CALLBACK(h225_counter_cb) },
{ "/Telephony/IAX2", NULL, "IA_X2", NULL, NULL, NULL },
{ "/Telephony/IAX2/StreamAnalysis", NULL, "Stream Analysis...", NULL, NULL, G_CALLBACK(iax2_analysis_cb) },
@ -1725,7 +1721,6 @@ static const GtkActionEntry main_menu_bar_entries[] = {
{ "/Telephony/SCTP", NULL, "S_CTP", NULL, NULL, NULL },
{ "/Telephony/SCTP/AnalysethisAssociation", NULL, "Analyse this Association", NULL, NULL, G_CALLBACK(sctp_analyse_start) },
{ "/Telephony/SCTP/ShowAllAssociations", NULL, "Show All Associations...", NULL, NULL, G_CALLBACK(sctp_stat_start) },
{ "/Telephony/SCTP/ChunkCounter", NULL, "Chunk Counter", NULL, NULL, G_CALLBACK(sctp_chunk_counter_cb) },
{ "/Telephony/SIP", NULL, "_SIP...", NULL, NULL, G_CALLBACK(sipstat_cb) },
{ "/Telephony/smpp_commands", NULL, "SM_PPOperations", NULL, NULL, G_CALLBACK(gtk_stats_tree_cb) },
{ "/Telephony/ucp_messages", NULL, "_UCP Messages", NULL, NULL, G_CALLBACK(gtk_stats_tree_cb) },
@ -3924,6 +3919,7 @@ stat_group_name(register_stat_group_t group)
{REGISTER_STAT_GROUP_TELEPHONY, "/Menubar/TelephonyMenu|Telephony"}, /* telephony specific */
{REGISTER_STAT_GROUP_TELEPHONY_GSM, "/Menubar/TelephonyMenu|Telephony/GSM|Telephony#GSM"}, /* GSM-specific */
{REGISTER_STAT_GROUP_TELEPHONY_LTE, "/Menubar/TelephonyMenu|Telephony/LTEmenu|Telephony#LTE"}, /* LTE-specific */
{REGISTER_STAT_GROUP_TELEPHONY_SCTP, "/Menubar/TelephonyMenu|Telephony/SCTPmenu|Telephony#SCTP"}, /* SCTP-specific */
{REGISTER_TOOLS_GROUP_UNSORTED, "/Menubar/ToolsMenu|Tools"}, /* unsorted tools */
{0, NULL}
};

View File

@ -321,12 +321,6 @@ sctpstat_init(const char *opt_arg, void *userdata _U_)
void
register_tap_listener_sctpstat(void)
{
register_param_stat(&sctp_stat_dlg, "S_CTP/Chunk Counter",
REGISTER_STAT_GROUP_TELEPHONY);
register_param_stat(&sctp_stat_dlg, "Chunk Counter",
REGISTER_STAT_GROUP_TELEPHONY_SCTP);
}
void sctp_chunk_counter_cb(GtkAction *action _U_, gpointer user_data _U_)
{
tap_param_dlg_cb(action, &sctp_stat_dlg);
}

View File

@ -101,6 +101,7 @@ register_param_stat(tap_param_dlg *info, const char *name,
case REGISTER_STAT_GROUP_TELEPHONY:
case REGISTER_STAT_GROUP_TELEPHONY_GSM:
case REGISTER_STAT_GROUP_TELEPHONY_LTE:
case REGISTER_STAT_GROUP_TELEPHONY_SCTP:
break;
case REGISTER_TOOLS_GROUP_UNSORTED: