6619bb5956076034d5d4f8f3775763082ddb0c1e
[metze/wireshark/wip.git] / ui / tap-megaco-common.h
1 /* tap-rtp-common.h
2  * MEGACO statistics handler functions used by tshark and wireshark
3  *
4  * Copyright 2008, Ericsson AB
5  * By Balint Reczey <balint.reczey@ericsson.com>
6  *
7  * most functions are copied from ui/gtk/rtp_stream.c and ui/gtk/rtp_analysis.c
8  * Copyright 2003, Alcatel Business Systems
9  * By Lars Ruoff <lars.ruoff@gmx.net>
10  *
11  * Wireshark - Network traffic analyzer
12  * By Gerald Combs <gerald@wireshark.org>
13  * Copyright 1998 Gerald Combs
14  *
15  * This program is free software; you can redistribute it and/or
16  * modify it under the terms of the GNU General Public License
17  * as published by the Free Software Foundation; either version 2
18  * of the License, or (at your option) any later version.
19  *
20  * This program is distributed in the hope that it will be useful,
21  * but WITHOUT ANY WARRANTY; without even the implied warranty of
22  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
23  * GNU General Public License for more details.
24  *
25  * You should have received a copy of the GNU General Public License
26  * along with this program; if not, write to the Free Software
27  * Foundation,  Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
28  */
29
30 #ifndef TAP_MEGACO_COMMON_H
31 #define TAP_MEGACO_COMMON_H
32
33 #define NUM_TIMESTATS 12
34
35 #define GCP_CMD_REPLY_CASE \
36         case GCP_CMD_ADD_REPLY: \
37         case GCP_CMD_MOVE_REPLY: \
38         case GCP_CMD_MOD_REPLY: \
39         case GCP_CMD_SUB_REPLY: \
40         case GCP_CMD_AUDITCAP_REPLY: \
41         case GCP_CMD_AUDITVAL_REPLY: \
42         case GCP_CMD_NOTIFY_REPLY: \
43         case GCP_CMD_SVCCHG_REPLY: \
44         case GCP_CMD_TOPOLOGY_REPLY: \
45         case GCP_CMD_REPLY:
46
47 #define GCP_CMD_REQ_CASE \
48         case GCP_CMD_ADD_REQ: \
49         case GCP_CMD_MOVE_REQ: \
50         case GCP_CMD_MOD_REQ: \
51         case GCP_CMD_SUB_REQ: \
52         case GCP_CMD_AUDITCAP_REQ: \
53         case GCP_CMD_AUDITVAL_REQ: \
54         case GCP_CMD_NOTIFY_REQ: \
55         case GCP_CMD_SVCCHG_REQ: \
56         case GCP_CMD_TOPOLOGY_REQ: \
57         case GCP_CMD_CTX_ATTR_AUDIT_REQ: \
58         case GCP_CMD_OTHER_REQ:
59
60 /* used to keep track of the statistics for an entire program interface */
61 typedef struct _megacostat_t {
62         char *filter;
63         timestat_t rtd[NUM_TIMESTATS];
64         guint32 open_req_num;
65         guint32 disc_rsp_num;
66         guint32 req_dup_num;
67         guint32 rsp_dup_num;
68 #ifdef __GTK_H__
69         GtkWidget *win;
70         GtkWidget *vbox;
71         GtkWidget *scrolled_window;
72         GtkTreeView *table;
73 #endif /*__GHTK_H__*/
74 } megacostat_t;
75
76 static const value_string megaco_message_type[] = {
77         {  0, "ADD "},
78         {  1, "MOVE"},
79         {  2, "MDFY"},
80         {  3, "SUBT"},
81         {  4, "AUCP"},
82         {  5, "AUVL"},
83         {  6, "NTFY"},
84         {  7, "SVCC"},
85         {  8, "TOPO"},
86         {  9, "NONE"},
87         { 10, "ALL "},
88         {  0, NULL}
89 };
90
91 int megacostat_packet(void *pms, packet_info *pinfo, epan_dissect_t *edt _U_, const void *pmi);
92
93 /*
94  * Editor modelines  -  http://www.wireshark.org/tools/modelines.html
95  *
96  * Local variables:
97  * c-basic-offset: 8
98  * tab-width: 8
99  * indent-tabs-mode: t
100  * End:
101  *
102  * vi: set shiftwidth=8 tabstop=8 noexpandtab:
103  * :indentSize=8:tabSize=8:noTabs=false:
104  */
105
106 #endif /*TAP_MEGACO_COMMON_H*/