2006-12-08 01:07:09 +00:00
|
|
|
/*
|
|
|
|
* camel-persistentdata.h
|
|
|
|
* Definitions for lists and hash tables used in wireshark's camel dissector
|
|
|
|
* for calculation of delays in camel-transactions
|
|
|
|
* Copyright 2006 Florent Drouin
|
|
|
|
*
|
2008-02-18 22:39:03 +00:00
|
|
|
* $Id$
|
|
|
|
*
|
2006-12-08 01:07:09 +00:00
|
|
|
* Wireshark - Network traffic analyzer
|
|
|
|
* By Gerald Combs <gerald@wireshark.org>
|
|
|
|
* Copyright 1998 Gerald Combs
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
2012-06-28 22:56:06 +00:00
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
2006-12-08 01:07:09 +00:00
|
|
|
*/
|
|
|
|
|
2007-01-18 18:43:30 +00:00
|
|
|
#ifndef __CAMEL_PERSISTENTDATA_H__
|
|
|
|
#define __CAMEL_PERSISTENTDATA_H__
|
2006-12-08 01:07:09 +00:00
|
|
|
|
2007-01-18 18:43:30 +00:00
|
|
|
#include <epan/packet.h>
|
|
|
|
#include <epan/conversation.h>
|
|
|
|
#include <epan/dissectors/packet-camel.h>
|
|
|
|
#include <epan/tcap-persistentdata.h>
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif /* __cplusplus */
|
2006-12-08 01:07:09 +00:00
|
|
|
|
2010-08-29 10:47:38 +00:00
|
|
|
/** @file
|
|
|
|
*/
|
|
|
|
#define NB_CAMELSRT_CATEGORY 9+1 /**< Number of type of message */
|
2006-12-08 01:07:09 +00:00
|
|
|
/* 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_VAR_IMPORT const value_string camelSRTtype_naming[];
|
|
|
|
|
2010-08-29 10:47:38 +00:00
|
|
|
/** If we have a request message and its response,
|
2006-12-08 01:07:09 +00:00
|
|
|
(eg: ApplyCharging, ApplyChargingReport)
|
|
|
|
the frames numbers are stored in this structure */
|
|
|
|
|
|
|
|
struct camelsrt_category_t {
|
2010-08-29 10:47:38 +00:00
|
|
|
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 */
|
2006-12-08 01:07:09 +00:00
|
|
|
};
|
|
|
|
|
2010-08-29 10:47:38 +00:00
|
|
|
/** List of stored parameters for a Camel dialogue
|
2006-12-08 01:07:09 +00:00
|
|
|
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 {
|
2010-08-29 10:47:38 +00:00
|
|
|
guint32 session_id; /**< Identify the session, with an internal number */
|
2006-12-08 01:07:09 +00:00
|
|
|
struct tcaphash_context_t * tcap_context;
|
|
|
|
struct camelsrt_category_t category[NB_CAMELSRT_CATEGORY];
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2010-08-29 10:47:38 +00:00
|
|
|
/** The Key for the hash table is the TCAP origine transaction identifier
|
2006-12-08 01:07:09 +00:00
|
|
|
of the TC_BEGIN containing the InitialDP */
|
|
|
|
|
|
|
|
struct camelsrt_call_info_key_t {
|
|
|
|
guint32 SessionIdKey;
|
|
|
|
};
|
|
|
|
|
2010-08-29 10:47:38 +00:00
|
|
|
/** Info for a couple of messages (or category)
|
2006-12-08 01:07:09 +00:00
|
|
|
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;
|
|
|
|
};
|
|
|
|
|
2010-08-29 10:47:38 +00:00
|
|
|
/** List of infos to store for the analyse */
|
2006-12-08 01:07:09 +00:00
|
|
|
|
|
|
|
struct camelsrt_info_t {
|
|
|
|
guint32 tcap_session_id;
|
|
|
|
void * tcap_context;
|
2010-08-29 10:47:38 +00:00
|
|
|
guint8 opcode; /**< operation code of message received */
|
|
|
|
guint8 bool_msginfo[NB_CAMELSRT_CATEGORY]; /**< category for the received message */
|
2006-12-08 01:07:09 +00:00
|
|
|
struct camelsrt_msginfo_t msginfo[NB_CAMELSRT_CATEGORY];
|
|
|
|
};
|
|
|
|
|
2010-08-29 10:47:38 +00:00
|
|
|
/**
|
|
|
|
* Routine called when the TAP is initialized.
|
|
|
|
* so hash table are (re)created
|
|
|
|
*/
|
2006-12-08 01:07:09 +00:00
|
|
|
void camelsrt_init_routine(void);
|
|
|
|
|
2010-08-29 10:47:38 +00:00
|
|
|
/**
|
|
|
|
* Initialize the Message Info used by the main dissector
|
|
|
|
* Data are linked to a TCAP transaction
|
|
|
|
*/
|
2006-12-08 01:07:09 +00:00
|
|
|
struct camelsrt_info_t * camelsrt_razinfo(void);
|
|
|
|
|
2010-08-29 10:47:38 +00:00
|
|
|
/**
|
|
|
|
* 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
|
|
|
|
*/
|
2006-12-08 01:07:09 +00:00
|
|
|
void camelsrt_call_matching(tvbuff_t *tvb,
|
|
|
|
packet_info * pinfo _U_,
|
|
|
|
proto_tree *tree,
|
|
|
|
struct camelsrt_info_t * p_camel_info);
|
|
|
|
|
2006-12-08 18:40:42 +00:00
|
|
|
WS_VAR_IMPORT gboolean gcamel_StatSRT;
|
2006-12-08 01:08:48 +00:00
|
|
|
|
2007-01-18 18:43:30 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif /* __cplusplus */
|
|
|
|
|
|
|
|
#endif /* camel-persistentdata.h */
|