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
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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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>
35 * lists and hash tables used in wireshark's tcap dissector
36 * for calculation of delays in tcap-calls
40 struct tcaphash_context_t {
41 struct tcaphash_context_key_t * key;
45 nstime_t begin_time; /**< time of arrival of TC_BEGIN */
46 nstime_t end_time; /**< time of closing message */
47 gboolean responded; /**< true, if request has been responded */
49 gboolean upper_dissector;
51 gchar oid[LENGTH_OID+1];
52 gboolean subdissector_present;
53 dissector_handle_t subdissector_handle;
54 void (* callback) (tvbuff_t *,packet_info *, proto_tree *, struct tcaphash_context_t *);
55 struct tcaphash_begincall_t * begincall;
56 struct tcaphash_contcall_t * contcall;
57 struct tcaphash_endcall_t * endcall;
58 struct tcaphash_ansicall_t * ansicall;
61 struct tcaphash_begincall_t {
62 struct tcaphash_begin_info_key_t * beginkey;
63 struct tcaphash_context_t * context;
65 struct tcaphash_begincall_t * next_begincall;
66 struct tcaphash_begincall_t * previous_begincall;
69 struct tcaphash_contcall_t {
70 struct tcaphash_cont_info_key_t * contkey;
71 struct tcaphash_context_t * context;
73 struct tcaphash_contcall_t * next_contcall;
74 struct tcaphash_contcall_t * previous_contcall;
77 struct tcaphash_endcall_t {
78 struct tcaphash_end_info_key_t * endkey;
79 struct tcaphash_context_t * context;
81 struct tcaphash_endcall_t * next_endcall;
82 struct tcaphash_endcall_t * previous_endcall;
85 struct tcaphash_ansicall_t {
86 struct tcaphash_ansi_info_key_t * ansikey;
87 struct tcaphash_context_t * context;
89 struct tcaphash_ansicall_t * next_ansicall;
90 struct tcaphash_ansicall_t * previous_ansicall;
93 /** The Key for the hash table is the TCAP origine transaction identifier
94 of the TC_BEGIN containing the InitialDP */
96 struct tcaphash_context_key_t {
100 struct tcaphash_begin_info_key_t {
107 struct tcaphash_cont_info_key_t {
115 struct tcaphash_end_info_key_t {
122 struct tcaphash_ansi_info_key_t {
130 /** List of infos to store for the analyse */
131 struct tcapsrt_info_t {
132 guint32 tcap_session_id;
139 * Routine called when the TAP is initialized.
140 * so hash table are (re)created
142 void tcapsrt_init_routine(void);
145 * Initialize the Message Info used by the main dissector
146 * Data are linked to a TCAP transaction
148 struct tcapsrt_info_t * tcapsrt_razinfo(void);
150 void tcapsrt_close(struct tcaphash_context_t * p_tcaphash_context,
151 packet_info * pinfo _U_);
154 * Service Response Time analyze
155 * Called just after dissector call
156 * Associate a TCAP context to a tcap session and display session related infomations
157 * like the first frame, the last, the session duration,
158 * and a uniq session identifier for the filtering
160 * For ETSI tcap, the TCAP context can be reached through three keys
161 * - a key (BEGIN) identifying the session according to the tcap source identifier
162 * - a key (CONT) identifying the established session (src_id and dst_id)
163 * - a key (END) identifying the session according to the tcap destination identifier
165 * For ANSI tcap, the TCAP context is reached through a uniq key
166 * - a key (ANSI) identifying the session according to the tcap identifier
168 struct tcaphash_context_t * tcapsrt_call_matching(tvbuff_t *tvb,
169 packet_info * pinfo _U_,
171 struct tcapsrt_info_t * p_tcap_info);
173 WS_VAR_IMPORT gboolean gtcap_StatSRT;
175 #endif /* __tcapsrt_HASH__*/