2003-06-21 01:42:46 +00:00
/* service_response_time_table.c
* service_response_time_table 2003 Ronnie Sahlberg
* Helper routines common to all service response time statistics
* tap .
*
2006-05-21 05:12:17 +00:00
* Wireshark - Network traffic analyzer
* By Gerald Combs < gerald @ wireshark . org >
2003-06-21 01:42:46 +00:00
* Copyright 1998 Gerald Combs
2010-08-05 22:34:59 +00:00
*
2003-06-21 01:42:46 +00:00
* This program is free software ; you can redistribute it and / or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation ; either version 2
* of the License , or ( at your option ) any later version .
2010-08-05 22:34:59 +00:00
*
2003-06-21 01:42:46 +00:00
* This program is distributed in the hope that it will be useful ,
* but WITHOUT ANY WARRANTY ; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE . See the
* GNU General Public License for more details .
2010-08-05 22:34:59 +00:00
*
2003-06-21 01:42:46 +00:00
* You should have received a copy of the GNU General Public License
* along with this program ; if not , write to the Free Software
2012-06-28 22:56:06 +00:00
* Foundation , Inc . , 51 Franklin Street , Fifth Floor , Boston , MA 02110 - 1301 USA .
2003-06-21 01:42:46 +00:00
*/
2012-09-20 01:48:30 +00:00
# include "config.h"
2008-04-13 03:32:24 +00:00
Further refactor SRT stats.
Create "common" SRT tap data collection intended for all GUIs. Refactor/merge functionality of existing dissectors that have SRT support (AFP, DCERPC, Diameter, FC, GTP, LDAP, NCP, RPC, SCIS, SMB, and SMB2) for both TShark and GTK.
SMB and DCERPC "tap packet filtering" were different between TShark and GTK, so I went with GTK filter logic.
CAMEL "tap packet filtering" was different between TShark and GTK, so GTK filtering logic was pushed to the dissector and the TShark tap was left alone.
Change-Id: I7d6eaad0673fe628ef337f9165d7ed94f4a5e1cc
Reviewed-on: https://code.wireshark.org/review/8894
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-06-16 21:07:04 +00:00
# include <gtk/gtk.h>
2008-04-13 03:32:24 +00:00
2003-06-21 01:42:46 +00:00
# include "epan/packet_info.h"
Further refactor SRT stats.
Create "common" SRT tap data collection intended for all GUIs. Refactor/merge functionality of existing dissectors that have SRT support (AFP, DCERPC, Diameter, FC, GTP, LDAP, NCP, RPC, SCIS, SMB, and SMB2) for both TShark and GTK.
SMB and DCERPC "tap packet filtering" were different between TShark and GTK, so I went with GTK filter logic.
CAMEL "tap packet filtering" was different between TShark and GTK, so GTK filtering logic was pushed to the dissector and the TShark tap was left alone.
Change-Id: I7d6eaad0673fe628ef337f9165d7ed94f4a5e1cc
Reviewed-on: https://code.wireshark.org/review/8894
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-06-16 21:07:04 +00:00
# include "epan/proto.h"
2008-04-13 03:32:24 +00:00
2012-01-16 01:07:52 +00:00
# include "ui/simple_dialog.h"
2012-08-01 19:18:49 +00:00
# include "ui/utf8_entities.h"
2008-04-13 03:32:24 +00:00
2012-01-15 21:59:11 +00:00
# include "ui/gtk/filter_utils.h"
# include "ui/gtk/gui_utils.h"
Further refactor SRT stats.
Create "common" SRT tap data collection intended for all GUIs. Refactor/merge functionality of existing dissectors that have SRT support (AFP, DCERPC, Diameter, FC, GTP, LDAP, NCP, RPC, SCIS, SMB, and SMB2) for both TShark and GTK.
SMB and DCERPC "tap packet filtering" were different between TShark and GTK, so I went with GTK filter logic.
CAMEL "tap packet filtering" was different between TShark and GTK, so GTK filtering logic was pushed to the dissector and the TShark tap was left alone.
Change-Id: I7d6eaad0673fe628ef337f9165d7ed94f4a5e1cc
Reviewed-on: https://code.wireshark.org/review/8894
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-06-16 21:07:04 +00:00
# include "ui/gtk/dlg_utils.h"
# include "ui/gtk/service_response_time_table.h"
# include "ui/gtk/tap_param_dlg.h"
# include "ui/gtk/main.h"
/* XXX - Part of temporary hack */
# include "epan/conversation.h"
# include "epan/dissectors/packet-scsi.h"
2008-04-13 03:32:24 +00:00
2010-08-05 22:14:16 +00:00
# define NANOSECS_PER_SEC 1000000000
2009-10-01 09:04:23 +00:00
enum
2003-06-21 05:39:45 +00:00
{
2010-08-05 22:34:59 +00:00
INDEX_COLUMN ,
PROCEDURE_COLUMN ,
CALLS_COLUMN ,
MIN_SRT_COLUMN ,
MAX_SRT_COLUMN ,
AVG_SRT_COLUMN ,
Add a "Sum" column to the Service Response Time (SRT) window.
The Service Response Time (SRT) window currently provides the
columns: Index, Procedure, Calls, Min SRT, Max SRT, and Avg SRT.
A Sum column has been found useful in some customer situations
to understand the total time spent doing a set of procedures.
For example, in one case we were trying to isolate whether most
time was being spent on a client thread or in the act of making
outbound calls. We knew the start and end time of the client call,
so with the "Sum" of time spent in that period, we could isolate
a particular set of procedures driving the slow down.
Additional changes made in this patch:
* Add " (s)" to Min, Max, Avg, and Sum columns to make it clear
that times are in seconds.
* Refactor out width and height constants used in calls to
gtk_window_set_default_size in most of the SRT users into
#define SRT_PREFERRED_WIDTH and SRT_PREFERRED_HEIGHT. Also
increase the common width of 550 to 650 to account for the
additional column.
Change-Id: I20f152eecbcd0bbf69f71c6c6b9f9463e8867e23
Reviewed-on: https://code.wireshark.org/review/7047
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-02-10 01:20:38 +00:00
SUM_SRT_COLUMN ,
2010-08-05 22:34:59 +00:00
N_COLUMNS
2009-10-01 09:04:23 +00:00
} ;
2003-06-21 05:39:45 +00:00
Further refactor SRT stats.
Create "common" SRT tap data collection intended for all GUIs. Refactor/merge functionality of existing dissectors that have SRT support (AFP, DCERPC, Diameter, FC, GTP, LDAP, NCP, RPC, SCIS, SMB, and SMB2) for both TShark and GTK.
SMB and DCERPC "tap packet filtering" were different between TShark and GTK, so I went with GTK filter logic.
CAMEL "tap packet filtering" was different between TShark and GTK, so GTK filtering logic was pushed to the dissector and the TShark tap was left alone.
Change-Id: I7d6eaad0673fe628ef337f9165d7ed94f4a5e1cc
Reviewed-on: https://code.wireshark.org/review/8894
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-06-16 21:07:04 +00:00
typedef struct _srt_t {
const char * type ;
const char * filter ;
gtk_srt_t gtk_data ;
register_srt_t * srt ;
srt_data_t data ;
} srt_t ;
2003-09-05 10:26:44 +00:00
static void
srt_select_filter_cb ( GtkWidget * widget _U_ , gpointer callback_data , guint callback_action )
{
Further refactor SRT stats.
Create "common" SRT tap data collection intended for all GUIs. Refactor/merge functionality of existing dissectors that have SRT support (AFP, DCERPC, Diameter, FC, GTP, LDAP, NCP, RPC, SCIS, SMB, and SMB2) for both TShark and GTK.
SMB and DCERPC "tap packet filtering" were different between TShark and GTK, so I went with GTK filter logic.
CAMEL "tap packet filtering" was different between TShark and GTK, so GTK filtering logic was pushed to the dissector and the TShark tap was left alone.
Change-Id: I7d6eaad0673fe628ef337f9165d7ed94f4a5e1cc
Reviewed-on: https://code.wireshark.org/review/8894
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-06-16 21:07:04 +00:00
gtk_srt_table_t * rst_table = ( gtk_srt_table_t * ) callback_data ;
srt_stat_table * rst = rst_table - > rst ;
2007-11-28 03:04:09 +00:00
char * str = NULL ;
2009-10-01 09:04:23 +00:00
GtkTreeIter iter ;
GtkTreeModel * model ;
GtkTreeSelection * sel ;
int selection ;
2003-09-05 10:26:44 +00:00
if ( rst - > filter_string = = NULL ) {
return ;
}
Further refactor SRT stats.
Create "common" SRT tap data collection intended for all GUIs. Refactor/merge functionality of existing dissectors that have SRT support (AFP, DCERPC, Diameter, FC, GTP, LDAP, NCP, RPC, SCIS, SMB, and SMB2) for both TShark and GTK.
SMB and DCERPC "tap packet filtering" were different between TShark and GTK, so I went with GTK filter logic.
CAMEL "tap packet filtering" was different between TShark and GTK, so GTK filtering logic was pushed to the dissector and the TShark tap was left alone.
Change-Id: I7d6eaad0673fe628ef337f9165d7ed94f4a5e1cc
Reviewed-on: https://code.wireshark.org/review/8894
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-06-16 21:07:04 +00:00
sel = gtk_tree_view_get_selection ( GTK_TREE_VIEW ( rst_table - > table ) ) ;
2009-10-01 09:04:23 +00:00
if ( ! gtk_tree_selection_get_selected ( sel , & model , & iter ) )
return ;
2015-06-05 20:17:13 +00:00
gtk_tree_model_get ( model , & iter , SRT_COLUMN_INDEX , & selection , - 1 ) ;
2003-09-05 10:26:44 +00:00
if ( selection > = ( int ) rst - > num_procs ) {
2004-01-31 03:22:42 +00:00
simple_dialog ( ESD_TYPE_ERROR , ESD_BTN_OK , " No procedure selected " ) ;
2003-09-05 10:26:44 +00:00
return ;
}
2008-05-17 23:01:28 +00:00
str = g_strdup_printf ( " %s==%d " , rst - > filter_string , selection ) ;
2003-09-05 10:26:44 +00:00
2008-05-17 23:01:28 +00:00
apply_selected_filter ( callback_action , str ) ;
2003-09-05 10:26:44 +00:00
2007-11-28 03:04:09 +00:00
g_free ( str ) ;
2003-09-05 10:26:44 +00:00
}
2010-08-23 15:58:48 +00:00
static gboolean
Further refactor SRT stats.
Create "common" SRT tap data collection intended for all GUIs. Refactor/merge functionality of existing dissectors that have SRT support (AFP, DCERPC, Diameter, FC, GTP, LDAP, NCP, RPC, SCIS, SMB, and SMB2) for both TShark and GTK.
SMB and DCERPC "tap packet filtering" were different between TShark and GTK, so I went with GTK filter logic.
CAMEL "tap packet filtering" was different between TShark and GTK, so GTK filtering logic was pushed to the dissector and the TShark tap was left alone.
Change-Id: I7d6eaad0673fe628ef337f9165d7ed94f4a5e1cc
Reviewed-on: https://code.wireshark.org/review/8894
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-06-16 21:07:04 +00:00
srt_show_popup_menu_cb ( void * widg _U_ , GdkEvent * event , gtk_srt_table_t * rst )
2003-09-05 10:26:44 +00:00
{
GdkEventButton * bevent = ( GdkEventButton * ) event ;
if ( event - > type = = GDK_BUTTON_PRESS & & bevent - > button = = 3 ) {
2010-08-05 22:34:59 +00:00
gtk_menu_popup ( GTK_MENU ( rst - > menu ) , NULL , NULL , NULL , NULL ,
2003-09-05 10:26:44 +00:00
bevent - > button , bevent - > time ) ;
}
return FALSE ;
}
2003-10-10 08:52:19 +00:00
2010-09-02 06:22:12 +00:00
/* Action callbacks */
2010-08-29 19:37:15 +00:00
static void
apply_as_selected_cb ( GtkWidget * widget , gpointer user_data )
{
srt_select_filter_cb ( widget , user_data , CALLBACK_MATCH ( ACTYPE_SELECTED , 0 ) ) ;
}
static void
apply_as_not_selected_cb ( GtkWidget * widget , gpointer user_data )
{
srt_select_filter_cb ( widget , user_data , CALLBACK_MATCH ( ACTYPE_NOT_SELECTED , 0 ) ) ;
}
static void
apply_as_and_selected_cb ( GtkWidget * widget , gpointer user_data )
{
srt_select_filter_cb ( widget , user_data , CALLBACK_MATCH ( ACTYPE_AND_SELECTED , 0 ) ) ;
}
static void
apply_as_or_selected_cb ( GtkWidget * widget , gpointer user_data )
{
srt_select_filter_cb ( widget , user_data , CALLBACK_MATCH ( ACTYPE_OR_SELECTED , 0 ) ) ;
}
static void
apply_as_and_not_selected_cb ( GtkWidget * widget , gpointer user_data )
{
srt_select_filter_cb ( widget , user_data , CALLBACK_MATCH ( ACTYPE_AND_NOT_SELECTED , 0 ) ) ;
}
static void
apply_as_or_not_selected_cb ( GtkWidget * widget , gpointer user_data )
{
srt_select_filter_cb ( widget , user_data , CALLBACK_MATCH ( ACTYPE_OR_NOT_SELECTED , 0 ) ) ;
}
2003-09-05 10:26:44 +00:00
2010-08-29 19:37:15 +00:00
static void
prep_as_selected_cb ( GtkWidget * widget , gpointer user_data )
{
srt_select_filter_cb ( widget , user_data , CALLBACK_PREPARE ( ACTYPE_SELECTED , 0 ) ) ;
}
static void
prep_as_not_selected_cb ( GtkWidget * widget , gpointer user_data )
{
srt_select_filter_cb ( widget , user_data , CALLBACK_PREPARE ( ACTYPE_NOT_SELECTED , 0 ) ) ;
}
static void
prep_as_and_selected_cb ( GtkWidget * widget , gpointer user_data )
{
srt_select_filter_cb ( widget , user_data , CALLBACK_PREPARE ( ACTYPE_AND_SELECTED , 0 ) ) ;
}
static void
prep_as_or_selected_cb ( GtkWidget * widget , gpointer user_data )
{
srt_select_filter_cb ( widget , user_data , CALLBACK_PREPARE ( ACTYPE_OR_SELECTED , 0 ) ) ;
}
static void
prep_as_and_not_selected_cb ( GtkWidget * widget , gpointer user_data )
{
srt_select_filter_cb ( widget , user_data , CALLBACK_PREPARE ( ACTYPE_AND_NOT_SELECTED , 0 ) ) ;
}
static void
prep_as_or_not_selected_cb ( GtkWidget * widget , gpointer user_data )
{
srt_select_filter_cb ( widget , user_data , CALLBACK_PREPARE ( ACTYPE_OR_NOT_SELECTED , 0 ) ) ;
}
static void
find_selected_cb ( GtkWidget * widget , gpointer user_data )
{
srt_select_filter_cb ( widget , user_data , CALLBACK_FIND_FRAME ( ACTYPE_SELECTED , 0 ) ) ;
}
static void
find_not_selected_cb ( GtkWidget * widget , gpointer user_data )
{
srt_select_filter_cb ( widget , user_data , CALLBACK_FIND_FRAME ( ACTYPE_NOT_SELECTED , 0 ) ) ;
}
static void
find_prev_selected_cb ( GtkWidget * widget , gpointer user_data )
{
srt_select_filter_cb ( widget , user_data , CALLBACK_FIND_PREVIOUS ( ACTYPE_SELECTED , 0 ) ) ;
}
static void
find_prev_not_selected_cb ( GtkWidget * widget , gpointer user_data )
{
srt_select_filter_cb ( widget , user_data , CALLBACK_FIND_PREVIOUS ( ACTYPE_NOT_SELECTED , 0 ) ) ;
}
static void
find_next_selected_cb ( GtkWidget * widget , gpointer user_data )
{
srt_select_filter_cb ( widget , user_data , CALLBACK_FIND_NEXT ( ACTYPE_SELECTED , 0 ) ) ;
}
static void
find_next_not_selected_cb ( GtkWidget * widget , gpointer user_data )
{
srt_select_filter_cb ( widget , user_data , CALLBACK_FIND_NEXT ( ACTYPE_NOT_SELECTED , 0 ) ) ;
}
static void
color_selected_cb ( GtkWidget * widget , gpointer user_data )
{
srt_select_filter_cb ( widget , user_data , CALLBACK_COLORIZE ( ACTYPE_SELECTED , 0 ) ) ;
}
static void
color_not_selected_cb ( GtkWidget * widget , gpointer user_data )
{
srt_select_filter_cb ( widget , user_data , CALLBACK_COLORIZE ( ACTYPE_SELECTED , 0 ) ) ;
}
static const char * ui_desc_service_resp_t_filter_popup =
" <ui> \n "
" <popup name='ServiceRespTFilterPopup'> \n "
" <menu action='/Apply as Filter'> \n "
" <menuitem action='/Apply as Filter/Selected'/> \n "
2010-10-03 16:09:25 +00:00
" <menuitem action='/Apply as Filter/ " UTF8_HORIZONTAL_ELLIPSIS " not Selected'/> \n "
" <menuitem action='/Apply as Filter/ " UTF8_HORIZONTAL_ELLIPSIS " and Selected'/> \n "
" <menuitem action='/Apply as Filter/ " UTF8_HORIZONTAL_ELLIPSIS " or Selected'/> \n "
" <menuitem action='/Apply as Filter/ " UTF8_HORIZONTAL_ELLIPSIS " and not Selected'/> \n "
" <menuitem action='/Apply as Filter/ " UTF8_HORIZONTAL_ELLIPSIS " or not Selected'/> \n "
2010-08-29 19:37:15 +00:00
" </menu> \n "
" <menu action='/Prepare a Filter'> \n "
" <menuitem action='/Prepare a Filter/Selected'/> \n "
2010-10-03 16:09:25 +00:00
" <menuitem action='/Prepare a Filter/ " UTF8_HORIZONTAL_ELLIPSIS " not Selected'/> \n "
" <menuitem action='/Prepare a Filter/ " UTF8_HORIZONTAL_ELLIPSIS " and Selected'/> \n "
" <menuitem action='/Prepare a Filter/ " UTF8_HORIZONTAL_ELLIPSIS " or Selected'/> \n "
" <menuitem action='/Prepare a Filter/ " UTF8_HORIZONTAL_ELLIPSIS " and not Selected'/> \n "
" <menuitem action='/Prepare a Filter/ " UTF8_HORIZONTAL_ELLIPSIS " or not Selected'/> \n "
2010-08-29 19:37:15 +00:00
" </menu> \n "
" <menu action='/Find Frame'> \n "
" <menu action='/Find Frame/Find Frame'> \n "
" <menuitem action='/Find Frame/Selected'/> \n "
" <menuitem action='/Find Frame/Not Selected'/> \n "
" </menu> \n "
" <menu action='/Find Frame/Find Next'> \n "
" <menuitem action='/Find Next/Selected'/> \n "
" <menuitem action='/Find Next/Not Selected'/> \n "
" </menu> \n "
" <menu action='/Find Frame/Find Previous'> \n "
" <menuitem action='/Find Previous/Selected'/> \n "
" <menuitem action='/Find Previous/Not Selected'/> \n "
" </menu> \n "
" </menu> \n "
" <menu action='/Colorize Procedure'> \n "
" <menuitem action='/Colorize Procedure/Selected'/> \n "
" <menuitem action='/Colorize Procedure/Not Selected'/> \n "
" </menu> \n "
" </popup> \n "
" </ui> \n " ;
2010-08-30 16:10:01 +00:00
/*
2010-08-29 19:37:15 +00:00
* GtkActionEntry
* typedef struct {
* const gchar * name ;
* const gchar * stock_id ;
* const gchar * label ;
* const gchar * accelerator ;
* const gchar * tooltip ;
* GCallback callback ;
* } GtkActionEntry ;
2015-02-15 18:58:39 +00:00
* const gchar * name ; The name of the action .
* const gchar * stock_id ; The stock id for the action , or the name of an icon from the icon theme .
* const gchar * label ; The label for the action . This field should typically be marked for translation ,
2010-08-30 16:10:01 +00:00
* see gtk_action_group_set_translation_domain ( ) .
2015-02-15 18:58:39 +00:00
* If label is NULL , the label of the stock item with id stock_id is used .
* const gchar * accelerator ; The accelerator for the action , in the format understood by gtk_accelerator_parse ( ) .
* const gchar * tooltip ; The tooltip for the action . This field should typically be marked for translation ,
* see gtk_action_group_set_translation_domain ( ) .
* GCallback callback ; The function to call when the action is activated .
2010-08-29 19:37:15 +00:00
*
*/
static const GtkActionEntry service_resp_t__popup_entries [ ] = {
2015-02-15 18:58:39 +00:00
{ " /Apply as Filter " , NULL , " Apply as Filter " , NULL , NULL , NULL } ,
{ " /Prepare a Filter " , NULL , " Prepare a Filter " , NULL , NULL , NULL } ,
{ " /Find Frame " , NULL , " Find Frame " , NULL , NULL , NULL } ,
{ " /Find Frame/Find Frame " , NULL , " Find Frame " , NULL , NULL , NULL } ,
{ " /Find Frame/Find Next " , NULL , " Find Next " , NULL , NULL , NULL } ,
{ " /Find Frame/Find Previous " , NULL , " Find Previous " , NULL , NULL , NULL } ,
{ " /Colorize Procedure " , NULL , " Colorize Procedure " , NULL , NULL , NULL } ,
{ " /Apply as Filter/Selected " , NULL , " Selected " , NULL , " Selected " , G_CALLBACK ( apply_as_selected_cb ) } ,
{ " /Apply as Filter/ " UTF8_HORIZONTAL_ELLIPSIS " not Selected " , NULL , UTF8_HORIZONTAL_ELLIPSIS " not Selected " , NULL , UTF8_HORIZONTAL_ELLIPSIS " not Selected " , G_CALLBACK ( apply_as_not_selected_cb ) } ,
{ " /Apply as Filter/ " UTF8_HORIZONTAL_ELLIPSIS " and Selected " , NULL , UTF8_HORIZONTAL_ELLIPSIS " and Selected " , NULL , UTF8_HORIZONTAL_ELLIPSIS " and Selected " , G_CALLBACK ( apply_as_and_selected_cb ) } ,
{ " /Apply as Filter/ " UTF8_HORIZONTAL_ELLIPSIS " or Selected " , NULL , UTF8_HORIZONTAL_ELLIPSIS " or Selected " , NULL , UTF8_HORIZONTAL_ELLIPSIS " or Selected " , G_CALLBACK ( apply_as_or_selected_cb ) } ,
{ " /Apply as Filter/ " UTF8_HORIZONTAL_ELLIPSIS " and not Selected " , NULL , UTF8_HORIZONTAL_ELLIPSIS " and not Selected " , NULL , UTF8_HORIZONTAL_ELLIPSIS " and not Selected " , G_CALLBACK ( apply_as_and_not_selected_cb ) } ,
{ " /Apply as Filter/ " UTF8_HORIZONTAL_ELLIPSIS " or not Selected " , NULL , UTF8_HORIZONTAL_ELLIPSIS " or not Selected " , NULL , UTF8_HORIZONTAL_ELLIPSIS " or not Selected " , G_CALLBACK ( apply_as_or_not_selected_cb ) } ,
{ " /Prepare a Filter/Selected " , NULL , " Selected " , NULL , " selcted " , G_CALLBACK ( prep_as_selected_cb ) } ,
{ " /Prepare a Filter/ " UTF8_HORIZONTAL_ELLIPSIS " not Selected " , NULL , UTF8_HORIZONTAL_ELLIPSIS " not Selected " , NULL , UTF8_HORIZONTAL_ELLIPSIS " not Selected " , G_CALLBACK ( prep_as_not_selected_cb ) } ,
{ " /Prepare a Filter/ " UTF8_HORIZONTAL_ELLIPSIS " and Selected " , NULL , UTF8_HORIZONTAL_ELLIPSIS " and Selected " , NULL , UTF8_HORIZONTAL_ELLIPSIS " and Selected " , G_CALLBACK ( prep_as_and_selected_cb ) } ,
{ " /Prepare a Filter/ " UTF8_HORIZONTAL_ELLIPSIS " or Selected " , NULL , UTF8_HORIZONTAL_ELLIPSIS " or Selected " , NULL , UTF8_HORIZONTAL_ELLIPSIS " or Selected " , G_CALLBACK ( prep_as_or_selected_cb ) } ,
{ " /Prepare a Filter/ " UTF8_HORIZONTAL_ELLIPSIS " and not Selected " , NULL , UTF8_HORIZONTAL_ELLIPSIS " and not Selected " , NULL , UTF8_HORIZONTAL_ELLIPSIS " and not Selected " , G_CALLBACK ( prep_as_and_not_selected_cb ) } ,
{ " /Prepare a Filter/ " UTF8_HORIZONTAL_ELLIPSIS " or not Selected " , NULL , UTF8_HORIZONTAL_ELLIPSIS " or not Selected " , NULL , UTF8_HORIZONTAL_ELLIPSIS " or not Selected " , G_CALLBACK ( prep_as_or_not_selected_cb ) } ,
{ " /Find Frame/Selected " , NULL , " Selected " , NULL , " Selected " , G_CALLBACK ( find_selected_cb ) } ,
{ " /Find Frame/Not Selected " , NULL , " Not Selected " , NULL , " Not Selected " , G_CALLBACK ( find_not_selected_cb ) } ,
{ " /Find Previous/Selected " , NULL , " Selected " , NULL , " Selected " , G_CALLBACK ( find_prev_selected_cb ) } ,
{ " /Find Previous/Not Selected " , NULL , " Not Selected " , NULL , " Not Selected " , G_CALLBACK ( find_prev_not_selected_cb ) } ,
{ " /Find Next/Selected " , NULL , " Selected " , NULL , " Selected " , G_CALLBACK ( find_next_selected_cb ) } ,
{ " /Find Next/Not Selected " , NULL , " Not Selected " , NULL , " Not Selected " , G_CALLBACK ( find_next_not_selected_cb ) } ,
{ " /Colorize Procedure/Selected " , NULL , " Selected " , NULL , " Selected " , G_CALLBACK ( color_selected_cb ) } ,
{ " /Colorize Procedure/Not Selected " , NULL , " Not Selected " , NULL , " Not Selected " , G_CALLBACK ( color_not_selected_cb ) } ,
2010-08-29 19:37:15 +00:00
} ;
2010-09-02 06:22:12 +00:00
2003-09-05 10:26:44 +00:00
static void
Further refactor SRT stats.
Create "common" SRT tap data collection intended for all GUIs. Refactor/merge functionality of existing dissectors that have SRT support (AFP, DCERPC, Diameter, FC, GTP, LDAP, NCP, RPC, SCIS, SMB, and SMB2) for both TShark and GTK.
SMB and DCERPC "tap packet filtering" were different between TShark and GTK, so I went with GTK filter logic.
CAMEL "tap packet filtering" was different between TShark and GTK, so GTK filtering logic was pushed to the dissector and the TShark tap was left alone.
Change-Id: I7d6eaad0673fe628ef337f9165d7ed94f4a5e1cc
Reviewed-on: https://code.wireshark.org/review/8894
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-06-16 21:07:04 +00:00
srt_create_popup_menu ( gtk_srt_table_t * rst_table )
2003-09-05 10:26:44 +00:00
{
2010-08-29 19:37:15 +00:00
GtkUIManager * ui_manager ;
GtkActionGroup * action_group ;
GError * error = NULL ;
2010-08-30 16:10:01 +00:00
action_group = gtk_action_group_new ( " ServiceRespTFilterPopupActionGroup " ) ;
2011-06-09 08:51:30 +00:00
gtk_action_group_add_actions ( action_group , /* the action group */
2013-03-21 02:29:09 +00:00
( GtkActionEntry * ) service_resp_t__popup_entries , /* an array of action descriptions */
2010-08-30 19:14:54 +00:00
G_N_ELEMENTS ( service_resp_t__popup_entries ) , /* the number of entries */
Further refactor SRT stats.
Create "common" SRT tap data collection intended for all GUIs. Refactor/merge functionality of existing dissectors that have SRT support (AFP, DCERPC, Diameter, FC, GTP, LDAP, NCP, RPC, SCIS, SMB, and SMB2) for both TShark and GTK.
SMB and DCERPC "tap packet filtering" were different between TShark and GTK, so I went with GTK filter logic.
CAMEL "tap packet filtering" was different between TShark and GTK, so GTK filtering logic was pushed to the dissector and the TShark tap was left alone.
Change-Id: I7d6eaad0673fe628ef337f9165d7ed94f4a5e1cc
Reviewed-on: https://code.wireshark.org/review/8894
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-06-16 21:07:04 +00:00
rst_table ) ; /* data to pass to the action callbacks */
2010-08-29 19:37:15 +00:00
ui_manager = gtk_ui_manager_new ( ) ;
2010-08-30 16:10:01 +00:00
gtk_ui_manager_insert_action_group ( ui_manager ,
action_group ,
2010-08-29 19:37:15 +00:00
0 ) ; /* the position at which the group will be inserted */
2010-08-30 16:10:01 +00:00
gtk_ui_manager_add_ui_from_string ( ui_manager , ui_desc_service_resp_t_filter_popup , - 1 , & error ) ;
if ( error ! = NULL )
2015-02-15 18:58:39 +00:00
{
fprintf ( stderr , " Warning: building service response time filter popup failed: %s \n " ,
error - > message ) ;
g_error_free ( error ) ;
error = NULL ;
}
2010-09-02 06:22:12 +00:00
Further refactor SRT stats.
Create "common" SRT tap data collection intended for all GUIs. Refactor/merge functionality of existing dissectors that have SRT support (AFP, DCERPC, Diameter, FC, GTP, LDAP, NCP, RPC, SCIS, SMB, and SMB2) for both TShark and GTK.
SMB and DCERPC "tap packet filtering" were different between TShark and GTK, so I went with GTK filter logic.
CAMEL "tap packet filtering" was different between TShark and GTK, so GTK filtering logic was pushed to the dissector and the TShark tap was left alone.
Change-Id: I7d6eaad0673fe628ef337f9165d7ed94f4a5e1cc
Reviewed-on: https://code.wireshark.org/review/8894
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-06-16 21:07:04 +00:00
rst_table - > menu = gtk_ui_manager_get_widget ( ui_manager , " /ServiceRespTFilterPopup " ) ;
g_signal_connect ( rst_table - > table , " button_press_event " , G_CALLBACK ( srt_show_popup_menu_cb ) , rst_table ) ;
2003-09-05 10:26:44 +00:00
}
2009-10-05 17:19:39 +00:00
/* ---------------- */
static void
srt_time_func ( GtkTreeViewColumn * column _U_ ,
2010-08-05 22:34:59 +00:00
GtkCellRenderer * renderer ,
GtkTreeModel * model ,
GtkTreeIter * iter ,
gpointer user_data )
{
2009-10-05 17:19:39 +00:00
gchar * str ;
nstime_t * data ;
2010-08-05 22:34:59 +00:00
/* The col to get data from is in userdata */
gint data_column = GPOINTER_TO_INT ( user_data ) ;
2009-10-05 17:19:39 +00:00
2010-08-05 22:34:59 +00:00
gtk_tree_model_get ( model , iter , data_column , & data , - 1 ) ;
if ( ! data ) {
g_object_set ( renderer , " text " , " " , NULL ) ;
return ;
2009-10-05 17:19:39 +00:00
}
2010-08-05 22:14:16 +00:00
str = g_strdup_printf ( " %3d.%06d " , ( int ) data - > secs , ( data - > nsecs + 500 ) / 1000 ) ;
2009-10-05 17:19:39 +00:00
g_object_set ( renderer , " text " , str , NULL ) ;
g_free ( str ) ;
}
static void
srt_avg_func ( GtkTreeViewColumn * column _U_ ,
2010-08-05 22:34:59 +00:00
GtkCellRenderer * renderer ,
GtkTreeModel * model ,
GtkTreeIter * iter ,
gpointer user_data )
{
gchar * str ;
guint64 td ;
gint data_column = GPOINTER_TO_INT ( user_data ) ;
2009-10-05 17:19:39 +00:00
2010-08-05 22:34:59 +00:00
gtk_tree_model_get ( model , iter , data_column , & td , - 1 ) ;
str = g_strdup_printf ( " %3d.%06d " ,
( int ) ( td / 1000000 ) , ( int ) ( td % 1000000 ) ) ;
g_object_set ( renderer , " text " , str , NULL ) ;
g_free ( str ) ;
2009-10-05 17:19:39 +00:00
}
static gint
srt_time_sort_func ( GtkTreeModel * model ,
2010-08-30 19:14:54 +00:00
GtkTreeIter * a ,
GtkTreeIter * b ,
gpointer user_data )
2009-10-05 17:19:39 +00:00
{
nstime_t * ns_a ;
nstime_t * ns_b ;
gint ret = 0 ;
gint data_column = GPOINTER_TO_INT ( user_data ) ;
2010-08-05 22:34:59 +00:00
gtk_tree_model_get ( model , a , data_column , & ns_a , - 1 ) ;
gtk_tree_model_get ( model , b , data_column , & ns_b , - 1 ) ;
2009-10-05 17:19:39 +00:00
if ( ns_a = = ns_b ) {
ret = 0 ;
2010-08-05 22:34:59 +00:00
}
2009-10-05 17:19:39 +00:00
else if ( ns_a = = NULL | | ns_b = = NULL ) {
ret = ( ns_a = = NULL ) ? - 1 : 1 ;
2010-08-05 22:34:59 +00:00
}
2009-10-05 17:19:39 +00:00
else {
ret = nstime_cmp ( ns_a , ns_b ) ;
}
return ret ;
}
Further refactor SRT stats.
Create "common" SRT tap data collection intended for all GUIs. Refactor/merge functionality of existing dissectors that have SRT support (AFP, DCERPC, Diameter, FC, GTP, LDAP, NCP, RPC, SCIS, SMB, and SMB2) for both TShark and GTK.
SMB and DCERPC "tap packet filtering" were different between TShark and GTK, so I went with GTK filter logic.
CAMEL "tap packet filtering" was different between TShark and GTK, so GTK filtering logic was pushed to the dissector and the TShark tap was left alone.
Change-Id: I7d6eaad0673fe628ef337f9165d7ed94f4a5e1cc
Reviewed-on: https://code.wireshark.org/review/8894
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-06-16 21:07:04 +00:00
static void
srt_set_title ( srt_t * ss )
{
gchar * str ;
str = g_strdup_printf ( " %s Service Response Time statistics " , proto_get_protocol_short_name ( find_protocol_by_id ( get_srt_proto_id ( ss - > srt ) ) ) ) ;
set_window_title ( ss - > gtk_data . win , str ) ;
g_free ( str ) ;
}
static gtk_srt_table_t *
get_gtk_table_from_srt ( srt_stat_table * rst , gtk_srt_t * gtk )
{
guint i ;
gtk_srt_table_t * srt ;
for ( i = 0 ; i < gtk - > gtk_srt_array - > len ; i + + ) {
srt = g_array_index ( gtk - > gtk_srt_array , gtk_srt_table_t * , i ) ;
if ( srt - > rst = = rst )
return srt ;
}
return NULL ;
}
2003-06-21 01:42:46 +00:00
void
Further refactor SRT stats.
Create "common" SRT tap data collection intended for all GUIs. Refactor/merge functionality of existing dissectors that have SRT support (AFP, DCERPC, Diameter, FC, GTP, LDAP, NCP, RPC, SCIS, SMB, and SMB2) for both TShark and GTK.
SMB and DCERPC "tap packet filtering" were different between TShark and GTK, so I went with GTK filter logic.
CAMEL "tap packet filtering" was different between TShark and GTK, so GTK filtering logic was pushed to the dissector and the TShark tap was left alone.
Change-Id: I7d6eaad0673fe628ef337f9165d7ed94f4a5e1cc
Reviewed-on: https://code.wireshark.org/review/8894
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-06-16 21:07:04 +00:00
free_table_data ( srt_stat_table * rst , void * gui_data )
{
gtk_srt_t * gtk_data = ( gtk_srt_t * ) gui_data ;
gtk_srt_table_t * gtk_table = get_gtk_table_from_srt ( rst , gtk_data ) ;
g_assert ( gtk_table ) ;
g_free ( gtk_table ) ;
}
static void
win_destroy_cb ( GtkWindow * win _U_ , gpointer data )
{
srt_t * ss = ( srt_t * ) data ;
remove_tap_listener ( & ss - > data ) ;
free_srt_table ( ss - > srt , ss - > data . srt_array , free_table_data , & ss - > gtk_data ) ;
g_free ( ss ) ;
}
void
init_gtk_srt_table ( srt_stat_table * rst , void * gui_data )
2003-06-21 01:42:46 +00:00
{
2009-10-01 09:04:23 +00:00
int i ;
GtkListStore * store ;
GtkWidget * tree ;
GtkTreeViewColumn * column ;
GtkCellRenderer * renderer ;
GtkTreeSortable * sortable ;
Further refactor SRT stats.
Create "common" SRT tap data collection intended for all GUIs. Refactor/merge functionality of existing dissectors that have SRT support (AFP, DCERPC, Diameter, FC, GTP, LDAP, NCP, RPC, SCIS, SMB, and SMB2) for both TShark and GTK.
SMB and DCERPC "tap packet filtering" were different between TShark and GTK, so I went with GTK filter logic.
CAMEL "tap packet filtering" was different between TShark and GTK, so GTK filtering logic was pushed to the dissector and the TShark tap was left alone.
Change-Id: I7d6eaad0673fe628ef337f9165d7ed94f4a5e1cc
Reviewed-on: https://code.wireshark.org/review/8894
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-06-16 21:07:04 +00:00
GtkWidget * label ;
GtkWidget * tab_page ;
gtk_srt_t * ss = ( gtk_srt_t * ) gui_data ;
GtkWidget * parent_box = ss - > vbox ;
2009-10-01 09:04:23 +00:00
GtkTreeSelection * sel ;
Further refactor SRT stats.
Create "common" SRT tap data collection intended for all GUIs. Refactor/merge functionality of existing dissectors that have SRT support (AFP, DCERPC, Diameter, FC, GTP, LDAP, NCP, RPC, SCIS, SMB, and SMB2) for both TShark and GTK.
SMB and DCERPC "tap packet filtering" were different between TShark and GTK, so I went with GTK filter logic.
CAMEL "tap packet filtering" was different between TShark and GTK, so GTK filtering logic was pushed to the dissector and the TShark tap was left alone.
Change-Id: I7d6eaad0673fe628ef337f9165d7ed94f4a5e1cc
Reviewed-on: https://code.wireshark.org/review/8894
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-06-16 21:07:04 +00:00
gtk_srt_table_t * gtk_table_data = g_new0 ( gtk_srt_table_t , 1 ) ;
2009-10-01 09:04:23 +00:00
Further refactor SRT stats.
Create "common" SRT tap data collection intended for all GUIs. Refactor/merge functionality of existing dissectors that have SRT support (AFP, DCERPC, Diameter, FC, GTP, LDAP, NCP, RPC, SCIS, SMB, and SMB2) for both TShark and GTK.
SMB and DCERPC "tap packet filtering" were different between TShark and GTK, so I went with GTK filter logic.
CAMEL "tap packet filtering" was different between TShark and GTK, so GTK filtering logic was pushed to the dissector and the TShark tap was left alone.
Change-Id: I7d6eaad0673fe628ef337f9165d7ed94f4a5e1cc
Reviewed-on: https://code.wireshark.org/review/8894
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-06-16 21:07:04 +00:00
/* Create GTK data for the table here */
gtk_table_data - > rst = rst ;
g_array_insert_val ( ss - > gtk_srt_array , ss - > gtk_srt_array - > len , gtk_table_data ) ;
/* Create the label for the table here */
label = gtk_label_new ( rst - > name ) ;
if ( ss - > main_nb = = NULL )
{
gtk_box_pack_start ( GTK_BOX ( ss - > vbox ) , label , FALSE , FALSE , 0 ) ;
}
else
{
GtkWidget * tab_label = gtk_label_new ( rst - > short_name ) ;
tab_page = ws_gtk_box_new ( GTK_ORIENTATION_VERTICAL , 6 , FALSE ) ;
gtk_notebook_append_page ( GTK_NOTEBOOK ( ss - > main_nb ) , tab_page , tab_label ) ;
gtk_box_pack_start ( GTK_BOX ( tab_page ) , label , FALSE , FALSE , 0 ) ;
parent_box = tab_page ;
}
2009-10-01 09:04:23 +00:00
/* Create the store */
2015-06-05 20:17:13 +00:00
store = gtk_list_store_new ( NUM_SRT_COLUMNS , /* Total number of columns */
2010-08-05 22:34:59 +00:00
G_TYPE_INT , /* Index */
G_TYPE_STRING , /* Procedure */
G_TYPE_UINT , /* Calls */
G_TYPE_POINTER , /* Min SRT */
G_TYPE_POINTER , /* Max SRT */
Add a "Sum" column to the Service Response Time (SRT) window.
The Service Response Time (SRT) window currently provides the
columns: Index, Procedure, Calls, Min SRT, Max SRT, and Avg SRT.
A Sum column has been found useful in some customer situations
to understand the total time spent doing a set of procedures.
For example, in one case we were trying to isolate whether most
time was being spent on a client thread or in the act of making
outbound calls. We knew the start and end time of the client call,
so with the "Sum" of time spent in that period, we could isolate
a particular set of procedures driving the slow down.
Additional changes made in this patch:
* Add " (s)" to Min, Max, Avg, and Sum columns to make it clear
that times are in seconds.
* Refactor out width and height constants used in calls to
gtk_window_set_default_size in most of the SRT users into
#define SRT_PREFERRED_WIDTH and SRT_PREFERRED_HEIGHT. Also
increase the common width of 550 to 650 to account for the
additional column.
Change-Id: I20f152eecbcd0bbf69f71c6c6b9f9463e8867e23
Reviewed-on: https://code.wireshark.org/review/7047
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-02-10 01:20:38 +00:00
G_TYPE_UINT64 , /* Avg SRT */
G_TYPE_UINT64 ) ; /* Sum SRT */
2010-08-05 22:34:59 +00:00
/* Create a view */
tree = gtk_tree_view_new_with_model ( GTK_TREE_MODEL ( store ) ) ;
Further refactor SRT stats.
Create "common" SRT tap data collection intended for all GUIs. Refactor/merge functionality of existing dissectors that have SRT support (AFP, DCERPC, Diameter, FC, GTP, LDAP, NCP, RPC, SCIS, SMB, and SMB2) for both TShark and GTK.
SMB and DCERPC "tap packet filtering" were different between TShark and GTK, so I went with GTK filter logic.
CAMEL "tap packet filtering" was different between TShark and GTK, so GTK filtering logic was pushed to the dissector and the TShark tap was left alone.
Change-Id: I7d6eaad0673fe628ef337f9165d7ed94f4a5e1cc
Reviewed-on: https://code.wireshark.org/review/8894
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-06-16 21:07:04 +00:00
gtk_table_data - > table = GTK_TREE_VIEW ( tree ) ;
2010-08-05 22:34:59 +00:00
sortable = GTK_TREE_SORTABLE ( store ) ;
/* The view now holds a reference. We can get rid of our own reference */
2009-10-01 09:04:23 +00:00
g_object_unref ( G_OBJECT ( store ) ) ;
2003-06-21 01:42:46 +00:00
2015-06-05 20:17:13 +00:00
for ( i = 0 ; i < NUM_SRT_COLUMNS ; i + + ) {
2009-10-01 09:04:23 +00:00
renderer = gtk_cell_renderer_text_new ( ) ;
2015-06-05 20:17:13 +00:00
if ( i ! = SRT_COLUMN_PROCEDURE ) {
2009-10-01 09:04:23 +00:00
/* right align numbers */
g_object_set ( G_OBJECT ( renderer ) , " xalign " , 1.0 , NULL ) ;
}
g_object_set ( renderer , " ypad " , 0 , NULL ) ;
2009-10-05 17:19:39 +00:00
switch ( i ) {
2015-06-05 20:17:13 +00:00
case SRT_COLUMN_MIN :
case SRT_COLUMN_MAX :
column = gtk_tree_view_column_new_with_attributes ( service_response_time_get_column_name ( i ) , renderer , NULL ) ;
2009-10-05 17:19:39 +00:00
gtk_tree_view_column_set_cell_data_func ( column , renderer , srt_time_func , GINT_TO_POINTER ( i ) , NULL ) ;
gtk_tree_sortable_set_sort_func ( sortable , i , srt_time_sort_func , GINT_TO_POINTER ( i ) , NULL ) ;
break ;
2015-06-05 20:17:13 +00:00
case SRT_COLUMN_AVG :
case SRT_COLUMN_SUM :
column = gtk_tree_view_column_new_with_attributes ( service_response_time_get_column_name ( i ) , renderer , NULL ) ;
2009-10-05 17:19:39 +00:00
gtk_tree_view_column_set_cell_data_func ( column , renderer , srt_avg_func , GINT_TO_POINTER ( i ) , NULL ) ;
break ;
Further refactor SRT stats.
Create "common" SRT tap data collection intended for all GUIs. Refactor/merge functionality of existing dissectors that have SRT support (AFP, DCERPC, Diameter, FC, GTP, LDAP, NCP, RPC, SCIS, SMB, and SMB2) for both TShark and GTK.
SMB and DCERPC "tap packet filtering" were different between TShark and GTK, so I went with GTK filter logic.
CAMEL "tap packet filtering" was different between TShark and GTK, so GTK filtering logic was pushed to the dissector and the TShark tap was left alone.
Change-Id: I7d6eaad0673fe628ef337f9165d7ed94f4a5e1cc
Reviewed-on: https://code.wireshark.org/review/8894
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-06-16 21:07:04 +00:00
case PROCEDURE_COLUMN :
2015-06-05 20:17:13 +00:00
column = gtk_tree_view_column_new_with_attributes ( ( rst - > proc_column_name ! = NULL ) ? rst - > proc_column_name : service_response_time_get_column_name ( i ) , renderer , " text " ,
2009-10-05 17:19:39 +00:00
i , NULL ) ;
break ;
Further refactor SRT stats.
Create "common" SRT tap data collection intended for all GUIs. Refactor/merge functionality of existing dissectors that have SRT support (AFP, DCERPC, Diameter, FC, GTP, LDAP, NCP, RPC, SCIS, SMB, and SMB2) for both TShark and GTK.
SMB and DCERPC "tap packet filtering" were different between TShark and GTK, so I went with GTK filter logic.
CAMEL "tap packet filtering" was different between TShark and GTK, so GTK filtering logic was pushed to the dissector and the TShark tap was left alone.
Change-Id: I7d6eaad0673fe628ef337f9165d7ed94f4a5e1cc
Reviewed-on: https://code.wireshark.org/review/8894
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-06-16 21:07:04 +00:00
default :
2015-06-05 20:17:13 +00:00
column = gtk_tree_view_column_new_with_attributes ( service_response_time_get_column_name ( i ) , renderer , " text " , i , NULL ) ;
Further refactor SRT stats.
Create "common" SRT tap data collection intended for all GUIs. Refactor/merge functionality of existing dissectors that have SRT support (AFP, DCERPC, Diameter, FC, GTP, LDAP, NCP, RPC, SCIS, SMB, and SMB2) for both TShark and GTK.
SMB and DCERPC "tap packet filtering" were different between TShark and GTK, so I went with GTK filter logic.
CAMEL "tap packet filtering" was different between TShark and GTK, so GTK filtering logic was pushed to the dissector and the TShark tap was left alone.
Change-Id: I7d6eaad0673fe628ef337f9165d7ed94f4a5e1cc
Reviewed-on: https://code.wireshark.org/review/8894
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-06-16 21:07:04 +00:00
break ;
2010-08-05 22:34:59 +00:00
}
2009-10-05 17:19:39 +00:00
2009-10-01 09:04:23 +00:00
gtk_tree_view_column_set_sort_column_id ( column , i ) ;
gtk_tree_view_column_set_resizable ( column , TRUE ) ;
Further refactor SRT stats.
Create "common" SRT tap data collection intended for all GUIs. Refactor/merge functionality of existing dissectors that have SRT support (AFP, DCERPC, Diameter, FC, GTP, LDAP, NCP, RPC, SCIS, SMB, and SMB2) for both TShark and GTK.
SMB and DCERPC "tap packet filtering" were different between TShark and GTK, so I went with GTK filter logic.
CAMEL "tap packet filtering" was different between TShark and GTK, so GTK filtering logic was pushed to the dissector and the TShark tap was left alone.
Change-Id: I7d6eaad0673fe628ef337f9165d7ed94f4a5e1cc
Reviewed-on: https://code.wireshark.org/review/8894
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-06-16 21:07:04 +00:00
gtk_tree_view_append_column ( gtk_table_data - > table , column ) ;
2015-06-05 20:17:13 +00:00
if ( i = = SRT_COLUMN_CALLS ) {
2009-10-01 09:04:23 +00:00
/* XXX revert order sort */
gtk_tree_view_column_clicked ( column ) ;
gtk_tree_view_column_clicked ( column ) ;
2003-06-21 06:45:49 +00:00
}
2003-06-21 05:39:45 +00:00
}
Further refactor SRT stats.
Create "common" SRT tap data collection intended for all GUIs. Refactor/merge functionality of existing dissectors that have SRT support (AFP, DCERPC, Diameter, FC, GTP, LDAP, NCP, RPC, SCIS, SMB, and SMB2) for both TShark and GTK.
SMB and DCERPC "tap packet filtering" were different between TShark and GTK, so I went with GTK filter logic.
CAMEL "tap packet filtering" was different between TShark and GTK, so GTK filtering logic was pushed to the dissector and the TShark tap was left alone.
Change-Id: I7d6eaad0673fe628ef337f9165d7ed94f4a5e1cc
Reviewed-on: https://code.wireshark.org/review/8894
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-06-16 21:07:04 +00:00
gtk_table_data - > scrolled_window = scrolled_window_new ( NULL , NULL ) ;
gtk_scrolled_window_set_shadow_type ( GTK_SCROLLED_WINDOW ( gtk_table_data - > scrolled_window ) ,
2009-10-01 09:04:23 +00:00
GTK_SHADOW_IN ) ;
Further refactor SRT stats.
Create "common" SRT tap data collection intended for all GUIs. Refactor/merge functionality of existing dissectors that have SRT support (AFP, DCERPC, Diameter, FC, GTP, LDAP, NCP, RPC, SCIS, SMB, and SMB2) for both TShark and GTK.
SMB and DCERPC "tap packet filtering" were different between TShark and GTK, so I went with GTK filter logic.
CAMEL "tap packet filtering" was different between TShark and GTK, so GTK filtering logic was pushed to the dissector and the TShark tap was left alone.
Change-Id: I7d6eaad0673fe628ef337f9165d7ed94f4a5e1cc
Reviewed-on: https://code.wireshark.org/review/8894
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-06-16 21:07:04 +00:00
gtk_container_add ( GTK_CONTAINER ( gtk_table_data - > scrolled_window ) , GTK_WIDGET ( gtk_table_data - > table ) ) ;
gtk_box_pack_start ( GTK_BOX ( parent_box ) , gtk_table_data - > scrolled_window , TRUE , TRUE , 0 ) ;
2003-06-21 01:42:46 +00:00
Further refactor SRT stats.
Create "common" SRT tap data collection intended for all GUIs. Refactor/merge functionality of existing dissectors that have SRT support (AFP, DCERPC, Diameter, FC, GTP, LDAP, NCP, RPC, SCIS, SMB, and SMB2) for both TShark and GTK.
SMB and DCERPC "tap packet filtering" were different between TShark and GTK, so I went with GTK filter logic.
CAMEL "tap packet filtering" was different between TShark and GTK, so GTK filtering logic was pushed to the dissector and the TShark tap was left alone.
Change-Id: I7d6eaad0673fe628ef337f9165d7ed94f4a5e1cc
Reviewed-on: https://code.wireshark.org/review/8894
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-06-16 21:07:04 +00:00
gtk_tree_view_set_reorderable ( gtk_table_data - > table , FALSE ) ;
2009-10-01 09:04:23 +00:00
/* Now enable the sorting of each column */
Further refactor SRT stats.
Create "common" SRT tap data collection intended for all GUIs. Refactor/merge functionality of existing dissectors that have SRT support (AFP, DCERPC, Diameter, FC, GTP, LDAP, NCP, RPC, SCIS, SMB, and SMB2) for both TShark and GTK.
SMB and DCERPC "tap packet filtering" were different between TShark and GTK, so I went with GTK filter logic.
CAMEL "tap packet filtering" was different between TShark and GTK, so GTK filtering logic was pushed to the dissector and the TShark tap was left alone.
Change-Id: I7d6eaad0673fe628ef337f9165d7ed94f4a5e1cc
Reviewed-on: https://code.wireshark.org/review/8894
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-06-16 21:07:04 +00:00
gtk_tree_view_set_rules_hint ( gtk_table_data - > table , TRUE ) ;
gtk_tree_view_set_headers_clickable ( gtk_table_data - > table , TRUE ) ;
2003-06-21 05:39:45 +00:00
Further refactor SRT stats.
Create "common" SRT tap data collection intended for all GUIs. Refactor/merge functionality of existing dissectors that have SRT support (AFP, DCERPC, Diameter, FC, GTP, LDAP, NCP, RPC, SCIS, SMB, and SMB2) for both TShark and GTK.
SMB and DCERPC "tap packet filtering" were different between TShark and GTK, so I went with GTK filter logic.
CAMEL "tap packet filtering" was different between TShark and GTK, so GTK filtering logic was pushed to the dissector and the TShark tap was left alone.
Change-Id: I7d6eaad0673fe628ef337f9165d7ed94f4a5e1cc
Reviewed-on: https://code.wireshark.org/review/8894
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-06-16 21:07:04 +00:00
gtk_widget_show ( gtk_table_data - > scrolled_window ) ;
2003-09-05 10:26:44 +00:00
Further refactor SRT stats.
Create "common" SRT tap data collection intended for all GUIs. Refactor/merge functionality of existing dissectors that have SRT support (AFP, DCERPC, Diameter, FC, GTP, LDAP, NCP, RPC, SCIS, SMB, and SMB2) for both TShark and GTK.
SMB and DCERPC "tap packet filtering" were different between TShark and GTK, so I went with GTK filter logic.
CAMEL "tap packet filtering" was different between TShark and GTK, so GTK filtering logic was pushed to the dissector and the TShark tap was left alone.
Change-Id: I7d6eaad0673fe628ef337f9165d7ed94f4a5e1cc
Reviewed-on: https://code.wireshark.org/review/8894
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-06-16 21:07:04 +00:00
sel = gtk_tree_view_get_selection ( GTK_TREE_VIEW ( gtk_table_data - > table ) ) ;
2009-10-01 09:04:23 +00:00
gtk_tree_selection_set_mode ( sel , GTK_SELECTION_SINGLE ) ;
Further refactor SRT stats.
Create "common" SRT tap data collection intended for all GUIs. Refactor/merge functionality of existing dissectors that have SRT support (AFP, DCERPC, Diameter, FC, GTP, LDAP, NCP, RPC, SCIS, SMB, and SMB2) for both TShark and GTK.
SMB and DCERPC "tap packet filtering" were different between TShark and GTK, so I went with GTK filter logic.
CAMEL "tap packet filtering" was different between TShark and GTK, so GTK filtering logic was pushed to the dissector and the TShark tap was left alone.
Change-Id: I7d6eaad0673fe628ef337f9165d7ed94f4a5e1cc
Reviewed-on: https://code.wireshark.org/review/8894
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-06-16 21:07:04 +00:00
2003-09-05 10:26:44 +00:00
/* create popup menu for this table */
if ( rst - > filter_string ) {
Further refactor SRT stats.
Create "common" SRT tap data collection intended for all GUIs. Refactor/merge functionality of existing dissectors that have SRT support (AFP, DCERPC, Diameter, FC, GTP, LDAP, NCP, RPC, SCIS, SMB, and SMB2) for both TShark and GTK.
SMB and DCERPC "tap packet filtering" were different between TShark and GTK, so I went with GTK filter logic.
CAMEL "tap packet filtering" was different between TShark and GTK, so GTK filtering logic was pushed to the dissector and the TShark tap was left alone.
Change-Id: I7d6eaad0673fe628ef337f9165d7ed94f4a5e1cc
Reviewed-on: https://code.wireshark.org/review/8894
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-06-16 21:07:04 +00:00
srt_create_popup_menu ( gtk_table_data ) ;
2003-09-05 10:26:44 +00:00
}
2003-06-21 01:42:46 +00:00
}
void
Further refactor SRT stats.
Create "common" SRT tap data collection intended for all GUIs. Refactor/merge functionality of existing dissectors that have SRT support (AFP, DCERPC, Diameter, FC, GTP, LDAP, NCP, RPC, SCIS, SMB, and SMB2) for both TShark and GTK.
SMB and DCERPC "tap packet filtering" were different between TShark and GTK, so I went with GTK filter logic.
CAMEL "tap packet filtering" was different between TShark and GTK, so GTK filtering logic was pushed to the dissector and the TShark tap was left alone.
Change-Id: I7d6eaad0673fe628ef337f9165d7ed94f4a5e1cc
Reviewed-on: https://code.wireshark.org/review/8894
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-06-16 21:07:04 +00:00
draw_srt_table_data ( srt_stat_table * rst , gtk_srt_t * gtk_data )
{
int idx , new_idx ;
GtkTreeIter iter ;
gboolean first = TRUE ;
gtk_srt_table_t * gtk_table ;
GtkListStore * store ;
gboolean iter_valid ;
2003-06-21 01:42:46 +00:00
Further refactor SRT stats.
Create "common" SRT tap data collection intended for all GUIs. Refactor/merge functionality of existing dissectors that have SRT support (AFP, DCERPC, Diameter, FC, GTP, LDAP, NCP, RPC, SCIS, SMB, and SMB2) for both TShark and GTK.
SMB and DCERPC "tap packet filtering" were different between TShark and GTK, so I went with GTK filter logic.
CAMEL "tap packet filtering" was different between TShark and GTK, so GTK filtering logic was pushed to the dissector and the TShark tap was left alone.
Change-Id: I7d6eaad0673fe628ef337f9165d7ed94f4a5e1cc
Reviewed-on: https://code.wireshark.org/review/8894
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-06-16 21:07:04 +00:00
gtk_table = get_gtk_table_from_srt ( rst , gtk_data ) ;
g_assert ( gtk_table ) ;
2009-10-01 09:04:23 +00:00
Further refactor SRT stats.
Create "common" SRT tap data collection intended for all GUIs. Refactor/merge functionality of existing dissectors that have SRT support (AFP, DCERPC, Diameter, FC, GTP, LDAP, NCP, RPC, SCIS, SMB, and SMB2) for both TShark and GTK.
SMB and DCERPC "tap packet filtering" were different between TShark and GTK, so I went with GTK filter logic.
CAMEL "tap packet filtering" was different between TShark and GTK, so GTK filtering logic was pushed to the dissector and the TShark tap was left alone.
Change-Id: I7d6eaad0673fe628ef337f9165d7ed94f4a5e1cc
Reviewed-on: https://code.wireshark.org/review/8894
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-06-16 21:07:04 +00:00
store = GTK_LIST_STORE ( gtk_tree_view_get_model ( gtk_table - > table ) ) ;
iter_valid = gtk_tree_model_get_iter_first ( GTK_TREE_MODEL ( store ) , & iter ) ;
2005-08-22 07:12:20 +00:00
Further refactor SRT stats.
Create "common" SRT tap data collection intended for all GUIs. Refactor/merge functionality of existing dissectors that have SRT support (AFP, DCERPC, Diameter, FC, GTP, LDAP, NCP, RPC, SCIS, SMB, and SMB2) for both TShark and GTK.
SMB and DCERPC "tap packet filtering" were different between TShark and GTK, so I went with GTK filter logic.
CAMEL "tap packet filtering" was different between TShark and GTK, so GTK filtering logic was pushed to the dissector and the TShark tap was left alone.
Change-Id: I7d6eaad0673fe628ef337f9165d7ed94f4a5e1cc
Reviewed-on: https://code.wireshark.org/review/8894
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-06-16 21:07:04 +00:00
new_idx = gtk_tree_model_iter_n_children ( GTK_TREE_MODEL ( store ) , NULL ) ;
2005-08-22 07:12:20 +00:00
Further refactor SRT stats.
Create "common" SRT tap data collection intended for all GUIs. Refactor/merge functionality of existing dissectors that have SRT support (AFP, DCERPC, Diameter, FC, GTP, LDAP, NCP, RPC, SCIS, SMB, and SMB2) for both TShark and GTK.
SMB and DCERPC "tap packet filtering" were different between TShark and GTK, so I went with GTK filter logic.
CAMEL "tap packet filtering" was different between TShark and GTK, so GTK filtering logic was pushed to the dissector and the TShark tap was left alone.
Change-Id: I7d6eaad0673fe628ef337f9165d7ed94f4a5e1cc
Reviewed-on: https://code.wireshark.org/review/8894
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-06-16 21:07:04 +00:00
/* Update list items (which may not be in "idx" order), then add new items */
while ( iter_valid | | ( new_idx < rst - > num_procs ) ) {
srt_procedure_t * procedure ;
guint64 td ;
guint64 sum ;
2003-06-21 01:42:46 +00:00
Further refactor SRT stats.
Create "common" SRT tap data collection intended for all GUIs. Refactor/merge functionality of existing dissectors that have SRT support (AFP, DCERPC, Diameter, FC, GTP, LDAP, NCP, RPC, SCIS, SMB, and SMB2) for both TShark and GTK.
SMB and DCERPC "tap packet filtering" were different between TShark and GTK, so I went with GTK filter logic.
CAMEL "tap packet filtering" was different between TShark and GTK, so GTK filtering logic was pushed to the dissector and the TShark tap was left alone.
Change-Id: I7d6eaad0673fe628ef337f9165d7ed94f4a5e1cc
Reviewed-on: https://code.wireshark.org/review/8894
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-06-16 21:07:04 +00:00
if ( iter_valid ) {
gtk_tree_model_get ( GTK_TREE_MODEL ( store ) , & iter , INDEX_COLUMN , & idx , - 1 ) ;
} else {
idx = new_idx ;
new_idx + + ;
}
2003-06-21 01:42:46 +00:00
Further refactor SRT stats.
Create "common" SRT tap data collection intended for all GUIs. Refactor/merge functionality of existing dissectors that have SRT support (AFP, DCERPC, Diameter, FC, GTP, LDAP, NCP, RPC, SCIS, SMB, and SMB2) for both TShark and GTK.
SMB and DCERPC "tap packet filtering" were different between TShark and GTK, so I went with GTK filter logic.
CAMEL "tap packet filtering" was different between TShark and GTK, so GTK filtering logic was pushed to the dissector and the TShark tap was left alone.
Change-Id: I7d6eaad0673fe628ef337f9165d7ed94f4a5e1cc
Reviewed-on: https://code.wireshark.org/review/8894
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-06-16 21:07:04 +00:00
procedure = & rst - > procedures [ idx ] ;
if ( ( procedure - > procedure = = NULL ) | | ( procedure - > stats . num = = 0 ) ) {
iter_valid = gtk_tree_model_iter_next ( GTK_TREE_MODEL ( store ) , & iter ) ;
2005-08-21 21:50:49 +00:00
continue ;
}
Further refactor SRT stats.
Create "common" SRT tap data collection intended for all GUIs. Refactor/merge functionality of existing dissectors that have SRT support (AFP, DCERPC, Diameter, FC, GTP, LDAP, NCP, RPC, SCIS, SMB, and SMB2) for both TShark and GTK.
SMB and DCERPC "tap packet filtering" were different between TShark and GTK, so I went with GTK filter logic.
CAMEL "tap packet filtering" was different between TShark and GTK, so GTK filtering logic was pushed to the dissector and the TShark tap was left alone.
Change-Id: I7d6eaad0673fe628ef337f9165d7ed94f4a5e1cc
Reviewed-on: https://code.wireshark.org/review/8894
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-06-16 21:07:04 +00:00
if ( first ) {
g_object_ref ( store ) ;
gtk_tree_view_set_model ( GTK_TREE_VIEW ( gtk_table - > table ) , NULL ) ;
first = FALSE ;
}
2010-08-05 22:14:16 +00:00
/* Scale the average SRT in units of 1us and round to the nearest us.
Further refactor SRT stats.
Create "common" SRT tap data collection intended for all GUIs. Refactor/merge functionality of existing dissectors that have SRT support (AFP, DCERPC, Diameter, FC, GTP, LDAP, NCP, RPC, SCIS, SMB, and SMB2) for both TShark and GTK.
SMB and DCERPC "tap packet filtering" were different between TShark and GTK, so I went with GTK filter logic.
CAMEL "tap packet filtering" was different between TShark and GTK, so GTK filtering logic was pushed to the dissector and the TShark tap was left alone.
Change-Id: I7d6eaad0673fe628ef337f9165d7ed94f4a5e1cc
Reviewed-on: https://code.wireshark.org/review/8894
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-06-16 21:07:04 +00:00
tot . secs is a time_t which may be 32 or 64 bits ( or even floating )
depending uon the platform . After casting tot . secs to 64 bits , it
would take a capture with a duration of over 136 * years * to
overflow the secs portion of td . */
td = ( ( guint64 ) ( procedure - > stats . tot . secs ) ) * NANOSECS_PER_SEC + procedure - > stats . tot . nsecs ;
Add a "Sum" column to the Service Response Time (SRT) window.
The Service Response Time (SRT) window currently provides the
columns: Index, Procedure, Calls, Min SRT, Max SRT, and Avg SRT.
A Sum column has been found useful in some customer situations
to understand the total time spent doing a set of procedures.
For example, in one case we were trying to isolate whether most
time was being spent on a client thread or in the act of making
outbound calls. We knew the start and end time of the client call,
so with the "Sum" of time spent in that period, we could isolate
a particular set of procedures driving the slow down.
Additional changes made in this patch:
* Add " (s)" to Min, Max, Avg, and Sum columns to make it clear
that times are in seconds.
* Refactor out width and height constants used in calls to
gtk_window_set_default_size in most of the SRT users into
#define SRT_PREFERRED_WIDTH and SRT_PREFERRED_HEIGHT. Also
increase the common width of 550 to 650 to account for the
additional column.
Change-Id: I20f152eecbcd0bbf69f71c6c6b9f9463e8867e23
Reviewed-on: https://code.wireshark.org/review/7047
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-02-10 01:20:38 +00:00
sum = ( td + 500 ) / 1000 ;
Further refactor SRT stats.
Create "common" SRT tap data collection intended for all GUIs. Refactor/merge functionality of existing dissectors that have SRT support (AFP, DCERPC, Diameter, FC, GTP, LDAP, NCP, RPC, SCIS, SMB, and SMB2) for both TShark and GTK.
SMB and DCERPC "tap packet filtering" were different between TShark and GTK, so I went with GTK filter logic.
CAMEL "tap packet filtering" was different between TShark and GTK, so GTK filtering logic was pushed to the dissector and the TShark tap was left alone.
Change-Id: I7d6eaad0673fe628ef337f9165d7ed94f4a5e1cc
Reviewed-on: https://code.wireshark.org/review/8894
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-06-16 21:07:04 +00:00
td = ( ( td / procedure - > stats . num ) + 500 ) / 1000 ;
if ( iter_valid ) {
/* Existing row. Only changeable entries */
gtk_list_store_set ( store , & iter ,
PROCEDURE_COLUMN , procedure - > procedure ,
CALLS_COLUMN , procedure - > stats . num ,
MIN_SRT_COLUMN , & procedure - > stats . min ,
MAX_SRT_COLUMN , & procedure - > stats . max ,
AVG_SRT_COLUMN , td ,
SUM_SRT_COLUMN , sum ,
- 1 ) ;
} else {
/* New row. All entries, including fixed ones */
gtk_list_store_insert_with_values ( store , & iter , G_MAXINT ,
PROCEDURE_COLUMN , procedure - > procedure ,
CALLS_COLUMN , procedure - > stats . num ,
MIN_SRT_COLUMN , & procedure - > stats . min ,
MAX_SRT_COLUMN , & procedure - > stats . max ,
AVG_SRT_COLUMN , td ,
SUM_SRT_COLUMN , sum ,
INDEX_COLUMN , idx ,
- 1 ) ;
}
iter_valid = gtk_tree_model_iter_next ( GTK_TREE_MODEL ( store ) , & iter ) ;
}
if ( ! first ) {
gtk_tree_view_set_model ( GTK_TREE_VIEW ( gtk_table - > table ) , GTK_TREE_MODEL ( store ) ) ;
g_object_unref ( store ) ;
2003-06-21 01:42:46 +00:00
}
}
Further refactor SRT stats.
Create "common" SRT tap data collection intended for all GUIs. Refactor/merge functionality of existing dissectors that have SRT support (AFP, DCERPC, Diameter, FC, GTP, LDAP, NCP, RPC, SCIS, SMB, and SMB2) for both TShark and GTK.
SMB and DCERPC "tap packet filtering" were different between TShark and GTK, so I went with GTK filter logic.
CAMEL "tap packet filtering" was different between TShark and GTK, so GTK filtering logic was pushed to the dissector and the TShark tap was left alone.
Change-Id: I7d6eaad0673fe628ef337f9165d7ed94f4a5e1cc
Reviewed-on: https://code.wireshark.org/review/8894
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-06-16 21:07:04 +00:00
static void
srt_draw ( void * arg )
{
guint i = 0 ;
srt_stat_table * srt_table ;
srt_data_t * srt = ( srt_data_t * ) arg ;
srt_t * ss = ( srt_t * ) srt - > user_data ;
for ( i = 0 ; i < srt - > srt_array - > len ; i + + )
{
srt_table = g_array_index ( srt - > srt_array , srt_stat_table * , i ) ;
draw_srt_table_data ( srt_table , & ss - > gtk_data ) ;
}
}
2003-06-21 01:42:46 +00:00
void
Further refactor SRT stats.
Create "common" SRT tap data collection intended for all GUIs. Refactor/merge functionality of existing dissectors that have SRT support (AFP, DCERPC, Diameter, FC, GTP, LDAP, NCP, RPC, SCIS, SMB, and SMB2) for both TShark and GTK.
SMB and DCERPC "tap packet filtering" were different between TShark and GTK, so I went with GTK filter logic.
CAMEL "tap packet filtering" was different between TShark and GTK, so GTK filtering logic was pushed to the dissector and the TShark tap was left alone.
Change-Id: I7d6eaad0673fe628ef337f9165d7ed94f4a5e1cc
Reviewed-on: https://code.wireshark.org/review/8894
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-06-16 21:07:04 +00:00
reset_table_data ( srt_stat_table * rst , void * gui_data )
2003-06-21 01:42:46 +00:00
{
2009-10-01 09:04:23 +00:00
GtkListStore * store ;
Further refactor SRT stats.
Create "common" SRT tap data collection intended for all GUIs. Refactor/merge functionality of existing dissectors that have SRT support (AFP, DCERPC, Diameter, FC, GTP, LDAP, NCP, RPC, SCIS, SMB, and SMB2) for both TShark and GTK.
SMB and DCERPC "tap packet filtering" were different between TShark and GTK, so I went with GTK filter logic.
CAMEL "tap packet filtering" was different between TShark and GTK, so GTK filtering logic was pushed to the dissector and the TShark tap was left alone.
Change-Id: I7d6eaad0673fe628ef337f9165d7ed94f4a5e1cc
Reviewed-on: https://code.wireshark.org/review/8894
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-06-16 21:07:04 +00:00
gtk_srt_t * gtk_data = ( gtk_srt_t * ) gui_data ;
gtk_srt_table_t * gtk_table = get_gtk_table_from_srt ( rst , gtk_data ) ;
g_assert ( gtk_table ) ;
2003-06-21 01:42:46 +00:00
Further refactor SRT stats.
Create "common" SRT tap data collection intended for all GUIs. Refactor/merge functionality of existing dissectors that have SRT support (AFP, DCERPC, Diameter, FC, GTP, LDAP, NCP, RPC, SCIS, SMB, and SMB2) for both TShark and GTK.
SMB and DCERPC "tap packet filtering" were different between TShark and GTK, so I went with GTK filter logic.
CAMEL "tap packet filtering" was different between TShark and GTK, so GTK filtering logic was pushed to the dissector and the TShark tap was left alone.
Change-Id: I7d6eaad0673fe628ef337f9165d7ed94f4a5e1cc
Reviewed-on: https://code.wireshark.org/review/8894
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-06-16 21:07:04 +00:00
store = GTK_LIST_STORE ( gtk_tree_view_get_model ( gtk_table - > table ) ) ;
2009-10-01 09:04:23 +00:00
gtk_list_store_clear ( store ) ;
2003-06-21 01:42:46 +00:00
}
Further refactor SRT stats.
Create "common" SRT tap data collection intended for all GUIs. Refactor/merge functionality of existing dissectors that have SRT support (AFP, DCERPC, Diameter, FC, GTP, LDAP, NCP, RPC, SCIS, SMB, and SMB2) for both TShark and GTK.
SMB and DCERPC "tap packet filtering" were different between TShark and GTK, so I went with GTK filter logic.
CAMEL "tap packet filtering" was different between TShark and GTK, so GTK filtering logic was pushed to the dissector and the TShark tap was left alone.
Change-Id: I7d6eaad0673fe628ef337f9165d7ed94f4a5e1cc
Reviewed-on: https://code.wireshark.org/review/8894
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-06-16 21:07:04 +00:00
static void
srt_reset ( void * arg )
2003-06-21 01:42:46 +00:00
{
Further refactor SRT stats.
Create "common" SRT tap data collection intended for all GUIs. Refactor/merge functionality of existing dissectors that have SRT support (AFP, DCERPC, Diameter, FC, GTP, LDAP, NCP, RPC, SCIS, SMB, and SMB2) for both TShark and GTK.
SMB and DCERPC "tap packet filtering" were different between TShark and GTK, so I went with GTK filter logic.
CAMEL "tap packet filtering" was different between TShark and GTK, so GTK filtering logic was pushed to the dissector and the TShark tap was left alone.
Change-Id: I7d6eaad0673fe628ef337f9165d7ed94f4a5e1cc
Reviewed-on: https://code.wireshark.org/review/8894
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-06-16 21:07:04 +00:00
srt_data_t * srt = ( srt_data_t * ) arg ;
srt_t * ss = ( srt_t * ) srt - > user_data ;
reset_srt_table ( ss - > data . srt_array , reset_table_data , & ss - > gtk_data ) ;
srt_set_title ( ss ) ;
}
static void
init_srt_tables ( register_srt_t * srt , const char * filter )
{
srt_t * ss ;
gchar * str ;
GtkWidget * label ;
2015-06-25 18:41:53 +00:00
char * filter_string , * tmp_filter_string ;
Further refactor SRT stats.
Create "common" SRT tap data collection intended for all GUIs. Refactor/merge functionality of existing dissectors that have SRT support (AFP, DCERPC, Diameter, FC, GTP, LDAP, NCP, RPC, SCIS, SMB, and SMB2) for both TShark and GTK.
SMB and DCERPC "tap packet filtering" were different between TShark and GTK, so I went with GTK filter logic.
CAMEL "tap packet filtering" was different between TShark and GTK, so GTK filtering logic was pushed to the dissector and the TShark tap was left alone.
Change-Id: I7d6eaad0673fe628ef337f9165d7ed94f4a5e1cc
Reviewed-on: https://code.wireshark.org/review/8894
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-06-16 21:07:04 +00:00
GString * error_string ;
GtkWidget * bbox ;
GtkWidget * close_bt ;
ss = g_new0 ( srt_t , 1 ) ;
2003-06-21 01:42:46 +00:00
Further refactor SRT stats.
Create "common" SRT tap data collection intended for all GUIs. Refactor/merge functionality of existing dissectors that have SRT support (AFP, DCERPC, Diameter, FC, GTP, LDAP, NCP, RPC, SCIS, SMB, and SMB2) for both TShark and GTK.
SMB and DCERPC "tap packet filtering" were different between TShark and GTK, so I went with GTK filter logic.
CAMEL "tap packet filtering" was different between TShark and GTK, so GTK filtering logic was pushed to the dissector and the TShark tap was left alone.
Change-Id: I7d6eaad0673fe628ef337f9165d7ed94f4a5e1cc
Reviewed-on: https://code.wireshark.org/review/8894
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-06-16 21:07:04 +00:00
str = g_strdup_printf ( " %s-stat " , proto_get_protocol_filter_name ( get_srt_proto_id ( srt ) ) ) ;
ss - > gtk_data . win = dlg_window_new ( str ) ; /* transient_for top_level */
g_free ( str ) ;
gtk_window_set_destroy_with_parent ( GTK_WINDOW ( ss - > gtk_data . win ) , TRUE ) ;
gtk_window_set_default_size ( GTK_WINDOW ( ss - > gtk_data . win ) , SRT_PREFERRED_WIDTH , 600 ) ;
2015-06-05 20:17:13 +00:00
str = g_strdup_printf ( " %s Service Response Time Statistics " , proto_get_protocol_short_name ( find_protocol_by_id ( get_srt_proto_id ( srt ) ) ) ) ;
Further refactor SRT stats.
Create "common" SRT tap data collection intended for all GUIs. Refactor/merge functionality of existing dissectors that have SRT support (AFP, DCERPC, Diameter, FC, GTP, LDAP, NCP, RPC, SCIS, SMB, and SMB2) for both TShark and GTK.
SMB and DCERPC "tap packet filtering" were different between TShark and GTK, so I went with GTK filter logic.
CAMEL "tap packet filtering" was different between TShark and GTK, so GTK filtering logic was pushed to the dissector and the TShark tap was left alone.
Change-Id: I7d6eaad0673fe628ef337f9165d7ed94f4a5e1cc
Reviewed-on: https://code.wireshark.org/review/8894
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-06-16 21:07:04 +00:00
set_window_title ( ss - > gtk_data . win , str ) ;
ss - > gtk_data . vbox = ws_gtk_box_new ( GTK_ORIENTATION_VERTICAL , 3 , FALSE ) ;
gtk_container_add ( GTK_CONTAINER ( ss - > gtk_data . win ) , ss - > gtk_data . vbox ) ;
gtk_container_set_border_width ( GTK_CONTAINER ( ss - > gtk_data . vbox ) , 12 ) ;
label = gtk_label_new ( str ) ;
gtk_box_pack_start ( GTK_BOX ( ss - > gtk_data . vbox ) , label , FALSE , FALSE , 0 ) ;
g_free ( str ) ;
2015-06-25 18:41:53 +00:00
if ( ( filter ! = NULL ) & & ( strlen ( filter ) > MAX_FILTER_STRING_LENGTH ) )
{
tmp_filter_string = g_strndup ( filter , MAX_FILTER_STRING_LENGTH ) ;
filter_string = g_strdup_printf ( " Filter: %s... " , tmp_filter_string ) ;
g_free ( tmp_filter_string ) ;
}
else
{
filter_string = g_strdup_printf ( " Filter: %s " , filter ? filter : " " ) ;
}
Further refactor SRT stats.
Create "common" SRT tap data collection intended for all GUIs. Refactor/merge functionality of existing dissectors that have SRT support (AFP, DCERPC, Diameter, FC, GTP, LDAP, NCP, RPC, SCIS, SMB, and SMB2) for both TShark and GTK.
SMB and DCERPC "tap packet filtering" were different between TShark and GTK, so I went with GTK filter logic.
CAMEL "tap packet filtering" was different between TShark and GTK, so GTK filtering logic was pushed to the dissector and the TShark tap was left alone.
Change-Id: I7d6eaad0673fe628ef337f9165d7ed94f4a5e1cc
Reviewed-on: https://code.wireshark.org/review/8894
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-06-16 21:07:04 +00:00
label = gtk_label_new ( filter_string ) ;
gtk_label_set_line_wrap ( GTK_LABEL ( label ) , TRUE ) ;
2015-06-05 20:17:13 +00:00
gtk_widget_set_tooltip_text ( label , filter ? filter : " " ) ;
Further refactor SRT stats.
Create "common" SRT tap data collection intended for all GUIs. Refactor/merge functionality of existing dissectors that have SRT support (AFP, DCERPC, Diameter, FC, GTP, LDAP, NCP, RPC, SCIS, SMB, and SMB2) for both TShark and GTK.
SMB and DCERPC "tap packet filtering" were different between TShark and GTK, so I went with GTK filter logic.
CAMEL "tap packet filtering" was different between TShark and GTK, so GTK filtering logic was pushed to the dissector and the TShark tap was left alone.
Change-Id: I7d6eaad0673fe628ef337f9165d7ed94f4a5e1cc
Reviewed-on: https://code.wireshark.org/review/8894
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-06-16 21:07:04 +00:00
g_free ( filter_string ) ;
gtk_box_pack_start ( GTK_BOX ( ss - > gtk_data . vbox ) , label , FALSE , FALSE , 0 ) ;
/* up to 3 tables is reasonable real estate to display tables. Any more than
* that and we need to switch to a tab view
*/
if ( get_srt_max_tables ( srt ) > 3 )
{
ss - > gtk_data . main_nb = gtk_notebook_new ( ) ;
gtk_box_pack_start ( GTK_BOX ( ss - > gtk_data . vbox ) , ss - > gtk_data . main_nb , TRUE , TRUE , 0 ) ;
2003-06-21 01:42:46 +00:00
}
Further refactor SRT stats.
Create "common" SRT tap data collection intended for all GUIs. Refactor/merge functionality of existing dissectors that have SRT support (AFP, DCERPC, Diameter, FC, GTP, LDAP, NCP, RPC, SCIS, SMB, and SMB2) for both TShark and GTK.
SMB and DCERPC "tap packet filtering" were different between TShark and GTK, so I went with GTK filter logic.
CAMEL "tap packet filtering" was different between TShark and GTK, so GTK filtering logic was pushed to the dissector and the TShark tap was left alone.
Change-Id: I7d6eaad0673fe628ef337f9165d7ed94f4a5e1cc
Reviewed-on: https://code.wireshark.org/review/8894
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-06-16 21:07:04 +00:00
/* We must display TOP LEVEL Widget before calling srt_table_dissector_init() */
gtk_widget_show_all ( ss - > gtk_data . win ) ;
ss - > type = proto_get_protocol_short_name ( find_protocol_by_id ( get_srt_proto_id ( srt ) ) ) ;
ss - > filter = g_strdup ( filter ) ;
ss - > srt = srt ;
ss - > gtk_data . gtk_srt_array = g_array_new ( FALSE , TRUE , sizeof ( gtk_srt_table_t * ) ) ;
ss - > data . srt_array = g_array_new ( FALSE , TRUE , sizeof ( srt_stat_table * ) ) ;
ss - > data . user_data = ss ;
srt_table_dissector_init ( srt , ss - > data . srt_array , init_gtk_srt_table , & ss - > gtk_data ) ;
error_string = register_tap_listener ( get_srt_tap_listener_name ( srt ) , & ss - > data , filter , 0 , srt_reset , get_srt_packet_func ( srt ) , srt_draw ) ;
if ( error_string ) {
simple_dialog ( ESD_TYPE_ERROR , ESD_BTN_OK , " %s " , error_string - > str ) ;
g_string_free ( error_string , TRUE ) ;
free_srt_table ( ss - > srt , ss - > data . srt_array , NULL , NULL ) ;
g_free ( ss ) ;
return ;
}
/* Button row. */
bbox = dlg_button_row_new ( GTK_STOCK_CLOSE , NULL ) ;
gtk_box_pack_end ( GTK_BOX ( ss - > gtk_data . vbox ) , bbox , FALSE , FALSE , 0 ) ;
close_bt = ( GtkWidget * ) g_object_get_data ( G_OBJECT ( bbox ) , GTK_STOCK_CLOSE ) ;
window_set_cancel_button ( ss - > gtk_data . win , close_bt , window_cancel_button_cb ) ;
g_signal_connect ( ss - > gtk_data . win , " delete_event " , G_CALLBACK ( window_delete_event_cb ) , NULL ) ;
g_signal_connect ( ss - > gtk_data . win , " destroy " , G_CALLBACK ( win_destroy_cb ) , ss ) ;
gtk_widget_show_all ( ss - > gtk_data . win ) ;
window_present ( ss - > gtk_data . win ) ;
cf_retap_packets ( & cfile ) ;
gdk_window_raise ( gtk_widget_get_window ( ss - > gtk_data . win ) ) ;
}
static void
gtk_srtstat_init ( const char * opt_arg , void * userdata _U_ )
{
gchar * * dissector_name ;
register_srt_t * srt ;
const char * filter = NULL ;
char * err ;
/* Use first comma to find dissector name */
dissector_name = g_strsplit ( opt_arg , " , " , - 1 ) ;
g_assert ( dissector_name [ 0 ] ) ;
/* Use dissector name to find SRT table */
srt = get_srt_table_by_name ( dissector_name [ 0 ] ) ;
g_assert ( srt ) ;
srt_table_get_filter ( srt , opt_arg , & filter , & err ) ;
if ( err ! = NULL )
{
gchar * cmd_str = srt_table_get_tap_string ( srt ) ;
simple_dialog ( ESD_TYPE_ERROR , ESD_BTN_OK , " invalid \" -z %s,%s \" argument " , cmd_str , err ) ;
g_free ( cmd_str ) ;
g_free ( err ) ;
return ;
}
init_srt_tables ( srt , filter ) ;
}
static tap_param srt_stat_params [ ] = {
{ PARAM_FILTER , " filter " , " Filter " , NULL , TRUE }
} ;
/* XXX - Temporary hack/workaround until a more generic approach can be implemented */
static const enum_val_t scsi_command_sets [ ] = {
{ " sbc " , " SBC (disk) " , SCSI_DEV_SBC } ,
{ " ssc " , " SSC (tape) " , SCSI_DEV_SSC } ,
{ " mmc " , " MMC (cd/dvd) " , SCSI_DEV_CDROM } ,
{ " smc " , " SMC (tape robot) " , SCSI_DEV_SMC } ,
{ " osd " , " OSD (object based) " , SCSI_DEV_OSD } ,
{ NULL , NULL , 0 }
} ;
static tap_param scsi_stat_params [ ] = {
{ PARAM_ENUM , " cmdset " , " Command set " , scsi_command_sets , FALSE } ,
{ PARAM_FILTER , " filter " , " Filter " , NULL , TRUE }
} ;
void register_service_response_tables ( gpointer data , gpointer user_data _U_ )
{
register_srt_t * srt = ( register_srt_t * ) data ;
const char * short_name = proto_get_protocol_short_name ( find_protocol_by_id ( get_srt_proto_id ( srt ) ) ) ;
tap_param_dlg * srt_dlg ;
/* XXX - These dissectors haven't been converted over to due to an "interactive input dialog" for their
tap data . Let those specific dialogs register for themselves */
if ( ( strcmp ( short_name , " RPC " ) = = 0 ) | |
( strcmp ( short_name , " DCERPC " ) = = 0 ) )
return ;
srt_dlg = g_new ( tap_param_dlg , 1 ) ;
srt_dlg - > win_title = g_strdup_printf ( " %s SRT Statistics " , short_name ) ;
srt_dlg - > init_string = srt_table_get_tap_string ( srt ) ;
srt_dlg - > tap_init_cb = gtk_srtstat_init ;
srt_dlg - > index = - 1 ;
2015-06-23 12:53:17 +00:00
srt_dlg - > user_data = srt ; /* TODO: Actually use this */
Further refactor SRT stats.
Create "common" SRT tap data collection intended for all GUIs. Refactor/merge functionality of existing dissectors that have SRT support (AFP, DCERPC, Diameter, FC, GTP, LDAP, NCP, RPC, SCIS, SMB, and SMB2) for both TShark and GTK.
SMB and DCERPC "tap packet filtering" were different between TShark and GTK, so I went with GTK filter logic.
CAMEL "tap packet filtering" was different between TShark and GTK, so GTK filtering logic was pushed to the dissector and the TShark tap was left alone.
Change-Id: I7d6eaad0673fe628ef337f9165d7ed94f4a5e1cc
Reviewed-on: https://code.wireshark.org/review/8894
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-06-16 21:07:04 +00:00
if ( get_srt_proto_id ( srt ) = = proto_get_id_by_filter_name ( " scsi " ) )
{
srt_dlg - > nparams = G_N_ELEMENTS ( scsi_stat_params ) ;
srt_dlg - > params = scsi_stat_params ;
}
else
{
srt_dlg - > nparams = G_N_ELEMENTS ( srt_stat_params ) ;
srt_dlg - > params = srt_stat_params ;
}
register_param_stat ( srt_dlg , short_name , REGISTER_STAT_GROUP_RESPONSE_TIME ) ;
2003-06-21 01:42:46 +00:00
}
2015-02-15 18:58:39 +00:00
/*
* Editor modelines - http : //www.wireshark.org/tools/modelines.html
*
* Local variables :
* c - basic - offset : 8
* tab - width : 8
* indent - tabs - mode : t
* End :
*
* vi : set shiftwidth = 8 tabstop = 8 noexpandtab :
* : indentSize = 8 : tabSize = 8 : noTabs = false :
*/