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 * This program is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU General Public License
13 * as published by the Free Software Foundation; either version 2
14 * of the License, or (at your option) any later version.
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
21 * You should have received a copy of the GNU General Public License
22 * along with this program; if not, write to the Free Software
23 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
26 #ifndef __tcapsrt_HASH__
27 #define __tcapsrt_HASH__
29 #include "epan/packet.h"
30 #include "epan/conversation.h"
31 #include "epan/dissectors/packet-tcap.h"
34 struct tcaphash_context_t {
35 struct tcaphash_context_key_t * key;
39 nstime_t begin_time; /* time of arrival of TC_BEGIN */
40 nstime_t end_time; /* time of closing message */
41 gboolean responded; /* true, if request has been responded */
43 gboolean upper_dissector;
45 gchar oid[LENGTH_OID+1];
46 dissector_handle_t subdissector_handle;
47 void (* callback) (tvbuff_t *,packet_info *, proto_tree *, struct tcaphash_context_t *);
48 struct tcaphash_begincall_t * begincall;
49 struct tcaphash_contcall_t * contcall;
50 struct tcaphash_endcall_t * endcall;
53 struct tcaphash_begincall_t {
54 struct tcaphash_begin_info_key_t * beginkey;
55 struct tcaphash_context_t * context;
57 struct tcaphash_begincall_t * next_begincall;
58 struct tcaphash_begincall_t * previous_begincall;
61 struct tcaphash_contcall_t {
62 struct tcaphash_cont_info_key_t * contkey;
63 struct tcaphash_context_t * context;
65 struct tcaphash_contcall_t * next_contcall;
66 struct tcaphash_contcall_t * previous_contcall;
69 struct tcaphash_endcall_t {
70 struct tcaphash_end_info_key_t * endkey;
71 struct tcaphash_context_t * context;
73 struct tcaphash_endcall_t * next_endcall;
74 struct tcaphash_endcall_t * previous_endcall;
77 /* The Key for the hash table is the TCAP origine transaction identifier
78 of the TC_BEGIN containing the InitialDP */
80 struct tcaphash_context_key_t {
84 struct tcaphash_begin_info_key_t {
91 struct tcaphash_cont_info_key_t {
99 struct tcaphash_end_info_key_t {
107 /* List of infos to store for the analyse */
108 struct tcapsrt_info_t {
109 guint32 tcap_session_id;
115 void tcapsrt_init_routine(void);
117 struct tcapsrt_info_t * tcapsrt_razinfo(void);
119 void tcapsrt_close(struct tcaphash_context_t * p_tcaphash_context,
120 packet_info * pinfo _U_);
122 struct tcaphash_context_t * tcapsrt_call_matching(tvbuff_t *tvb,
123 packet_info * pinfo _U_,
125 struct tcapsrt_info_t * p_tcap_info);
127 WS_VAR_IMPORT gboolean gtcap_StatSRT;
129 #endif /* __tcapsrt_HASH__*/