1 /* service_response_time_table.h
2 * service_response_time_table 2003 Ronnie Sahlberg
3 * Helper routines common to all service response time statistics
6 * Wireshark - Network traffic analyzer
7 * By Gerald Combs <gerald@wireshark.org>
8 * Copyright 1998 Gerald Combs
10 * This program is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU General Public License
12 * as published by the Free Software Foundation; either version 2
13 * of the License, or (at your option) any later version.
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
25 #ifndef __SERVICE_RESPONSE_TIME_TABLE_H__
26 #define __SERVICE_RESPONSE_TIME_TABLE_H__
29 #include "wsutil/nstime.h"
30 #include "epan/srt_table.h"
32 /** Suggested width of SRT window */
33 #define SRT_PREFERRED_WIDTH 650
35 /** Suggested height of SRT window */
36 #define SRT_PREFERRED_HEIGHT 400
38 /** Limit filter string length for sanity */
39 #define MAX_FILTER_STRING_LENGTH 1000
42 * Helper routines common to all service response time statistics tap.
45 /** Statistics table */
46 typedef struct _gtk_srt_stat_table {
47 GtkWidget *scrolled_window; /**< window widget */
48 GtkTreeView *table; /**< Tree view */
49 GtkWidget *menu; /**< context menu */
50 srt_stat_table stat_table;
53 typedef struct _gtk_srt_table_t {
54 GtkTreeView *table; /**< Tree view */
55 GtkWidget *scrolled_window; /**< window widget */
56 GtkWidget *menu; /**< context menu */
57 srt_stat_table* rst; /**< Used to match tables with its GUI data */
60 typedef struct _gtk_srt_t {
63 GtkWidget *main_nb; /** Used for tab displays */
64 GArray *gtk_srt_array; /**< array of gtk_srt_table_t */
67 /** Init an srt table data structure.
69 * @param rst the srt table to init
70 * @param gui_data contains GTK specific data
72 void init_gtk_srt_table(srt_stat_table* rst, void* gui_data);
74 /** Draw the srt table data.
76 * @param rst the srt table
77 * @param gtk_data contains GTK specific data
79 void draw_srt_table_data(srt_stat_table *rst, gtk_srt_t* gtk_data);
81 /** Clean up memory of the srt table.
83 * @param rst the srt table
84 * @param gui_data contains GTK specific data
86 void free_table_data(srt_stat_table* rst, void* gui_data);
88 /** Reset srt table data.
89 * Called when a tap listener is reset
91 * @param rst the srt table
92 * @param gui_data contains GTK specific data
94 void reset_table_data(srt_stat_table* rst, void* gui_data);
96 /** Register function to register dissectors that support SRT for GTK.
98 * @param data register_srt_t* representing dissetor SRT table
99 * @param user_data is unused
101 void register_service_response_tables(gpointer data, gpointer user_data);
103 #endif /* __SERVICE_RESPONSE_TIME_TABLE_H__ */