Witness: add pidl output
[wireshark-wip.git] / epan / tcap-persistentdata.h
blob93e68fb28dc2dcec5843a8fe8e5dc2858a6bab4f
1 /*
2 * tcap-persistentdata.h
3 * Definitions for lists and hash tables used in wireshark's tcap dissector
4 * for calculation of delays in tcap-transactions
5 * Copyright 2006 Florent Drouin (based on h225-persistentdata from Lars Roland)
7 * Wireshark - Network traffic analyzer
8 * By Gerald Combs <gerald@wireshark.org>
9 * Copyright 1998 Gerald Combs
11 * $Id$
13 * This program is free software; you can redistribute it and/or
14 * modify it under the terms of the GNU General Public License
15 * as published by the Free Software Foundation; either version 2
16 * of the License, or (at your option) any later version.
18 * This program is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU General Public License for more details.
23 * You should have received a copy of the GNU General Public License
24 * along with this program; if not, write to the Free Software
25 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
28 #ifndef __tcapsrt_HASH__
29 #define __tcapsrt_HASH__
31 #include <epan/packet.h>
32 #include <epan/conversation.h>
33 #include <epan/dissectors/packet-tcap.h>
34 #include "ws_symbol_export.h"
36 /** @file
37 * lists and hash tables used in wireshark's tcap dissector
38 * for calculation of delays in tcap-calls
41 #define LENGTH_OID 23
42 struct tcaphash_context_t {
43 struct tcaphash_context_key_t * key;
44 guint32 session_id;
45 guint32 first_frame;
46 guint32 last_frame;
47 nstime_t begin_time; /**< time of arrival of TC_BEGIN */
48 nstime_t end_time; /**< time of closing message */
49 gboolean responded; /**< true, if request has been responded */
50 gboolean closed;
51 gboolean upper_dissector;
52 gboolean oid_present;
53 gchar oid[LENGTH_OID+1];
54 gboolean subdissector_present;
55 dissector_handle_t subdissector_handle;
56 void (* callback) (tvbuff_t *,packet_info *, proto_tree *, struct tcaphash_context_t *);
57 struct tcaphash_begincall_t * begincall;
58 struct tcaphash_contcall_t * contcall;
59 struct tcaphash_endcall_t * endcall;
60 struct tcaphash_ansicall_t * ansicall;
63 struct tcaphash_begincall_t {
64 struct tcaphash_begin_info_key_t * beginkey;
65 struct tcaphash_context_t * context;
66 gboolean father;
67 struct tcaphash_begincall_t * next_begincall;
68 struct tcaphash_begincall_t * previous_begincall;
71 struct tcaphash_contcall_t {
72 struct tcaphash_cont_info_key_t * contkey;
73 struct tcaphash_context_t * context;
74 gboolean father;
75 struct tcaphash_contcall_t * next_contcall;
76 struct tcaphash_contcall_t * previous_contcall;
79 struct tcaphash_endcall_t {
80 struct tcaphash_end_info_key_t * endkey;
81 struct tcaphash_context_t * context;
82 gboolean father;
83 struct tcaphash_endcall_t * next_endcall;
84 struct tcaphash_endcall_t * previous_endcall;
87 struct tcaphash_ansicall_t {
88 struct tcaphash_ansi_info_key_t * ansikey;
89 struct tcaphash_context_t * context;
90 gboolean father;
91 struct tcaphash_ansicall_t * next_ansicall;
92 struct tcaphash_ansicall_t * previous_ansicall;
95 /** The Key for the hash table is the TCAP origine transaction identifier
96 of the TC_BEGIN containing the InitialDP */
98 struct tcaphash_context_key_t {
99 guint32 session_id;
102 struct tcaphash_begin_info_key_t {
103 guint32 hashKey;
104 guint32 tid;
105 guint32 opc_hash;
106 guint32 dpc_hash;
109 struct tcaphash_cont_info_key_t {
110 guint32 hashKey;
111 guint32 src_tid;
112 guint32 dst_tid;
113 guint32 opc_hash;
114 guint32 dpc_hash;
117 struct tcaphash_end_info_key_t {
118 guint32 hashKey;
119 guint32 tid;
120 guint32 opc_hash;
121 guint32 dpc_hash;
124 struct tcaphash_ansi_info_key_t {
125 guint32 hashKey;
126 guint32 tid;
127 guint32 opc_hash;
128 guint32 dpc_hash;
132 /** List of infos to store for the analyse */
133 struct tcapsrt_info_t {
134 guint32 tcap_session_id;
135 guint32 src_tid;
136 guint32 dst_tid;
137 guint8 ope;
141 * Routine called when the TAP is initialized.
142 * so hash table are (re)created
144 void tcapsrt_init_routine(void);
147 * Initialize the Message Info used by the main dissector
148 * Data are linked to a TCAP transaction
150 struct tcapsrt_info_t * tcapsrt_razinfo(void);
152 void tcapsrt_close(struct tcaphash_context_t * p_tcaphash_context,
153 packet_info * pinfo _U_);
156 * Service Response Time analyze
157 * Called just after dissector call
158 * Associate a TCAP context to a tcap session and display session related infomations
159 * like the first frame, the last, the session duration,
160 * and a uniq session identifier for the filtering
162 * For ETSI tcap, the TCAP context can be reached through three keys
163 * - a key (BEGIN) identifying the session according to the tcap source identifier
164 * - a key (CONT) identifying the established session (src_id and dst_id)
165 * - a key (END) identifying the session according to the tcap destination identifier
167 * For ANSI tcap, the TCAP context is reached through a uniq key
168 * - a key (ANSI) identifying the session according to the tcap identifier
170 struct tcaphash_context_t * tcapsrt_call_matching(tvbuff_t *tvb,
171 packet_info * pinfo _U_,
172 proto_tree *tree,
173 struct tcapsrt_info_t * p_tcap_info);
175 WS_DLL_PUBLIC gboolean gtcap_StatSRT;
177 #endif /* __tcapsrt_HASH__*/