2005-03-22 15:41:40 +00:00
|
|
|
|
/* packet-camel-template.c
|
|
|
|
|
* Routines for Camel
|
|
|
|
|
* Copyright 2004, Tim Endean <endeant@hotmail.com>
|
|
|
|
|
* Copyright 2005, Olivier Jacques <olivier.jacques@hp.com>
|
2005-05-08 20:34:57 +00:00
|
|
|
|
* Copyright 2005, Javier Acu<EFBFBD><EFBFBD>a <javier.acuna@sixbell.com>
|
2005-11-25 20:18:36 +00:00
|
|
|
|
* Updated to ETSI TS 129 078 V6.4.0 (2004-3GPP TS 29.078 version 6.4.0 Release 6 1 12)
|
2006-01-20 19:34:53 +00:00
|
|
|
|
* Copyright 2005-2006, Anders Broman <anders.broman@ericsson.com>
|
2006-12-19 22:07:08 +00:00
|
|
|
|
* Updated to 3GPP TS 29.078 version 7.3.0 Release 7 (2006-06)
|
2005-03-22 15:41:40 +00:00
|
|
|
|
* Built from the gsm-map dissector Copyright 2004, Anders Broman <anders.broman@ericsson.com>
|
|
|
|
|
*
|
2005-08-31 19:51:16 +00:00
|
|
|
|
* $Id$
|
|
|
|
|
*
|
2006-05-21 05:12:17 +00:00
|
|
|
|
* Wireshark - Network traffic analyzer
|
|
|
|
|
* By Gerald Combs <gerald@wireshark.org>
|
2005-03-22 15:41:40 +00:00
|
|
|
|
* 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
|
|
|
|
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
|
|
|
* References: ETSI 300 374
|
|
|
|
|
*/
|
|
|
|
|
/*
|
|
|
|
|
* Indentation logic: this file is indented with 2 spaces indentation.
|
|
|
|
|
* there are no tabs.
|
|
|
|
|
*/
|
|
|
|
|
#ifdef HAVE_CONFIG_H
|
|
|
|
|
# include "config.h"
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
#include <glib.h>
|
|
|
|
|
#include <epan/packet.h>
|
|
|
|
|
#include <epan/prefs.h>
|
|
|
|
|
#include <epan/conversation.h>
|
2006-06-28 14:19:08 +00:00
|
|
|
|
#include <epan/oid_resolv.h>
|
2005-03-22 15:41:40 +00:00
|
|
|
|
#include <epan/tap.h>
|
2007-02-17 20:04:10 +00:00
|
|
|
|
#include "epan/expert.h"
|
2005-03-22 15:41:40 +00:00
|
|
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
|
#include <string.h>
|
|
|
|
|
|
|
|
|
|
#include "packet-ber.h"
|
|
|
|
|
#include "packet-camel.h"
|
|
|
|
|
#include "packet-q931.h"
|
|
|
|
|
#include "packet-e164.h"
|
|
|
|
|
#include "packet-isup.h"
|
2005-04-01 09:20:39 +00:00
|
|
|
|
#include "packet-gsm_map.h"
|
2006-01-17 21:52:30 +00:00
|
|
|
|
#include "packet-gsm_a.h"
|
2005-12-17 16:55:45 +00:00
|
|
|
|
#include "packet-tcap.h"
|
2006-10-04 16:02:59 +00:00
|
|
|
|
#include "epan/camel-persistentdata.h"
|
|
|
|
|
#include "epan/tcap-persistentdata.h"
|
2005-03-22 15:41:40 +00:00
|
|
|
|
|
|
|
|
|
#define PNAME "Camel"
|
|
|
|
|
#define PSNAME "CAMEL"
|
|
|
|
|
#define PFNAME "camel"
|
|
|
|
|
|
|
|
|
|
/* Initialize the protocol and registered fields */
|
|
|
|
|
int proto_camel = -1;
|
2005-05-08 20:34:57 +00:00
|
|
|
|
int date_format = 1; /*assume european date format */
|
2006-10-04 16:02:59 +00:00
|
|
|
|
int camel_tap = -1;
|
2007-02-17 20:04:10 +00:00
|
|
|
|
/* Global variables */
|
|
|
|
|
static guint32 opcode=0;
|
|
|
|
|
static guint32 errorCode=0;
|
|
|
|
|
|
2006-10-04 16:02:59 +00:00
|
|
|
|
|
2005-05-08 20:34:57 +00:00
|
|
|
|
static int hf_digit = -1;
|
2005-04-15 08:18:15 +00:00
|
|
|
|
static int hf_camel_addr_extension = -1;
|
|
|
|
|
static int hf_camel_addr_natureOfAddressIndicator = -1;
|
|
|
|
|
static int hf_camel_addr_numberingPlanInd = -1;
|
|
|
|
|
static int hf_camel_addr_digits = -1;
|
|
|
|
|
static int hf_camel_cause_indicator = -1;
|
2006-01-20 19:34:53 +00:00
|
|
|
|
static int hf_camel_PDPTypeNumber_etsi = -1;
|
|
|
|
|
static int hf_camel_PDPTypeNumber_ietf = -1;
|
|
|
|
|
static int hf_camel_PDPAddress_IPv4 = -1;
|
|
|
|
|
static int hf_camel_PDPAddress_IPv6 = -1;
|
2006-01-22 21:16:33 +00:00
|
|
|
|
static int hf_camel_cellGlobalIdOrServiceAreaIdFixedLength = -1;
|
2006-08-21 21:58:30 +00:00
|
|
|
|
static int hf_camel_RP_Cause = -1;
|
|
|
|
|
|
2006-10-04 16:02:59 +00:00
|
|
|
|
/* Used by camel-persistentdata.c */
|
|
|
|
|
int hf_camelsrt_SessionId=-1;
|
|
|
|
|
int hf_camelsrt_RequestNumber=-1;
|
|
|
|
|
int hf_camelsrt_Duplicate=-1;
|
|
|
|
|
int hf_camelsrt_RequestFrame=-1;
|
|
|
|
|
int hf_camelsrt_ResponseFrame=-1;
|
|
|
|
|
int hf_camelsrt_DeltaTime=-1;
|
|
|
|
|
int hf_camelsrt_SessionTime=-1;
|
|
|
|
|
int hf_camelsrt_DeltaTime31=-1;
|
|
|
|
|
int hf_camelsrt_DeltaTime75=-1;
|
|
|
|
|
int hf_camelsrt_DeltaTime65=-1;
|
|
|
|
|
int hf_camelsrt_DeltaTime22=-1;
|
|
|
|
|
int hf_camelsrt_DeltaTime35=-1;
|
|
|
|
|
int hf_camelsrt_DeltaTime80=-1;
|
|
|
|
|
|
|
|
|
|
static struct camelsrt_info_t * gp_camelsrt_info;
|
|
|
|
|
|
2007-02-17 20:04:10 +00:00
|
|
|
|
/* Forward declarations */
|
|
|
|
|
static int dissect_invokeData(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset);
|
|
|
|
|
static int dissect_returnResultData(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset);
|
|
|
|
|
static int dissect_returnErrorData(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset);
|
|
|
|
|
|
|
|
|
|
|
2005-03-22 15:41:40 +00:00
|
|
|
|
#include "packet-camel-hf.c"
|
|
|
|
|
|
2006-10-04 16:02:59 +00:00
|
|
|
|
gboolean gcamel_HandleSRT=FALSE;
|
|
|
|
|
extern gboolean gcamel_PersistentSRT;
|
|
|
|
|
extern gboolean gcamel_DisplaySRT;
|
|
|
|
|
|
2005-03-22 15:41:40 +00:00
|
|
|
|
/* Initialize the subtree pointers */
|
|
|
|
|
static gint ett_camel = -1;
|
|
|
|
|
static gint ett_camelisup_parameter = -1;
|
2006-01-17 21:52:30 +00:00
|
|
|
|
static gint ett_camel_isdn_address_string = -1;
|
|
|
|
|
static gint ett_camel_MSRadioAccessCapability = -1;
|
|
|
|
|
static gint ett_camel_MSNetworkCapability = -1;
|
|
|
|
|
static gint ett_camel_AccessPointName = -1;
|
2006-01-20 19:34:53 +00:00
|
|
|
|
static gint ett_camel_pdptypenumber = -1;
|
2006-10-04 16:02:59 +00:00
|
|
|
|
static gint ett_camel_stat = -1;
|
2006-01-17 21:52:30 +00:00
|
|
|
|
|
2005-03-22 15:41:40 +00:00
|
|
|
|
#include "packet-camel-ett.c"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* Preference settings default */
|
|
|
|
|
#define MAX_SSN 254
|
|
|
|
|
static range_t *global_ssn_range;
|
|
|
|
|
static range_t *ssn_range;
|
2006-12-07 20:34:08 +00:00
|
|
|
|
static dissector_handle_t camel_handle;
|
2005-03-22 15:41:40 +00:00
|
|
|
|
|
|
|
|
|
/* Global variables */
|
|
|
|
|
|
2005-03-28 02:53:49 +00:00
|
|
|
|
static int application_context_version;
|
2006-01-20 19:34:53 +00:00
|
|
|
|
static guint8 PDPTypeOrganization;
|
|
|
|
|
static guint8 PDPTypeNumber;
|
|
|
|
|
|
2007-02-17 20:04:10 +00:00
|
|
|
|
static char camel_number_to_char(int );
|
2006-08-21 21:58:30 +00:00
|
|
|
|
static guint8 dissect_RP_cause_ie(tvbuff_t *tvb, guint32 offset, guint len,
|
|
|
|
|
proto_tree *tree, int hf_cause_value, guint8 *cause_value);
|
2005-03-22 15:41:40 +00:00
|
|
|
|
|
|
|
|
|
static const true_false_string camel_extension_value = {
|
|
|
|
|
"No Extension",
|
|
|
|
|
"Extension"
|
|
|
|
|
};
|
2005-05-08 20:34:57 +00:00
|
|
|
|
#define EUROPEAN_DATE 1
|
|
|
|
|
#define AMERICAN_DATE 2
|
2005-09-08 15:01:16 +00:00
|
|
|
|
#define CAMEL_DATE_AND_TIME_LEN 20 /* 2*5 + 4 + 5 + 1 (HH:MM:SS;mm/dd/yyyy) */
|
2005-05-08 20:34:57 +00:00
|
|
|
|
|
|
|
|
|
static enum_val_t date_options[] = {
|
|
|
|
|
{ "european", "DD/MM/YYYY", EUROPEAN_DATE },
|
|
|
|
|
{ "american", "MM/DD/YYYY", AMERICAN_DATE },
|
|
|
|
|
{ NULL, NULL, 0 }
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
static const value_string digit_value[] = {
|
|
|
|
|
{ 0, "0"},
|
|
|
|
|
{ 1, "1"},
|
|
|
|
|
{ 2, "2"},
|
|
|
|
|
{ 3, "3"},
|
|
|
|
|
{ 4, "4"},
|
|
|
|
|
{ 5, "5"},
|
|
|
|
|
{ 6, "6"},
|
|
|
|
|
{ 7, "7"},
|
|
|
|
|
{ 8, "8"},
|
|
|
|
|
{ 9, "9"},
|
|
|
|
|
{ 10, "spare"},
|
|
|
|
|
{ 11, "spare"},
|
|
|
|
|
{ 12, "spare"},
|
|
|
|
|
{ 13, "spare"},
|
|
|
|
|
{ 0, NULL}};
|
|
|
|
|
|
|
|
|
|
|
2005-04-15 08:18:15 +00:00
|
|
|
|
static const value_string camel_nature_of_addr_indicator_values[] = {
|
2005-03-22 15:41:40 +00:00
|
|
|
|
{ 0x00, "unknown" },
|
|
|
|
|
{ 0x01, "International Number" },
|
|
|
|
|
{ 0x02, "National Significant Number" },
|
|
|
|
|
{ 0x03, "Network Specific Number" },
|
|
|
|
|
{ 0x04, "Subscriber Number" },
|
|
|
|
|
{ 0x05, "Reserved" },
|
|
|
|
|
{ 0x06, "Abbreviated Number" },
|
|
|
|
|
{ 0x07, "Reserved for extension" },
|
|
|
|
|
{ 0, NULL }
|
|
|
|
|
};
|
|
|
|
|
static const value_string camel_number_plan_values[] = {
|
|
|
|
|
{ 0x00, "unknown" },
|
|
|
|
|
{ 0x01, "ISDN/Telephony Numbering (Rec ITU-T E.164)" },
|
|
|
|
|
{ 0x02, "spare" },
|
|
|
|
|
{ 0x03, "Data Numbering (ITU-T Rec. X.121)" },
|
|
|
|
|
{ 0x04, "Telex Numbering (ITU-T Rec. F.69)" },
|
|
|
|
|
{ 0x05, "spare" },
|
|
|
|
|
{ 0x06, "Land Mobile Numbering (ITU-T Rec. E.212)" },
|
|
|
|
|
{ 0x07, "spare" },
|
|
|
|
|
{ 0x08, "National Numbering" },
|
|
|
|
|
{ 0x09, "Private Numbering" },
|
|
|
|
|
{ 0x0f, "Reserved for extension" },
|
|
|
|
|
{ 0, NULL }
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/* End includes from old" packet-camel.c */
|
|
|
|
|
|
2006-08-21 21:58:30 +00:00
|
|
|
|
static const value_string camel_RP_Cause_values[] = {
|
|
|
|
|
{ 1, "Unassigned (unallocated) number" },
|
|
|
|
|
{ 8, "Operator determined barring" },
|
|
|
|
|
{ 10, "Call barred" },
|
|
|
|
|
{ 11, "Reserved" },
|
|
|
|
|
{ 21, "Short message transfer rejected" },
|
|
|
|
|
{ 27, "Destination out of order" },
|
|
|
|
|
{ 28, "Unidentified subscriber" },
|
|
|
|
|
{ 29, "Facility Rejected" },
|
|
|
|
|
{ 30, "Unknown subscriber" },
|
|
|
|
|
{ 38, "Network out of order" },
|
|
|
|
|
{ 41, "Temporary failure" },
|
|
|
|
|
{ 42, "Congestion" },
|
|
|
|
|
{ 47, "Resources unavailable, unspecified" },
|
|
|
|
|
{ 50, "Requested facility not subscribed" },
|
|
|
|
|
{ 69, "Requested facility not implemented" },
|
|
|
|
|
{ 81, "Invalid short message transfer reference value" },
|
|
|
|
|
{ 95, "Semantically incorrect message" },
|
|
|
|
|
{ 96, "Invalid mandatory information" },
|
|
|
|
|
{ 97, " Message Type non-existent or not implemented" },
|
|
|
|
|
{ 98, "Message not compatible with short message protocol state" },
|
|
|
|
|
{ 99, "Information element non existent or not implemented" },
|
|
|
|
|
{ 111, "Protocol error, unspecified" },
|
|
|
|
|
{ 127, "Interworking, unspecified" },
|
|
|
|
|
{ 22,"Memory capacity exceeded" },
|
|
|
|
|
{ 0, NULL }
|
|
|
|
|
};
|
|
|
|
|
|
2005-03-22 15:41:40 +00:00
|
|
|
|
#include "packet-camel-fn.c"
|
|
|
|
|
|
|
|
|
|
const value_string camel_opr_code_strings[] = {
|
|
|
|
|
|
2005-11-25 20:18:36 +00:00
|
|
|
|
{0, "InitialDP"},
|
2005-03-22 15:41:40 +00:00
|
|
|
|
{16, "AssistRequestInstructions"},
|
|
|
|
|
{17, "EstablishTemporaryConnection"},
|
|
|
|
|
{18, "DisconnectForwardConnection"},
|
|
|
|
|
{19, "ConnectToResource"},
|
|
|
|
|
{20, "Connect"},
|
|
|
|
|
{22, "ReleaseCall"},
|
|
|
|
|
{23, "RequestReportBCSMEvent"},
|
|
|
|
|
{24, "EventReportBCSM"},
|
2006-12-19 22:07:08 +00:00
|
|
|
|
{27, "CollectInformation"},
|
2005-03-22 15:41:40 +00:00
|
|
|
|
{31, "Continue"},
|
2005-11-25 20:18:36 +00:00
|
|
|
|
{32, "InitiateCallAttempt"},
|
2005-03-22 15:41:40 +00:00
|
|
|
|
{33, "ResetTimer"},
|
|
|
|
|
{34, "FurnishChargingInformation"},
|
|
|
|
|
{35, "ApplyCharging"},
|
|
|
|
|
{36, "ApplyChargingReport"},
|
|
|
|
|
{41, "CallGap"},
|
|
|
|
|
{44, "CallInformationReport"},
|
|
|
|
|
{45, "CallInformationRequest"},
|
|
|
|
|
{46, "SendChargingInformation"},
|
|
|
|
|
{47, "PlayAnnouncement"},
|
|
|
|
|
{48, "PromptAndCollectUserInformation"},
|
|
|
|
|
{49, "SpecializedResourceReport"},
|
|
|
|
|
{53, "Cancel"},
|
|
|
|
|
{55, "ActivityTest"},
|
|
|
|
|
{56, "ContinueWithArgument"},
|
|
|
|
|
{60, "InitialDPSMS"},
|
|
|
|
|
{61, "FurnishChargingInformationSMS"},
|
|
|
|
|
{62, "ConnectSMS"},
|
|
|
|
|
{63, "RequestReportSMSEvent"},
|
|
|
|
|
{64, "EventReportSMS"},
|
|
|
|
|
{65, "ContinueSMS"},
|
|
|
|
|
{66, "ReleaseSMS"},
|
|
|
|
|
{67, "ResetTimerSMS"},
|
|
|
|
|
{70, "ActivityTestGPRS"},
|
|
|
|
|
{71, "ApplyChargingGPRS"},
|
|
|
|
|
{72, "ApplyChargingReportGPRS"},
|
|
|
|
|
{73, "CancelGPRS"},
|
|
|
|
|
{74, "ConnectGPRS"},
|
|
|
|
|
{75, "ContinueGPRS"},
|
|
|
|
|
{76, "EntityReleasedGPRS"},
|
|
|
|
|
{77, "FurnishChargingInformationGPRS"},
|
|
|
|
|
{78, "InitialDPGPRS"},
|
|
|
|
|
{79, "ReleaseGPRS"},
|
|
|
|
|
{80, "EventReportGPRS"},
|
|
|
|
|
{81, "RequestReportGPRSEvent"},
|
|
|
|
|
{82, "ResetTimerGPRS"},
|
2005-08-28 01:51:50 +00:00
|
|
|
|
{83, "SendChargingInformationGPRS"},
|
2005-11-25 20:18:36 +00:00
|
|
|
|
{86, "DFCWithArgument"},
|
|
|
|
|
{88, "ContinueWithArgument"},
|
|
|
|
|
{90, "DisconnectLeg"},
|
|
|
|
|
{93, "MoveLeg"},
|
|
|
|
|
{95, "SplitLeg"},
|
|
|
|
|
{96, "EntityReleased"},
|
|
|
|
|
{97, "PlayTone"},
|
2005-08-28 01:51:50 +00:00
|
|
|
|
{0, NULL}
|
2005-03-22 15:41:40 +00:00
|
|
|
|
};
|
|
|
|
|
|
2007-02-17 20:04:10 +00:00
|
|
|
|
static const value_string camel_err_code_string_vals[] = {
|
|
|
|
|
{ 0, "Canceled"},
|
|
|
|
|
{ 1, "CancelFailed"},
|
|
|
|
|
{ 3, "ETCFailed"},
|
|
|
|
|
{ 4, "ImproperCallerResponse"},
|
|
|
|
|
{ 6, "MissingCustomerRecord"},
|
|
|
|
|
{ 7, "MissingParameter"},
|
|
|
|
|
{ 8, "ParameterOutOfRange"},
|
|
|
|
|
{ 10, "RequestedInfoError"},
|
|
|
|
|
{ 11, "SystemFailure"},
|
|
|
|
|
{ 12, "TaskRefused"},
|
|
|
|
|
{ 13, "UnavailableResource"},
|
|
|
|
|
{ 14, "UnexpectedComponentSequence"},
|
|
|
|
|
{ 15, "UnexpectedDataValue"},
|
|
|
|
|
{ 16, "UnexpectedParameter"},
|
|
|
|
|
{ 17, "UnknownLegID"},
|
|
|
|
|
{ 50, "UnknownPDPID"},
|
|
|
|
|
{ 51, "UnknownCSID"},
|
|
|
|
|
{ 0, NULL}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
static char camel_number_to_char(int number)
|
2005-05-08 20:34:57 +00:00
|
|
|
|
{
|
|
|
|
|
if (number < 10)
|
|
|
|
|
return (char) (number + 48 ); /* this is ASCII specific */
|
|
|
|
|
else
|
|
|
|
|
return (char) (number + 55 );
|
|
|
|
|
}
|
2005-03-22 15:41:40 +00:00
|
|
|
|
|
2006-08-21 21:58:30 +00:00
|
|
|
|
/*
|
|
|
|
|
* 24.011 8.2.5.4
|
|
|
|
|
*/
|
|
|
|
|
static guint8
|
2006-10-26 21:31:48 +00:00
|
|
|
|
dissect_RP_cause_ie(tvbuff_t *tvb, guint32 offset, _U_ guint len,
|
2006-08-21 21:58:30 +00:00
|
|
|
|
proto_tree *tree, int hf_cause_value, guint8 *cause_value)
|
|
|
|
|
{
|
|
|
|
|
guint8 oct;
|
|
|
|
|
guint32 curr_offset;
|
|
|
|
|
static char a_bigbuf[1024];
|
|
|
|
|
|
|
|
|
|
curr_offset = offset;
|
|
|
|
|
oct = tvb_get_guint8(tvb, curr_offset);
|
|
|
|
|
|
|
|
|
|
*cause_value = oct & 0x7f;
|
|
|
|
|
|
|
|
|
|
other_decode_bitfield_value(a_bigbuf, oct, 0x7f, 8);
|
|
|
|
|
proto_tree_add_uint_format(tree, hf_cause_value,
|
|
|
|
|
tvb, curr_offset, 1, *cause_value,
|
|
|
|
|
"%s : %s",
|
|
|
|
|
a_bigbuf,
|
|
|
|
|
val_to_str(*cause_value, camel_RP_Cause_values,
|
|
|
|
|
"Unknown Cause (%u), treated as (41) \"Temporary failure\" for MO-SMS or (111) \"Protocol error,unspecified\" for MT-SMS"));
|
|
|
|
|
curr_offset++;
|
|
|
|
|
|
|
|
|
|
if ((oct & 0x80)) {
|
|
|
|
|
oct = tvb_get_guint8(tvb, curr_offset);
|
|
|
|
|
proto_tree_add_uint_format(tree, hf_cause_value,
|
|
|
|
|
tvb, curr_offset, 1, oct,
|
|
|
|
|
"Diagnostic : %u", oct);
|
|
|
|
|
curr_offset++;
|
|
|
|
|
}
|
|
|
|
|
return(curr_offset - offset);
|
|
|
|
|
}
|
|
|
|
|
|
2005-03-22 15:41:40 +00:00
|
|
|
|
|
|
|
|
|
static int dissect_invokeData(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
|
2007-02-17 20:04:10 +00:00
|
|
|
|
proto_item *cause;
|
|
|
|
|
gint8 bug_class;
|
|
|
|
|
gboolean bug_pc, bug_ind_field;
|
|
|
|
|
gint32 bug_tag;
|
|
|
|
|
guint32 bug_len1;
|
|
|
|
|
|
2005-03-22 15:41:40 +00:00
|
|
|
|
switch(opcode){
|
|
|
|
|
case 0: /*InitialDP*/
|
|
|
|
|
offset=dissect_camel_InitialDPArg(FALSE, tvb, offset, pinfo, tree, -1);
|
|
|
|
|
break;
|
|
|
|
|
case 16: /*AssistRequestInstructions*/
|
|
|
|
|
offset=dissect_camel_AssistRequestInstructionsArg(FALSE, tvb, offset, pinfo, tree, -1);
|
|
|
|
|
break;
|
|
|
|
|
case 17: /*EstablishTemporaryConnection*/
|
|
|
|
|
offset=dissect_camel_EstablishTemporaryConnectionArg(FALSE, tvb, offset, pinfo, tree, -1);
|
|
|
|
|
break;
|
|
|
|
|
case 18: /*DisconnectForwardConnections*/
|
|
|
|
|
proto_tree_add_text(tree, tvb, offset, -1, "Disconnect Forward Connection");
|
|
|
|
|
break;
|
|
|
|
|
case 19: /*ConnectToResource*/
|
|
|
|
|
offset=dissect_camel_ConnectToResourceArg(FALSE, tvb, offset, pinfo, tree, -1);
|
|
|
|
|
break;
|
|
|
|
|
case 20: /*Connect*/
|
|
|
|
|
offset=dissect_camel_ConnectArg(FALSE, tvb, offset, pinfo, tree, -1);
|
|
|
|
|
break;
|
|
|
|
|
case 22: /*releaseCall*/
|
2005-05-02 18:32:57 +00:00
|
|
|
|
offset=dissect_camel_ReleaseCallArg(FALSE, tvb, offset, pinfo, tree, hf_camel_cause);
|
2005-03-22 15:41:40 +00:00
|
|
|
|
break;
|
|
|
|
|
case 23: /*RequestReportBCSMEvent*/
|
|
|
|
|
offset=dissect_camel_RequestReportBCSMEventArg(FALSE, tvb, offset, pinfo, tree, -1);
|
|
|
|
|
break;
|
|
|
|
|
case 24: /*EventReportBCSM*/
|
|
|
|
|
offset=dissect_camel_EventReportBCSMArg(FALSE, tvb, offset, pinfo, tree, -1);
|
|
|
|
|
break;
|
2006-12-19 22:07:08 +00:00
|
|
|
|
case 27: /*CollectInformation*/
|
|
|
|
|
offset=dissect_camel_CollectInformationArg(FALSE, tvb, offset, pinfo, tree, -1);
|
|
|
|
|
break;
|
2005-03-22 15:41:40 +00:00
|
|
|
|
case 31: /*Continue*/
|
|
|
|
|
/* Continue: no arguments - do nothing */
|
|
|
|
|
break;
|
2005-11-25 20:18:36 +00:00
|
|
|
|
case 32: /*initiateCallAttempt*/
|
|
|
|
|
offset=dissect_camel_InitiateCallAttemptArg(FALSE, tvb, offset, pinfo, tree, -1);
|
|
|
|
|
break;
|
2005-03-22 15:41:40 +00:00
|
|
|
|
case 33: /*ResetTimer*/
|
|
|
|
|
offset=dissect_camel_ResetTimerArg(FALSE, tvb, offset, pinfo, tree, -1);
|
|
|
|
|
break;
|
|
|
|
|
case 34: /*FurnishChargingInformation*/
|
2007-02-17 20:04:10 +00:00
|
|
|
|
/* offset=dissect_camel_FurnishChargingInformationArg(TRUE, tvb, offset, pinfo, tree, -1); */
|
|
|
|
|
offset = get_ber_identifier(tvb, offset, &bug_class, &bug_pc, &bug_tag);
|
|
|
|
|
offset = get_ber_length(tree, tvb, offset, &bug_len1, &bug_ind_field);
|
|
|
|
|
offset=dissect_camel_CAMEL_FCIBillingChargingCharacteristics(TRUE, tvb, offset, pinfo, tree, -1);
|
2005-03-22 15:41:40 +00:00
|
|
|
|
break;
|
|
|
|
|
case 35: /*ApplyCharging*/
|
|
|
|
|
offset=dissect_camel_ApplyChargingArg(FALSE, tvb, offset, pinfo, tree, -1);
|
|
|
|
|
break;
|
|
|
|
|
case 36: /*ApplyChargingReport*/
|
2007-02-17 20:04:10 +00:00
|
|
|
|
/* offset=dissect_camel_ApplyChargingReportArg(TRUE, tvb, offset, pinfo, tree, -1); */
|
|
|
|
|
offset = get_ber_identifier(tvb, offset, &bug_class, &bug_pc, &bug_tag);
|
|
|
|
|
offset = get_ber_length(tree, tvb, offset, &bug_len1, &bug_ind_field);
|
|
|
|
|
offset=dissect_camel_CAMEL_CallResult(TRUE, tvb, offset, pinfo, tree, -1);
|
2005-03-22 15:41:40 +00:00
|
|
|
|
break;
|
|
|
|
|
case 41: /*CallGap*/
|
|
|
|
|
offset=dissect_camel_CallGapArg(FALSE, tvb, offset, pinfo, tree, -1);
|
|
|
|
|
break;
|
|
|
|
|
case 44: /*CallInformationReport*/
|
|
|
|
|
offset=dissect_camel_CallInformationReportArg(FALSE, tvb, offset, pinfo, tree, -1);
|
|
|
|
|
break;
|
|
|
|
|
case 45: /*CallInformationRequest*/
|
|
|
|
|
offset=dissect_camel_CallInformationRequestArg(FALSE, tvb, offset, pinfo, tree, -1);
|
|
|
|
|
break;
|
|
|
|
|
case 46: /*SendChargingInformation*/
|
|
|
|
|
offset=dissect_camel_SendChargingInformationArg(FALSE, tvb, offset, pinfo, tree, -1);
|
|
|
|
|
break;
|
|
|
|
|
case 47: /*PlayAnnouncement*/
|
|
|
|
|
offset=dissect_camel_PlayAnnouncementArg(FALSE, tvb, offset, pinfo, tree, -1);
|
|
|
|
|
break;
|
|
|
|
|
case 48: /*PromptAndCollectUserInformation*/
|
|
|
|
|
offset=dissect_camel_PromptAndCollectUserInformationArg(FALSE, tvb, offset, pinfo, tree, -1);
|
|
|
|
|
break;
|
|
|
|
|
case 49: /*SpecializedResourceReport*/
|
|
|
|
|
offset=dissect_camel_SpecializedResourceReportArg(FALSE, tvb, offset, pinfo, tree, -1);
|
|
|
|
|
break;
|
|
|
|
|
case 53: /*Cancel*/
|
|
|
|
|
offset=dissect_camel_CancelArg(FALSE, tvb, offset, pinfo, tree, -1);
|
|
|
|
|
break;
|
|
|
|
|
case 56: /*ContinueWithArgument*/
|
|
|
|
|
offset=dissect_camel_ContinueWithArgumentArg(FALSE, tvb, offset, pinfo, tree, -1);
|
|
|
|
|
break;
|
|
|
|
|
case 60: /*InitialDPSMS*/
|
|
|
|
|
offset=dissect_camel_InitialDPSMSArg(FALSE, tvb, offset, pinfo, tree, -1);
|
|
|
|
|
break;
|
|
|
|
|
case 61: /*FurnishChargingInformationSMS*/
|
2007-02-17 20:04:10 +00:00
|
|
|
|
/* offset=dissect_camel_FurnishChargingInformationSMSArg(FALSE, tvb, offset, pinfo, tree, -1); */
|
|
|
|
|
offset = get_ber_identifier(tvb, offset, &bug_class, &bug_pc, &bug_tag);
|
|
|
|
|
offset = get_ber_length(tree, tvb, offset, &bug_len1, &bug_ind_field);
|
|
|
|
|
offset=dissect_camel_CAMEL_FCISMSBillingChargingCharacteristics(TRUE, tvb, offset, pinfo, tree, -1);
|
2005-03-22 15:41:40 +00:00
|
|
|
|
break;
|
|
|
|
|
case 62: /*ConnectSMS*/
|
|
|
|
|
offset=dissect_camel_ConnectSMSArg(FALSE, tvb, offset, pinfo, tree, -1);
|
|
|
|
|
break;
|
|
|
|
|
case 63: /*RequestReportSMSEvent*/
|
|
|
|
|
offset=dissect_camel_RequestReportSMSEventArg(FALSE, tvb, offset, pinfo, tree, -1);
|
|
|
|
|
break;
|
|
|
|
|
case 64: /*EventReportSMS*/
|
|
|
|
|
offset=dissect_camel_EventReportSMSArg(FALSE, tvb, offset, pinfo, tree, -1);
|
|
|
|
|
break;
|
|
|
|
|
case 65: /*ContinueSMS*/
|
|
|
|
|
/* ContinueSMS: no arguments - do nothing */
|
|
|
|
|
break;
|
|
|
|
|
case 66: /*ReleaseSMS*/
|
2006-08-21 21:58:30 +00:00
|
|
|
|
offset=dissect_camel_ReleaseSMSArg(FALSE, tvb, offset, pinfo, tree, hf_camel_RP_Cause);
|
2005-03-22 15:41:40 +00:00
|
|
|
|
break;
|
|
|
|
|
case 67: /*ResetTimerSMS*/
|
|
|
|
|
offset=dissect_camel_ResetTimerSMSArg(FALSE, tvb, offset, pinfo, tree, -1);
|
|
|
|
|
break;
|
|
|
|
|
case 71: /*ApplyChargingGPRS*/
|
|
|
|
|
offset=dissect_camel_ApplyChargingGPRSArg(FALSE, tvb, offset, pinfo, tree, -1);
|
|
|
|
|
break;
|
2006-01-17 21:52:30 +00:00
|
|
|
|
case 72: /*ApplyChargingReportGPRS*/
|
|
|
|
|
offset=dissect_camel_ApplyChargingReportGPRSArg(FALSE, tvb, offset, pinfo, tree, -1);
|
|
|
|
|
break;
|
2005-03-22 15:41:40 +00:00
|
|
|
|
case 73: /*CancelGPRS*/
|
|
|
|
|
offset=dissect_camel_CancelGPRSArg(FALSE, tvb, offset, pinfo, tree, -1);
|
|
|
|
|
break;
|
|
|
|
|
case 74: /*ConnectGPRS*/
|
|
|
|
|
offset=dissect_camel_ConnectGPRSArg(FALSE, tvb, offset, pinfo, tree, -1);
|
|
|
|
|
break;
|
|
|
|
|
case 75: /*ContinueGPRS*/
|
|
|
|
|
offset=dissect_camel_ContinueGPRSArg(FALSE, tvb, offset, pinfo, tree, -1);
|
|
|
|
|
break;
|
2006-01-17 21:52:30 +00:00
|
|
|
|
case 76: /*EntityReleasedGPRS*/
|
|
|
|
|
offset=dissect_camel_EntityReleasedGPRSArg(FALSE, tvb, offset, pinfo, tree, -1);
|
|
|
|
|
break;
|
2005-03-22 15:41:40 +00:00
|
|
|
|
case 77: /*FurnishChargingInformationGPRS*/
|
2007-02-17 20:04:10 +00:00
|
|
|
|
/* offset=dissect_camel_FurnishChargingInformationGPRSArg(FALSE, tvb, offset, pinfo, tree, -1); */
|
|
|
|
|
offset = get_ber_identifier(tvb, offset, &bug_class, &bug_pc, &bug_tag);
|
|
|
|
|
offset = get_ber_length(tree, tvb, offset, &bug_len1, &bug_ind_field);
|
|
|
|
|
offset=dissect_camel_CAMEL_FCIGPRSBillingChargingCharacteristics(TRUE, tvb, offset, pinfo, tree, -1);
|
2005-03-22 15:41:40 +00:00
|
|
|
|
break;
|
|
|
|
|
case 78: /*InitialDPGPRS*/
|
|
|
|
|
offset=dissect_camel_InitialDPGPRSArg(FALSE, tvb, offset, pinfo, tree, -1);
|
|
|
|
|
break;
|
|
|
|
|
case 79: /*ReleaseGPRS*/
|
|
|
|
|
offset=dissect_camel_ReleaseGPRSArg(FALSE, tvb, offset, pinfo, tree, -1);
|
|
|
|
|
break;
|
2006-01-17 21:52:30 +00:00
|
|
|
|
case 80: /*EventReportGPRS*/
|
|
|
|
|
offset=dissect_camel_EventReportGPRSArg(FALSE, tvb, offset, pinfo, tree, -1);
|
|
|
|
|
break;
|
2005-03-22 15:41:40 +00:00
|
|
|
|
case 81: /*RequestReportGPRSEvent*/
|
|
|
|
|
offset=dissect_camel_RequestReportGPRSEventArg(FALSE, tvb, offset, pinfo, tree, -1);
|
|
|
|
|
break;
|
|
|
|
|
case 82: /*ResetTimerGPRS*/
|
|
|
|
|
offset=dissect_camel_ResetTimerGPRSArg(FALSE, tvb, offset, pinfo, tree, -1);
|
|
|
|
|
break;
|
|
|
|
|
case 83: /*SendChargingInformationGPRS*/
|
|
|
|
|
offset=dissect_camel_SendChargingInformationGPRSArg(FALSE, tvb, offset, pinfo, tree, -1);
|
|
|
|
|
break;
|
2005-11-25 20:18:36 +00:00
|
|
|
|
case 86: /*DFCWithArgument*/
|
|
|
|
|
offset= dissect_camel_DisconnectForwardConnectionWithArgumentArg(FALSE, tvb, offset, pinfo, tree, -1);
|
|
|
|
|
break;
|
|
|
|
|
case 88: /*ContinueWithArgument*/
|
|
|
|
|
/* XXX Same as opcode 56 ??? */
|
|
|
|
|
offset= dissect_camel_ContinueWithArgumentArg(FALSE, tvb, offset, pinfo, tree, -1);
|
|
|
|
|
break;
|
|
|
|
|
case 90: /*DisconnectLeg*/
|
|
|
|
|
offset= dissect_camel_DisconnectLegArg(FALSE, tvb, offset, pinfo, tree, -1);
|
|
|
|
|
break;
|
|
|
|
|
case 93: /*MoveLeg*/
|
|
|
|
|
offset= dissect_camel_MoveLegArg(FALSE, tvb, offset, pinfo, tree, -1);
|
|
|
|
|
break;
|
|
|
|
|
case 95: /*SplitLeg*/
|
|
|
|
|
offset= dissect_camel_SplitLegArg(FALSE, tvb, offset, pinfo, tree, -1);
|
|
|
|
|
break;
|
|
|
|
|
case 96: /*EntityReleased*/
|
|
|
|
|
offset= dissect_camel_EntityReleasedArg(FALSE, tvb, offset, pinfo, tree, -1);
|
|
|
|
|
break;
|
|
|
|
|
case 97: /*PlayTone*/
|
|
|
|
|
offset= dissect_camel_PlayToneArg(FALSE, tvb, offset, pinfo, tree, -1);
|
|
|
|
|
break;
|
2005-03-22 15:41:40 +00:00
|
|
|
|
default:
|
2007-02-17 20:04:10 +00:00
|
|
|
|
cause=proto_tree_add_text(tree, tvb, offset, -1, "Unknown invokeData blob");
|
|
|
|
|
proto_item_set_expert_flags(cause, PI_MALFORMED, PI_WARN);
|
|
|
|
|
expert_add_info_format(pinfo, cause, PI_MALFORMED, PI_WARN, "Unknown invokeData %d",opcode);
|
2005-03-22 15:41:40 +00:00
|
|
|
|
/* todo call the asn.1 dissector */
|
|
|
|
|
}
|
|
|
|
|
return offset;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static int dissect_returnResultData(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
|
2007-02-17 20:04:10 +00:00
|
|
|
|
proto_item *cause;
|
|
|
|
|
|
2005-03-22 15:41:40 +00:00
|
|
|
|
switch(opcode){
|
2005-11-25 20:18:36 +00:00
|
|
|
|
case 32: /*initiateCallAttempt*/
|
|
|
|
|
offset=dissect_camel_InitiateCallAttemptRes(FALSE, tvb, offset, pinfo, tree, -1);
|
|
|
|
|
break;
|
2005-03-22 15:41:40 +00:00
|
|
|
|
case 48: /*PromptAndCollectUserInformation*/
|
|
|
|
|
offset=dissect_camel_ReceivedInformationArg(FALSE, tvb, offset, pinfo, tree, -1);
|
|
|
|
|
break;
|
|
|
|
|
case 55: /*ActivityTest*/
|
|
|
|
|
/* ActivityTest: no arguments - do nothing */
|
|
|
|
|
break;
|
|
|
|
|
case 70: /*ActivityTestGPRS*/
|
|
|
|
|
/* ActivityTestGPRS: no arguments - do nothing */
|
|
|
|
|
break;
|
|
|
|
|
default:
|
2007-02-17 20:04:10 +00:00
|
|
|
|
cause=proto_tree_add_text(tree, tvb, offset, -1, "Unknown returnResultData blob");
|
|
|
|
|
proto_item_set_expert_flags(cause, PI_MALFORMED, PI_WARN);
|
|
|
|
|
expert_add_info_format(pinfo, cause, PI_MALFORMED, PI_WARN, "Unknown returnResultData %d",opcode);
|
2005-03-22 15:41:40 +00:00
|
|
|
|
}
|
|
|
|
|
return offset;
|
|
|
|
|
}
|
|
|
|
|
|
2007-02-17 20:04:10 +00:00
|
|
|
|
static int dissect_returnErrorData(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) {
|
|
|
|
|
proto_item *cause;
|
2005-03-22 15:41:40 +00:00
|
|
|
|
|
2007-02-17 20:04:10 +00:00
|
|
|
|
switch(errorCode) {
|
|
|
|
|
case 1: /*CancelFailed*/
|
|
|
|
|
offset=dissect_camel_CancelFailedPARAM(TRUE, tvb, offset, pinfo, tree, -1);
|
|
|
|
|
break;
|
|
|
|
|
case 10: /*RequestedInfoError*/
|
|
|
|
|
offset=dissect_camel_RequestedInfoErrorPARAM(TRUE, tvb, offset, pinfo, tree, -1);
|
|
|
|
|
break;
|
|
|
|
|
case 11: /*SystemFailure*/
|
|
|
|
|
offset=dissect_camel_SystemFailurePARAM(TRUE, tvb, offset, pinfo, tree, -1);
|
|
|
|
|
break;
|
|
|
|
|
case 12: /*TaskRefused*/
|
|
|
|
|
offset=dissect_camel_TaskRefusedPARAM(TRUE, tvb, offset, pinfo, tree, -1);
|
|
|
|
|
break;
|
|
|
|
|
default:
|
|
|
|
|
cause=proto_tree_add_text(tree, tvb, offset, -1, "Unknown returnErrorData blob");
|
|
|
|
|
proto_item_set_expert_flags(cause, PI_MALFORMED, PI_WARN);
|
|
|
|
|
expert_add_info_format(pinfo, cause, PI_MALFORMED, PI_WARN, "Unknown returnErrorData %d",errorCode);
|
|
|
|
|
}
|
2005-03-22 15:41:40 +00:00
|
|
|
|
return offset;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static guint8 camel_pdu_type = 0;
|
|
|
|
|
static guint8 camel_pdu_size = 0;
|
|
|
|
|
|
2006-09-01 16:17:48 +00:00
|
|
|
|
static void dissect_camelext_CAPGPRSReferenceNumber(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree) {
|
|
|
|
|
proto_item *item=NULL;
|
|
|
|
|
proto_tree *tree=NULL;
|
|
|
|
|
proto_item *camel_item=NULL;
|
|
|
|
|
proto_tree *camel_tree=NULL;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (check_col(pinfo->cinfo, COL_PROTOCOL)) {
|
|
|
|
|
col_set_str(pinfo->cinfo, COL_PROTOCOL, "Camel");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* create display subtree for the protocol */
|
|
|
|
|
if(parent_tree){
|
|
|
|
|
camel_item = proto_tree_add_item(parent_tree, proto_camel, tvb, 0, -1, FALSE);
|
|
|
|
|
camel_tree = proto_item_add_subtree(camel_item, ett_camel);
|
|
|
|
|
}
|
|
|
|
|
/* create display subtree for the protocol */
|
|
|
|
|
if(camel_tree){
|
|
|
|
|
item = proto_tree_add_text(camel_tree, tvb, 0, -1, "GPRS Reference Number");
|
|
|
|
|
tree = proto_item_add_subtree(item, ett_camel_CAPGPRSReferenceNumber);
|
|
|
|
|
}
|
|
|
|
|
dissect_camel_CAPGPRSReferenceNumber(FALSE, tvb, 0, pinfo, tree, -1);
|
|
|
|
|
}
|
|
|
|
|
|
2005-03-22 15:41:40 +00:00
|
|
|
|
static int
|
|
|
|
|
dissect_camel_camelPDU(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index) {
|
|
|
|
|
|
2005-09-08 15:01:16 +00:00
|
|
|
|
char *version_ptr;
|
From Florent Drouin:
Here are some patches and a new module to introduce the notion of Tcap context for a Tcap transaction. For each Tcap transaction, several parameters, like session identifier, start time or OID, will be saved in a hash table, to keep these informations available for the next messages. This context is then given to the upper layer, and can be used, for example, to generate transaction-associated statistics.
Moreover, the Upper protocol, detected in the Begin of the TCAP transaction ( according to the OID ), is saved in the context, and will be reused for the next messages of the transaction. This help the decoding of SS7 messages, without any SSN configuration in the "wireshark preferences".
You will have too, the possibility to apply a filter to see only the messages related to a TCAP transaction. (tcap.srt.session_id=XXX)
To enable the use of the Tcap context, you have 2 new parameters in the preferences,
- SRT, enable search for a Tcap context for any TCAP messages
- persistentSRT, keep the Tcap context, even after the transaction has been closed. This is mandatory with Wireshark, to have a clean display of the stats.
There is 2 new timers in the preferences for the statistics, to tune the retransmission timeout, and messages lost timeout.
svn path=/trunk/; revision=19341
2006-09-27 20:06:06 +00:00
|
|
|
|
struct tcap_private_t * p_private_tcap;
|
2005-03-22 15:41:40 +00:00
|
|
|
|
|
|
|
|
|
opcode = 0;
|
|
|
|
|
application_context_version = 0;
|
|
|
|
|
if (pinfo->private_data != NULL){
|
From Florent Drouin:
Here are some patches and a new module to introduce the notion of Tcap context for a Tcap transaction. For each Tcap transaction, several parameters, like session identifier, start time or OID, will be saved in a hash table, to keep these informations available for the next messages. This context is then given to the upper layer, and can be used, for example, to generate transaction-associated statistics.
Moreover, the Upper protocol, detected in the Begin of the TCAP transaction ( according to the OID ), is saved in the context, and will be reused for the next messages of the transaction. This help the decoding of SS7 messages, without any SSN configuration in the "wireshark preferences".
You will have too, the possibility to apply a filter to see only the messages related to a TCAP transaction. (tcap.srt.session_id=XXX)
To enable the use of the Tcap context, you have 2 new parameters in the preferences,
- SRT, enable search for a Tcap context for any TCAP messages
- persistentSRT, keep the Tcap context, even after the transaction has been closed. This is mandatory with Wireshark, to have a clean display of the stats.
There is 2 new timers in the preferences for the statistics, to tune the retransmission timeout, and messages lost timeout.
svn path=/trunk/; revision=19341
2006-09-27 20:06:06 +00:00
|
|
|
|
p_private_tcap=pinfo->private_data;
|
|
|
|
|
|
|
|
|
|
if (p_private_tcap->acv==TRUE ){
|
|
|
|
|
version_ptr = strrchr(p_private_tcap->oid,'.');
|
|
|
|
|
if (version_ptr)
|
|
|
|
|
application_context_version = atoi(version_ptr+1);
|
2005-05-30 20:55:16 +00:00
|
|
|
|
}
|
2006-10-04 16:02:59 +00:00
|
|
|
|
gp_camelsrt_info->tcap_context=p_private_tcap->context;
|
|
|
|
|
if (p_private_tcap->context)
|
|
|
|
|
gp_camelsrt_info->tcap_session_id
|
|
|
|
|
= ( (struct tcaphash_context_t *) (p_private_tcap->context))->session_id;
|
2005-03-22 15:41:40 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
camel_pdu_type = tvb_get_guint8(tvb, offset)&0x0f;
|
|
|
|
|
/* Get the length and add 2 */
|
|
|
|
|
camel_pdu_size = tvb_get_guint8(tvb, offset+1)+2;
|
|
|
|
|
|
|
|
|
|
if (check_col(pinfo->cinfo, COL_INFO)){
|
|
|
|
|
/* Populate the info column with PDU type*/
|
2007-02-17 20:04:10 +00:00
|
|
|
|
col_set_str(pinfo->cinfo, COL_INFO, val_to_str(camel_pdu_type, camel_Component_vals, "Unknown Camel (%u)"));
|
|
|
|
|
col_append_fstr(pinfo->cinfo, COL_INFO, " ");
|
2005-03-22 15:41:40 +00:00
|
|
|
|
}
|
|
|
|
|
|
2007-02-17 20:04:10 +00:00
|
|
|
|
offset = dissect_camel_Component(FALSE, tvb, 0, pinfo, tree, hf_index);
|
2005-03-22 15:41:40 +00:00
|
|
|
|
|
|
|
|
|
return offset;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void
|
|
|
|
|
dissect_camel(tvbuff_t *tvb, packet_info *pinfo, proto_tree *parent_tree)
|
|
|
|
|
{
|
|
|
|
|
proto_item *item=NULL;
|
|
|
|
|
proto_tree *tree=NULL;
|
2006-10-04 16:02:59 +00:00
|
|
|
|
proto_item *stat_item=NULL;
|
|
|
|
|
proto_tree *stat_tree=NULL;
|
2005-03-22 15:41:40 +00:00
|
|
|
|
|
|
|
|
|
if (check_col(pinfo->cinfo, COL_PROTOCOL)) {
|
|
|
|
|
col_set_str(pinfo->cinfo, COL_PROTOCOL, "Camel");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* create display subtree for the protocol */
|
|
|
|
|
if(parent_tree){
|
|
|
|
|
item = proto_tree_add_item(parent_tree, proto_camel, tvb, 0, -1, FALSE);
|
|
|
|
|
tree = proto_item_add_subtree(item, ett_camel);
|
|
|
|
|
}
|
2006-10-04 16:02:59 +00:00
|
|
|
|
/* camelsrt reset counter, and initialise global pointer
|
|
|
|
|
to store service response time related data */
|
|
|
|
|
gp_camelsrt_info=camelsrt_razinfo();
|
2005-03-22 15:41:40 +00:00
|
|
|
|
dissect_camel_camelPDU(FALSE, tvb, 0, pinfo, tree, -1);
|
2006-10-04 16:02:59 +00:00
|
|
|
|
|
|
|
|
|
/* If a Tcap context is associated to this transaction */
|
|
|
|
|
if (gcamel_HandleSRT &&
|
|
|
|
|
gp_camelsrt_info->tcap_context ) {
|
|
|
|
|
if (gcamel_DisplaySRT && tree) {
|
|
|
|
|
stat_item = proto_tree_add_text(tree, tvb, 0, 0, "Stat");
|
|
|
|
|
stat_tree = proto_item_add_subtree(stat_item, ett_camel_stat);
|
|
|
|
|
}
|
|
|
|
|
camelsrt_call_matching(tvb, pinfo, stat_tree, gp_camelsrt_info);
|
|
|
|
|
tap_queue_packet(camel_tap, pinfo, gp_camelsrt_info);
|
|
|
|
|
}
|
2005-03-22 15:41:40 +00:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*--- proto_reg_handoff_camel ---------------------------------------*/
|
|
|
|
|
static void range_delete_callback(guint32 ssn)
|
|
|
|
|
{
|
|
|
|
|
if (ssn) {
|
2005-12-17 16:55:45 +00:00
|
|
|
|
delete_itu_tcap_subdissector(ssn, camel_handle);
|
2005-03-22 15:41:40 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void range_add_callback(guint32 ssn)
|
|
|
|
|
{
|
|
|
|
|
if (ssn) {
|
2005-12-17 16:55:45 +00:00
|
|
|
|
add_itu_tcap_subdissector(ssn, camel_handle);
|
2005-03-22 15:41:40 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void proto_reg_handoff_camel(void) {
|
|
|
|
|
|
|
|
|
|
static int camel_prefs_initialized = FALSE;
|
|
|
|
|
if (!camel_prefs_initialized) {
|
|
|
|
|
camel_prefs_initialized = TRUE;
|
|
|
|
|
camel_handle = create_dissector_handle(dissect_camel, proto_camel);
|
2006-09-01 16:17:48 +00:00
|
|
|
|
|
2006-10-04 16:02:59 +00:00
|
|
|
|
register_ber_oid_dissector_handle("0.4.0.0.1.0.50.0",camel_handle, proto_camel, "itu-t(0) identified-organization(4) etsi(0) mobileDomain(0) gsm-Network|umts-Network(1) applicationContext(0) cap-gsmssf-to-gsmscf(50) version1(0)" );
|
2006-09-01 16:17:48 +00:00
|
|
|
|
register_ber_oid_dissector_handle("0.4.0.0.1.0.50.1",camel_handle, proto_camel, "itu-t(0) identified-organization(4) etsi(0) mobileDomain(0) gsm-Network|umts-Network(1) applicationContext(0) cap-gsmssf-to-gsmscf(50) version2(1)" );
|
|
|
|
|
register_ber_oid_dissector_handle("0.4.0.0.1.0.51.1",camel_handle, proto_camel, "itu-t(0) identified-organization(4) etsi(0) mobileDomain(0) gsm-Network|umts-Network(1) applicationContext(0) cap-assist-handoff-gsmssf-to-gsmscf(51) version2(1)" );
|
|
|
|
|
register_ber_oid_dissector_handle("0.4.0.0.1.0.52.1",camel_handle, proto_camel, "itu-t(0) identified-organization(4) etsi(0) mobileDomain(0) gsm-Network|umts-Network(1) applicationContext(0) cap-gsmSRF-to-gsmscf(52) version2(1)" );
|
|
|
|
|
register_ber_oid_dissector_handle("0.4.0.0.1.21.3.50",camel_handle, proto_camel, "itu-t(0) identified-organization(4) etsi(0) mobileDomain(0) gsm-Network(1) cAP3OE(21) ac(3) id-ac-CAP-gprsSSF-gsmSCF-AC(50)" );
|
From Florent Drouin:
Here are some patches and a new module to introduce the notion of Tcap context for a Tcap transaction. For each Tcap transaction, several parameters, like session identifier, start time or OID, will be saved in a hash table, to keep these informations available for the next messages. This context is then given to the upper layer, and can be used, for example, to generate transaction-associated statistics.
Moreover, the Upper protocol, detected in the Begin of the TCAP transaction ( according to the OID ), is saved in the context, and will be reused for the next messages of the transaction. This help the decoding of SS7 messages, without any SSN configuration in the "wireshark preferences".
You will have too, the possibility to apply a filter to see only the messages related to a TCAP transaction. (tcap.srt.session_id=XXX)
To enable the use of the Tcap context, you have 2 new parameters in the preferences,
- SRT, enable search for a Tcap context for any TCAP messages
- persistentSRT, keep the Tcap context, even after the transaction has been closed. This is mandatory with Wireshark, to have a clean display of the stats.
There is 2 new timers in the preferences for the statistics, to tune the retransmission timeout, and messages lost timeout.
svn path=/trunk/; revision=19341
2006-09-27 20:06:06 +00:00
|
|
|
|
register_ber_oid_dissector_handle("0.4.0.0.1.21.3.61",camel_handle, proto_camel, "itu-t(0) identified-organization(4) etsi(0) mobileDomain(0) gsm-Network(1) cAP3OE(21) ac(3) id-ac-cap3-sms-AC(61)" );
|
2006-09-01 16:17:48 +00:00
|
|
|
|
|
|
|
|
|
register_ber_oid_dissector("0.4.0.0.1.1.5.2", dissect_camelext_CAPGPRSReferenceNumber, proto_camel, "itu-t(0) identified-organization(4) etsi(0) mobileDomain(0) gsm-Network(1) abstractSyntax(1) cap-GPRS-ReferenceNumber(5) version3(2)");
|
2005-03-22 15:41:40 +00:00
|
|
|
|
} else {
|
|
|
|
|
range_foreach(ssn_range, range_delete_callback);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
g_free(ssn_range);
|
|
|
|
|
ssn_range = range_copy(global_ssn_range);
|
|
|
|
|
|
|
|
|
|
range_foreach(ssn_range, range_add_callback);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void proto_register_camel(void) {
|
|
|
|
|
module_t *camel_module;
|
|
|
|
|
/* List of fields */
|
|
|
|
|
static hf_register_info hf[] = {
|
|
|
|
|
{ &hf_camel_cause_indicator, /* Currently not enabled */
|
|
|
|
|
{ "Cause indicator", "camel.cause_indicator",
|
|
|
|
|
FT_UINT8, BASE_DEC, VALS(q850_cause_code_vals), 0x7f,
|
|
|
|
|
"", HFILL }},
|
2007-02-17 20:04:10 +00:00
|
|
|
|
{ &hf_camel_addr_extension,
|
2005-04-15 08:18:15 +00:00
|
|
|
|
{ "Extension", "camel.addr_extension",
|
2005-03-22 15:41:40 +00:00
|
|
|
|
FT_BOOLEAN, 8, TFS(&camel_extension_value), 0x80,
|
|
|
|
|
"Extension", HFILL }},
|
2005-04-15 08:18:15 +00:00
|
|
|
|
{ &hf_camel_addr_natureOfAddressIndicator,
|
|
|
|
|
{ "Nature of address", "camel.addr_nature_of_addr",
|
|
|
|
|
FT_UINT8, BASE_HEX, VALS(camel_nature_of_addr_indicator_values), 0x70,
|
|
|
|
|
"Nature of address", HFILL }},
|
|
|
|
|
{ &hf_camel_addr_numberingPlanInd,
|
|
|
|
|
{ "Numbering plan indicator", "camel.addr_numbering_plan",
|
2005-03-22 15:41:40 +00:00
|
|
|
|
FT_UINT8, BASE_HEX, VALS(camel_number_plan_values), 0x0f,
|
2005-04-15 08:18:15 +00:00
|
|
|
|
"Numbering plan indicator", HFILL }},
|
|
|
|
|
{ &hf_camel_addr_digits,
|
2005-03-22 15:41:40 +00:00
|
|
|
|
{ "Address digits", "camel.address_digits",
|
|
|
|
|
FT_STRING, BASE_NONE, NULL, 0,
|
|
|
|
|
"Address digits", HFILL }},
|
2005-05-08 20:34:57 +00:00
|
|
|
|
{ &hf_digit,
|
|
|
|
|
{ "Digit Value", "camel.digit_value",
|
2006-01-20 19:34:53 +00:00
|
|
|
|
FT_UINT8, BASE_DEC, VALS(digit_value), 0, "Digit Value", HFILL }},
|
|
|
|
|
{ &hf_camel_PDPTypeNumber_etsi,
|
|
|
|
|
{ "ETSI defined PDP Type Value", "camel.PDPTypeNumber_etsi",
|
|
|
|
|
FT_UINT8, BASE_HEX, VALS(gsm_map_etsi_defined_pdp_vals), 0,
|
|
|
|
|
"ETSI defined PDP Type Value", HFILL }},
|
|
|
|
|
{ &hf_camel_PDPTypeNumber_ietf,
|
|
|
|
|
{ "IETF defined PDP Type Value", "camel.PDPTypeNumber_ietf",
|
|
|
|
|
FT_UINT8, BASE_HEX, VALS(gsm_map_ietf_defined_pdp_vals), 0,
|
|
|
|
|
"IETF defined PDP Type Value", HFILL }},
|
|
|
|
|
{ &hf_camel_PDPAddress_IPv4,
|
|
|
|
|
{ "PDPAddress IPv4", "camel.PDPAddress_IPv4",
|
|
|
|
|
FT_IPv4, BASE_NONE, NULL, 0,
|
|
|
|
|
"IPAddress IPv4", HFILL }},
|
|
|
|
|
{ &hf_camel_PDPAddress_IPv6,
|
|
|
|
|
{ "PDPAddress IPv6", "camel.PDPAddress_IPv6",
|
2006-01-31 18:35:36 +00:00
|
|
|
|
FT_IPv6, BASE_NONE, NULL, 0,
|
2006-01-20 19:34:53 +00:00
|
|
|
|
"IPAddress IPv6", HFILL }},
|
2006-08-21 21:58:30 +00:00
|
|
|
|
{ &hf_camel_cellGlobalIdOrServiceAreaIdFixedLength,
|
2006-01-22 21:16:33 +00:00
|
|
|
|
{ "CellGlobalIdOrServiceAreaIdFixedLength", "camel.CellGlobalIdOrServiceAreaIdFixedLength",
|
|
|
|
|
FT_BYTES, BASE_HEX, NULL, 0,
|
|
|
|
|
"LocationInformationGPRS/CellGlobalIdOrServiceAreaIdOrLAI", HFILL }},
|
2006-08-21 21:58:30 +00:00
|
|
|
|
{ &hf_camel_RP_Cause,
|
|
|
|
|
{ "RP Cause", "camel.RP_Cause",
|
|
|
|
|
FT_UINT8, BASE_DEC, NULL, 0,
|
|
|
|
|
"RP Cause Value", HFILL }},
|
2006-01-20 19:34:53 +00:00
|
|
|
|
|
2006-10-04 16:02:59 +00:00
|
|
|
|
/* Camel Service Response Time */
|
|
|
|
|
{ &hf_camelsrt_SessionId,
|
|
|
|
|
{ "Session Id",
|
|
|
|
|
"camel.srt.session_id",
|
|
|
|
|
FT_UINT32, BASE_DEC, NULL, 0x0,
|
|
|
|
|
"", HFILL }
|
|
|
|
|
},
|
|
|
|
|
{ &hf_camelsrt_RequestNumber,
|
|
|
|
|
{ "Request Number",
|
|
|
|
|
"camel.srt.request_number",
|
|
|
|
|
FT_UINT64, BASE_DEC, NULL, 0x0,
|
|
|
|
|
"", HFILL }
|
|
|
|
|
},
|
|
|
|
|
{ &hf_camelsrt_Duplicate,
|
|
|
|
|
{ "Request Duplicate",
|
|
|
|
|
"camel.srt.duplicate",
|
|
|
|
|
FT_UINT32, BASE_DEC, NULL, 0x0,
|
|
|
|
|
"", HFILL }
|
|
|
|
|
},
|
|
|
|
|
{ &hf_camelsrt_RequestFrame,
|
|
|
|
|
{ "Requested Frame",
|
|
|
|
|
"camel.srt.reqframe",
|
|
|
|
|
FT_FRAMENUM, BASE_NONE, NULL, 0x0,
|
|
|
|
|
"SRT Request Frame", HFILL }
|
|
|
|
|
},
|
|
|
|
|
{ &hf_camelsrt_ResponseFrame,
|
|
|
|
|
{ "Response Frame",
|
|
|
|
|
"camel.srt.rspframe",
|
|
|
|
|
FT_FRAMENUM, BASE_NONE, NULL, 0x0,
|
|
|
|
|
"SRT Response Frame", HFILL }
|
|
|
|
|
},
|
|
|
|
|
{ &hf_camelsrt_DeltaTime,
|
|
|
|
|
{ "Service Response Time",
|
|
|
|
|
"camel.srt.deltatime",
|
|
|
|
|
FT_RELATIVE_TIME, BASE_NONE, NULL, 0x0,
|
|
|
|
|
"DeltaTime between Request and Response", HFILL }
|
|
|
|
|
},
|
|
|
|
|
{ &hf_camelsrt_SessionTime,
|
|
|
|
|
{ "Session duration",
|
|
|
|
|
"camel.srt.sessiontime",
|
|
|
|
|
FT_RELATIVE_TIME, BASE_NONE, NULL, 0x0,
|
|
|
|
|
"Duration of the TCAP session", HFILL }
|
|
|
|
|
},
|
|
|
|
|
{ &hf_camelsrt_DeltaTime31,
|
|
|
|
|
{ "Service Response Time",
|
|
|
|
|
"camel.srt.deltatime31",
|
|
|
|
|
FT_RELATIVE_TIME, BASE_NONE, NULL, 0x0,
|
|
|
|
|
"DeltaTime between InitialDP and Continue", HFILL }
|
|
|
|
|
},
|
|
|
|
|
{ &hf_camelsrt_DeltaTime65,
|
|
|
|
|
{ "Service Response Time",
|
|
|
|
|
"camel.srt.deltatime65",
|
|
|
|
|
FT_RELATIVE_TIME, BASE_NONE, NULL, 0x0,
|
|
|
|
|
"DeltaTime between InitialDPSMS and ContinueSMS", HFILL }
|
|
|
|
|
},
|
|
|
|
|
{ &hf_camelsrt_DeltaTime75,
|
|
|
|
|
{ "Service Response Time",
|
|
|
|
|
"camel.srt.deltatime75",
|
|
|
|
|
FT_RELATIVE_TIME, BASE_NONE, NULL, 0x0,
|
|
|
|
|
"DeltaTime between InitialDPGPRS and ContinueGPRS", HFILL }
|
|
|
|
|
},
|
|
|
|
|
{ &hf_camelsrt_DeltaTime35,
|
|
|
|
|
{ "Service Response Time",
|
|
|
|
|
"camel.srt.deltatime35",
|
|
|
|
|
FT_RELATIVE_TIME, BASE_NONE, NULL, 0x0,
|
|
|
|
|
"DeltaTime between ApplyCharginReport and ApplyCharging", HFILL }
|
|
|
|
|
},
|
|
|
|
|
{ &hf_camelsrt_DeltaTime22,
|
|
|
|
|
{ "Service Response Time",
|
|
|
|
|
"camel.srt.deltatime22",
|
|
|
|
|
FT_RELATIVE_TIME, BASE_NONE, NULL, 0x0,
|
|
|
|
|
"DeltaTime between EventReport(Disconnect) and Release Call", HFILL }
|
|
|
|
|
},
|
|
|
|
|
{ &hf_camelsrt_DeltaTime80,
|
|
|
|
|
{ "Service Response Time",
|
|
|
|
|
"camel.srt.deltatime80",
|
|
|
|
|
FT_RELATIVE_TIME, BASE_NONE, NULL, 0x0,
|
|
|
|
|
"DeltaTime between EventReportGPRS and ContinueGPRS", HFILL }
|
|
|
|
|
},
|
|
|
|
|
|
2005-04-15 08:18:15 +00:00
|
|
|
|
#ifdef REMOVED
|
2005-03-22 15:41:40 +00:00
|
|
|
|
#endif
|
|
|
|
|
#include "packet-camel-hfarr.c"
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/* List of subtrees */
|
|
|
|
|
static gint *ett[] = {
|
|
|
|
|
&ett_camel,
|
|
|
|
|
&ett_camelisup_parameter,
|
2007-02-17 20:04:10 +00:00
|
|
|
|
&ett_camel_isdn_address_string,
|
|
|
|
|
&ett_camel_MSRadioAccessCapability,
|
|
|
|
|
&ett_camel_MSNetworkCapability,
|
|
|
|
|
&ett_camel_AccessPointName,
|
|
|
|
|
&ett_camel_pdptypenumber,
|
2006-10-04 16:02:59 +00:00
|
|
|
|
&ett_camel_stat,
|
|
|
|
|
|
2005-03-22 15:41:40 +00:00
|
|
|
|
#include "packet-camel-ettarr.c"
|
|
|
|
|
};
|
|
|
|
|
/* Register protocol */
|
|
|
|
|
proto_camel = proto_register_protocol(PNAME, PSNAME, PFNAME);
|
|
|
|
|
|
2007-04-03 19:08:00 +00:00
|
|
|
|
register_dissector("camel", dissect_camel, proto_camel);
|
|
|
|
|
|
2005-03-22 15:41:40 +00:00
|
|
|
|
proto_register_field_array(proto_camel, hf, array_length(hf));
|
|
|
|
|
proto_register_subtree_array(ett, array_length(ett));
|
2005-12-16 16:37:03 +00:00
|
|
|
|
|
2005-03-22 15:41:40 +00:00
|
|
|
|
/* Register our configuration options, particularly our ssn:s */
|
|
|
|
|
/* Set default SSNs */
|
|
|
|
|
range_convert_str(&global_ssn_range, "6-9", MAX_SSN);
|
|
|
|
|
ssn_range = range_empty();
|
|
|
|
|
|
|
|
|
|
camel_module = prefs_register_protocol(proto_camel, proto_reg_handoff_camel);
|
|
|
|
|
|
2005-05-09 00:11:03 +00:00
|
|
|
|
prefs_register_enum_preference(camel_module, "date.format", "Date Format",
|
2005-05-08 20:34:57 +00:00
|
|
|
|
"The date format: (DD/MM) or (MM/DD)",
|
|
|
|
|
&date_format, date_options, FALSE);
|
|
|
|
|
|
|
|
|
|
|
2005-03-22 15:41:40 +00:00
|
|
|
|
prefs_register_range_preference(camel_module, "tcap.ssn",
|
|
|
|
|
"TCAP SSNs",
|
|
|
|
|
"TCAP Subsystem numbers used for Camel",
|
|
|
|
|
&global_ssn_range, MAX_SSN);
|
2006-10-04 16:02:59 +00:00
|
|
|
|
|
|
|
|
|
prefs_register_bool_preference(camel_module, "srt",
|
|
|
|
|
"Service Response Time Analyse",
|
|
|
|
|
"Activate the analyse for Response Time",
|
|
|
|
|
&gcamel_HandleSRT);
|
|
|
|
|
|
|
|
|
|
prefs_register_bool_preference(camel_module, "persistentsrt",
|
|
|
|
|
"Persistent stats for SRT",
|
|
|
|
|
"Statistics for Response Time",
|
|
|
|
|
&gcamel_PersistentSRT);
|
|
|
|
|
|
|
|
|
|
/* Routine for statistic */
|
|
|
|
|
register_init_routine(&camelsrt_init_routine);
|
|
|
|
|
camel_tap=register_tap(PSNAME);
|
2005-03-22 15:41:40 +00:00
|
|
|
|
}
|
|
|
|
|
|