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