1 /* Do not modify this file. Changes will be overwritten.                      */
2 /* Generated automatically by the ASN.1 to Wireshark dissector compiler       */
3 /* packet-camel.h                                                             */
4 /* asn2wrs.py -b -L -p camel -c ./camel.cnf -s ./packet-camel-template -D . -O ../.. CAP-object-identifiers.asn CAP-classes.asn CAP-datatypes.asn CAP-errorcodes.asn CAP-errortypes.asn CAP-operationcodes.asn CAP-GPRS-ReferenceNumber.asn CAP-gsmSCF-gsmSRF-ops-args.asn CAP-gsmSSF-gsmSCF-ops-args.asn CAP-gprsSSF-gsmSCF-ops-args.asn CAP-SMS-ops-args.asn CAP-U-ABORT-Data.asn CamelV2diff.asn ../ros/Remote-Operations-Information-Objects.asn ../ros/Remote-Operations-Generic-ROS-PDUs.asn */
5 
6 /* Input file: packet-camel-template.h */
7 
8 #line 1 "./asn1/camel/packet-camel-template.h"
9 /* packet-camel-template.h
10  * Routines for Camel
11  * Copyright 2004, Tim Endean <endeant@hotmail.com>
12  * Copyright 2005, Olivier Jacques <olivier.jacques@hp.com>
13  * Built from the gsm-map dissector Copyright 2004, Anders Broman <anders.broman@ericsson.com>
14  *
15  * Wireshark - Network traffic analyzer
16  * By Gerald Combs <gerald@wireshark.org>
17  * Copyright 1998 Gerald Combs
18  *
19  * SPDX-License-Identifier: GPL-2.0-or-later
20  * References: ETSI 300 374
21  */
22 /*
23  * Indentation logic: this file is indented with 2 spaces indentation.
24  *                    there are no tabs.
25  */
26 
27 
28 #ifndef PACKET_CAMEL_H
29 #define PACKET_CAMEL_H
30 
31 #include "ws_symbol_export.h"
32 
33 void proto_reg_handoff_camel(void);
34 void proto_register_camel(void);
35 
36 /* Defines for the camel taps */
37 #define	camel_MAX_NUM_OPR_CODES	256
38 
39 WS_DLL_PUBLIC const value_string camel_opr_code_strings[];
40 /* #include "packet-camel-exp.h"*/
41 
42 /** @file
43 */
44 #define NB_CAMELSRT_CATEGORY 9+1 /**< Number of type of message */
45 /* for example TC_BEGIN with InitalDP, and TC_CONT with RequestReportBCSMEvent
46    is a category, we want to measure the delay between the two messages */
47 
48 #define CAMELSRT_SESSION 1
49 
50 #define CAMELSRT_VOICE_INITIALDP 2
51 #define CAMELSRT_VOICE_ACR1 3
52 #define CAMELSRT_VOICE_ACR2 4
53 #define CAMELSRT_VOICE_ACR3 5
54 #define CAMELSRT_VOICE_DISC 6
55 
56 #define CAMELSRT_GPRS_INITIALDP 7
57 #define CAMELSRT_GPRS_REPORT 8
58 
59 #define CAMELSRT_SMS_INITIALDP 9
60 
61 WS_DLL_PUBLIC const value_string  camelSRTtype_naming[];
62 
63 /** If we have a request message and its response,
64    (eg: ApplyCharging, ApplyChargingReport)
65    the frames numbers are stored in this structure */
66 
67 struct camelsrt_category_t {
68   guint32 req_num;		/**< frame number request seen */
69   guint32 rsp_num;		/**< frame number response seen */
70   nstime_t req_time;	/**< arrival time of request */
71   gboolean responded;	/**< true, if request has been responded */
72 };
73 
74 /** List of stored parameters for a Camel dialogue
75    All this parameters are linked to the hash table key below (use of Tid)
76    In case of same Tid reused, the Camel parameters are chained.
77    The right dialogue will be identified with the arrival time of the InitialDP */
78 
79 struct camelsrt_call_t {
80   guint32 session_id;    /**< Identify the session, with an internal number */
81   struct tcaphash_context_t * tcap_context;
82   struct camelsrt_category_t category[NB_CAMELSRT_CATEGORY];
83 };
84 
85 
86 /** The Key for the hash table is the TCAP origine transaction identifier
87    of the TC_BEGIN containing the InitialDP */
88 
89 struct camelsrt_call_info_key_t {
90   guint32 SessionIdKey;
91 };
92 
93 /** Info for a couple of messages (or category)
94    The request must be available, not duplicated,
95    and once the corresponding response received,
96    we can deduce the Delta Time between Request/response */
97 
98 struct camelsrt_msginfo_t {
99   gboolean request_available;
100   gboolean is_duplicate;
101   gboolean is_delta_time;
102   nstime_t req_time;
103   nstime_t delta_time;
104 };
105 
106 /** List of infos to store for the analyse */
107 
108 struct camelsrt_info_t {
109   guint32 tcap_session_id;
110   void * tcap_context;
111   guint8 opcode; /**< operation code of message received */
112   guint8 bool_msginfo[NB_CAMELSRT_CATEGORY]; /**< category for the received message */
113   struct camelsrt_msginfo_t msginfo[NB_CAMELSRT_CATEGORY];
114 };
115 
116 /**
117  * Initialize the Message Info used by the main dissector
118  * Data are linked to a TCAP transaction
119  */
120 struct camelsrt_info_t * camelsrt_razinfo(void);
121 
122 /**
123  * Service Response Time analyze, called just after the camel dissector
124  * According to the camel operation, we
125  * - open/close a context for the camel session
126  * - look for a request, or look for the corresponding response
127  */
128 void camelsrt_call_matching(tvbuff_t *tvb,
129 			    packet_info * pinfo _U_,
130 			    proto_tree *tree,
131 			    struct camelsrt_info_t * p_camel_info);
132 
133 WS_DLL_PUBLIC gboolean gcamel_StatSRT;
134 
135 #endif  /* PACKET_camel_H */
136