summaryrefslogtreecommitdiff
path: root/asn1/camel/packet-camel-template.h
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2013-12-30 22:07:38 +0000
committerMichael Mann <mmann78@netscape.net>2013-12-30 22:07:38 +0000
commit58346b632786cebda787c8519b2d3e70207ab6b5 (patch)
tree40afe325045aa3de70f202f91d7c2d08b8214d69 /asn1/camel/packet-camel-template.h
parent94387fdcbd451cf0762ed898a5e63fbf85f3904c (diff)
downloadwireshark-58346b632786cebda787c8519b2d3e70207ab6b5.tar.gz
Move tcap and camel "persistent data" functionality to the dissectors themselves instead of being part of epan directory.
svn path=/trunk/; revision=54499
Diffstat (limited to 'asn1/camel/packet-camel-template.h')
-rw-r--r--asn1/camel/packet-camel-template.h99
1 files changed, 99 insertions, 0 deletions
diff --git a/asn1/camel/packet-camel-template.h b/asn1/camel/packet-camel-template.h
index 5dd326b82e..ee40de3f55 100644
--- a/asn1/camel/packet-camel-template.h
+++ b/asn1/camel/packet-camel-template.h
@@ -46,4 +46,103 @@ void proto_register_camel(void);
WS_DLL_PUBLIC const value_string camel_opr_code_strings[];
/* #include "packet-camel-exp.h"*/
+/** @file
+*/
+#define NB_CAMELSRT_CATEGORY 9+1 /**< Number of type of message */
+/* for example TC_BEGIN with InitalDP, and TC_CONT with RequestReportBCSMEvent
+ is a category, we want to measure the delay between the two messages */
+
+#define CAMELSRT_SESSION 1
+
+#define CAMELSRT_VOICE_INITIALDP 2
+#define CAMELSRT_VOICE_ACR1 3
+#define CAMELSRT_VOICE_ACR2 4
+#define CAMELSRT_VOICE_ACR3 5
+#define CAMELSRT_VOICE_DISC 6
+
+#define CAMELSRT_GPRS_INITIALDP 7
+#define CAMELSRT_GPRS_REPORT 8
+
+#define CAMELSRT_SMS_INITIALDP 9
+
+WS_DLL_PUBLIC const value_string camelSRTtype_naming[];
+
+/** If we have a request message and its response,
+ (eg: ApplyCharging, ApplyChargingReport)
+ the frames numbers are stored in this structure */
+
+struct camelsrt_category_t {
+ guint32 req_num; /**< frame number request seen */
+ guint32 rsp_num; /**< frame number response seen */
+ nstime_t req_time; /**< arrival time of request */
+ gboolean responded; /**< true, if request has been responded */
+};
+
+/** List of stored parameters for a Camel dialogue
+ All this parameters are linked to the hash table key below (use of Tid)
+ In case of same Tid reused, the Camel parameters are chained.
+ The right dialogue will be identified with the arrival time of the InitialDP */
+
+struct camelsrt_call_t {
+ guint32 session_id; /**< Identify the session, with an internal number */
+ struct tcaphash_context_t * tcap_context;
+ struct camelsrt_category_t category[NB_CAMELSRT_CATEGORY];
+};
+
+
+/** The Key for the hash table is the TCAP origine transaction identifier
+ of the TC_BEGIN containing the InitialDP */
+
+struct camelsrt_call_info_key_t {
+ guint32 SessionIdKey;
+};
+
+/** Info for a couple of messages (or category)
+ The request must be available, not duplicated,
+ and once the corresponding response received,
+ we can deduce the Delta Time between Request/response */
+
+struct camelsrt_msginfo_t {
+ gboolean request_available;
+ gboolean is_duplicate;
+ gboolean is_delta_time;
+ nstime_t req_time;
+ nstime_t delta_time;
+};
+
+/** List of infos to store for the analyse */
+
+struct camelsrt_info_t {
+ guint32 tcap_session_id;
+ void * tcap_context;
+ guint8 opcode; /**< operation code of message received */
+ guint8 bool_msginfo[NB_CAMELSRT_CATEGORY]; /**< category for the received message */
+ struct camelsrt_msginfo_t msginfo[NB_CAMELSRT_CATEGORY];
+};
+
+/**
+ * Routine called when the TAP is initialized.
+ * so hash table are (re)created
+ */
+void camelsrt_init_routine(void);
+
+/**
+ * Initialize the Message Info used by the main dissector
+ * Data are linked to a TCAP transaction
+ */
+struct camelsrt_info_t * camelsrt_razinfo(void);
+
+/**
+ * Service Response Time analyze, called just after the camel dissector
+ * According to the camel operation, we
+ * - open/close a context for the camel session
+ * - look for a request, or look for the corresponding response
+ */
+void camelsrt_call_matching(tvbuff_t *tvb,
+ packet_info * pinfo _U_,
+ proto_tree *tree,
+ struct camelsrt_info_t * p_camel_info);
+
+WS_DLL_PUBLIC gboolean gcamel_StatSRT;
+
#endif /* PACKET_camel_H */