2003-06-21 01:42:46 +00:00
|
|
|
/* service_response_time_table.h
|
|
|
|
* service_response_time_table 2003 Ronnie Sahlberg
|
|
|
|
* Helper routines common to all service response time statistics
|
|
|
|
* tap.
|
|
|
|
*
|
2004-07-18 00:24:25 +00:00
|
|
|
* $Id$
|
2003-06-21 01:42:46 +00:00
|
|
|
*
|
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
|
|
|
|
*
|
|
|
|
* 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.
|
|
|
|
*
|
|
|
|
* 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.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <gtk/gtk.h>
|
|
|
|
#include "epan/nstime.h"
|
2005-08-22 07:12:20 +00:00
|
|
|
#include "../timestats.h"
|
2003-06-21 01:42:46 +00:00
|
|
|
|
2004-06-02 22:13:04 +00:00
|
|
|
/** @file
|
2004-06-05 12:12:13 +00:00
|
|
|
* Helper routines common to all service response time statistics tap.
|
2004-06-02 22:13:04 +00:00
|
|
|
*/
|
2003-06-21 01:42:46 +00:00
|
|
|
|
2004-06-05 12:12:13 +00:00
|
|
|
/** Procedure data */
|
2003-06-21 01:42:46 +00:00
|
|
|
typedef struct _srt_procedure_t {
|
2004-06-05 12:12:13 +00:00
|
|
|
char *entries[6]; /**< column entries */
|
2005-08-22 07:12:20 +00:00
|
|
|
timestat_t stats; /**< stats */
|
2003-06-21 01:42:46 +00:00
|
|
|
} srt_procedure_t;
|
|
|
|
|
2004-06-05 12:12:13 +00:00
|
|
|
/** Statistics table */
|
2003-06-21 01:42:46 +00:00
|
|
|
typedef struct _srt_stat_table {
|
2004-06-05 12:12:13 +00:00
|
|
|
GtkWidget *scrolled_window; /**< window widget */
|
|
|
|
GtkCList *table; /**< table widget */
|
|
|
|
GtkWidget *menu; /**< context menu */
|
|
|
|
char *filter_string; /**< append procedure number (%d) to this string
|
2003-09-05 10:26:44 +00:00
|
|
|
to create a display filter */
|
2004-06-05 12:12:13 +00:00
|
|
|
int num_procs; /**< number of elements on procedures array */
|
|
|
|
srt_procedure_t *procedures;/**< the procedures array */
|
2003-06-21 01:42:46 +00:00
|
|
|
} srt_stat_table;
|
|
|
|
|
2004-06-05 12:12:13 +00:00
|
|
|
/** Init an srt table data structure.
|
|
|
|
*
|
|
|
|
* @param rst the srt table to init
|
|
|
|
* @param num_procs number of procedures
|
|
|
|
* @param vbox the corresponding GtkVBox to fill in
|
|
|
|
* @param filter_string filter string or NULL
|
|
|
|
*/
|
2005-06-24 01:32:42 +00:00
|
|
|
void init_srt_table(srt_stat_table *rst, int num_procs, GtkWidget *vbox,
|
|
|
|
const char *filter_string);
|
2003-06-21 01:42:46 +00:00
|
|
|
|
2004-06-05 12:12:13 +00:00
|
|
|
/** Init an srt table row data structure.
|
|
|
|
*
|
|
|
|
* @param rst the srt table
|
|
|
|
* @param index number of procedure
|
|
|
|
* @param procedure the procedures name
|
|
|
|
*/
|
2005-06-27 08:13:41 +00:00
|
|
|
void init_srt_table_row(srt_stat_table *rst, int index, const char *procedure);
|
2003-06-21 01:42:46 +00:00
|
|
|
|
2004-06-05 12:12:13 +00:00
|
|
|
/** Add srt response to table row data. This will not draw the data!
|
|
|
|
*
|
|
|
|
* @param rst the srt table
|
|
|
|
* @param index number of procedure
|
|
|
|
* @param req_time the time of the corresponding request
|
|
|
|
* @param pinfo current packet info
|
|
|
|
*/
|
2005-01-01 02:57:02 +00:00
|
|
|
void add_srt_table_data(srt_stat_table *rst, int index, const nstime_t *req_time, packet_info *pinfo);
|
2003-06-21 01:42:46 +00:00
|
|
|
|
2004-06-05 12:12:13 +00:00
|
|
|
/** Draw the srt table data.
|
|
|
|
*
|
|
|
|
* @param rst the srt table
|
|
|
|
*/
|
2003-06-21 01:42:46 +00:00
|
|
|
void draw_srt_table_data(srt_stat_table *rst);
|
|
|
|
|
2004-06-05 12:12:13 +00:00
|
|
|
/** Reset the srt table data.
|
|
|
|
*
|
|
|
|
* @param rst the srt table
|
|
|
|
*/
|
2003-06-21 01:42:46 +00:00
|
|
|
void reset_srt_table_data(srt_stat_table *rst);
|
|
|
|
|
2004-06-05 12:12:13 +00:00
|
|
|
/** Free the srt table data.
|
|
|
|
*
|
|
|
|
* @param rst the srt table
|
|
|
|
*/
|
2003-06-21 01:42:46 +00:00
|
|
|
void free_srt_table_data(srt_stat_table *rst);
|
|
|
|
|