1 /* packet-camel-template.h
3 * Copyright 2004, Tim Endean <endeant@hotmail.com>
4 * Copyright 2005, Olivier Jacques <olivier.jacques@hp.com>
5 * Built from the gsm-map dissector Copyright 2004, Anders Broman <anders.broman@ericsson.com>
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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
24 * References: ETSI 300 374
27 * Indentation logic: this file is indented with 2 spaces indentation.
32 #ifndef PACKET_CAMEL_H
33 #define PACKET_CAMEL_H
35 #include "ws_symbol_export.h"
37 void proto_reg_handoff_camel(void);
38 void proto_register_camel(void);
40 /* Defines for the camel taps */
41 #define camel_MAX_NUM_OPR_CODES 256
43 WS_DLL_PUBLIC const value_string camel_opr_code_strings[];
44 /* #include "packet-camel-exp.h"*/
48 #define NB_CAMELSRT_CATEGORY 9+1 /**< Number of type of message */
49 /* for example TC_BEGIN with InitalDP, and TC_CONT with RequestReportBCSMEvent
50 is a category, we want to measure the delay between the two messages */
52 #define CAMELSRT_SESSION 1
54 #define CAMELSRT_VOICE_INITIALDP 2
55 #define CAMELSRT_VOICE_ACR1 3
56 #define CAMELSRT_VOICE_ACR2 4
57 #define CAMELSRT_VOICE_ACR3 5
58 #define CAMELSRT_VOICE_DISC 6
60 #define CAMELSRT_GPRS_INITIALDP 7
61 #define CAMELSRT_GPRS_REPORT 8
63 #define CAMELSRT_SMS_INITIALDP 9
65 WS_DLL_PUBLIC const value_string camelSRTtype_naming[];
67 /** If we have a request message and its response,
68 (eg: ApplyCharging, ApplyChargingReport)
69 the frames numbers are stored in this structure */
71 struct camelsrt_category_t {
72 guint32 req_num; /**< frame number request seen */
73 guint32 rsp_num; /**< frame number response seen */
74 nstime_t req_time; /**< arrival time of request */
75 gboolean responded; /**< true, if request has been responded */
78 /** List of stored parameters for a Camel dialogue
79 All this parameters are linked to the hash table key below (use of Tid)
80 In case of same Tid reused, the Camel parameters are chained.
81 The right dialogue will be identified with the arrival time of the InitialDP */
83 struct camelsrt_call_t {
84 guint32 session_id; /**< Identify the session, with an internal number */
85 struct tcaphash_context_t * tcap_context;
86 struct camelsrt_category_t category[NB_CAMELSRT_CATEGORY];
90 /** The Key for the hash table is the TCAP origine transaction identifier
91 of the TC_BEGIN containing the InitialDP */
93 struct camelsrt_call_info_key_t {
97 /** Info for a couple of messages (or category)
98 The request must be available, not duplicated,
99 and once the corresponding response received,
100 we can deduce the Delta Time between Request/response */
102 struct camelsrt_msginfo_t {
103 gboolean request_available;
104 gboolean is_duplicate;
105 gboolean is_delta_time;
110 /** List of infos to store for the analyse */
112 struct camelsrt_info_t {
113 guint32 tcap_session_id;
115 guint8 opcode; /**< operation code of message received */
116 guint8 bool_msginfo[NB_CAMELSRT_CATEGORY]; /**< category for the received message */
117 struct camelsrt_msginfo_t msginfo[NB_CAMELSRT_CATEGORY];
121 * Initialize the Message Info used by the main dissector
122 * Data are linked to a TCAP transaction
124 struct camelsrt_info_t * camelsrt_razinfo(void);
127 * Service Response Time analyze, called just after the camel dissector
128 * According to the camel operation, we
129 * - open/close a context for the camel session
130 * - look for a request, or look for the corresponding response
132 void camelsrt_call_matching(tvbuff_t *tvb,
133 packet_info * pinfo _U_,
135 struct camelsrt_info_t * p_camel_info);
137 WS_DLL_PUBLIC gboolean gcamel_StatSRT;
139 #endif /* PACKET_camel_H */