2003-10-22 20:59:02 +00:00
|
|
|
/* packet-bssap.c
|
|
|
|
* Routines for Base Station Subsystem Application Part (BSSAP/BSAP) dissection
|
|
|
|
* Specifications from 3GPP2 (www.3gpp2.org) and 3GPP (www.3gpp.org)
|
2010-05-10 15:54:57 +00:00
|
|
|
* IOS 4.0.1 (BSAP)
|
|
|
|
* GSM 08.06 (BSSAP)
|
2003-10-22 20:59:02 +00:00
|
|
|
*
|
|
|
|
* Copyright 2003, Michael Lum <mlum [AT] telostech.com>
|
|
|
|
* In association with Telos Technology Inc.
|
|
|
|
*
|
2006-02-01 17:39:20 +00:00
|
|
|
* Added BSSAP+ according to ETSI TS 129 018 V6.3.0 (2005-3GPP TS 29.018 version 6.3.0 Release 6)
|
|
|
|
* Copyright 2006, Anders Broman <Anders.Broman [AT] ericsson.com>
|
|
|
|
*
|
2006-05-28 19:49:07 +00:00
|
|
|
* Wireshark - Network traffic analyzer
|
|
|
|
* By Gerald Combs <gerald@wireshark.org>
|
2003-10-22 20:59:02 +00:00
|
|
|
* Copyright 1998 Gerald Combs
|
|
|
|
*
|
2018-02-12 11:23:27 +00:00
|
|
|
* SPDX-License-Identifier: GPL-2.0-or-later
|
2003-10-22 20:59:02 +00:00
|
|
|
*/
|
|
|
|
|
2012-09-20 02:03:38 +00:00
|
|
|
#include "config.h"
|
2003-10-22 20:59:02 +00:00
|
|
|
|
2007-03-22 22:59:20 +00:00
|
|
|
#include <epan/packet.h>
|
2014-11-01 20:55:25 +00:00
|
|
|
#include <epan/expert.h>
|
2004-09-27 22:55:15 +00:00
|
|
|
#include <epan/prefs.h>
|
2015-11-04 08:45:54 +00:00
|
|
|
#include <wsutil/str_util.h>
|
2003-10-22 20:59:02 +00:00
|
|
|
#include "packet-bssap.h"
|
2008-08-04 16:11:17 +00:00
|
|
|
#include "packet-gsm_a_common.h"
|
2006-02-02 15:16:51 +00:00
|
|
|
#include "packet-e212.h"
|
2003-10-22 20:59:02 +00:00
|
|
|
|
2013-03-15 04:52:42 +00:00
|
|
|
void proto_register_bssap(void);
|
2008-09-27 01:08:19 +00:00
|
|
|
void proto_reg_handoff_bssap(void);
|
2006-08-21 21:19:48 +00:00
|
|
|
|
2019-03-08 12:59:40 +00:00
|
|
|
static dissector_handle_t bssap_handle;
|
|
|
|
|
2003-10-22 20:59:02 +00:00
|
|
|
#define BSSAP 0
|
|
|
|
#define BSAP 1
|
|
|
|
|
2008-11-21 06:41:00 +00:00
|
|
|
#define GSM_INTERFACE 0
|
|
|
|
#define LB_INTERFACE 1
|
|
|
|
|
2003-10-22 20:59:02 +00:00
|
|
|
#define BSSAP_OR_BSAP_DEFAULT BSSAP
|
|
|
|
|
2008-11-21 06:41:00 +00:00
|
|
|
#define GSM_OR_LB_INTERFACE_DEFAULT GSM_INTERFACE
|
|
|
|
|
2003-10-22 20:59:02 +00:00
|
|
|
#define PDU_TYPE_OFFSET 0
|
|
|
|
#define PDU_TYPE_LENGTH 1
|
|
|
|
|
|
|
|
/* Same as below but with names typed out */
|
|
|
|
static const value_string bssap_pdu_type_values[] = {
|
2010-05-10 15:54:57 +00:00
|
|
|
{ BSSAP_PDU_TYPE_BSSMAP, "BSS Management" },
|
|
|
|
{ BSSAP_PDU_TYPE_DTAP, "Direct Transfer" },
|
|
|
|
{ 0, NULL } };
|
2003-10-22 20:59:02 +00:00
|
|
|
|
|
|
|
static const value_string bsap_pdu_type_values[] = {
|
2010-05-10 15:54:57 +00:00
|
|
|
{ BSSAP_PDU_TYPE_BSSMAP, "BS Management" },
|
|
|
|
{ BSSAP_PDU_TYPE_DTAP, "Direct Transfer" },
|
|
|
|
{ 0, NULL } };
|
2003-10-22 20:59:02 +00:00
|
|
|
|
|
|
|
/* Same as above but in acronym for (for the Info column) */
|
|
|
|
static const value_string bssap_pdu_type_acro_values[] = {
|
2010-05-10 15:54:57 +00:00
|
|
|
{ BSSAP_PDU_TYPE_BSSMAP, "BSSMAP" },
|
|
|
|
{ BSSAP_PDU_TYPE_DTAP, "DTAP" },
|
|
|
|
{ 0, NULL } };
|
2003-10-22 20:59:02 +00:00
|
|
|
|
|
|
|
/* Same as above but in acronym for (for the Info column) */
|
|
|
|
static const value_string bsap_pdu_type_acro_values[] = {
|
2010-05-10 15:54:57 +00:00
|
|
|
{ BSSAP_PDU_TYPE_BSSMAP, "BSMAP" },
|
|
|
|
{ BSSAP_PDU_TYPE_DTAP, "DTAP" },
|
|
|
|
{ 0, NULL } };
|
2003-10-22 20:59:02 +00:00
|
|
|
|
2010-05-10 15:54:57 +00:00
|
|
|
#define PARAMETER_DLCI 0x00
|
|
|
|
#define PARAMETER_LENGTH 0x01
|
|
|
|
#define PARAMETER_DATA 0x02
|
2003-10-22 20:59:02 +00:00
|
|
|
|
2010-05-10 15:54:57 +00:00
|
|
|
#define DLCI_LENGTH 1
|
2012-10-18 17:39:45 +00:00
|
|
|
#define LENGTH_LENGTH 1
|
2010-05-10 15:54:57 +00:00
|
|
|
#define DATA_LENGTH 1
|
2003-10-22 20:59:02 +00:00
|
|
|
|
2010-05-10 15:54:57 +00:00
|
|
|
#define CC_MASK 0xc0
|
|
|
|
#define SPARE_MASK 0x38
|
|
|
|
#define SAPI_MASK 0x07
|
2003-10-22 20:59:02 +00:00
|
|
|
|
2006-08-21 21:19:48 +00:00
|
|
|
static guint global_bssap_ssn = 98;
|
2006-02-01 17:39:20 +00:00
|
|
|
|
2003-10-22 20:59:02 +00:00
|
|
|
static const value_string bssap_cc_values[] = {
|
2010-05-10 15:54:57 +00:00
|
|
|
{ 0x00, "not further specified" },
|
|
|
|
{ 0x80, "FACCH or SDCCH" },
|
|
|
|
{ 0xc0, "SACCH" },
|
|
|
|
{ 0, NULL } };
|
2003-10-22 20:59:02 +00:00
|
|
|
|
|
|
|
static const value_string bsap_cc_values[] = {
|
2010-05-10 15:54:57 +00:00
|
|
|
{ 0x00, "default for TIA/EIA/IS-2000" },
|
|
|
|
{ 0, NULL } };
|
2003-10-22 20:59:02 +00:00
|
|
|
|
|
|
|
static const value_string bssap_sapi_values[] = {
|
2010-05-10 15:54:57 +00:00
|
|
|
{ 0x00, "RR/MM/CC" },
|
|
|
|
{ 0x03, "SMS" },
|
|
|
|
{ 0, NULL } };
|
2003-10-22 20:59:02 +00:00
|
|
|
|
|
|
|
static const value_string bsap_sapi_values[] = {
|
2010-05-10 15:54:57 +00:00
|
|
|
{ 0x00, "Not used" },
|
|
|
|
{ 0, NULL } };
|
|
|
|
|
2012-10-18 17:39:45 +00:00
|
|
|
#define BSSAP_PAGING_REQUEST 1
|
|
|
|
#define BSSAP_PAGING_REJECT 2 /* 17.1.18 */
|
|
|
|
#define BSSAP_DOWNLINK_TUNNEL_REQUEST 7 /* 17.1.4 */
|
|
|
|
#define BSSAP_UPLINK_TUNNEL_REQUEST 8 /* 17.1.23 */
|
|
|
|
#define BSSAP_LOCATION_UPDATE_REQUEST 9 /* 17.1.11 */
|
2010-05-10 15:54:57 +00:00
|
|
|
#define BSSAP_LOCATION_UPDATE_ACCEPT 10 /* 17.1.9 */
|
|
|
|
#define BSSAP_LOCATION_UPDATE_REJECT 11 /* 17.1.10 */
|
|
|
|
#define BSSAP_TMSI_REALLOCATION_COMPLETE 12 /* 17.1.22 */
|
|
|
|
#define BSSAP_ALERT_REQUEST 13 /* 17.1.3 */
|
|
|
|
#define BSSAP_ALERT_ACK 14 /* 17.1.1 */
|
|
|
|
#define BSSAP_ALERT_REJECT 15 /* 17.1.2 */
|
|
|
|
#define BSSAP_MS_ACTIVITY_INDICATION 16 /* 17.1.14 */
|
|
|
|
#define BSSAP_GPRS_DETACH_INDICATION 17 /* 17.1.6 */
|
|
|
|
#define BSSAP_GPRS_DETACH_ACK 18 /* 17.1.5 */
|
|
|
|
#define BSSAP_IMSI_DETACH_INDICATION 19 /* 17.1.8 */
|
|
|
|
#define BSSAP_IMSI_DETACH_ACK 20 /* 17.1.7 */
|
|
|
|
#define BSSAP_RESET_INDICATION 21 /* 17.1.21 */
|
|
|
|
#define BSSAP_RESET_ACK 22 /* 17.1.20 */
|
|
|
|
#define BSSAP_MS_INFORMATION_REQUEST 23 /* 17.1.15 */
|
|
|
|
#define BSSAP_MS_INFORMATION_RESPONSE 24 /* 17.1.16 */
|
|
|
|
#define BSSAP_MM_INFORMATION_REQUEST 26 /* 17.1.12 */
|
|
|
|
#define BSSAP_MOBILE_STATUS 29 /* 17.1.13 */
|
|
|
|
#define BSSAP_MS_UNREACHABLE 31 /* 17.1.17 */
|
2006-02-01 17:39:20 +00:00
|
|
|
|
|
|
|
static const value_string bssap_plus_message_type_values[] = {
|
2012-12-12 12:48:12 +00:00
|
|
|
/* 0 */ { 0x00, "Unassigned: treated as an unknown Message type." },
|
|
|
|
/* 1 */ { BSSAP_PAGING_REQUEST, "BSSAP+-PAGING-REQUEST" }, /* 17.1.19 */
|
|
|
|
/* 2 */ { BSSAP_PAGING_REJECT, "BSSAP+-PAGING-REJECT" }, /* 17.1.18 */
|
|
|
|
/* 3 */ { 0x03, "Unassigned: treated as an unknown Message type." },
|
|
|
|
/* 4 */ { 0x04, "Unassigned: treated as an unknown Message type." },
|
|
|
|
/* 5 */ { 0x05, "Unassigned: treated as an unknown Message type." },
|
|
|
|
/* 6 */ { 0x06, "Unassigned: treated as an unknown Message type." },
|
|
|
|
/* 7 */ { BSSAP_DOWNLINK_TUNNEL_REQUEST, "BSSAP+-DOWNLINK-TUNNEL-REQUEST" }, /* 17.1.4 */
|
|
|
|
/* 8 */ { BSSAP_UPLINK_TUNNEL_REQUEST, "BSSAP+-UPLINK-TUNNEL-REQUEST" }, /* 17.1.23 */
|
|
|
|
/* 9 */ { BSSAP_LOCATION_UPDATE_REQUEST, "BSSAP+-LOCATION-UPDATE-REQUEST" }, /* 17.1.11 */
|
|
|
|
/* 10 */ { BSSAP_LOCATION_UPDATE_ACCEPT, "BSSAP+-LOCATION-UPDATE-ACCEPT" }, /* 17.1.9 */
|
|
|
|
/* 11 */ { BSSAP_LOCATION_UPDATE_REJECT, "BSSAP+-LOCATION-UPDATE-REJECT" }, /* 17.1.10 */
|
|
|
|
/* 12 */ { BSSAP_TMSI_REALLOCATION_COMPLETE, "BSSAP+-TMSI-REALLOCATION-COMPLETE" }, /* 17.1.22 */
|
|
|
|
/* 13 */ { BSSAP_ALERT_REQUEST, "BSSAP+-ALERT-REQUEST" }, /* 17.1.3 */
|
|
|
|
/* 14 */ { BSSAP_ALERT_ACK, "BSSAP+-ALERT-ACK" }, /* 17.1.1 */
|
|
|
|
/* 15 */ { BSSAP_ALERT_REJECT, "BSSAP+-ALERT-REJECT" }, /* 17.1.2 */
|
|
|
|
/* 16 */ { BSSAP_MS_ACTIVITY_INDICATION, "BSSAP+-MS-ACTIVITY-INDICATION" }, /* 17.1.14 */
|
|
|
|
/* 17 */ { BSSAP_GPRS_DETACH_INDICATION, "BSSAP+-GPRS-DETACH-INDICATION" }, /* 17.1.6 */
|
|
|
|
/* 18 */ { BSSAP_GPRS_DETACH_ACK, "BSSAP+-GPRS-DETACH-ACK" }, /* 17.1.5 */
|
|
|
|
/* 19 */ { BSSAP_IMSI_DETACH_INDICATION, "BSSAP+-IMSI-DETACH-INDICATION" }, /* 17.1.8 */
|
|
|
|
/* 20 */ { BSSAP_IMSI_DETACH_ACK, "BSSAP+-IMSI-DETACH-ACK" }, /* 17.1.7 */
|
|
|
|
/* 21 */ { BSSAP_RESET_INDICATION, "BSSAP+-RESET-INDICATION" }, /* 17.1.21 */
|
|
|
|
/* 22 */ { BSSAP_RESET_ACK, "BSSAP+-RESET-ACK" }, /* 17.1.20 */
|
|
|
|
/* 23 */ { BSSAP_MS_INFORMATION_REQUEST, "BSSAP+-MS-INFORMATION-REQUEST" }, /* 17.1.15 */
|
|
|
|
/* 24 */ { BSSAP_MS_INFORMATION_RESPONSE, "BSSAP+-MS-INFORMATION-RESPONSE" }, /* 17.1.16 */
|
|
|
|
/* 25 */ { 0x19, "Unassigned: treated as an unknown Message type." },
|
|
|
|
/* 26 */ { BSSAP_MM_INFORMATION_REQUEST, "BSSAP+-MM-INFORMATION-REQUEST" }, /* 17.1.12 */
|
|
|
|
/* 27 */ { 0x1b, "Unassigned: treated as an unknown Message type." },
|
|
|
|
/* 28 */ { 0x1c, "Unassigned: treated as an unknown Message type." },
|
|
|
|
/* 29 */ { BSSAP_MOBILE_STATUS, "BSSAP+-MOBILE-STATUS" }, /* 17.1.13 */
|
|
|
|
/* 30 */ { 0x1e, "Unassigned: treated as an unknown Message type." },
|
|
|
|
/* 31 */ { BSSAP_MS_UNREACHABLE, "BSSAP+-MS-UNREACHABLE" }, /* 17.1.17 */
|
2010-05-10 15:54:57 +00:00
|
|
|
{ 0, NULL }
|
2006-02-01 17:39:20 +00:00
|
|
|
};
|
2012-10-18 17:39:45 +00:00
|
|
|
static value_string_ext bssap_plus_message_type_values_ext = VALUE_STRING_EXT_INIT(bssap_plus_message_type_values);
|
|
|
|
|
|
|
|
#define BSSAP_IMSI 1
|
|
|
|
#define BSSAP_VLR_NUMBER 2
|
|
|
|
#define BSSAP_TMSI 3
|
|
|
|
#define BSSAP_LOC_AREA_ID 4
|
|
|
|
#define BSSAP_CHANNEL_NEEDED 5
|
|
|
|
#define BSSAP_EMLPP_PRIORITY 6
|
|
|
|
#define BSSAP_TMSI_STATUS 7
|
|
|
|
#define BSSAP_GS_CAUSE 8
|
|
|
|
#define BSSAP_SGSN_NUMBER 9
|
|
|
|
#define BSSAP_GPRS_LOC_UPD_TYPE 0x0a
|
|
|
|
#define BSSAP_GLOBAL_CN_ID 0x0b
|
|
|
|
#define BSSAP_MOBILE_STN_CLS_MRK1 0x0d
|
|
|
|
#define BSSAP_MOBILE_ID 0x0e
|
|
|
|
#define BSSAP_REJECT_CAUSE 0x0f
|
|
|
|
#define BSSAP_IMSI_DET_FROM_GPRS_SERV_TYPE 0x10
|
|
|
|
#define BSSAP_IMSI_DET_FROM_NON_GPRS_SERV_TYPE 0x11
|
|
|
|
#define BSSAP_INFO_REQ 0x12
|
|
|
|
#define BSSAP_PTMSI 0x13
|
|
|
|
#define BSSAP_IMEI 0x14
|
|
|
|
#define BSSAP_IMEISV 0x15
|
|
|
|
#define BSSAP_MM_INFORMATION 0x17
|
|
|
|
#define BSSAP_CELL_GBL_ID 0x18
|
|
|
|
#define BSSAP_LOC_INF_AGE 0x19
|
|
|
|
#define BSSAP_MOBILE_STN_STATE 0x1a
|
|
|
|
#define BSSAP_ERRONEOUS_MSG 0x1b
|
|
|
|
#define BSSAP_DLINK_TNL_PLD_CTR_AND_INF 0x1c
|
|
|
|
#define BSSAP_ULINK_TNL_PLD_CTR_AND_INF 0x1d
|
2013-01-17 16:10:22 +00:00
|
|
|
#define BSSAP_SERVICE_AREA_ID 0x1e
|
|
|
|
#define BSSAP_MSI_BASED_NRI_CON 0x1f
|
2006-02-01 17:39:20 +00:00
|
|
|
|
2011-02-07 18:49:29 +00:00
|
|
|
static const value_string bssap_plus_ie_id_values[] = {
|
2010-05-10 15:54:57 +00:00
|
|
|
{ BSSAP_IMSI, "IMSI" }, /* 18.4.10 */
|
2011-02-07 18:49:29 +00:00
|
|
|
{ BSSAP_VLR_NUMBER, "VLR number" }, /* 18.4.26 */
|
2010-05-10 15:54:57 +00:00
|
|
|
{ BSSAP_TMSI, "TMSI" }, /* 18.4.23 */
|
2011-02-07 18:49:29 +00:00
|
|
|
{ BSSAP_LOC_AREA_ID, "Location area identifier" }, /* 18.4.14 */
|
|
|
|
{ BSSAP_CHANNEL_NEEDED, "Channel Needed" }, /* 18.4.2 */
|
|
|
|
{ BSSAP_EMLPP_PRIORITY, "eMLPP Priority" }, /* 18.4.4 */
|
|
|
|
{ BSSAP_TMSI_STATUS, "TMSI status" }, /* 18.4.24 */
|
|
|
|
{ BSSAP_GS_CAUSE, "Gs cause" }, /* 18.4.7 */
|
|
|
|
{ BSSAP_SGSN_NUMBER, "SGSN number" }, /* 18.4.22 */
|
|
|
|
{ BSSAP_GPRS_LOC_UPD_TYPE, "GPRS location update type" }, /* 18.4.6 */
|
|
|
|
{ BSSAP_GLOBAL_CN_ID, "Global CN-Id" }, /* 18.4.27 */
|
|
|
|
{ 0x0c, "Unassigned: treated as an unknown IEI." }, /* 18 and 16 */
|
|
|
|
{ BSSAP_MOBILE_STN_CLS_MRK1, "Mobile station classmark 1" }, /* 18.4.18 */
|
|
|
|
{ BSSAP_MOBILE_ID, "Mobile identity" }, /* 18.4.17 */
|
|
|
|
{ BSSAP_REJECT_CAUSE, "Reject cause" }, /* 18.4.21 */
|
|
|
|
{ BSSAP_IMSI_DET_FROM_GPRS_SERV_TYPE, "IMSI detach from GPRS service type" }, /* 18.4.11 */
|
|
|
|
{ BSSAP_IMSI_DET_FROM_NON_GPRS_SERV_TYPE, "IMSI detach from non-GPRS service type" }, /* 18.4.12 */
|
2010-05-10 15:54:57 +00:00
|
|
|
{ BSSAP_INFO_REQ, "Information requested" }, /* 18.4.13 */
|
|
|
|
{ BSSAP_PTMSI, "PTMSI" }, /* 18.4.20 */
|
|
|
|
{ BSSAP_IMEI, "IMEI" }, /* 18.4.8 */
|
|
|
|
{ BSSAP_IMEISV, "IMEISV" }, /* 18.4.9 */
|
2011-02-07 18:49:29 +00:00
|
|
|
{ 0x16, "Unassigned: treated as an unknown IEI." }, /* 18 and 16 */
|
|
|
|
{ BSSAP_MM_INFORMATION, "MM information" }, /* 18.4.16 */
|
|
|
|
{ BSSAP_CELL_GBL_ID, "Cell Global Identity" }, /* 18.4.1 */
|
|
|
|
{ BSSAP_LOC_INF_AGE, "Location information age" }, /* 18.4.15 */
|
|
|
|
{ BSSAP_MOBILE_STN_STATE, "Mobile station state" }, /* 18.4.19 */
|
|
|
|
{ BSSAP_ERRONEOUS_MSG, "Erroneous message" }, /* 18.4.5 */
|
|
|
|
{ BSSAP_DLINK_TNL_PLD_CTR_AND_INF, "Downlink Tunnel Payload Control and Info" }, /* 18.4.3 */
|
|
|
|
{ BSSAP_ULINK_TNL_PLD_CTR_AND_INF, "Uplink Tunnel Payload Control and Info" }, /* 18.4.25 */
|
|
|
|
{ BSSAP_SERVICE_AREA_ID, "Service Area Identification" }, /* 18.4.21b */
|
2013-01-17 16:10:22 +00:00
|
|
|
{ BSSAP_MSI_BASED_NRI_CON, "TMSI based NRI container" }, /* 18.4.28 */
|
2011-02-07 18:49:29 +00:00
|
|
|
{ 0, NULL }
|
|
|
|
};
|
2012-10-18 17:39:45 +00:00
|
|
|
static value_string_ext bssap_plus_ie_id_values_ext = VALUE_STRING_EXT_INIT(bssap_plus_ie_id_values);
|
2003-10-22 20:59:02 +00:00
|
|
|
|
|
|
|
/* Initialize the protocol and registered fields */
|
|
|
|
static int proto_bssap = -1;
|
2014-06-19 19:39:39 +00:00
|
|
|
static int proto_bssap_plus = -1;
|
2003-10-22 20:59:02 +00:00
|
|
|
static int hf_bssap_pdu_type = -1;
|
|
|
|
static int hf_bsap_pdu_type = -1;
|
|
|
|
static int hf_bssap_dlci_cc = -1;
|
|
|
|
static int hf_bsap_dlci_cc = -1;
|
2003-10-28 18:08:52 +00:00
|
|
|
static int hf_bssap_dlci_spare = -1;
|
|
|
|
static int hf_bsap_dlci_rsvd = -1;
|
2003-10-22 20:59:02 +00:00
|
|
|
static int hf_bssap_dlci_sapi = -1;
|
|
|
|
static int hf_bsap_dlci_sapi = -1;
|
|
|
|
static int hf_bssap_length = -1;
|
2006-02-01 17:39:20 +00:00
|
|
|
static int hf_bssap_plus_ie = -1;
|
|
|
|
static int hf_bssap_plus_ie_len = -1;
|
|
|
|
|
|
|
|
static int hf_bssap_plus_message_type = -1;
|
|
|
|
static int hf_bssap_imsi_ie = -1;
|
|
|
|
static int hf_bssap_imsi_det_from_gprs_serv_type_ie = -1;
|
|
|
|
static int hf_bssap_imsi_det_from_non_gprs_serv_type_ie = -1;
|
|
|
|
static int hf_bssap_info_req_ie = -1;
|
|
|
|
static int hf_bssap_loc_area_id_ie = -1;
|
|
|
|
static int hf_bssap_loc_inf_age_ie = -1;
|
|
|
|
static int hf_bssap_mm_information_ie = -1;
|
|
|
|
static int hf_bssap_mobile_id_ie = -1;
|
|
|
|
static int hf_bssap_mobile_stn_cls_mrk1_ie = -1;
|
|
|
|
static int hf_bssap_mobile_station_state_ie = -1;
|
|
|
|
static int hf_bssap_ptmsi_ie = -1;
|
|
|
|
static int hf_bssap_reject_cause_ie = -1;
|
|
|
|
static int hf_bssap_service_area_id_ie = -1;
|
|
|
|
static int hf_bssap_sgsn_nr_ie = -1;
|
|
|
|
static int hf_bssap_tmsi_ie = -1;
|
|
|
|
static int hf_bssap_tmsi_status_ie = -1;
|
|
|
|
static int hf_bssap_vlr_number_ie = -1;
|
|
|
|
static int hf_bssap_global_cn_id_ie = -1;
|
|
|
|
static int hf_bssap_plus_ie_data = -1;
|
|
|
|
|
|
|
|
static int hf_bssap_extension = -1;
|
2011-02-07 18:49:29 +00:00
|
|
|
static int hf_bssap_type_of_number = -1;
|
2006-02-01 17:39:20 +00:00
|
|
|
static int hf_bssap_numbering_plan_id = -1;
|
|
|
|
static int hf_bssap_sgsn_number = -1;
|
2013-01-31 17:55:31 +00:00
|
|
|
/* static int hf_bssap_vlr_number = -1; */
|
2006-02-02 15:16:51 +00:00
|
|
|
static int hf_bssap_call_priority = -1;
|
2006-02-01 17:39:20 +00:00
|
|
|
static int hf_bssap_gprs_loc_upd_type_ie = -1;
|
|
|
|
static int hf_bssap_Gs_cause_ie = -1;
|
|
|
|
static int hf_bssap_imei_ie = -1;
|
2019-01-15 14:26:33 +00:00
|
|
|
static int hf_bssap_imeisv_ie = -1;
|
2006-02-01 17:39:20 +00:00
|
|
|
static int hf_bssap_cell_global_id_ie = -1;
|
|
|
|
static int hf_bssap_channel_needed_ie = -1;
|
|
|
|
static int hf_bssap_dlink_tnl_pld_cntrl_amd_inf_ie = -1;
|
|
|
|
static int hf_bssap_ulink_tnl_pld_cntrl_amd_inf_ie = -1;
|
|
|
|
static int hf_bssap_emlpp_prio_ie = -1;
|
|
|
|
static int hf_bssap_gprs_erroneous_msg_ie = -1;
|
|
|
|
|
2006-02-02 15:16:51 +00:00
|
|
|
static int hf_bssap_gprs_loc_upd_type = -1;
|
|
|
|
static int hf_bssap_Gs_cause = -1;
|
2006-02-07 19:29:51 +00:00
|
|
|
static int hf_bssap_imei = -1;
|
|
|
|
static int hf_bssap_imeisv = -1;
|
2006-02-02 15:16:51 +00:00
|
|
|
static int hf_bssap_imsi_det_from_gprs_serv_type = -1;
|
|
|
|
static int hf_bssap_info_req = -1;
|
|
|
|
static int hf_bssap_loc_inf_age = -1;
|
|
|
|
static int hf_bssap_mobile_station_state = -1;
|
|
|
|
static int hf_bssap_ptmsi = -1;
|
|
|
|
static int hf_bssap_tmsi = -1;
|
|
|
|
static int hf_bssap_tmsi_status = -1;
|
|
|
|
static int hf_bssap_tom_prot_disc = -1;
|
|
|
|
static int hf_bssap_e_bit = -1;
|
|
|
|
static int hf_bssap_tunnel_prio = -1;
|
|
|
|
static int hf_bssap_global_cn_id = -1;
|
|
|
|
static int hf_bssap_plmn_id = -1;
|
|
|
|
static int hf_bssap_cn_id = -1;
|
|
|
|
static int hf_bssap_cell_global_id = -1;
|
2014-09-11 20:43:00 +00:00
|
|
|
static int hf_bssap_extraneous_data = -1;
|
2014-11-01 20:55:25 +00:00
|
|
|
static int hf_bssap_conditional_ie = -1;
|
2003-10-22 20:59:02 +00:00
|
|
|
|
|
|
|
/* Initialize the subtree pointers */
|
|
|
|
static gint ett_bssap = -1;
|
|
|
|
static gint ett_bssap_dlci = -1;
|
2010-05-10 15:54:57 +00:00
|
|
|
static gint ett_bssap_imsi = -1;
|
2006-02-01 17:39:20 +00:00
|
|
|
static gint ett_bssap_imsi_det_from_gprs_serv_type = -1;
|
|
|
|
static gint ett_bssap_imsi_det_from_non_gprs_serv_type = -1;
|
|
|
|
static gint ett_bssap_info_req = -1;
|
|
|
|
static gint ett_bssap_loc_area_id = -1;
|
|
|
|
static gint ett_bssap_loc_inf_age = -1;
|
|
|
|
static gint ett_bssap_mm_information = -1;
|
|
|
|
static gint ett_bssap_mobile_id = -1;
|
|
|
|
static gint ett_bssap_sgsn_nr = -1;
|
|
|
|
static gint ett_bssap_tmsi = -1;
|
|
|
|
static gint ett_bssap_tmsi_status = -1;
|
|
|
|
static gint ett_bssap_vlr_number = -1;
|
|
|
|
static gint ett_bssap_global_cn = -1;
|
|
|
|
static gint ett_bssap_gprs_loc_upd = -1;
|
|
|
|
static gint ett_bassp_Gs_cause = -1;
|
|
|
|
static gint ett_bassp_imei = -1;
|
2019-01-15 14:26:33 +00:00
|
|
|
static gint ett_bassp_imeisv = -1;
|
2006-02-01 17:39:20 +00:00
|
|
|
static gint ett_bssap_cell_global_id = -1;
|
2006-02-02 15:16:51 +00:00
|
|
|
static gint ett_bssap_cgi = -1;
|
2006-02-01 17:39:20 +00:00
|
|
|
static gint ett_bssap_channel_needed = -1;
|
|
|
|
static gint ett_bssap_dlink_tnl_pld_cntrl_amd_inf = -1;
|
|
|
|
static gint ett_bssap_ulink_tnl_pld_cntrl_amd_inf = -1;
|
|
|
|
static gint ett_bssap_emlpp_prio = -1;
|
|
|
|
static gint ett_bssap_erroneous_msg = -1;
|
|
|
|
static gint ett_bssap_mobile_stn_cls_mrk1 = -1;
|
|
|
|
static gint ett_bssap_mobile_station_state = -1;
|
|
|
|
static gint ett_bssap_ptmsi = -1;
|
|
|
|
static gint ett_bssap_reject_cause = -1;
|
|
|
|
static gint ett_bssap_service_area_id =-1;
|
2006-02-02 15:16:51 +00:00
|
|
|
static gint ett_bssap_global_cn_id = -1;
|
|
|
|
static gint ett_bssap_plmn = -1;
|
2003-10-22 20:59:02 +00:00
|
|
|
|
2014-11-01 20:55:25 +00:00
|
|
|
static expert_field ei_bssap_unknown_message = EI_INIT;
|
|
|
|
static expert_field ei_bssap_unknown_parameter = EI_INIT;
|
|
|
|
static expert_field ei_bssap_mandatory_ie = EI_INIT;
|
|
|
|
|
|
|
|
|
2006-05-23 05:35:20 +00:00
|
|
|
static dissector_handle_t rrlp_handle;
|
2003-10-22 20:59:02 +00:00
|
|
|
|
|
|
|
static dissector_table_t bssap_dissector_table;
|
|
|
|
static dissector_table_t bsap_dissector_table;
|
|
|
|
|
2014-11-22 16:54:54 +00:00
|
|
|
static dissector_handle_t gsm_bssmap_le_dissector_handle;
|
|
|
|
static dissector_handle_t gsm_a_bssmap_dissector_handle;
|
2008-11-21 06:41:00 +00:00
|
|
|
|
2003-10-22 20:59:02 +00:00
|
|
|
/*
|
|
|
|
* Keep track of pdu_type so we can call appropriate sub-dissector
|
|
|
|
*/
|
2010-05-10 15:54:57 +00:00
|
|
|
static guint8 pdu_type = 0xFF;
|
2003-10-22 20:59:02 +00:00
|
|
|
|
2010-05-10 15:54:57 +00:00
|
|
|
static gint bssap_or_bsap_global = BSSAP_OR_BSAP_DEFAULT;
|
2003-10-22 20:59:02 +00:00
|
|
|
|
2008-11-21 06:41:00 +00:00
|
|
|
static gint gsm_or_lb_interface_global = GSM_OR_LB_INTERFACE_DEFAULT;
|
2003-10-22 20:59:02 +00:00
|
|
|
|
|
|
|
static void
|
|
|
|
dissect_bssap_data_param(tvbuff_t *tvb, packet_info *pinfo,
|
2014-11-22 16:54:54 +00:00
|
|
|
proto_tree *bssap_tree, proto_tree *tree, struct _sccp_msg_info_t* sccp_info)
|
2003-10-22 20:59:02 +00:00
|
|
|
{
|
2010-05-10 15:54:57 +00:00
|
|
|
if ((pdu_type <= 0x01))
|
|
|
|
{
|
|
|
|
if (bssap_or_bsap_global == BSSAP)
|
2008-11-21 06:41:00 +00:00
|
|
|
{
|
|
|
|
/* BSSAP */
|
|
|
|
if((gsm_or_lb_interface_global == LB_INTERFACE) && (pdu_type == BSSAP_PDU_TYPE_BSSMAP))
|
|
|
|
{
|
2014-11-22 16:54:54 +00:00
|
|
|
call_dissector_with_data(gsm_bssmap_le_dissector_handle, tvb, pinfo, tree, sccp_info);
|
2008-11-21 06:41:00 +00:00
|
|
|
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
else if((gsm_or_lb_interface_global == GSM_INTERFACE) && (pdu_type == BSSAP_PDU_TYPE_BSSMAP))
|
|
|
|
{
|
2014-11-22 16:54:54 +00:00
|
|
|
call_dissector_with_data(gsm_a_bssmap_dissector_handle, tvb, pinfo, tree, sccp_info);
|
2008-11-21 06:41:00 +00:00
|
|
|
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2014-11-22 16:54:54 +00:00
|
|
|
if (dissector_try_uint_new(bssap_dissector_table, pdu_type, tvb, pinfo, tree, TRUE, sccp_info)) return;
|
2008-11-21 06:41:00 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
/* BSAP */
|
2014-11-22 16:54:54 +00:00
|
|
|
if (dissector_try_uint_new(bsap_dissector_table, pdu_type, tvb, pinfo, tree, TRUE, sccp_info))
|
2008-11-21 06:41:00 +00:00
|
|
|
return;
|
|
|
|
}
|
2010-05-10 15:54:57 +00:00
|
|
|
}
|
2003-10-22 20:59:02 +00:00
|
|
|
|
2013-02-26 04:42:26 +00:00
|
|
|
/* No sub-dissection occurred, treat it as raw data */
|
2016-03-20 00:33:14 +00:00
|
|
|
call_data_dissector(tvb, pinfo, bssap_tree);
|
2003-10-22 20:59:02 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2003-12-13 01:57:27 +00:00
|
|
|
dissect_bssap_dlci_param(tvbuff_t *tvb, proto_tree *tree, guint16 length)
|
2003-10-22 20:59:02 +00:00
|
|
|
{
|
2012-10-18 17:39:45 +00:00
|
|
|
proto_tree *dlci_tree;
|
|
|
|
guint8 oct;
|
2010-05-10 15:54:57 +00:00
|
|
|
|
2014-06-22 20:01:36 +00:00
|
|
|
dlci_tree =
|
|
|
|
proto_tree_add_subtree(tree, tvb, 0, length,
|
|
|
|
ett_bssap_dlci, NULL, "Data Link Connection Identifier");
|
2010-05-10 15:54:57 +00:00
|
|
|
|
|
|
|
oct = tvb_get_guint8(tvb, 0);
|
|
|
|
|
|
|
|
if (bssap_or_bsap_global == BSSAP)
|
|
|
|
{
|
|
|
|
proto_tree_add_uint(dlci_tree, hf_bssap_dlci_cc, tvb, 0, length, oct);
|
|
|
|
proto_tree_add_uint(dlci_tree, hf_bssap_dlci_spare, tvb, 0, length, oct);
|
|
|
|
proto_tree_add_uint(dlci_tree, hf_bssap_dlci_sapi, tvb, 0, length, oct);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
proto_tree_add_uint(dlci_tree, hf_bsap_dlci_cc, tvb, 0, length, oct);
|
|
|
|
proto_tree_add_uint(dlci_tree, hf_bsap_dlci_rsvd, tvb, 0, length, oct);
|
|
|
|
proto_tree_add_uint(dlci_tree, hf_bsap_dlci_sapi, tvb, 0, length, oct);
|
|
|
|
}
|
2003-10-22 20:59:02 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2003-12-13 01:57:27 +00:00
|
|
|
dissect_bssap_length_param(tvbuff_t *tvb, proto_tree *tree, guint16 length)
|
2003-10-22 20:59:02 +00:00
|
|
|
{
|
2012-10-18 17:39:45 +00:00
|
|
|
guint8 data_length;
|
2003-10-22 20:59:02 +00:00
|
|
|
|
2010-05-10 15:54:57 +00:00
|
|
|
data_length = tvb_get_guint8(tvb, 0);
|
|
|
|
proto_tree_add_uint(tree, hf_bssap_length, tvb, 0, length, data_length);
|
2003-10-22 20:59:02 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Dissect a parameter given its type, offset into tvb, and length.
|
|
|
|
*/
|
|
|
|
static guint16
|
|
|
|
dissect_bssap_parameter(tvbuff_t *tvb, packet_info *pinfo, proto_tree *bssap_tree,
|
2010-05-10 15:54:57 +00:00
|
|
|
proto_tree *tree, guint8 parameter_type, gint offset,
|
2014-11-22 16:54:54 +00:00
|
|
|
guint16 parameter_length, struct _sccp_msg_info_t* sccp_info)
|
2003-10-22 20:59:02 +00:00
|
|
|
{
|
2010-05-10 15:54:57 +00:00
|
|
|
tvbuff_t *parameter_tvb;
|
2008-09-24 00:50:18 +00:00
|
|
|
|
2014-06-06 14:35:50 +00:00
|
|
|
parameter_tvb = tvb_new_subset_length(tvb, offset, parameter_length);
|
2003-10-22 20:59:02 +00:00
|
|
|
|
2010-05-10 15:54:57 +00:00
|
|
|
switch (parameter_type)
|
|
|
|
{
|
|
|
|
case PARAMETER_DLCI:
|
|
|
|
dissect_bssap_dlci_param(parameter_tvb, bssap_tree, parameter_length);
|
|
|
|
break;
|
|
|
|
|
|
|
|
case PARAMETER_LENGTH:
|
|
|
|
dissect_bssap_length_param(parameter_tvb, bssap_tree, parameter_length);
|
|
|
|
break;
|
|
|
|
|
|
|
|
case PARAMETER_DATA:
|
2014-11-22 16:54:54 +00:00
|
|
|
dissect_bssap_data_param(parameter_tvb, pinfo, bssap_tree, tree, sccp_info);
|
2010-05-10 15:54:57 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
default:
|
2014-11-01 20:55:25 +00:00
|
|
|
proto_tree_add_expert_format(bssap_tree, pinfo, &ei_bssap_unknown_parameter, parameter_tvb, 0, parameter_length,
|
|
|
|
"Unknown parameter 0x%x (%u byte%s)", parameter_type, parameter_length, plurality(parameter_length, "", "s"));
|
2010-05-10 15:54:57 +00:00
|
|
|
break;
|
|
|
|
}
|
2008-09-24 00:50:18 +00:00
|
|
|
|
2010-05-10 15:54:57 +00:00
|
|
|
return(parameter_length);
|
2003-10-22 20:59:02 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
static guint16
|
|
|
|
dissect_bssap_var_parameter(tvbuff_t *tvb, packet_info *pinfo,
|
2010-05-10 15:54:57 +00:00
|
|
|
proto_tree *bssap_tree, proto_tree *tree,
|
2014-11-22 16:54:54 +00:00
|
|
|
guint8 parameter_type, gint offset, struct _sccp_msg_info_t* sccp_info)
|
2003-10-22 20:59:02 +00:00
|
|
|
{
|
2010-05-10 15:54:57 +00:00
|
|
|
guint16 parameter_length;
|
|
|
|
guint8 length_length;
|
2003-10-22 20:59:02 +00:00
|
|
|
|
2010-05-10 15:54:57 +00:00
|
|
|
parameter_length = tvb_get_guint8(tvb, offset);
|
|
|
|
length_length = LENGTH_LENGTH;
|
2003-10-22 20:59:02 +00:00
|
|
|
|
2010-05-10 15:54:57 +00:00
|
|
|
offset += length_length;
|
2003-10-22 20:59:02 +00:00
|
|
|
|
2010-05-10 15:54:57 +00:00
|
|
|
dissect_bssap_parameter(tvb, pinfo, bssap_tree, tree, parameter_type,
|
2014-11-22 16:54:54 +00:00
|
|
|
offset, parameter_length, sccp_info);
|
2003-10-22 20:59:02 +00:00
|
|
|
|
2010-05-10 15:54:57 +00:00
|
|
|
return(parameter_length + length_length);
|
2003-10-22 20:59:02 +00:00
|
|
|
}
|
|
|
|
|
2012-03-10 17:46:18 +00:00
|
|
|
static int
|
2003-10-22 20:59:02 +00:00
|
|
|
dissect_bssap_message(tvbuff_t *tvb, packet_info *pinfo, proto_tree *bssap_tree,
|
2014-11-22 16:54:54 +00:00
|
|
|
proto_tree *tree, struct _sccp_msg_info_t* sccp_info)
|
2003-10-22 20:59:02 +00:00
|
|
|
{
|
2012-12-02 15:21:53 +00:00
|
|
|
gint offset;
|
2014-11-01 20:55:25 +00:00
|
|
|
proto_item* type_item;
|
2010-05-10 15:54:57 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Extract the PDU type
|
|
|
|
*/
|
|
|
|
pdu_type = tvb_get_guint8(tvb, PDU_TYPE_OFFSET);
|
|
|
|
offset = PDU_TYPE_LENGTH;
|
|
|
|
|
2014-11-01 20:55:25 +00:00
|
|
|
/*
|
|
|
|
* add the message type to the protocol tree
|
|
|
|
*/
|
|
|
|
type_item = proto_tree_add_uint(bssap_tree,
|
|
|
|
(bssap_or_bsap_global == BSSAP) ? hf_bssap_pdu_type : hf_bsap_pdu_type,
|
|
|
|
tvb, PDU_TYPE_OFFSET, PDU_TYPE_LENGTH, pdu_type);
|
2010-05-10 15:54:57 +00:00
|
|
|
|
|
|
|
/* Starting a new message dissection */
|
|
|
|
|
|
|
|
switch (pdu_type)
|
|
|
|
{
|
|
|
|
case BSSAP_PDU_TYPE_BSSMAP:
|
|
|
|
offset += dissect_bssap_parameter(tvb, pinfo, bssap_tree, tree,
|
|
|
|
PARAMETER_LENGTH, offset,
|
2014-11-22 16:54:54 +00:00
|
|
|
LENGTH_LENGTH, sccp_info);
|
2010-05-10 15:54:57 +00:00
|
|
|
offset += dissect_bssap_var_parameter(tvb, pinfo, bssap_tree, tree,
|
|
|
|
PARAMETER_DATA,
|
2014-11-22 16:54:54 +00:00
|
|
|
(offset - LENGTH_LENGTH), sccp_info);
|
2010-05-10 15:54:57 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case BSSAP_PDU_TYPE_DTAP:
|
|
|
|
offset += dissect_bssap_parameter(tvb, pinfo, bssap_tree, tree,
|
|
|
|
PARAMETER_DLCI,
|
2014-11-22 16:54:54 +00:00
|
|
|
offset, DLCI_LENGTH, sccp_info);
|
2010-05-10 15:54:57 +00:00
|
|
|
offset += dissect_bssap_parameter(tvb, pinfo, bssap_tree, tree,
|
|
|
|
PARAMETER_LENGTH, offset,
|
2014-11-22 16:54:54 +00:00
|
|
|
LENGTH_LENGTH, sccp_info);
|
2010-05-10 15:54:57 +00:00
|
|
|
offset += dissect_bssap_var_parameter(tvb, pinfo, bssap_tree, tree,
|
|
|
|
PARAMETER_DATA,
|
2014-11-22 16:54:54 +00:00
|
|
|
(offset - LENGTH_LENGTH), sccp_info);
|
2010-05-10 15:54:57 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
default:
|
2014-11-01 20:55:25 +00:00
|
|
|
{
|
|
|
|
guint32 message_length;
|
|
|
|
|
2011-09-26 08:25:18 +00:00
|
|
|
col_append_fstr(pinfo->cinfo, COL_INFO, "%s ",
|
2012-08-10 22:55:02 +00:00
|
|
|
val_to_str_const(pdu_type,
|
|
|
|
((bssap_or_bsap_global == BSSAP) ?
|
|
|
|
bssap_pdu_type_acro_values : bsap_pdu_type_acro_values),
|
|
|
|
"Unknown"));
|
2014-11-01 20:55:25 +00:00
|
|
|
|
|
|
|
message_length = tvb_reported_length(tvb);
|
|
|
|
|
|
|
|
expert_add_info_format(pinfo, type_item, &ei_bssap_unknown_message, "Unknown message (%u byte%s)",
|
|
|
|
message_length, plurality(message_length, "", "s"));
|
|
|
|
}
|
2010-05-10 15:54:57 +00:00
|
|
|
break;
|
|
|
|
}
|
2012-03-10 17:46:18 +00:00
|
|
|
return offset;
|
2003-10-22 20:59:02 +00:00
|
|
|
}
|
|
|
|
|
2014-11-22 16:54:54 +00:00
|
|
|
static int
|
|
|
|
dissect_bssap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
|
2003-10-22 20:59:02 +00:00
|
|
|
{
|
2012-08-14 21:58:36 +00:00
|
|
|
proto_item *bssap_item;
|
2012-10-18 17:39:45 +00:00
|
|
|
proto_tree *bssap_tree;
|
2014-11-22 16:54:54 +00:00
|
|
|
struct _sccp_msg_info_t* sccp_info = (struct _sccp_msg_info_t*)data;
|
2010-05-10 15:54:57 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Make entry in the Protocol column on summary display
|
|
|
|
*/
|
2011-09-26 08:25:18 +00:00
|
|
|
col_set_str(pinfo->cinfo, COL_PROTOCOL, ((bssap_or_bsap_global == BSSAP) ? "BSSAP" : "BSAP"));
|
2010-05-10 15:54:57 +00:00
|
|
|
|
2014-11-22 16:54:54 +00:00
|
|
|
if (sccp_info && sccp_info->data.co.assoc )
|
|
|
|
sccp_info->data.co.assoc->payload = SCCP_PLOAD_BSSAP;
|
2010-05-10 15:54:57 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* create the bssap protocol tree
|
|
|
|
*/
|
2012-08-14 21:58:36 +00:00
|
|
|
bssap_item = proto_tree_add_protocol_format(tree, proto_bssap, tvb, 0, -1,
|
|
|
|
(bssap_or_bsap_global == BSSAP) ? "BSSAP" : "BSAP");
|
2010-05-10 15:54:57 +00:00
|
|
|
bssap_tree = proto_item_add_subtree(bssap_item, ett_bssap);
|
|
|
|
|
|
|
|
/* dissect the message */
|
|
|
|
|
2014-11-22 16:54:54 +00:00
|
|
|
return dissect_bssap_message(tvb, pinfo, bssap_tree, tree, sccp_info);
|
2003-10-22 20:59:02 +00:00
|
|
|
}
|
|
|
|
|
2006-02-07 19:29:51 +00:00
|
|
|
|
2011-02-07 18:49:29 +00:00
|
|
|
/*
|
2006-02-07 19:29:51 +00:00
|
|
|
* BSSAP+ Routines
|
|
|
|
*/
|
|
|
|
|
2006-03-11 12:33:15 +00:00
|
|
|
#ifdef REMOVED
|
2006-02-07 19:29:51 +00:00
|
|
|
static dgt_set_t Dgt_tbcd = {
|
|
|
|
{
|
|
|
|
/* 0 1 2 3 4 5 6 7 8 9 a b c d e */
|
2013-12-18 15:54:32 +00:00
|
|
|
'0','1','2','3','4','5','6','7','8','9','?','B','C','*','#','?'
|
2006-02-07 19:29:51 +00:00
|
|
|
}
|
|
|
|
};
|
2006-03-11 12:33:15 +00:00
|
|
|
#endif
|
|
|
|
|
2006-02-01 17:39:20 +00:00
|
|
|
static gboolean
|
2014-11-01 20:55:25 +00:00
|
|
|
check_ie(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int *offset, guint8 expected_ie)
|
2012-10-18 17:39:45 +00:00
|
|
|
{
|
|
|
|
guint8 ie_type;
|
|
|
|
guint8 ie_len;
|
2010-05-10 15:54:57 +00:00
|
|
|
|
2012-10-18 17:39:45 +00:00
|
|
|
ie_type = tvb_get_guint8(tvb, *offset);
|
|
|
|
if (ie_type != expected_ie) {
|
2014-11-01 20:55:25 +00:00
|
|
|
proto_tree_add_expert_format(tree, pinfo, &ei_bssap_mandatory_ie, tvb, *offset, 1, "Mandatory IE %s expected but IE %s Found",
|
2012-10-18 17:39:45 +00:00
|
|
|
val_to_str_ext(expected_ie, &bssap_plus_ie_id_values_ext, "Unknown %u"),
|
|
|
|
val_to_str_ext(ie_type, &bssap_plus_ie_id_values_ext, "Unknown %u"));
|
2010-05-10 15:54:57 +00:00
|
|
|
(*offset)++;
|
2012-10-18 17:39:45 +00:00
|
|
|
ie_len = tvb_get_guint8(tvb, *offset);
|
2010-05-10 15:54:57 +00:00
|
|
|
*offset = *offset + ie_len;
|
|
|
|
return FALSE;
|
|
|
|
}
|
2006-02-01 17:39:20 +00:00
|
|
|
|
2010-05-10 15:54:57 +00:00
|
|
|
return TRUE;
|
2006-02-01 17:39:20 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
static gboolean
|
2012-10-18 17:39:45 +00:00
|
|
|
check_optional_ie(tvbuff_t *tvb, int offset, guint8 expected_ie)
|
|
|
|
{
|
|
|
|
guint8 ie_type;
|
2006-02-01 17:39:20 +00:00
|
|
|
|
2012-10-18 17:39:45 +00:00
|
|
|
ie_type = tvb_get_guint8(tvb, offset);
|
|
|
|
if (ie_type != expected_ie) {
|
2010-05-10 15:54:57 +00:00
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
return TRUE;
|
2006-02-01 17:39:20 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
/* 18.4.1 Cell global identity */
|
|
|
|
static int
|
2011-04-04 14:37:25 +00:00
|
|
|
dissect_bssap_cell_global_id(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, int offset)
|
2006-02-01 17:39:20 +00:00
|
|
|
{
|
2012-10-18 17:39:45 +00:00
|
|
|
proto_item *item;
|
|
|
|
proto_tree *ie_tree;
|
|
|
|
proto_item *cgi_item;
|
|
|
|
proto_tree *cgi_tree;
|
|
|
|
guint8 ie_len;
|
|
|
|
|
|
|
|
ie_len = tvb_get_guint8(tvb, offset+1);
|
|
|
|
item = proto_tree_add_item(tree, hf_bssap_cell_global_id_ie, tvb, offset, ie_len+2, ENC_NA);
|
2010-05-10 15:54:57 +00:00
|
|
|
ie_tree = proto_item_add_subtree(item, ett_bssap_cell_global_id);
|
|
|
|
|
2012-10-18 17:39:45 +00:00
|
|
|
proto_tree_add_item(ie_tree, hf_bssap_plus_ie, tvb, offset, 1, ENC_BIG_ENDIAN);
|
2010-05-10 15:54:57 +00:00
|
|
|
offset++;
|
2011-09-26 08:25:18 +00:00
|
|
|
proto_tree_add_item(ie_tree, hf_bssap_plus_ie_len, tvb, offset, 1, ENC_BIG_ENDIAN);
|
2010-05-10 15:54:57 +00:00
|
|
|
offset++;
|
|
|
|
/*
|
|
|
|
* The rest of the information element is coded as the the value part
|
|
|
|
* of the cell global id IE defined in 3GPP TS 48.018 (not including
|
|
|
|
* 3GPP TS 48.018 IEI and 3GPP TS 48.018 length indicator).
|
|
|
|
*/
|
2012-10-18 17:39:45 +00:00
|
|
|
cgi_item = proto_tree_add_item(ie_tree, hf_bssap_cell_global_id, tvb, offset, ie_len, ENC_NA);
|
2010-05-10 15:54:57 +00:00
|
|
|
cgi_tree = proto_item_add_subtree(cgi_item, ett_bssap_cgi);
|
|
|
|
/* octets 3-8 Octets 3 to 8 contain the value part (starting with octet 2) of the
|
|
|
|
* Routing Area Identification IE defined in 3GPP TS 24.008, not
|
|
|
|
* including 3GPP TS 24.008 IEI
|
|
|
|
*/
|
2011-04-04 14:37:25 +00:00
|
|
|
de_gmm_rai(tvb, cgi_tree, pinfo, offset, ie_len, NULL, 0);
|
2010-05-10 15:54:57 +00:00
|
|
|
/* Octets 9 and 10 contain the value part (starting with octet 2) of the
|
|
|
|
* Cell Identity IE defined in 3GPP TS 24.008, not including
|
|
|
|
* 3GPP TS 24.008 IEI
|
|
|
|
*/
|
|
|
|
offset = offset + 6;
|
2011-04-04 14:37:25 +00:00
|
|
|
de_cell_id(tvb, cgi_tree, pinfo, offset, ie_len, NULL, 0);
|
2010-05-10 15:54:57 +00:00
|
|
|
offset = offset + 2;
|
|
|
|
|
|
|
|
return offset;
|
2006-02-01 17:39:20 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
/* 18.4.2 Channel needed */
|
|
|
|
static int
|
2011-04-04 14:37:25 +00:00
|
|
|
dissect_bssap_channel_needed(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, int offset)
|
2006-02-01 17:39:20 +00:00
|
|
|
{
|
2012-10-18 17:39:45 +00:00
|
|
|
proto_item *item;
|
|
|
|
proto_tree *ie_tree;
|
|
|
|
guint8 ie_len;
|
2011-02-07 18:49:29 +00:00
|
|
|
|
2012-10-18 17:39:45 +00:00
|
|
|
ie_len = tvb_get_guint8(tvb, offset+1);
|
|
|
|
item = proto_tree_add_item(tree, hf_bssap_channel_needed_ie, tvb, offset, ie_len+2, ENC_NA);
|
2010-05-10 15:54:57 +00:00
|
|
|
ie_tree = proto_item_add_subtree(item, ett_bssap_channel_needed);
|
|
|
|
|
2012-10-18 17:39:45 +00:00
|
|
|
proto_tree_add_item(ie_tree, hf_bssap_plus_ie, tvb, offset, 1, ENC_BIG_ENDIAN);
|
2010-05-10 15:54:57 +00:00
|
|
|
offset++;
|
2011-09-26 08:25:18 +00:00
|
|
|
proto_tree_add_item(ie_tree, hf_bssap_plus_ie_len, tvb, offset, 1, ENC_BIG_ENDIAN);
|
2010-05-10 15:54:57 +00:00
|
|
|
offset++;
|
|
|
|
/*
|
|
|
|
* The rest of the information element is coded as the IEI part and the
|
|
|
|
* value part of the Channel Needed IE defined in 3GPP TS 44.018.
|
|
|
|
* 10.5.2.8 Channel Needed
|
|
|
|
*/
|
2011-04-04 14:37:25 +00:00
|
|
|
de_rr_chnl_needed(tvb, ie_tree, pinfo, offset, ie_len, NULL, 0);
|
2010-05-10 15:54:57 +00:00
|
|
|
|
|
|
|
return offset + ie_len;
|
2006-02-01 17:39:20 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
/* 18.4.3 Downlink Tunnel Payload Control and Info */
|
|
|
|
static int
|
2006-05-23 05:35:20 +00:00
|
|
|
dissect_bssap_dlink_tunnel_payload_control_and_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset)
|
2006-02-01 17:39:20 +00:00
|
|
|
{
|
2012-10-18 17:39:45 +00:00
|
|
|
proto_item *item;
|
|
|
|
proto_tree *ie_tree;
|
|
|
|
tvbuff_t *next_tvb;
|
|
|
|
guint8 ie_len;
|
|
|
|
guint8 octet;
|
|
|
|
guint8 prot_disc;
|
|
|
|
|
|
|
|
ie_len = tvb_get_guint8(tvb, offset+1);
|
|
|
|
item = proto_tree_add_item(tree, hf_bssap_dlink_tnl_pld_cntrl_amd_inf_ie, tvb, offset, ie_len+2, ENC_NA);
|
2010-05-10 15:54:57 +00:00
|
|
|
ie_tree = proto_item_add_subtree(item, ett_bssap_dlink_tnl_pld_cntrl_amd_inf);
|
|
|
|
|
2012-10-18 17:39:45 +00:00
|
|
|
proto_tree_add_item(ie_tree, hf_bssap_plus_ie, tvb, offset, 1, ENC_BIG_ENDIAN);
|
2010-05-10 15:54:57 +00:00
|
|
|
offset++;
|
2011-09-26 08:25:18 +00:00
|
|
|
proto_tree_add_item(ie_tree, hf_bssap_plus_ie_len, tvb, offset, 1, ENC_BIG_ENDIAN);
|
2010-05-10 15:54:57 +00:00
|
|
|
offset++;
|
|
|
|
/* Bit 8 Spare */
|
|
|
|
/* Bit 7 - 4
|
|
|
|
* TOM Protocol Discriminator: Identifies the protocol using tunnelling of non-GSM signalling.
|
|
|
|
* For coding, see 3GPP TS 44.064.
|
|
|
|
*/
|
|
|
|
|
2011-09-26 08:25:18 +00:00
|
|
|
proto_tree_add_item(ie_tree, hf_bssap_tom_prot_disc, tvb, offset, 1, ENC_BIG_ENDIAN);
|
2012-10-18 17:39:45 +00:00
|
|
|
octet = tvb_get_guint8(tvb, offset);
|
2010-05-10 15:54:57 +00:00
|
|
|
prot_disc = (octet&0x78)>>3;
|
|
|
|
|
|
|
|
/* octet 3 bit 3 E: Cipher Request. When set to 1 indicates that the SGSN received the payload in ciphered form,
|
|
|
|
* when set to 0 indicates that the SGSN did not receive the payload in ciphered form.
|
|
|
|
*/
|
2011-09-26 08:25:18 +00:00
|
|
|
proto_tree_add_item(ie_tree, hf_bssap_e_bit, tvb, offset, 1, ENC_BIG_ENDIAN);
|
2010-05-10 15:54:57 +00:00
|
|
|
|
2011-02-07 18:49:29 +00:00
|
|
|
/* octet 3 bit 2 - 1
|
2010-05-10 15:54:57 +00:00
|
|
|
* Tunnel Priority: Indicates the priority of the Tunnel Payload. For coding, see Table 20.1: Association
|
|
|
|
* between Tunnel Priority and LLC SAPs.
|
|
|
|
*/
|
2011-09-26 08:25:18 +00:00
|
|
|
proto_tree_add_item(ie_tree, hf_bssap_tunnel_prio, tvb, offset, 1, ENC_BIG_ENDIAN);
|
2010-05-10 15:54:57 +00:00
|
|
|
/* Tunnel payload */
|
2014-06-06 14:35:50 +00:00
|
|
|
next_tvb = tvb_new_subset_length(tvb, offset, ie_len-4);
|
2010-05-10 15:54:57 +00:00
|
|
|
|
|
|
|
if ((prot_disc == 2)&&(rrlp_handle))
|
|
|
|
call_dissector(rrlp_handle, next_tvb, pinfo, ie_tree);
|
|
|
|
else
|
2016-03-20 00:33:14 +00:00
|
|
|
call_data_dissector(next_tvb, pinfo, ie_tree);
|
2010-05-10 15:54:57 +00:00
|
|
|
|
|
|
|
|
|
|
|
return offset + ie_len;
|
2006-02-01 17:39:20 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
/* 18.4.4 eMLPP Priority */
|
2006-02-02 15:16:51 +00:00
|
|
|
/* Call priority */
|
2011-02-07 18:49:29 +00:00
|
|
|
static const value_string bssap_call_priority_values[] = {
|
2006-02-02 15:16:51 +00:00
|
|
|
{ 0x00, "No priority applied" },
|
2011-02-07 18:49:29 +00:00
|
|
|
{ 0x01, "Call priority level 4" },
|
|
|
|
{ 0x02, "Call priority level 3" },
|
|
|
|
{ 0x03, "Call priority level 2" },
|
|
|
|
{ 0x04, "Call priority level 1" },
|
|
|
|
{ 0x05, "Call priority level 0" },
|
|
|
|
{ 0x06, "Call priority level B" },
|
|
|
|
{ 0x07, "Call priority level A" },
|
|
|
|
{ 0, NULL }
|
2006-02-02 15:16:51 +00:00
|
|
|
};
|
2006-02-01 17:39:20 +00:00
|
|
|
static int
|
2006-03-11 12:33:15 +00:00
|
|
|
dissect_bssap_emlpp_priority(tvbuff_t *tvb, proto_tree *tree, int offset)
|
2006-02-01 17:39:20 +00:00
|
|
|
{
|
2012-10-18 17:39:45 +00:00
|
|
|
proto_item *item;
|
|
|
|
proto_tree *ie_tree;
|
|
|
|
guint8 ie_len;
|
2011-02-07 18:49:29 +00:00
|
|
|
|
2012-10-18 17:39:45 +00:00
|
|
|
ie_len = tvb_get_guint8(tvb, offset+1);
|
|
|
|
item = proto_tree_add_item(tree, hf_bssap_emlpp_prio_ie, tvb, offset, ie_len+2, ENC_NA);
|
2010-05-10 15:54:57 +00:00
|
|
|
ie_tree = proto_item_add_subtree(item, ett_bssap_emlpp_prio);
|
|
|
|
|
2012-10-18 17:39:45 +00:00
|
|
|
proto_tree_add_item(ie_tree, hf_bssap_plus_ie, tvb, offset, 1, ENC_BIG_ENDIAN);
|
2010-05-10 15:54:57 +00:00
|
|
|
offset++;
|
2011-09-26 08:25:18 +00:00
|
|
|
proto_tree_add_item(ie_tree, hf_bssap_plus_ie_len, tvb, offset, 1, ENC_BIG_ENDIAN);
|
2010-05-10 15:54:57 +00:00
|
|
|
offset++;
|
|
|
|
/* The rest of the information element is coded as the value part of
|
|
|
|
the eMLPP-Priority IE defined in 3GPP TS 48.008 (not including
|
|
|
|
3GPP TS 48.008 IEI and 3GPP TS 48.008 length indicator).
|
|
|
|
3.2.2.56 eMLPP Priority
|
2011-02-07 18:49:29 +00:00
|
|
|
The call priority field (bit 3 to 1 of octet 2) is coded in the same way
|
2010-05-10 15:54:57 +00:00
|
|
|
as the call priority field (bit 3 to 1 of octet 5) in the Descriptive group
|
|
|
|
or broadcast call reference information element as defined in 3GPP TS 24.008.
|
|
|
|
*/
|
2011-09-26 08:25:18 +00:00
|
|
|
proto_tree_add_item(ie_tree, hf_bssap_call_priority, tvb, offset, ie_len, ENC_BIG_ENDIAN);
|
2010-05-10 15:54:57 +00:00
|
|
|
|
|
|
|
return offset + ie_len;
|
2006-02-01 17:39:20 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
/* 18.4.5 Erroneous message */
|
2010-05-10 15:54:57 +00:00
|
|
|
/* Erroneous message including the message type. */
|
2006-02-01 17:39:20 +00:00
|
|
|
|
|
|
|
static int
|
2006-03-11 12:33:15 +00:00
|
|
|
dissect_bssap_gprs_erroneous_msg(tvbuff_t *tvb, proto_tree *tree, int offset)
|
2006-02-01 17:39:20 +00:00
|
|
|
{
|
2012-10-18 17:39:45 +00:00
|
|
|
proto_item *item;
|
|
|
|
proto_tree *ie_tree;
|
|
|
|
guint8 ie_len;
|
2011-02-07 18:49:29 +00:00
|
|
|
|
2012-10-18 17:39:45 +00:00
|
|
|
ie_len = tvb_get_guint8(tvb, offset+1);
|
|
|
|
item = proto_tree_add_item(tree, hf_bssap_gprs_erroneous_msg_ie, tvb, offset, ie_len+2, ENC_NA);
|
2010-05-10 15:54:57 +00:00
|
|
|
ie_tree = proto_item_add_subtree(item, ett_bssap_erroneous_msg);
|
2006-02-01 17:39:20 +00:00
|
|
|
|
2012-10-18 17:39:45 +00:00
|
|
|
proto_tree_add_item(ie_tree, hf_bssap_plus_ie, tvb, offset, 1, ENC_BIG_ENDIAN);
|
2010-05-10 15:54:57 +00:00
|
|
|
offset++;
|
2011-09-26 08:25:18 +00:00
|
|
|
proto_tree_add_item(ie_tree, hf_bssap_plus_ie_len, tvb, offset, 1, ENC_BIG_ENDIAN);
|
2010-05-10 15:54:57 +00:00
|
|
|
offset++;
|
2006-02-01 17:39:20 +00:00
|
|
|
|
2010-05-10 15:54:57 +00:00
|
|
|
/* Erroneous message including the message type. */
|
2011-10-04 22:44:31 +00:00
|
|
|
proto_tree_add_item(ie_tree, hf_bssap_plus_ie_data, tvb, offset, ie_len, ENC_NA);
|
2006-02-01 17:39:20 +00:00
|
|
|
|
2010-05-10 15:54:57 +00:00
|
|
|
return offset + ie_len;
|
2006-02-01 17:39:20 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2011-02-07 18:49:29 +00:00
|
|
|
static const value_string bssap_plus_GPRS_loc_upd_type_values[] = {
|
2006-02-01 17:39:20 +00:00
|
|
|
{ 0x00, "Shall not be sent in this version of the protocol. If received, shall be treated as '00000010'." },
|
2011-02-07 18:49:29 +00:00
|
|
|
{ 0x01, "IMSI attach" },
|
|
|
|
{ 0x02, "Normal location update" },
|
|
|
|
{ 0, NULL }
|
|
|
|
};
|
2006-02-01 17:39:20 +00:00
|
|
|
/* 18.4.6 GPRS location update type */
|
|
|
|
static int
|
2006-03-11 12:33:15 +00:00
|
|
|
dissect_bssap_gprs_location_update_type(tvbuff_t *tvb, proto_tree *tree, int offset)
|
2006-02-01 17:39:20 +00:00
|
|
|
{
|
2012-10-18 17:39:45 +00:00
|
|
|
proto_item *item;
|
|
|
|
proto_tree *ie_tree;
|
|
|
|
guint8 ie_len;
|
2011-02-07 18:49:29 +00:00
|
|
|
|
2012-10-18 17:39:45 +00:00
|
|
|
ie_len = tvb_get_guint8(tvb, offset+1);
|
|
|
|
item = proto_tree_add_item(tree, hf_bssap_gprs_loc_upd_type_ie, tvb, offset, ie_len+2, ENC_NA);
|
2010-05-10 15:54:57 +00:00
|
|
|
ie_tree = proto_item_add_subtree(item, ett_bssap_gprs_loc_upd);
|
|
|
|
|
2012-10-18 17:39:45 +00:00
|
|
|
proto_tree_add_item(ie_tree, hf_bssap_plus_ie, tvb, offset, 1, ENC_BIG_ENDIAN);
|
2010-05-10 15:54:57 +00:00
|
|
|
offset++;
|
2011-09-26 08:25:18 +00:00
|
|
|
proto_tree_add_item(ie_tree, hf_bssap_plus_ie_len, tvb, offset, 1, ENC_BIG_ENDIAN);
|
2010-05-10 15:54:57 +00:00
|
|
|
offset++;
|
2011-02-07 18:49:29 +00:00
|
|
|
|
2010-05-10 15:54:57 +00:00
|
|
|
/* GPRS location update type value (octet 3) */
|
2011-09-26 08:25:18 +00:00
|
|
|
proto_tree_add_item(ie_tree, hf_bssap_gprs_loc_upd_type, tvb, offset, ie_len, ENC_BIG_ENDIAN);
|
2011-02-07 18:49:29 +00:00
|
|
|
|
2010-05-10 15:54:57 +00:00
|
|
|
return offset + ie_len;
|
2006-02-01 17:39:20 +00:00
|
|
|
}
|
|
|
|
|
2006-02-02 15:16:51 +00:00
|
|
|
/* Gs Cause value (octet 3) */
|
2011-02-07 18:49:29 +00:00
|
|
|
static const value_string bssap_Gs_cause_values[] = {
|
2006-02-02 15:16:51 +00:00
|
|
|
|
2010-05-10 15:54:57 +00:00
|
|
|
{ 0x00, "Normal, unspecified in this version of the protocol." },
|
|
|
|
{ 0x01, "IMSI detached for GPRS services" },
|
|
|
|
{ 0x02, "IMSI detached for GPRS and non-GPRS services" },
|
|
|
|
{ 0x03, "IMSI unknown" },
|
|
|
|
{ 0x04, "IMSI detached for non-GPRS services" },
|
|
|
|
{ 0x05, "IMSI implicitly detached for non-GPRS services" },
|
|
|
|
{ 0x06, "MS unreachable" },
|
|
|
|
{ 0x07, "Message not compatible with the protocol state" },
|
|
|
|
{ 0x08, "Missing mandatory information element" },
|
|
|
|
{ 0x09, "Invalid mandatory information" },
|
|
|
|
{ 0x0a, "Conditional IE error" },
|
|
|
|
{ 0x0b, "Semantically incorrect message" },
|
|
|
|
{ 0x0c, "Message unknown" },
|
|
|
|
{ 0x0d, "Address error" },
|
|
|
|
{ 0x0e, "TOM functionality not supported" },
|
|
|
|
{ 0x0f, "Ciphering request cannot be accommodated" },
|
2011-02-07 18:49:29 +00:00
|
|
|
{ 0, NULL }
|
|
|
|
};
|
2006-02-02 15:16:51 +00:00
|
|
|
|
2006-02-01 17:39:20 +00:00
|
|
|
/* 18.4.7 Gs cause */
|
|
|
|
static int
|
2006-03-11 12:33:15 +00:00
|
|
|
dissect_bssap_Gs_cause(tvbuff_t *tvb, proto_tree *tree, int offset)
|
2006-02-01 17:39:20 +00:00
|
|
|
{
|
2012-10-18 17:39:45 +00:00
|
|
|
proto_item *item;
|
|
|
|
proto_tree *ie_tree;
|
|
|
|
guint8 ie_len;
|
2011-02-07 18:49:29 +00:00
|
|
|
|
2012-10-18 17:39:45 +00:00
|
|
|
ie_len = tvb_get_guint8(tvb, offset+1);
|
|
|
|
item = proto_tree_add_item(tree, hf_bssap_Gs_cause_ie, tvb, offset, ie_len+2, ENC_NA);
|
2010-05-10 15:54:57 +00:00
|
|
|
ie_tree = proto_item_add_subtree(item, ett_bassp_Gs_cause);
|
2006-02-01 17:39:20 +00:00
|
|
|
|
2012-10-18 17:39:45 +00:00
|
|
|
proto_tree_add_item(ie_tree, hf_bssap_plus_ie, tvb, offset, 1, ENC_BIG_ENDIAN);
|
2010-05-10 15:54:57 +00:00
|
|
|
offset++;
|
2011-09-26 08:25:18 +00:00
|
|
|
proto_tree_add_item(ie_tree, hf_bssap_plus_ie_len, tvb, offset, 1, ENC_BIG_ENDIAN);
|
2010-05-10 15:54:57 +00:00
|
|
|
offset++;
|
|
|
|
/* Gs Cause value (octet 3) */
|
2012-10-18 17:39:45 +00:00
|
|
|
proto_tree_add_item(ie_tree, hf_bssap_Gs_cause, tvb, offset, ie_len, ENC_BIG_ENDIAN);
|
2006-02-01 17:39:20 +00:00
|
|
|
|
|
|
|
|
2010-05-10 15:54:57 +00:00
|
|
|
return offset + ie_len;
|
2006-02-01 17:39:20 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
/* 18.4.8 IMEI */
|
|
|
|
static int
|
2006-03-11 12:33:15 +00:00
|
|
|
dissect_bssap_imei(tvbuff_t *tvb, proto_tree *tree, int offset)
|
2006-02-01 17:39:20 +00:00
|
|
|
{
|
2012-10-18 17:39:45 +00:00
|
|
|
proto_item *item;
|
|
|
|
proto_tree *ie_tree;
|
|
|
|
guint8 ie_len;
|
|
|
|
tvbuff_t *ie_tvb;
|
2010-05-10 15:54:57 +00:00
|
|
|
const char *digit_str;
|
|
|
|
|
2012-10-18 17:39:45 +00:00
|
|
|
ie_len = tvb_get_guint8(tvb, offset+1);
|
|
|
|
item = proto_tree_add_item(tree, hf_bssap_imei_ie, tvb, offset, ie_len+2, ENC_NA);
|
2010-05-10 15:54:57 +00:00
|
|
|
ie_tree = proto_item_add_subtree(item, ett_bassp_imei);
|
|
|
|
|
2012-10-18 17:39:45 +00:00
|
|
|
proto_tree_add_item(ie_tree, hf_bssap_plus_ie, tvb, offset, 1, ENC_BIG_ENDIAN);
|
2010-05-10 15:54:57 +00:00
|
|
|
offset++;
|
2011-09-26 08:25:18 +00:00
|
|
|
proto_tree_add_item(ie_tree, hf_bssap_plus_ie_len, tvb, offset, 1, ENC_BIG_ENDIAN);
|
2010-05-10 15:54:57 +00:00
|
|
|
offset++;
|
|
|
|
/* The IMEI is coded as a sequence of BCD digits, compressed two into each octet.
|
|
|
|
* The IMEI consists of 15 digits (see 3GPP TS 23.003).
|
|
|
|
*/
|
2014-06-06 14:35:50 +00:00
|
|
|
ie_tvb = tvb_new_subset_length(tvb, offset, ie_len);
|
2014-08-22 19:44:20 +00:00
|
|
|
digit_str = tvb_bcd_dig_to_wmem_packet_str(ie_tvb, 0, -1, NULL, FALSE);
|
2010-05-10 15:54:57 +00:00
|
|
|
proto_tree_add_string(ie_tree, hf_bssap_imei, ie_tvb, 0, -1, digit_str);
|
|
|
|
|
|
|
|
return offset + ie_len;
|
2006-02-01 17:39:20 +00:00
|
|
|
|
|
|
|
}
|
2019-01-08 13:04:29 +00:00
|
|
|
static int
|
|
|
|
dissect_bssap_imei_dissector(tvbuff_t *tvb, packet_info *pinfo _U_, proto_tree *tree, void *data _U_)
|
|
|
|
{
|
|
|
|
return dissect_bssap_imei(tvb, tree, 0);
|
|
|
|
}
|
2006-02-01 17:39:20 +00:00
|
|
|
/* 18.4.9 IMEISV */
|
|
|
|
static int
|
2019-01-15 14:26:33 +00:00
|
|
|
dissect_bssap_imeisv(tvbuff_t *tvb, proto_tree *tree, int offset)
|
2006-02-01 17:39:20 +00:00
|
|
|
{
|
2012-10-18 17:39:45 +00:00
|
|
|
proto_item *item;
|
|
|
|
proto_tree *ie_tree;
|
|
|
|
guint8 ie_len;
|
|
|
|
tvbuff_t *ie_tvb;
|
2010-05-10 15:54:57 +00:00
|
|
|
const char *digit_str;
|
2011-02-07 18:49:29 +00:00
|
|
|
|
2012-10-18 17:39:45 +00:00
|
|
|
ie_len = tvb_get_guint8(tvb, offset+1);
|
2019-01-15 14:26:33 +00:00
|
|
|
item = proto_tree_add_item(tree, hf_bssap_imeisv_ie, tvb, offset, ie_len+2, ENC_NA);
|
|
|
|
ie_tree = proto_item_add_subtree(item, ett_bassp_imeisv);
|
2010-05-10 15:54:57 +00:00
|
|
|
|
2012-10-18 17:39:45 +00:00
|
|
|
proto_tree_add_item(ie_tree, hf_bssap_plus_ie, tvb, offset, 1, ENC_BIG_ENDIAN);
|
2010-05-10 15:54:57 +00:00
|
|
|
offset++;
|
2011-09-26 08:25:18 +00:00
|
|
|
proto_tree_add_item(ie_tree, hf_bssap_plus_ie_len, tvb, offset, 1, ENC_BIG_ENDIAN);
|
2010-05-10 15:54:57 +00:00
|
|
|
offset++;
|
|
|
|
/* The IMEISV is coded as a sequence of BCD digits, compressed two into each octet.
|
|
|
|
* The IMEISV consists of 16 digits (see 3GPP TS 23.003).
|
|
|
|
*/
|
2014-06-06 14:35:50 +00:00
|
|
|
ie_tvb = tvb_new_subset_length(tvb, offset, ie_len);
|
2014-08-22 19:44:20 +00:00
|
|
|
digit_str = tvb_bcd_dig_to_wmem_packet_str(ie_tvb, 0, -1, NULL, FALSE);
|
2010-05-10 15:54:57 +00:00
|
|
|
proto_tree_add_string(ie_tree, hf_bssap_imeisv, ie_tvb, 0, -1, digit_str);
|
|
|
|
|
|
|
|
return offset + ie_len;
|
2006-02-01 17:39:20 +00:00
|
|
|
|
|
|
|
}
|
2011-02-07 18:49:29 +00:00
|
|
|
/* 18.4.10 IMSI
|
|
|
|
* The IMSI is coded as a sequence of BCD digits, compressed two into each octet.
|
2006-02-01 17:39:20 +00:00
|
|
|
* This is a variable length element, and includes a length indicator.
|
|
|
|
* The IMSI is defined in 3GPP TS 23.003. It shall not exceed 15 digits (see 3GPP TS 23.003).
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
static int
|
2014-08-20 11:19:38 +00:00
|
|
|
dissect_bssap_imsi(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, int offset)
|
2006-02-01 17:39:20 +00:00
|
|
|
{
|
2012-10-18 17:39:45 +00:00
|
|
|
proto_item *item;
|
|
|
|
proto_tree *ie_tree;
|
|
|
|
guint8 ie_len;
|
|
|
|
tvbuff_t *ie_tvb;
|
2011-02-07 18:49:29 +00:00
|
|
|
|
2012-10-18 17:39:45 +00:00
|
|
|
ie_len = tvb_get_guint8(tvb, offset+1);
|
|
|
|
item = proto_tree_add_item(tree, hf_bssap_imsi_ie, tvb, offset, ie_len+2, ENC_NA);
|
2010-05-10 15:54:57 +00:00
|
|
|
ie_tree = proto_item_add_subtree(item, ett_bssap_imsi);
|
|
|
|
|
2012-10-18 17:39:45 +00:00
|
|
|
proto_tree_add_item(ie_tree, hf_bssap_plus_ie, tvb, offset, 1, ENC_BIG_ENDIAN);
|
2010-05-10 15:54:57 +00:00
|
|
|
offset++;
|
2011-09-26 08:25:18 +00:00
|
|
|
proto_tree_add_item(ie_tree, hf_bssap_plus_ie_len, tvb, offset, 1, ENC_BIG_ENDIAN);
|
2010-05-10 15:54:57 +00:00
|
|
|
offset++;
|
2014-06-06 14:35:50 +00:00
|
|
|
ie_tvb = tvb_new_subset_length(tvb, offset, ie_len);
|
2014-08-20 11:19:38 +00:00
|
|
|
dissect_e212_imsi(ie_tvb, pinfo, tree, 0, ie_len, TRUE);
|
2011-02-07 18:49:29 +00:00
|
|
|
|
2010-05-10 15:54:57 +00:00
|
|
|
return offset + ie_len;
|
2006-02-01 17:39:20 +00:00
|
|
|
|
|
|
|
}
|
2011-02-07 18:49:29 +00:00
|
|
|
static const value_string bssap_imsi_det_from_gprs_serv_type_values[] _U_ = {
|
2010-05-10 15:54:57 +00:00
|
|
|
{ 0x00, "Interpreted as reserved in this version of the protocol" },
|
2011-02-07 18:49:29 +00:00
|
|
|
{ 0x01, "Network initiated IMSI detach from GPRS service" },
|
2010-05-10 15:54:57 +00:00
|
|
|
{ 0x02, "MS initiated IMSI detach from GPRS service" },
|
|
|
|
{ 0x03, "GPRS services not allowed" },
|
2011-02-07 18:49:29 +00:00
|
|
|
{ 0, NULL }
|
|
|
|
};
|
2006-02-01 17:39:20 +00:00
|
|
|
|
|
|
|
/* 18.4.11 IMSI detach from GPRS service type */
|
|
|
|
static int
|
2006-03-11 12:33:15 +00:00
|
|
|
dissect_bssap_imsi_det_from_gprs_serv_type(tvbuff_t *tvb, proto_tree *tree, int offset)
|
2006-02-01 17:39:20 +00:00
|
|
|
{
|
2012-10-18 17:39:45 +00:00
|
|
|
proto_item *item;
|
|
|
|
proto_tree *ie_tree;
|
|
|
|
guint8 ie_len;
|
2011-02-07 18:49:29 +00:00
|
|
|
|
2012-10-18 17:39:45 +00:00
|
|
|
ie_len = tvb_get_guint8(tvb, offset+1);
|
|
|
|
item = proto_tree_add_item(tree, hf_bssap_imsi_det_from_gprs_serv_type_ie, tvb, offset, ie_len+2, ENC_NA);
|
2010-05-10 15:54:57 +00:00
|
|
|
ie_tree = proto_item_add_subtree(item, ett_bssap_imsi_det_from_gprs_serv_type);
|
2006-02-01 17:39:20 +00:00
|
|
|
|
2012-10-18 17:39:45 +00:00
|
|
|
proto_tree_add_item(ie_tree, hf_bssap_plus_ie, tvb, offset, 1, ENC_BIG_ENDIAN);
|
2010-05-10 15:54:57 +00:00
|
|
|
offset++;
|
2011-09-26 08:25:18 +00:00
|
|
|
proto_tree_add_item(ie_tree, hf_bssap_plus_ie_len, tvb, offset, 1, ENC_BIG_ENDIAN);
|
2010-05-10 15:54:57 +00:00
|
|
|
offset++;
|
|
|
|
/* IMSI detach from GPRS service type value (octet 3)*/
|
2011-09-26 08:25:18 +00:00
|
|
|
proto_tree_add_item(ie_tree, hf_bssap_imsi_det_from_gprs_serv_type, tvb, offset, ie_len, ENC_BIG_ENDIAN);
|
2006-02-01 17:39:20 +00:00
|
|
|
|
|
|
|
|
2010-05-10 15:54:57 +00:00
|
|
|
return offset + ie_len;
|
2006-02-01 17:39:20 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
/* 18.4.12 IMSI detach from non-GPRS service type */
|
|
|
|
static int
|
2006-03-11 12:33:15 +00:00
|
|
|
dissect_bssap_imsi_det_from_non_gprs_serv_type(tvbuff_t *tvb, proto_tree *tree, int offset)
|
2006-02-01 17:39:20 +00:00
|
|
|
{
|
2012-10-18 17:39:45 +00:00
|
|
|
proto_item *item;
|
|
|
|
proto_tree *ie_tree;
|
|
|
|
guint8 ie_len;
|
2011-02-07 18:49:29 +00:00
|
|
|
|
2012-10-18 17:39:45 +00:00
|
|
|
ie_len = tvb_get_guint8(tvb, offset+1);
|
|
|
|
item = proto_tree_add_item(tree, hf_bssap_imsi_det_from_non_gprs_serv_type_ie, tvb, offset, ie_len+2, ENC_NA);
|
2010-05-10 15:54:57 +00:00
|
|
|
ie_tree = proto_item_add_subtree(item, ett_bssap_imsi_det_from_non_gprs_serv_type);
|
2006-02-01 17:39:20 +00:00
|
|
|
|
2012-10-18 17:39:45 +00:00
|
|
|
proto_tree_add_item(ie_tree, hf_bssap_plus_ie, tvb, offset, 1, ENC_BIG_ENDIAN);
|
2010-05-10 15:54:57 +00:00
|
|
|
offset++;
|
2012-10-18 17:39:45 +00:00
|
|
|
proto_tree_add_item(ie_tree, hf_bssap_plus_ie_len, tvb, offset, 1, ENC_BIG_ENDIAN);
|
2010-05-10 15:54:57 +00:00
|
|
|
offset++;
|
2011-10-04 22:44:31 +00:00
|
|
|
proto_tree_add_item(ie_tree, hf_bssap_plus_ie_data, tvb, offset, ie_len, ENC_NA);
|
2006-02-01 17:39:20 +00:00
|
|
|
|
|
|
|
|
2010-05-10 15:54:57 +00:00
|
|
|
return offset + ie_len;
|
2006-02-01 17:39:20 +00:00
|
|
|
|
|
|
|
}
|
2011-02-07 18:49:29 +00:00
|
|
|
static const value_string bssap_info_req_values[] = {
|
2010-05-10 15:54:57 +00:00
|
|
|
{ 0x00, "Interpreted as Not supported in this version of the protocol." },
|
2011-02-07 18:49:29 +00:00
|
|
|
{ 0x01, "PTMSI" },
|
2010-05-10 15:54:57 +00:00
|
|
|
{ 0x02, "IMEI" },
|
|
|
|
{ 0x03, "IMEISV" },
|
|
|
|
{ 0x04, "PTMSI and IMEI" },
|
|
|
|
{ 0x05, "PTMSI and IMEISV" },
|
|
|
|
{ 0x06, "IMEI and IMEISV" },
|
|
|
|
{ 0x07, "PTMSI, IMEI, and IMEISV" },
|
|
|
|
{ 0x08, "Mobile location information" },
|
|
|
|
{ 0x09, "TMSI" },
|
2011-02-07 18:49:29 +00:00
|
|
|
{ 0, NULL }
|
|
|
|
};
|
2006-02-01 17:39:20 +00:00
|
|
|
/* 18.4.13 Information requested */
|
|
|
|
static int
|
2006-03-11 12:33:15 +00:00
|
|
|
dissect_bssap_info_req(tvbuff_t *tvb, proto_tree *tree, int offset)
|
2006-02-01 17:39:20 +00:00
|
|
|
{
|
2012-10-18 17:39:45 +00:00
|
|
|
proto_item *item;
|
|
|
|
proto_tree *ie_tree;
|
|
|
|
guint8 ie_len;
|
2011-02-07 18:49:29 +00:00
|
|
|
|
2012-10-18 17:39:45 +00:00
|
|
|
ie_len = tvb_get_guint8(tvb, offset+1);
|
|
|
|
item = proto_tree_add_item(tree, hf_bssap_info_req_ie, tvb, offset, ie_len+2, ENC_NA);
|
2010-05-10 15:54:57 +00:00
|
|
|
ie_tree = proto_item_add_subtree(item, ett_bssap_info_req);
|
2006-02-01 17:39:20 +00:00
|
|
|
|
2012-10-18 17:39:45 +00:00
|
|
|
proto_tree_add_item(ie_tree, hf_bssap_plus_ie, tvb, offset, 1, ENC_BIG_ENDIAN);
|
2010-05-10 15:54:57 +00:00
|
|
|
offset++;
|
2011-09-26 08:25:18 +00:00
|
|
|
proto_tree_add_item(ie_tree, hf_bssap_plus_ie_len, tvb, offset, 1, ENC_BIG_ENDIAN);
|
2010-05-10 15:54:57 +00:00
|
|
|
offset++;
|
|
|
|
/*Information requested value (octet 3) */
|
2012-10-18 17:39:45 +00:00
|
|
|
proto_tree_add_item(ie_tree, hf_bssap_info_req, tvb, offset, ie_len, ENC_BIG_ENDIAN);
|
2006-02-01 17:39:20 +00:00
|
|
|
|
|
|
|
|
2010-05-10 15:54:57 +00:00
|
|
|
return offset + ie_len;
|
2006-02-01 17:39:20 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
/* 18.4.14 Location area identifier */
|
|
|
|
static int
|
2011-04-04 14:37:25 +00:00
|
|
|
dissect_bssap_loc_area_id(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, int offset)
|
2006-02-01 17:39:20 +00:00
|
|
|
{
|
2012-10-18 17:39:45 +00:00
|
|
|
proto_item *item;
|
|
|
|
proto_tree *ie_tree;
|
|
|
|
guint8 ie_len;
|
2011-02-07 18:49:29 +00:00
|
|
|
|
2012-10-18 17:39:45 +00:00
|
|
|
ie_len = tvb_get_guint8(tvb, offset+1);
|
|
|
|
item = proto_tree_add_item(tree, hf_bssap_loc_area_id_ie, tvb, offset, ie_len+2, ENC_NA);
|
2010-05-10 15:54:57 +00:00
|
|
|
ie_tree = proto_item_add_subtree(item, ett_bssap_loc_area_id);
|
|
|
|
|
2012-10-18 17:39:45 +00:00
|
|
|
proto_tree_add_item(ie_tree, hf_bssap_plus_ie, tvb, offset, 1, ENC_BIG_ENDIAN);
|
2010-05-10 15:54:57 +00:00
|
|
|
offset++;
|
2011-09-26 08:25:18 +00:00
|
|
|
proto_tree_add_item(ie_tree, hf_bssap_plus_ie_len, tvb, offset, 1, ENC_BIG_ENDIAN);
|
2010-05-10 15:54:57 +00:00
|
|
|
offset++;
|
|
|
|
/* The rest of the information element is coded as the value part of
|
|
|
|
* the location area identifier IE defined in 3GPP TS 48.018 (not
|
|
|
|
* including 3GPP TS 48.018 IEI and 3GPP TS 48.018 length
|
|
|
|
* indicator).
|
|
|
|
*/
|
2011-04-04 14:37:25 +00:00
|
|
|
de_lai(tvb, ie_tree, pinfo, offset, ie_len, NULL, 0);
|
2010-05-10 15:54:57 +00:00
|
|
|
|
|
|
|
return offset + ie_len;
|
2006-02-01 17:39:20 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
/* 18.4.15 Location information age */
|
|
|
|
static int
|
2006-03-11 12:33:15 +00:00
|
|
|
dissect_bssap_location_information_age(tvbuff_t *tvb, proto_tree *tree, int offset)
|
2006-02-01 17:39:20 +00:00
|
|
|
{
|
2012-10-18 17:39:45 +00:00
|
|
|
proto_item *item;
|
|
|
|
proto_tree *ie_tree;
|
|
|
|
guint8 ie_len;
|
2011-02-07 18:49:29 +00:00
|
|
|
|
2012-10-18 17:39:45 +00:00
|
|
|
ie_len = tvb_get_guint8(tvb, offset+1);
|
|
|
|
item = proto_tree_add_item(tree, hf_bssap_loc_inf_age_ie, tvb, offset, ie_len+2, ENC_NA);
|
2010-05-10 15:54:57 +00:00
|
|
|
ie_tree = proto_item_add_subtree(item, ett_bssap_loc_inf_age);
|
|
|
|
|
2012-10-18 17:39:45 +00:00
|
|
|
proto_tree_add_item(ie_tree, hf_bssap_plus_ie, tvb, offset, 1, ENC_BIG_ENDIAN);
|
2010-05-10 15:54:57 +00:00
|
|
|
offset++;
|
2011-09-26 08:25:18 +00:00
|
|
|
proto_tree_add_item(ie_tree, hf_bssap_plus_ie_len, tvb, offset, 1, ENC_BIG_ENDIAN);
|
2010-05-10 15:54:57 +00:00
|
|
|
offset++;
|
|
|
|
/* The rest of the IE is coded as the value part of the
|
|
|
|
* AgeOfLocationInformation as specified in 3GPP TS 29.002.:
|
|
|
|
* AgeOfLocationInformation ::= INTEGER (0..32767)
|
|
|
|
* -- the value represents the elapsed time in minutes since the last
|
|
|
|
* -- network contact of the mobile station (i.e. the actuality of the
|
|
|
|
* -- location information).
|
|
|
|
* -- value '0' indicates that the MS is currently in contact with the
|
|
|
|
* -- network
|
|
|
|
* -- value '32767' indicates that the location information is at least
|
|
|
|
* -- 32767 minutes old
|
|
|
|
*/
|
2011-09-26 08:25:18 +00:00
|
|
|
proto_tree_add_item(ie_tree, hf_bssap_loc_inf_age, tvb, offset, ie_len, ENC_BIG_ENDIAN);
|
2010-05-10 15:54:57 +00:00
|
|
|
|
|
|
|
|
|
|
|
return offset + ie_len;
|
2006-02-01 17:39:20 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
/* 18.4.16 MM information */
|
|
|
|
static int
|
2011-04-04 07:45:34 +00:00
|
|
|
dissect_bssap_MM_information(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, int offset)
|
2006-02-01 17:39:20 +00:00
|
|
|
{
|
2012-10-18 17:39:45 +00:00
|
|
|
proto_item *item;
|
|
|
|
proto_tree *ie_tree;
|
|
|
|
guint8 ie_len;
|
2011-02-07 18:49:29 +00:00
|
|
|
|
2012-10-18 17:39:45 +00:00
|
|
|
ie_len = tvb_get_guint8(tvb, offset+1);
|
|
|
|
item = proto_tree_add_item(tree, hf_bssap_mm_information_ie, tvb, offset, ie_len+2, ENC_NA);
|
2010-05-10 15:54:57 +00:00
|
|
|
ie_tree = proto_item_add_subtree(item, ett_bssap_mm_information);
|
|
|
|
|
2012-10-18 17:39:45 +00:00
|
|
|
proto_tree_add_item(ie_tree, hf_bssap_plus_ie, tvb, offset, 1, ENC_BIG_ENDIAN);
|
2010-05-10 15:54:57 +00:00
|
|
|
offset++;
|
2011-09-26 08:25:18 +00:00
|
|
|
proto_tree_add_item(ie_tree, hf_bssap_plus_ie_len, tvb, offset, 1, ENC_BIG_ENDIAN);
|
2010-05-10 15:54:57 +00:00
|
|
|
offset++;
|
|
|
|
/* User information: This field is composed of one or more of the
|
|
|
|
* information elements of the MM information message as defined
|
|
|
|
* 3GPP TS 24.008, excluding the Protocol discriminator, Skip
|
|
|
|
* indicator and Message type. This field includes the IEI and length
|
|
|
|
* indicatior of the other information elements.
|
|
|
|
*/
|
2011-04-04 07:45:34 +00:00
|
|
|
dtap_mm_mm_info(tvb, ie_tree, pinfo, offset, ie_len);
|
2011-02-07 18:49:29 +00:00
|
|
|
|
2010-05-10 15:54:57 +00:00
|
|
|
|
|
|
|
return offset + ie_len;
|
2006-02-01 17:39:20 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
/* 18.4.17 Mobile identity */
|
|
|
|
static int
|
2011-04-04 14:37:25 +00:00
|
|
|
dissect_bssap_mobile_id(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, int offset)
|
2006-02-01 17:39:20 +00:00
|
|
|
{
|
2012-10-18 17:39:45 +00:00
|
|
|
proto_item *item;
|
|
|
|
proto_tree *ie_tree;
|
|
|
|
guint ie_len;
|
2011-02-07 18:49:29 +00:00
|
|
|
|
2012-10-18 17:39:45 +00:00
|
|
|
ie_len = tvb_get_guint8(tvb, offset+1);
|
|
|
|
item = proto_tree_add_item(tree, hf_bssap_mobile_id_ie, tvb, offset, ie_len+2, ENC_NA);
|
2010-05-10 15:54:57 +00:00
|
|
|
ie_tree = proto_item_add_subtree(item, ett_bssap_mobile_id);
|
|
|
|
|
2012-10-18 17:39:45 +00:00
|
|
|
proto_tree_add_item(ie_tree, hf_bssap_plus_ie, tvb, offset, 1, ENC_BIG_ENDIAN);
|
2010-05-10 15:54:57 +00:00
|
|
|
offset++;
|
2011-09-26 08:25:18 +00:00
|
|
|
proto_tree_add_item(ie_tree, hf_bssap_plus_ie_len, tvb, offset, 1, ENC_BIG_ENDIAN);
|
2010-05-10 15:54:57 +00:00
|
|
|
offset++;
|
|
|
|
/* The rest of the information element is coded as the value part of
|
|
|
|
* the mobile identity IE defined in 3GPP TS 24.008 (not including
|
|
|
|
* 3GPP TS 24.008 IEI and 3GPP TS 24.008 length indicator).
|
|
|
|
*/
|
2011-04-04 14:37:25 +00:00
|
|
|
de_mid(tvb, ie_tree, pinfo, offset, ie_len, NULL, 0);
|
2010-05-10 15:54:57 +00:00
|
|
|
|
|
|
|
|
|
|
|
return offset + ie_len;
|
2006-02-01 17:39:20 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
/* 18.4.18 Mobile station classmark 1 */
|
|
|
|
static int
|
2011-04-04 14:37:25 +00:00
|
|
|
dissect_bssap_mobile_stn_cls_mrk1(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, int offset)
|
2006-02-01 17:39:20 +00:00
|
|
|
{
|
2012-10-18 17:39:45 +00:00
|
|
|
proto_item *item;
|
|
|
|
proto_tree *ie_tree;
|
|
|
|
guint8 ie_len;
|
2011-02-07 18:49:29 +00:00
|
|
|
|
2012-10-18 17:39:45 +00:00
|
|
|
ie_len = tvb_get_guint8(tvb, offset+1);
|
|
|
|
item = proto_tree_add_item(tree, hf_bssap_mobile_stn_cls_mrk1_ie, tvb, offset, ie_len+2, ENC_NA);
|
2010-05-10 15:54:57 +00:00
|
|
|
ie_tree = proto_item_add_subtree(item, ett_bssap_mobile_stn_cls_mrk1);
|
|
|
|
|
2012-10-18 17:39:45 +00:00
|
|
|
proto_tree_add_item(ie_tree, hf_bssap_plus_ie, tvb, offset, 1, ENC_BIG_ENDIAN);
|
2010-05-10 15:54:57 +00:00
|
|
|
offset++;
|
2011-09-26 08:25:18 +00:00
|
|
|
proto_tree_add_item(ie_tree, hf_bssap_plus_ie_len, tvb, offset, 1, ENC_BIG_ENDIAN);
|
2010-05-10 15:54:57 +00:00
|
|
|
offset++;
|
|
|
|
/* The rest of the information element is coded as the value part of
|
|
|
|
* the mobile station classmark 1 IE defined in 3GPP TS 24.008 (not
|
|
|
|
* including 3GPP TS 24.008 IEI)
|
|
|
|
*/
|
2011-04-04 14:37:25 +00:00
|
|
|
de_ms_cm_1(tvb, ie_tree, pinfo, offset, ie_len, NULL, 0);
|
2010-05-10 15:54:57 +00:00
|
|
|
|
|
|
|
return offset + ie_len;
|
2006-02-01 17:39:20 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
/* 18.4.19 Mobile station state */
|
2011-02-07 18:49:29 +00:00
|
|
|
static const value_string bssap_mobile_station_state_values[] = {
|
2010-05-10 15:54:57 +00:00
|
|
|
{ 0x00, "IDLE or PMM-DETACHED" },
|
2011-02-07 18:49:29 +00:00
|
|
|
{ 0x01, "STANDBY or PMM-IDLE, 0 PDP contexts active" },
|
2010-05-10 15:54:57 +00:00
|
|
|
{ 0x02, "STANDBY or PMM-IDLE, 1 or more PDP contexts active" },
|
|
|
|
{ 0x03, "SUSPENDED, 0 PDP contexts active" },
|
|
|
|
{ 0x04, "SUSPENDED, 1 or more PDP contexts active" },
|
|
|
|
{ 0x05, "READY or PMM-CONNECTED, 0 PDP contexts active" },
|
|
|
|
{ 0x06, "READY or PMM-CONNECTED, 1 or more PDP contexts active" },
|
|
|
|
{ 0x07, "IMSI unknown" },
|
|
|
|
{ 0x08, "Information requested not supported" },
|
2011-02-07 18:49:29 +00:00
|
|
|
{ 0, NULL }
|
2006-02-02 15:16:51 +00:00
|
|
|
};
|
2006-02-01 17:39:20 +00:00
|
|
|
static int
|
2006-03-11 12:33:15 +00:00
|
|
|
dissect_bssap_mobile_station_state(tvbuff_t *tvb, proto_tree *tree, int offset)
|
2006-02-01 17:39:20 +00:00
|
|
|
{
|
2012-10-18 17:39:45 +00:00
|
|
|
proto_item *item;
|
|
|
|
proto_tree *ie_tree;
|
|
|
|
guint8 ie_len;
|
2011-02-07 18:49:29 +00:00
|
|
|
|
2012-10-18 17:39:45 +00:00
|
|
|
ie_len = tvb_get_guint8(tvb, offset+1);
|
|
|
|
item = proto_tree_add_item(tree, hf_bssap_mobile_station_state_ie, tvb, offset, ie_len+2, ENC_NA);
|
2010-05-10 15:54:57 +00:00
|
|
|
ie_tree = proto_item_add_subtree(item, ett_bssap_mobile_station_state);
|
|
|
|
|
2012-10-18 17:39:45 +00:00
|
|
|
proto_tree_add_item(ie_tree, hf_bssap_plus_ie, tvb, offset, 1, ENC_BIG_ENDIAN);
|
2010-05-10 15:54:57 +00:00
|
|
|
offset++;
|
2011-09-26 08:25:18 +00:00
|
|
|
proto_tree_add_item(ie_tree, hf_bssap_plus_ie_len, tvb, offset, 1, ENC_BIG_ENDIAN);
|
2010-05-10 15:54:57 +00:00
|
|
|
offset++;
|
|
|
|
/* Mobile station state value (octet 3) */
|
2011-09-26 08:25:18 +00:00
|
|
|
proto_tree_add_item(ie_tree, hf_bssap_mobile_station_state, tvb, offset, ie_len, ENC_BIG_ENDIAN);
|
2010-05-10 15:54:57 +00:00
|
|
|
|
|
|
|
return offset + ie_len;
|
2006-02-01 17:39:20 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
/* 18.4.20 PTMSI */
|
|
|
|
static int
|
2006-03-11 12:33:15 +00:00
|
|
|
dissect_bssap_ptmsi(tvbuff_t *tvb, proto_tree *tree, int offset)
|
2006-02-01 17:39:20 +00:00
|
|
|
{
|
2012-10-18 17:39:45 +00:00
|
|
|
proto_item *item;
|
|
|
|
proto_tree *ie_tree;
|
|
|
|
guint8 ie_len;
|
2011-02-07 18:49:29 +00:00
|
|
|
|
2012-10-18 17:39:45 +00:00
|
|
|
ie_len = tvb_get_guint8(tvb, offset+1);
|
|
|
|
item = proto_tree_add_item(tree, hf_bssap_ptmsi_ie, tvb, offset, ie_len+2, ENC_NA);
|
2010-05-10 15:54:57 +00:00
|
|
|
ie_tree = proto_item_add_subtree(item, ett_bssap_ptmsi);
|
|
|
|
|
2012-10-18 17:39:45 +00:00
|
|
|
proto_tree_add_item(ie_tree, hf_bssap_plus_ie, tvb, offset, 1, ENC_BIG_ENDIAN);
|
2010-05-10 15:54:57 +00:00
|
|
|
offset++;
|
2011-09-26 08:25:18 +00:00
|
|
|
proto_tree_add_item(ie_tree, hf_bssap_plus_ie_len, tvb, offset, 1, ENC_BIG_ENDIAN);
|
2010-05-10 15:54:57 +00:00
|
|
|
offset++;
|
|
|
|
/* The PTMSI consists of 4 octets. It can be coded using a full hexadecimal representation
|
|
|
|
* (see 3GPP TS 23.003).
|
|
|
|
*/
|
2011-10-04 22:44:31 +00:00
|
|
|
proto_tree_add_item(ie_tree, hf_bssap_ptmsi, tvb, offset, ie_len, ENC_NA);
|
2010-05-10 15:54:57 +00:00
|
|
|
|
|
|
|
return offset + ie_len;
|
2006-02-01 17:39:20 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
/* 18.4.21 Reject cause */
|
|
|
|
static int
|
2011-04-04 14:37:25 +00:00
|
|
|
dissect_bssap_reject_cause(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, int offset)
|
2006-02-01 17:39:20 +00:00
|
|
|
{
|
2012-10-18 17:39:45 +00:00
|
|
|
proto_item *item;
|
|
|
|
proto_tree *ie_tree;
|
|
|
|
guint8 ie_len;
|
2011-02-07 18:49:29 +00:00
|
|
|
|
2012-10-18 17:39:45 +00:00
|
|
|
ie_len = tvb_get_guint8(tvb, offset+1);
|
|
|
|
item = proto_tree_add_item(tree, hf_bssap_reject_cause_ie, tvb, offset, ie_len+2, ENC_NA);
|
2010-05-10 15:54:57 +00:00
|
|
|
ie_tree = proto_item_add_subtree(item, ett_bssap_reject_cause);
|
|
|
|
|
2012-10-18 17:39:45 +00:00
|
|
|
proto_tree_add_item(ie_tree, hf_bssap_plus_ie, tvb, offset, 1, ENC_BIG_ENDIAN);
|
2010-05-10 15:54:57 +00:00
|
|
|
offset++;
|
2011-09-26 08:25:18 +00:00
|
|
|
proto_tree_add_item(ie_tree, hf_bssap_plus_ie_len, tvb, offset, 1, ENC_BIG_ENDIAN);
|
2010-05-10 15:54:57 +00:00
|
|
|
offset++;
|
|
|
|
/* The rest of the information element is coded as the value part of
|
|
|
|
* the reject cause IE defined in 3GPP TS 24.008, not including
|
|
|
|
* 3GPP TS 24.008 IEI.
|
|
|
|
*/
|
2011-04-04 14:37:25 +00:00
|
|
|
de_rej_cause(tvb, ie_tree, pinfo, offset, ie_len, NULL, 0);
|
2010-05-10 15:54:57 +00:00
|
|
|
|
|
|
|
return offset + ie_len;
|
2006-02-01 17:39:20 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
/* 18.4.21b Service Area Identification */
|
|
|
|
static int
|
2006-03-11 12:33:15 +00:00
|
|
|
dissect_bssap_service_area_id(tvbuff_t *tvb, proto_tree *tree, int offset)
|
2006-02-01 17:39:20 +00:00
|
|
|
{
|
2012-10-18 17:39:45 +00:00
|
|
|
proto_item *item;
|
|
|
|
proto_tree *ie_tree;
|
|
|
|
guint8 ie_len;
|
2011-02-07 18:49:29 +00:00
|
|
|
|
2012-10-18 17:39:45 +00:00
|
|
|
ie_len = tvb_get_guint8(tvb, offset+1);
|
|
|
|
item = proto_tree_add_item(tree, hf_bssap_service_area_id_ie, tvb, offset, ie_len+2, ENC_NA);
|
2010-05-10 15:54:57 +00:00
|
|
|
ie_tree = proto_item_add_subtree(item, ett_bssap_service_area_id);
|
|
|
|
|
2012-10-18 17:39:45 +00:00
|
|
|
proto_tree_add_item(ie_tree, hf_bssap_plus_ie, tvb, offset, 1, ENC_BIG_ENDIAN);
|
2010-05-10 15:54:57 +00:00
|
|
|
offset++;
|
2011-09-26 08:25:18 +00:00
|
|
|
proto_tree_add_item(ie_tree, hf_bssap_plus_ie_len, tvb, offset, 1, ENC_BIG_ENDIAN);
|
2010-05-10 15:54:57 +00:00
|
|
|
offset++;
|
|
|
|
/* The rest of the information element is coded as the the value part
|
|
|
|
* of the SAI IE defined in 3GPP TS 25.413 (not including
|
|
|
|
* 3GPP TS 25.413 IEI and 3GPP TS 25.413 length indicator).
|
|
|
|
*/
|
2011-10-04 22:44:31 +00:00
|
|
|
proto_tree_add_item(ie_tree, hf_bssap_plus_ie_data, tvb, offset, ie_len, ENC_NA);
|
2010-05-10 15:54:57 +00:00
|
|
|
|
|
|
|
return offset + ie_len;
|
2006-02-01 17:39:20 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
/* 18.4.22 SGSN number */
|
2006-02-02 15:16:51 +00:00
|
|
|
|
2006-02-01 17:39:20 +00:00
|
|
|
static const true_false_string bssap_extension_value = {
|
|
|
|
"No Extension",
|
|
|
|
"Extension"
|
|
|
|
};
|
|
|
|
|
|
|
|
static int
|
2006-03-11 12:33:15 +00:00
|
|
|
dissect_bssap_sgsn_number(tvbuff_t *tvb, proto_tree *tree, int offset)
|
2006-02-01 17:39:20 +00:00
|
|
|
{
|
2012-10-18 17:39:45 +00:00
|
|
|
proto_item *item;
|
|
|
|
proto_tree *ie_tree;
|
|
|
|
guint8 ie_len;
|
|
|
|
tvbuff_t *number_tvb;
|
2010-05-10 15:54:57 +00:00
|
|
|
const char *digit_str;
|
2011-02-07 18:49:29 +00:00
|
|
|
|
2012-10-18 17:39:45 +00:00
|
|
|
ie_len = tvb_get_guint8(tvb, offset+1);
|
|
|
|
item = proto_tree_add_item(tree, hf_bssap_sgsn_nr_ie, tvb, offset, ie_len+2, ENC_NA);
|
2010-05-10 15:54:57 +00:00
|
|
|
ie_tree = proto_item_add_subtree(item, ett_bssap_sgsn_nr);
|
|
|
|
|
2012-10-18 17:39:45 +00:00
|
|
|
proto_tree_add_item(ie_tree, hf_bssap_plus_ie, tvb, offset, 1, ENC_BIG_ENDIAN);
|
2010-05-10 15:54:57 +00:00
|
|
|
offset++;
|
2011-09-26 08:25:18 +00:00
|
|
|
proto_tree_add_item(ie_tree, hf_bssap_plus_ie_len, tvb, offset, 1, ENC_BIG_ENDIAN);
|
2010-05-10 15:54:57 +00:00
|
|
|
offset++;
|
2011-02-07 18:49:29 +00:00
|
|
|
/* The SGSN number is coded as a sequence of TBCD digits (as specified in 3GPP TS 29.002),
|
2010-05-10 15:54:57 +00:00
|
|
|
* compressed two into each octet. The Number is in international E.164 format as indicated by Octet 3
|
2011-02-07 18:49:29 +00:00
|
|
|
* which coding is specified in 3GPP TS 29.002. This is a variable length information element,
|
|
|
|
* and includes a length indicator. The value part of the SGSN number information element
|
2010-05-10 15:54:57 +00:00
|
|
|
* (not including IEI, Length indicator and Octet 3) shall not exceed 15 digits.
|
|
|
|
*/
|
2012-10-18 17:39:45 +00:00
|
|
|
proto_tree_add_item(ie_tree, hf_bssap_extension, tvb, offset, 1, ENC_BIG_ENDIAN);
|
|
|
|
proto_tree_add_item(ie_tree, hf_bssap_type_of_number, tvb, offset, 1, ENC_BIG_ENDIAN);
|
2011-09-26 08:25:18 +00:00
|
|
|
proto_tree_add_item(ie_tree, hf_bssap_numbering_plan_id, tvb, offset, 1, ENC_BIG_ENDIAN);
|
2010-05-10 15:54:57 +00:00
|
|
|
offset++;
|
2014-06-06 14:35:50 +00:00
|
|
|
number_tvb = tvb_new_subset_length(tvb, offset, ie_len-1);
|
2014-08-22 19:44:20 +00:00
|
|
|
digit_str = tvb_bcd_dig_to_wmem_packet_str(number_tvb, 0, -1, NULL, FALSE);
|
2010-05-10 15:54:57 +00:00
|
|
|
proto_tree_add_string(ie_tree, hf_bssap_sgsn_number, number_tvb, 0, -1, digit_str);
|
|
|
|
|
|
|
|
|
|
|
|
return offset + ie_len-1;
|
2006-02-01 17:39:20 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
/* 18.4.23 TMSI */
|
|
|
|
static int
|
2006-03-11 12:33:15 +00:00
|
|
|
dissect_bssap_tmsi(tvbuff_t *tvb, proto_tree *tree, int offset)
|
2006-02-01 17:39:20 +00:00
|
|
|
{
|
2012-10-18 17:39:45 +00:00
|
|
|
proto_item *item;
|
|
|
|
proto_tree *ie_tree;
|
|
|
|
guint8 ie_len;
|
2011-02-07 18:49:29 +00:00
|
|
|
|
2012-10-18 17:39:45 +00:00
|
|
|
ie_len = tvb_get_guint8(tvb, offset+1);
|
|
|
|
item = proto_tree_add_item(tree, hf_bssap_tmsi_ie, tvb, offset, ie_len+2, ENC_NA);
|
2010-05-10 15:54:57 +00:00
|
|
|
ie_tree = proto_item_add_subtree(item, ett_bssap_tmsi);
|
|
|
|
|
2012-10-18 17:39:45 +00:00
|
|
|
proto_tree_add_item(ie_tree, hf_bssap_plus_ie, tvb, offset, 1, ENC_BIG_ENDIAN);
|
2010-05-10 15:54:57 +00:00
|
|
|
offset++;
|
2011-09-26 08:25:18 +00:00
|
|
|
proto_tree_add_item(ie_tree, hf_bssap_plus_ie_len, tvb, offset, 1, ENC_BIG_ENDIAN);
|
2010-05-10 15:54:57 +00:00
|
|
|
offset++;
|
2011-02-07 18:49:29 +00:00
|
|
|
/* The TMSI consists of 4 octets. It can be coded using a full hexadecimal representation
|
2010-05-10 15:54:57 +00:00
|
|
|
* (see 3GPP TS 23.003).
|
|
|
|
*/
|
2011-10-04 22:44:31 +00:00
|
|
|
proto_tree_add_item(ie_tree, hf_bssap_tmsi, tvb, offset, ie_len, ENC_NA);
|
2010-05-10 15:54:57 +00:00
|
|
|
|
|
|
|
|
|
|
|
return offset + ie_len;
|
2006-02-01 17:39:20 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
/* 18.4.24 TMSI status */
|
2006-02-02 15:16:51 +00:00
|
|
|
static const true_false_string bssap_tmsi_flag = {
|
|
|
|
"Valid TMSI available",
|
|
|
|
"No valid TMSI available"
|
|
|
|
};
|
2006-02-01 17:39:20 +00:00
|
|
|
static int
|
2006-03-11 12:33:15 +00:00
|
|
|
dissect_bssap_tmsi_status(tvbuff_t *tvb, proto_tree *tree, int offset)
|
2006-02-01 17:39:20 +00:00
|
|
|
{
|
2012-10-18 17:39:45 +00:00
|
|
|
proto_item *item;
|
|
|
|
proto_tree *ie_tree;
|
|
|
|
guint8 ie_len;
|
2011-02-07 18:49:29 +00:00
|
|
|
|
2012-10-18 17:39:45 +00:00
|
|
|
ie_len = tvb_get_guint8(tvb, offset+1);
|
|
|
|
item = proto_tree_add_item(tree, hf_bssap_tmsi_status_ie, tvb, offset, ie_len+2, ENC_NA);
|
2010-05-10 15:54:57 +00:00
|
|
|
ie_tree = proto_item_add_subtree(item, ett_bssap_tmsi_status);
|
2006-02-01 17:39:20 +00:00
|
|
|
|
2012-10-18 17:39:45 +00:00
|
|
|
proto_tree_add_item(ie_tree, hf_bssap_plus_ie, tvb, offset, 1, ENC_BIG_ENDIAN);
|
2010-05-10 15:54:57 +00:00
|
|
|
offset++;
|
2011-09-26 08:25:18 +00:00
|
|
|
proto_tree_add_item(ie_tree, hf_bssap_plus_ie_len, tvb, offset, 1, ENC_BIG_ENDIAN);
|
2010-05-10 15:54:57 +00:00
|
|
|
offset++;
|
|
|
|
/* TMSI flag (octet 3) */
|
2011-09-26 08:25:18 +00:00
|
|
|
proto_tree_add_item(ie_tree, hf_bssap_tmsi_status, tvb, offset, ie_len, ENC_BIG_ENDIAN);
|
2006-02-01 17:39:20 +00:00
|
|
|
|
|
|
|
|
2010-05-10 15:54:57 +00:00
|
|
|
return offset + ie_len;
|
2006-02-01 17:39:20 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
/* 18.4.25 Uplink Tunnel Payload Control and Info */
|
2006-02-02 15:16:51 +00:00
|
|
|
static const true_false_string bssap_E_flag = {
|
|
|
|
"SGSN received the payload in ciphered",
|
|
|
|
"SGSN did not receive the payload in ciphered form"
|
|
|
|
};
|
|
|
|
/* 3GPP TS 44.064 B.1.1 TOM Protocol Discriminator */
|
2011-02-07 18:49:29 +00:00
|
|
|
static const value_string bssap_tom_prot_disc_values[] = {
|
2010-05-10 15:54:57 +00:00
|
|
|
{ 0x00, "Not specified" },
|
2011-02-07 18:49:29 +00:00
|
|
|
{ 0x01, "TIA/EIA-136" },
|
2010-05-10 15:54:57 +00:00
|
|
|
{ 0x02, "RRLP" },
|
|
|
|
{ 0x03, "Reserved for extension" },
|
2011-02-07 18:49:29 +00:00
|
|
|
{ 0, NULL }
|
2006-02-02 15:16:51 +00:00
|
|
|
};
|
2006-02-01 17:39:20 +00:00
|
|
|
static int
|
2006-05-23 05:35:20 +00:00
|
|
|
dissect_bssap_ulink_tunnel_payload_control_and_info(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset)
|
2006-02-01 17:39:20 +00:00
|
|
|
{
|
2012-10-18 17:39:45 +00:00
|
|
|
proto_item *item;
|
|
|
|
proto_tree *ie_tree;
|
|
|
|
tvbuff_t *next_tvb;
|
|
|
|
guint8 ie_len;
|
|
|
|
guint8 octet;
|
|
|
|
guint8 prot_disc;
|
|
|
|
|
|
|
|
ie_len = tvb_get_guint8(tvb, offset+1);
|
|
|
|
item = proto_tree_add_item(tree, hf_bssap_ulink_tnl_pld_cntrl_amd_inf_ie, tvb, offset, ie_len+2, ENC_NA);
|
2010-05-10 15:54:57 +00:00
|
|
|
ie_tree = proto_item_add_subtree(item, ett_bssap_ulink_tnl_pld_cntrl_amd_inf);
|
|
|
|
|
2012-10-18 17:39:45 +00:00
|
|
|
proto_tree_add_item(ie_tree, hf_bssap_plus_ie, tvb, offset, 1, ENC_BIG_ENDIAN);
|
2010-05-10 15:54:57 +00:00
|
|
|
offset++;
|
2011-09-26 08:25:18 +00:00
|
|
|
proto_tree_add_item(ie_tree, hf_bssap_plus_ie_len, tvb, offset, 1, ENC_BIG_ENDIAN);
|
2010-05-10 15:54:57 +00:00
|
|
|
offset++;
|
|
|
|
/* octet 3 bit 8 Spare */
|
2011-02-07 18:49:29 +00:00
|
|
|
/* octet 3 bit 7 - 4
|
2010-05-10 15:54:57 +00:00
|
|
|
* TOM Protocol Discriminator: Identifies the protocol using tunnelling of non-GSM signalling.
|
|
|
|
* For coding, see 3GPP TS 44.064.
|
|
|
|
*/
|
2011-09-26 08:25:18 +00:00
|
|
|
proto_tree_add_item(ie_tree, hf_bssap_tom_prot_disc, tvb, offset, 1, ENC_BIG_ENDIAN);
|
2012-10-18 17:39:45 +00:00
|
|
|
octet = tvb_get_guint8(tvb, offset);
|
2010-05-10 15:54:57 +00:00
|
|
|
prot_disc = (octet&0x78)>>3;
|
|
|
|
|
|
|
|
/* octet 3 bit 3 E: Cipher Request. When set to 1 indicates that the SGSN received the payload in ciphered form,
|
|
|
|
* when set to 0 indicates that the SGSN did not receive the payload in ciphered form.
|
|
|
|
*/
|
2011-09-26 08:25:18 +00:00
|
|
|
proto_tree_add_item(ie_tree, hf_bssap_e_bit, tvb, offset, 1, ENC_BIG_ENDIAN);
|
2010-05-10 15:54:57 +00:00
|
|
|
|
2011-02-07 18:49:29 +00:00
|
|
|
/* octet 3 bit 2 - 1
|
2010-05-10 15:54:57 +00:00
|
|
|
* Tunnel Priority: Indicates the priority of the Tunnel Payload. For coding, see Table 20.1: Association
|
|
|
|
* between Tunnel Priority and LLC SAPs.
|
|
|
|
*/
|
2011-09-26 08:25:18 +00:00
|
|
|
proto_tree_add_item(ie_tree, hf_bssap_tunnel_prio, tvb, offset, 1, ENC_BIG_ENDIAN);
|
2010-05-10 15:54:57 +00:00
|
|
|
/* Tunnel payload */
|
2014-06-06 14:35:50 +00:00
|
|
|
next_tvb = tvb_new_subset_length(tvb, offset, ie_len - 4);
|
2010-05-10 15:54:57 +00:00
|
|
|
|
|
|
|
if ((prot_disc == 2)&&(rrlp_handle))
|
|
|
|
call_dissector(rrlp_handle, next_tvb, pinfo, ie_tree);
|
|
|
|
else
|
2016-03-20 00:33:14 +00:00
|
|
|
call_data_dissector(next_tvb, pinfo, ie_tree);
|
2010-05-10 15:54:57 +00:00
|
|
|
|
|
|
|
return offset + ie_len;
|
2006-02-01 17:39:20 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
/* 18.4.26 VLR number */
|
|
|
|
static int
|
2006-03-11 12:33:15 +00:00
|
|
|
dissect_bssap_vlr_number(tvbuff_t *tvb, proto_tree *tree, int offset)
|
2006-02-01 17:39:20 +00:00
|
|
|
{
|
2012-10-18 17:39:45 +00:00
|
|
|
proto_item *item;
|
|
|
|
proto_tree *ie_tree;
|
|
|
|
guint8 ie_len;
|
|
|
|
tvbuff_t *number_tvb;
|
2010-05-10 15:54:57 +00:00
|
|
|
const char *digit_str;
|
2011-02-07 18:49:29 +00:00
|
|
|
|
2012-10-18 17:39:45 +00:00
|
|
|
ie_len = tvb_get_guint8(tvb, offset+1);
|
|
|
|
item = proto_tree_add_item(tree, hf_bssap_vlr_number_ie, tvb, offset, ie_len+2, ENC_NA);
|
2010-05-10 15:54:57 +00:00
|
|
|
ie_tree = proto_item_add_subtree(item, ett_bssap_vlr_number);
|
|
|
|
|
2012-10-18 17:39:45 +00:00
|
|
|
proto_tree_add_item(ie_tree, hf_bssap_plus_ie, tvb, offset, 1, ENC_BIG_ENDIAN);
|
2010-05-10 15:54:57 +00:00
|
|
|
offset++;
|
2011-09-26 08:25:18 +00:00
|
|
|
proto_tree_add_item(ie_tree, hf_bssap_plus_ie_len, tvb, offset, 1, ENC_BIG_ENDIAN);
|
2010-05-10 15:54:57 +00:00
|
|
|
offset++;
|
2011-02-07 18:49:29 +00:00
|
|
|
/* The VLR number is coded as a sequence of TBCD digits (as specified in 3GPP TS 29.002),
|
2010-05-10 15:54:57 +00:00
|
|
|
* compressed two into each octet. The Number is in international E.164 format as indicated by Octet 3
|
|
|
|
* which coding is specified in 3GPP TS 29.002. This is a variable length information element,
|
|
|
|
* and includes a length indicator. The value part of the VLR number information element
|
|
|
|
* (not including IEI, length indicator and Octet 3), shall not exceed 15 digits.
|
|
|
|
*/
|
|
|
|
|
2012-10-18 17:39:45 +00:00
|
|
|
proto_tree_add_item(ie_tree, hf_bssap_extension, tvb, offset, 1, ENC_BIG_ENDIAN);
|
|
|
|
proto_tree_add_item(ie_tree, hf_bssap_type_of_number, tvb, offset, 1, ENC_BIG_ENDIAN);
|
2011-09-26 08:25:18 +00:00
|
|
|
proto_tree_add_item(ie_tree, hf_bssap_numbering_plan_id, tvb, offset, 1, ENC_BIG_ENDIAN);
|
2010-05-10 15:54:57 +00:00
|
|
|
offset++;
|
2014-06-06 14:35:50 +00:00
|
|
|
number_tvb = tvb_new_subset_length(tvb, offset, ie_len - 1);
|
2014-08-22 19:44:20 +00:00
|
|
|
digit_str = tvb_bcd_dig_to_wmem_packet_str(number_tvb, 0, -1, NULL, FALSE);
|
2010-05-10 15:54:57 +00:00
|
|
|
proto_tree_add_string(ie_tree, hf_bssap_sgsn_number, number_tvb, 0, -1, digit_str);
|
|
|
|
|
2012-10-18 17:39:45 +00:00
|
|
|
return offset + ie_len - 1;
|
2006-02-01 17:39:20 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
/* 18.4.27 Global CN-Id */
|
|
|
|
static int
|
2009-11-27 22:57:50 +00:00
|
|
|
dissect_bssap_global_cn_id(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset)
|
2006-02-01 17:39:20 +00:00
|
|
|
{
|
2012-10-18 17:39:45 +00:00
|
|
|
proto_item *item;
|
|
|
|
proto_tree *ie_tree;
|
|
|
|
proto_item *plmn_item;
|
|
|
|
proto_tree *plmn_tree;
|
|
|
|
proto_item *global_cn_id_item;
|
|
|
|
proto_tree *global_cn_id_tree;
|
|
|
|
guint8 ie_len;
|
|
|
|
|
|
|
|
ie_len = tvb_get_guint8(tvb, offset+1);
|
|
|
|
item = proto_tree_add_item(tree, hf_bssap_global_cn_id_ie, tvb, offset, ie_len+2, ENC_NA);
|
2010-05-10 15:54:57 +00:00
|
|
|
ie_tree = proto_item_add_subtree(item, ett_bssap_global_cn);
|
|
|
|
|
2012-10-18 17:39:45 +00:00
|
|
|
proto_tree_add_item(ie_tree, hf_bssap_plus_ie, tvb, offset, 1, ENC_BIG_ENDIAN);
|
2010-05-10 15:54:57 +00:00
|
|
|
offset++;
|
2011-09-26 08:25:18 +00:00
|
|
|
proto_tree_add_item(ie_tree, hf_bssap_plus_ie_len, tvb, offset, 1, ENC_BIG_ENDIAN);
|
2010-05-10 15:54:57 +00:00
|
|
|
offset++;
|
2011-02-07 18:49:29 +00:00
|
|
|
/* The Global CN-Id consists of a PLMN-Id and a CN-Id, see 3GPP TS 23.003.
|
2010-05-10 15:54:57 +00:00
|
|
|
* The PLMN-Id consists of MCC and MNC coded according to Location Area Identification
|
|
|
|
* in 3GPP TS 24.008. The CN-Id is an integer defined by O&M.
|
|
|
|
* The least significant bit of the CN-Id field is bit 1 of octet 7 and
|
|
|
|
* the most significant bit is bit 8 of octet 6. If the CN-Id does not fill the field reserved for it,
|
|
|
|
* the rest of the bits are set to '0'.
|
|
|
|
*/
|
2011-10-04 22:44:31 +00:00
|
|
|
global_cn_id_item = proto_tree_add_item(ie_tree, hf_bssap_global_cn_id, tvb, offset, ie_len, ENC_NA);
|
2010-05-10 15:54:57 +00:00
|
|
|
global_cn_id_tree = proto_item_add_subtree(global_cn_id_item, ett_bssap_global_cn_id);
|
|
|
|
/* Octet 3 - 5 PLMN-Id Coded as octets 2 to 4 of the Location Area Identification IE,
|
|
|
|
* defined in 3GPP TS 24.008 (not including 3GPP TS 24.008 IEI and LAC).
|
|
|
|
*/
|
2011-10-04 22:44:31 +00:00
|
|
|
plmn_item = proto_tree_add_item(global_cn_id_tree, hf_bssap_plmn_id, tvb, offset, 3, ENC_NA);
|
2010-05-10 15:54:57 +00:00
|
|
|
plmn_tree = proto_item_add_subtree(plmn_item, ett_bssap_plmn);
|
2015-01-14 12:47:08 +00:00
|
|
|
dissect_e212_mcc_mnc(tvb, pinfo, plmn_tree, offset, E212_NONE, TRUE);
|
2010-05-10 15:54:57 +00:00
|
|
|
offset = offset + 3;
|
|
|
|
|
|
|
|
/* Octet 6 - 7 CN-Id (INTEGER 0..4095) */
|
2011-09-26 08:25:18 +00:00
|
|
|
proto_tree_add_item(global_cn_id_tree, hf_bssap_cn_id, tvb, offset, 2, ENC_BIG_ENDIAN);
|
2010-05-10 15:54:57 +00:00
|
|
|
offset = offset+2;
|
|
|
|
|
|
|
|
return offset;
|
2006-02-01 17:39:20 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
|
2014-11-22 16:54:54 +00:00
|
|
|
static int dissect_bssap_plus(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void* data)
|
2006-02-01 17:39:20 +00:00
|
|
|
{
|
2012-10-18 17:39:45 +00:00
|
|
|
proto_item *bssap_item;
|
|
|
|
proto_tree *bssap_tree;
|
2010-05-10 15:54:57 +00:00
|
|
|
guint8 message_type;
|
|
|
|
int offset = 0;
|
2014-11-22 16:54:54 +00:00
|
|
|
struct _sccp_msg_info_t* sccp_info = (struct _sccp_msg_info_t*)data;
|
2010-05-10 15:54:57 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Make entry in the Protocol column on summary display
|
|
|
|
*/
|
|
|
|
col_set_str(pinfo->cinfo, COL_PROTOCOL, "BSSAP+");
|
2011-02-07 18:49:29 +00:00
|
|
|
|
2014-11-22 16:54:54 +00:00
|
|
|
if (sccp_info && sccp_info->data.co.assoc)
|
|
|
|
sccp_info->data.co.assoc->payload = SCCP_PLOAD_BSSAP;
|
2011-02-07 18:49:29 +00:00
|
|
|
|
2010-05-10 15:54:57 +00:00
|
|
|
/* create the BSSAP+ protocol tree */
|
2011-10-21 02:10:19 +00:00
|
|
|
bssap_item = proto_tree_add_item(tree, proto_bssap, tvb, 0, -1, ENC_NA);
|
2010-05-10 15:54:57 +00:00
|
|
|
bssap_tree = proto_item_add_subtree(bssap_item, ett_bssap);
|
2011-02-07 18:49:29 +00:00
|
|
|
|
2012-10-18 17:39:45 +00:00
|
|
|
message_type = tvb_get_guint8(tvb, offset);
|
|
|
|
proto_tree_add_item(bssap_tree, hf_bssap_plus_message_type, tvb, offset, 1, ENC_BIG_ENDIAN);
|
2010-05-10 15:54:57 +00:00
|
|
|
offset++;
|
|
|
|
|
2012-10-18 17:39:45 +00:00
|
|
|
col_add_str(pinfo->cinfo, COL_INFO, val_to_str_ext(message_type, &bssap_plus_message_type_values_ext, "Unknown %u"));
|
2010-05-10 15:54:57 +00:00
|
|
|
|
2012-10-18 17:39:45 +00:00
|
|
|
switch (message_type) {
|
2010-05-10 15:54:57 +00:00
|
|
|
case BSSAP_PAGING_REQUEST:
|
|
|
|
/* IMSI IMSI 18.4.10 M TLV 6-10 */
|
2014-11-01 20:55:25 +00:00
|
|
|
if (check_ie(tvb, pinfo, tree, &offset, BSSAP_IMSI))
|
2014-08-20 11:19:38 +00:00
|
|
|
offset = dissect_bssap_imsi(tvb, bssap_tree, pinfo, offset);
|
2010-05-10 15:54:57 +00:00
|
|
|
|
2011-02-07 18:49:29 +00:00
|
|
|
/* VLR number VLR number 18.4.26 M TLV 5-11 */
|
2014-11-01 20:55:25 +00:00
|
|
|
if (check_ie(tvb, pinfo, tree, &offset, BSSAP_VLR_NUMBER))
|
2010-05-10 15:54:57 +00:00
|
|
|
offset = dissect_bssap_vlr_number(tvb, bssap_tree, offset);
|
2011-02-07 18:49:29 +00:00
|
|
|
|
2010-05-10 15:54:57 +00:00
|
|
|
/* End of mandatory elements */
|
2014-08-20 11:34:41 +00:00
|
|
|
if (tvb_reported_length_remaining(tvb, offset) <= 0)
|
2014-11-22 16:54:54 +00:00
|
|
|
return tvb_reported_length(tvb);
|
2010-05-10 15:54:57 +00:00
|
|
|
|
|
|
|
/* TMSI TMSI 18.4.23 O TLV 6 */
|
2012-10-18 17:39:45 +00:00
|
|
|
if (check_optional_ie(tvb, offset, BSSAP_TMSI))
|
2010-05-10 15:54:57 +00:00
|
|
|
offset = dissect_bssap_tmsi(tvb, bssap_tree, offset);
|
2014-08-20 11:34:41 +00:00
|
|
|
if (tvb_reported_length_remaining(tvb, offset) <= 0)
|
2014-11-22 16:54:54 +00:00
|
|
|
return tvb_reported_length(tvb);
|
2010-05-10 15:54:57 +00:00
|
|
|
|
|
|
|
/* Location area identifier Location area identifier 18.4.14 O TLV 7 */
|
2012-10-18 17:39:45 +00:00
|
|
|
if (check_optional_ie(tvb, offset, BSSAP_LOC_AREA_ID))
|
2011-04-04 14:37:25 +00:00
|
|
|
offset = dissect_bssap_loc_area_id(tvb, bssap_tree, pinfo, offset);
|
2014-08-20 11:34:41 +00:00
|
|
|
if (tvb_reported_length_remaining(tvb, offset) <= 0)
|
2014-11-22 16:54:54 +00:00
|
|
|
return tvb_reported_length(tvb);
|
2010-05-10 15:54:57 +00:00
|
|
|
|
|
|
|
/* Channel needed Channel needed 18.4.2 O TLV 3 */
|
2012-10-18 17:39:45 +00:00
|
|
|
if (check_optional_ie(tvb, offset, BSSAP_CHANNEL_NEEDED))
|
2011-04-04 14:37:25 +00:00
|
|
|
offset = dissect_bssap_channel_needed(tvb, bssap_tree, pinfo, offset);
|
2014-08-20 11:34:41 +00:00
|
|
|
if (tvb_reported_length_remaining(tvb, offset) <= 0)
|
2014-11-22 16:54:54 +00:00
|
|
|
return tvb_reported_length(tvb);
|
2010-05-10 15:54:57 +00:00
|
|
|
|
|
|
|
/* eMLPP Priority eMLPP Priority 18.4.4 O TLV 3 */
|
2012-10-18 17:39:45 +00:00
|
|
|
if (check_optional_ie(tvb, offset, BSSAP_EMLPP_PRIORITY))
|
2010-05-10 15:54:57 +00:00
|
|
|
offset = dissect_bssap_emlpp_priority(tvb, bssap_tree, offset);
|
2014-08-20 11:34:41 +00:00
|
|
|
if (tvb_reported_length_remaining(tvb, offset) <= 0)
|
2014-11-22 16:54:54 +00:00
|
|
|
return tvb_reported_length(tvb);
|
2010-05-10 15:54:57 +00:00
|
|
|
|
|
|
|
/* Global CN-Id Global CN-Id 18.4.27 O TLV 7 */
|
2012-10-18 17:39:45 +00:00
|
|
|
if (check_optional_ie(tvb, offset, BSSAP_GLOBAL_CN_ID))
|
2010-05-10 15:54:57 +00:00
|
|
|
offset = dissect_bssap_global_cn_id(tvb, pinfo, bssap_tree, offset);
|
2014-08-20 11:34:41 +00:00
|
|
|
if (tvb_reported_length_remaining(tvb, offset) <= 0)
|
2014-11-22 16:54:54 +00:00
|
|
|
return tvb_reported_length(tvb);
|
2010-05-10 15:54:57 +00:00
|
|
|
|
2014-09-11 20:43:00 +00:00
|
|
|
proto_tree_add_item(tree, hf_bssap_extraneous_data, tvb, offset, -1, ENC_NA);
|
2010-05-10 15:54:57 +00:00
|
|
|
break;
|
|
|
|
case BSSAP_PAGING_REJECT: /* 17.1.18 */
|
|
|
|
/* IMSI IMSI 18.4.10 M TLV 6-10 */
|
2014-11-01 20:55:25 +00:00
|
|
|
if (check_ie(tvb, pinfo, tree, &offset, BSSAP_IMSI))
|
2014-08-20 11:19:38 +00:00
|
|
|
offset = dissect_bssap_imsi(tvb, bssap_tree, pinfo, offset);
|
2010-05-10 15:54:57 +00:00
|
|
|
/* Gs Cause Gs Cause 18.4.7 M TLV 3 */
|
2014-11-01 20:55:25 +00:00
|
|
|
if (check_ie(tvb, pinfo, tree, &offset, BSSAP_GS_CAUSE))
|
2010-05-10 15:54:57 +00:00
|
|
|
offset = dissect_bssap_Gs_cause(tvb, bssap_tree, offset);
|
|
|
|
|
2014-08-20 11:34:41 +00:00
|
|
|
if (tvb_reported_length_remaining(tvb, offset) <= 0)
|
2014-11-22 16:54:54 +00:00
|
|
|
return tvb_reported_length(tvb);
|
2014-09-11 20:43:00 +00:00
|
|
|
proto_tree_add_item(tree, hf_bssap_extraneous_data, tvb, offset, -1, ENC_NA);
|
2010-05-10 15:54:57 +00:00
|
|
|
break;
|
|
|
|
case BSSAP_DOWNLINK_TUNNEL_REQUEST: /* 17.1.4 */
|
|
|
|
/* IMSI IMSI 18.4.10 M TLV 6-10 */
|
2014-11-01 20:55:25 +00:00
|
|
|
if (check_ie(tvb, pinfo, tree, &offset, BSSAP_IMSI))
|
2014-08-20 11:19:38 +00:00
|
|
|
offset = dissect_bssap_imsi(tvb, bssap_tree, pinfo, offset);
|
2010-05-10 15:54:57 +00:00
|
|
|
|
|
|
|
/* VLR number VLR number 18.4.26 M TLV 5-11 */
|
2014-11-01 20:55:25 +00:00
|
|
|
if (check_ie(tvb, pinfo, tree, &offset, BSSAP_VLR_NUMBER))
|
2010-05-10 15:54:57 +00:00
|
|
|
offset = dissect_bssap_vlr_number(tvb, bssap_tree, offset);
|
|
|
|
|
2011-02-07 18:49:29 +00:00
|
|
|
/* Downlink Tunnel Payload Control and Info 18.4.3 M TLV 3-223 */
|
2014-11-01 20:55:25 +00:00
|
|
|
if (check_ie(tvb, pinfo, tree, &offset, BSSAP_DLINK_TNL_PLD_CTR_AND_INF))
|
2010-05-10 15:54:57 +00:00
|
|
|
offset = dissect_bssap_dlink_tunnel_payload_control_and_info(tvb, pinfo, bssap_tree, offset);
|
|
|
|
|
2014-08-20 11:34:41 +00:00
|
|
|
if (tvb_reported_length_remaining(tvb, offset) <= 0)
|
2014-11-22 16:54:54 +00:00
|
|
|
return tvb_reported_length(tvb);
|
2014-09-11 20:43:00 +00:00
|
|
|
proto_tree_add_item(tree, hf_bssap_extraneous_data, tvb, offset, -1, ENC_NA);
|
2010-05-10 15:54:57 +00:00
|
|
|
break;
|
|
|
|
case BSSAP_UPLINK_TUNNEL_REQUEST: /* 17.1.23 */
|
2017-12-21 10:00:09 +00:00
|
|
|
/* IMSI IMSI 18.4.10 M TLV 6-10 */
|
|
|
|
if (check_ie(tvb, pinfo, tree, &offset, BSSAP_IMSI))
|
|
|
|
offset = dissect_bssap_imsi(tvb, bssap_tree, pinfo, offset);
|
|
|
|
|
2010-05-10 15:54:57 +00:00
|
|
|
/* SGSN number 18.4.22 M TLV 5-11 */
|
2014-11-01 20:55:25 +00:00
|
|
|
if (check_ie(tvb, pinfo, tree, &offset, BSSAP_SGSN_NUMBER))
|
2010-05-10 15:54:57 +00:00
|
|
|
offset = dissect_bssap_sgsn_number(tvb, bssap_tree, offset);
|
|
|
|
|
|
|
|
/* Uplink Tunnel Payload Control and Info 18.4.25 M TLV 3-223 */
|
2014-11-01 20:55:25 +00:00
|
|
|
if (check_ie(tvb, pinfo, tree, &offset, BSSAP_ULINK_TNL_PLD_CTR_AND_INF))
|
2010-05-10 15:54:57 +00:00
|
|
|
offset = dissect_bssap_ulink_tunnel_payload_control_and_info(tvb, pinfo, bssap_tree, offset);
|
|
|
|
|
2014-08-20 11:34:41 +00:00
|
|
|
if (tvb_reported_length_remaining(tvb, offset) <= 0)
|
2014-11-22 16:54:54 +00:00
|
|
|
return tvb_reported_length(tvb);
|
2014-09-11 20:43:00 +00:00
|
|
|
proto_tree_add_item(tree, hf_bssap_extraneous_data, tvb, offset, -1, ENC_NA);
|
2010-05-10 15:54:57 +00:00
|
|
|
break;
|
|
|
|
case BSSAP_LOCATION_UPDATE_REQUEST: /* 17.1.11 BSSAP+-LOCATION-UPDATE-REQUEST */
|
|
|
|
/* IMSI IMSI 18.4.10 M TLV 6-10 */
|
2014-11-01 20:55:25 +00:00
|
|
|
if (check_ie(tvb, pinfo, tree, &offset, BSSAP_IMSI))
|
2014-08-20 11:19:38 +00:00
|
|
|
offset = dissect_bssap_imsi(tvb, bssap_tree, pinfo, offset);
|
2010-05-10 15:54:57 +00:00
|
|
|
|
|
|
|
/* SGSN number SGSN number 18.4.22 M TLV 5-11 */
|
2014-11-01 20:55:25 +00:00
|
|
|
if (check_ie(tvb, pinfo, tree, &offset, BSSAP_SGSN_NUMBER))
|
2010-05-10 15:54:57 +00:00
|
|
|
offset = dissect_bssap_sgsn_number(tvb, bssap_tree, offset);
|
|
|
|
|
|
|
|
/* Update type GPRS location update type 18.4.6 M TLV 3 */
|
2014-11-01 20:55:25 +00:00
|
|
|
if (check_ie(tvb, pinfo, tree, &offset, BSSAP_GPRS_LOC_UPD_TYPE))
|
2010-05-10 15:54:57 +00:00
|
|
|
offset = dissect_bssap_gprs_location_update_type(tvb, bssap_tree, offset);
|
|
|
|
|
|
|
|
/* New Cell global identity Cell global identity 18.4.1 M TLV 10 */
|
2014-11-01 20:55:25 +00:00
|
|
|
if (check_ie(tvb, pinfo, tree, &offset, BSSAP_CELL_GBL_ID))
|
2011-04-04 14:37:25 +00:00
|
|
|
offset = dissect_bssap_cell_global_id(tvb, bssap_tree, pinfo, offset);
|
2011-02-07 18:49:29 +00:00
|
|
|
|
2010-05-10 15:54:57 +00:00
|
|
|
/* Mobile station classmark Mobile station classmark 1 18.4.18 M TLV 3 */
|
2014-11-01 20:55:25 +00:00
|
|
|
if (check_ie(tvb, pinfo, tree, &offset, BSSAP_MOBILE_STN_CLS_MRK1))
|
2011-04-04 14:37:25 +00:00
|
|
|
offset = dissect_bssap_mobile_stn_cls_mrk1(tvb, bssap_tree, pinfo, offset);
|
2014-08-20 11:34:41 +00:00
|
|
|
if (tvb_reported_length_remaining(tvb, offset) <= 0)
|
2014-11-22 16:54:54 +00:00
|
|
|
return tvb_reported_length(tvb);
|
2011-02-07 18:49:29 +00:00
|
|
|
|
2010-05-10 15:54:57 +00:00
|
|
|
/* Old location area identifier Location area identifier 18.4.14 O TLV 7 */
|
2012-10-18 17:39:45 +00:00
|
|
|
if (check_optional_ie(tvb, offset, BSSAP_LOC_AREA_ID))
|
2011-04-04 14:37:25 +00:00
|
|
|
offset = dissect_bssap_loc_area_id(tvb, bssap_tree, pinfo, offset);
|
2014-08-20 11:34:41 +00:00
|
|
|
if (tvb_reported_length_remaining(tvb, offset) <= 0)
|
2014-11-22 16:54:54 +00:00
|
|
|
return tvb_reported_length(tvb);
|
2011-02-07 18:49:29 +00:00
|
|
|
|
2010-05-10 15:54:57 +00:00
|
|
|
/* TMSI status TMSI status 18.4.24 O TLV 3 */
|
2012-10-18 17:39:45 +00:00
|
|
|
if (check_optional_ie(tvb, offset, BSSAP_TMSI_STATUS))
|
2010-05-10 15:54:57 +00:00
|
|
|
offset = dissect_bssap_tmsi_status(tvb, bssap_tree, offset);
|
2014-08-20 11:34:41 +00:00
|
|
|
if (tvb_reported_length_remaining(tvb, offset) <= 0)
|
2014-11-22 16:54:54 +00:00
|
|
|
return tvb_reported_length(tvb);
|
2010-05-10 15:54:57 +00:00
|
|
|
|
|
|
|
/* New service area identification Service area identification 18.4.21b O TLV 9 */
|
2012-10-18 17:39:45 +00:00
|
|
|
if (check_optional_ie(tvb, offset, BSSAP_SERVICE_AREA_ID))
|
2010-05-10 15:54:57 +00:00
|
|
|
offset = dissect_bssap_service_area_id(tvb, bssap_tree, offset);
|
2014-08-20 11:34:41 +00:00
|
|
|
if (tvb_reported_length_remaining(tvb, offset) <= 0)
|
2014-11-22 16:54:54 +00:00
|
|
|
return tvb_reported_length(tvb);
|
2010-05-10 15:54:57 +00:00
|
|
|
|
|
|
|
/* IMEISV IMEISV 18.4.9 O TLV 10 */
|
2012-10-18 17:39:45 +00:00
|
|
|
if (check_optional_ie(tvb, offset, BSSAP_IMEISV))
|
2019-01-15 14:26:33 +00:00
|
|
|
offset = dissect_bssap_imeisv(tvb, bssap_tree, offset);
|
2014-08-20 11:34:41 +00:00
|
|
|
if (tvb_reported_length_remaining(tvb, offset) <= 0)
|
2014-11-22 16:54:54 +00:00
|
|
|
return tvb_reported_length(tvb);
|
2014-09-11 20:43:00 +00:00
|
|
|
proto_tree_add_item(tree, hf_bssap_extraneous_data, tvb, offset, -1, ENC_NA);
|
2010-05-10 15:54:57 +00:00
|
|
|
break;
|
|
|
|
case BSSAP_LOCATION_UPDATE_ACCEPT: /* 17.1.9 */
|
|
|
|
/* IMSI 18.4.10 M TLV 6-10 */
|
2014-11-01 20:55:25 +00:00
|
|
|
if (check_ie(tvb, pinfo, tree, &offset, BSSAP_IMSI))
|
2014-08-20 11:19:38 +00:00
|
|
|
offset = dissect_bssap_imsi(tvb, bssap_tree, pinfo, offset);
|
2010-05-10 15:54:57 +00:00
|
|
|
|
|
|
|
/* Location area identifier Location area identifier 18.4.14 M TLV 7 */
|
2014-11-01 20:55:25 +00:00
|
|
|
if (check_ie(tvb, pinfo, tree, &offset, BSSAP_LOC_AREA_ID))
|
2011-04-04 14:37:25 +00:00
|
|
|
offset = dissect_bssap_loc_area_id(tvb, bssap_tree, pinfo, offset);
|
2010-05-10 15:54:57 +00:00
|
|
|
|
2014-08-20 11:34:41 +00:00
|
|
|
if (tvb_reported_length_remaining(tvb, offset) <= 0)
|
2014-11-22 16:54:54 +00:00
|
|
|
return tvb_reported_length(tvb);
|
2010-05-10 15:54:57 +00:00
|
|
|
|
2011-02-07 18:49:29 +00:00
|
|
|
/* New TMSI, or IMSI Mobile identity 18.4.17 O TLV 6-10 */
|
2012-10-18 17:39:45 +00:00
|
|
|
if (check_optional_ie(tvb, offset, BSSAP_MOBILE_ID))
|
2011-04-04 14:37:25 +00:00
|
|
|
offset = dissect_bssap_mobile_id(tvb, bssap_tree, pinfo, offset);
|
2014-08-20 11:34:41 +00:00
|
|
|
if (tvb_reported_length_remaining(tvb, offset) <= 0)
|
2014-11-22 16:54:54 +00:00
|
|
|
return tvb_reported_length(tvb);
|
2014-09-11 20:43:00 +00:00
|
|
|
proto_tree_add_item(tree, hf_bssap_extraneous_data, tvb, offset, -1, ENC_NA);
|
2010-05-10 15:54:57 +00:00
|
|
|
break;
|
|
|
|
case BSSAP_LOCATION_UPDATE_REJECT: /* 17.1.10 */
|
|
|
|
/* IMSI IMSI 18.4.10 M TLV 6-10 */
|
2014-11-01 20:55:25 +00:00
|
|
|
if (check_ie(tvb, pinfo, tree, &offset, BSSAP_IMSI))
|
2014-08-20 11:19:38 +00:00
|
|
|
offset = dissect_bssap_imsi(tvb, bssap_tree, pinfo, offset);
|
2010-05-10 15:54:57 +00:00
|
|
|
/* Reject cause Reject cause 18.4.21 M TLV 3 */
|
2014-11-01 20:55:25 +00:00
|
|
|
if (check_ie(tvb, pinfo, tree, &offset, BSSAP_REJECT_CAUSE))
|
2011-04-04 14:37:25 +00:00
|
|
|
offset = dissect_bssap_reject_cause(tvb, bssap_tree, pinfo, offset);
|
2014-08-20 11:34:41 +00:00
|
|
|
if (tvb_reported_length_remaining(tvb, offset) <= 0)
|
2014-11-22 16:54:54 +00:00
|
|
|
return tvb_reported_length(tvb);
|
2014-09-11 20:43:00 +00:00
|
|
|
proto_tree_add_item(tree, hf_bssap_extraneous_data, tvb, offset, -1, ENC_NA);
|
2010-05-10 15:54:57 +00:00
|
|
|
break;
|
|
|
|
case BSSAP_TMSI_REALLOCATION_COMPLETE: /* 17.1.22 */
|
|
|
|
/* IMSI IMSI 18.4.10 M TLV 6-10 */
|
2014-11-01 20:55:25 +00:00
|
|
|
if (check_ie(tvb, pinfo, tree, &offset, BSSAP_IMSI))
|
2014-08-20 11:19:38 +00:00
|
|
|
offset = dissect_bssap_imsi(tvb, bssap_tree, pinfo, offset);
|
2010-05-10 15:54:57 +00:00
|
|
|
|
2014-08-20 11:34:41 +00:00
|
|
|
if (tvb_reported_length_remaining(tvb, offset) <= 0)
|
2014-11-22 16:54:54 +00:00
|
|
|
return tvb_reported_length(tvb);
|
2010-05-10 15:54:57 +00:00
|
|
|
|
|
|
|
/* Cell global identity Cell global identity 18.4.1 O TLV 10 */
|
2012-10-18 17:39:45 +00:00
|
|
|
if (check_optional_ie(tvb, offset, BSSAP_CELL_GBL_ID))
|
2011-04-04 14:37:25 +00:00
|
|
|
offset = dissect_bssap_cell_global_id(tvb, bssap_tree, pinfo, offset);
|
2010-05-10 15:54:57 +00:00
|
|
|
|
2014-08-20 11:34:41 +00:00
|
|
|
if (tvb_reported_length_remaining(tvb, offset) <= 0)
|
2014-11-22 16:54:54 +00:00
|
|
|
return tvb_reported_length(tvb);
|
2010-05-10 15:54:57 +00:00
|
|
|
|
|
|
|
/* Service area identification Service area identification 18.4.21b O TLV 9 */
|
2012-10-18 17:39:45 +00:00
|
|
|
if (check_optional_ie(tvb, offset, BSSAP_SERVICE_AREA_ID))
|
2010-05-10 15:54:57 +00:00
|
|
|
offset = dissect_bssap_service_area_id(tvb, bssap_tree, offset);
|
2014-08-20 11:34:41 +00:00
|
|
|
if (tvb_reported_length_remaining(tvb, offset) <= 0)
|
2014-11-22 16:54:54 +00:00
|
|
|
return tvb_reported_length(tvb);
|
2014-09-11 20:43:00 +00:00
|
|
|
proto_tree_add_item(tree, hf_bssap_extraneous_data, tvb, offset, -1, ENC_NA);
|
2010-05-10 15:54:57 +00:00
|
|
|
break;
|
|
|
|
case BSSAP_ALERT_REQUEST: /* 17.1.3 */
|
|
|
|
/* IMSI IMSI 18.4.10 M TLV 6-10 */
|
2014-11-01 20:55:25 +00:00
|
|
|
if (check_ie(tvb, pinfo, tree, &offset, BSSAP_IMSI))
|
2014-08-20 11:19:38 +00:00
|
|
|
offset = dissect_bssap_imsi(tvb, bssap_tree, pinfo, offset);
|
2010-05-10 15:54:57 +00:00
|
|
|
|
2014-08-20 11:34:41 +00:00
|
|
|
if (tvb_reported_length_remaining(tvb, offset) <= 0)
|
2014-11-22 16:54:54 +00:00
|
|
|
return tvb_reported_length(tvb);
|
2014-09-11 20:43:00 +00:00
|
|
|
proto_tree_add_item(tree, hf_bssap_extraneous_data, tvb, offset, -1, ENC_NA);
|
2010-05-10 15:54:57 +00:00
|
|
|
break;
|
|
|
|
case BSSAP_ALERT_ACK: /* 17.1.1 */
|
|
|
|
/* IMSI IMSI 18.4.10 M TLV 6-10 */
|
2014-11-01 20:55:25 +00:00
|
|
|
if (check_ie(tvb, pinfo, tree, &offset, BSSAP_IMSI))
|
2014-08-20 11:19:38 +00:00
|
|
|
offset = dissect_bssap_imsi(tvb, bssap_tree, pinfo, offset);
|
2010-05-10 15:54:57 +00:00
|
|
|
|
2014-08-20 11:34:41 +00:00
|
|
|
if (tvb_reported_length_remaining(tvb, offset) <= 0)
|
2014-11-22 16:54:54 +00:00
|
|
|
return tvb_reported_length(tvb);
|
2014-09-11 20:43:00 +00:00
|
|
|
proto_tree_add_item(tree, hf_bssap_extraneous_data, tvb, offset, -1, ENC_NA);
|
2010-05-10 15:54:57 +00:00
|
|
|
break;
|
|
|
|
case BSSAP_ALERT_REJECT: /* 17.1.2 */
|
|
|
|
/* IMSI IMSI 18.4.10 M TLV 6-10 */
|
2014-11-01 20:55:25 +00:00
|
|
|
if (check_ie(tvb, pinfo, tree, &offset, BSSAP_IMSI))
|
2014-08-20 11:19:38 +00:00
|
|
|
offset = dissect_bssap_imsi(tvb, bssap_tree, pinfo, offset);
|
2010-05-10 15:54:57 +00:00
|
|
|
|
|
|
|
/* Gs Cause Gs Cause 18.4.7 M TLV 3 */
|
2014-11-01 20:55:25 +00:00
|
|
|
if (check_ie(tvb, pinfo, tree, &offset, BSSAP_GS_CAUSE))
|
2010-05-10 15:54:57 +00:00
|
|
|
offset = dissect_bssap_Gs_cause(tvb, bssap_tree, offset);
|
|
|
|
|
2014-08-20 11:34:41 +00:00
|
|
|
if (tvb_reported_length_remaining(tvb, offset) <= 0)
|
2014-11-22 16:54:54 +00:00
|
|
|
return tvb_reported_length(tvb);
|
2014-09-11 20:43:00 +00:00
|
|
|
proto_tree_add_item(tree, hf_bssap_extraneous_data, tvb, offset, -1, ENC_NA);
|
2010-05-10 15:54:57 +00:00
|
|
|
break;
|
|
|
|
case BSSAP_MS_ACTIVITY_INDICATION: /* 17.1.14 */
|
|
|
|
/* IMSI IMSI 18.4.10 M TLV 6-10 */
|
2014-11-01 20:55:25 +00:00
|
|
|
if (check_ie(tvb, pinfo, tree, &offset, BSSAP_IMSI))
|
2014-08-20 11:19:38 +00:00
|
|
|
offset = dissect_bssap_imsi(tvb, bssap_tree, pinfo, offset);
|
2010-05-10 15:54:57 +00:00
|
|
|
|
2014-08-20 11:34:41 +00:00
|
|
|
if (tvb_reported_length_remaining(tvb, offset) <= 0)
|
2014-11-22 16:54:54 +00:00
|
|
|
return tvb_reported_length(tvb);
|
2010-05-10 15:54:57 +00:00
|
|
|
|
|
|
|
/* Cell global identity Cell global identity 18.4.1 O TLV 10 */
|
2012-10-18 17:39:45 +00:00
|
|
|
if (check_optional_ie(tvb, offset, BSSAP_CELL_GBL_ID))
|
2011-04-04 14:37:25 +00:00
|
|
|
offset = dissect_bssap_cell_global_id(tvb, bssap_tree, pinfo, offset);
|
2010-05-10 15:54:57 +00:00
|
|
|
|
2014-08-20 11:34:41 +00:00
|
|
|
if (tvb_reported_length_remaining(tvb, offset) <= 0)
|
2014-11-22 16:54:54 +00:00
|
|
|
return tvb_reported_length(tvb);
|
2010-05-10 15:54:57 +00:00
|
|
|
|
|
|
|
/* Service area identification Service area identification 18.4.21b O TLV 9 */
|
2012-10-18 17:39:45 +00:00
|
|
|
if (check_optional_ie(tvb, offset, BSSAP_SERVICE_AREA_ID))
|
2010-05-10 15:54:57 +00:00
|
|
|
offset = dissect_bssap_service_area_id(tvb, bssap_tree, offset);
|
2014-08-20 11:34:41 +00:00
|
|
|
if (tvb_reported_length_remaining(tvb, offset) <= 0)
|
2014-11-22 16:54:54 +00:00
|
|
|
return tvb_reported_length(tvb);
|
2014-09-11 20:43:00 +00:00
|
|
|
proto_tree_add_item(tree, hf_bssap_extraneous_data, tvb, offset, -1, ENC_NA);
|
2010-05-10 15:54:57 +00:00
|
|
|
break;
|
|
|
|
case BSSAP_GPRS_DETACH_INDICATION: /* 17.1.6 */
|
|
|
|
/* IMSI IMSI 18.4.10 M TLV 6-10 */
|
2014-11-01 20:55:25 +00:00
|
|
|
if (check_ie(tvb, pinfo, tree, &offset, BSSAP_IMSI))
|
2014-08-20 11:19:38 +00:00
|
|
|
offset = dissect_bssap_imsi(tvb, bssap_tree, pinfo, offset);
|
2010-05-10 15:54:57 +00:00
|
|
|
|
|
|
|
/* SGSN number SGSN number 18.4.22 M TLV 5-11 */
|
2014-11-01 20:55:25 +00:00
|
|
|
if (check_ie(tvb, pinfo, tree, &offset, BSSAP_SGSN_NUMBER))
|
2010-05-10 15:54:57 +00:00
|
|
|
offset = dissect_bssap_sgsn_number(tvb, bssap_tree, offset);
|
|
|
|
|
|
|
|
/* IMSI detach from GPRS service type IMSI detach from GPRS service type 18.4.17 M TLV 3 */
|
2014-11-01 20:55:25 +00:00
|
|
|
if (check_ie(tvb, pinfo, tree, &offset, BSSAP_IMSI_DET_FROM_GPRS_SERV_TYPE))
|
2010-05-10 15:54:57 +00:00
|
|
|
offset = dissect_bssap_imsi_det_from_gprs_serv_type(tvb, bssap_tree, offset);
|
|
|
|
|
2014-08-20 11:34:41 +00:00
|
|
|
if (tvb_reported_length_remaining(tvb, offset) <= 0)
|
2014-11-22 16:54:54 +00:00
|
|
|
return tvb_reported_length(tvb);
|
2010-05-10 15:54:57 +00:00
|
|
|
|
|
|
|
/* Cell global identity Cell global identity 18.4.1 O TLV 10 */
|
2012-10-18 17:39:45 +00:00
|
|
|
if (check_optional_ie(tvb, offset, BSSAP_CELL_GBL_ID))
|
2011-04-04 14:37:25 +00:00
|
|
|
offset = dissect_bssap_cell_global_id(tvb, bssap_tree, pinfo, offset);
|
2010-05-10 15:54:57 +00:00
|
|
|
|
2014-08-20 11:34:41 +00:00
|
|
|
if (tvb_reported_length_remaining(tvb, offset) <= 0)
|
2014-11-22 16:54:54 +00:00
|
|
|
return tvb_reported_length(tvb);
|
2010-05-10 15:54:57 +00:00
|
|
|
|
|
|
|
/* Service area identification Service area identification 18.4.21b O TLV 9 */
|
2012-10-18 17:39:45 +00:00
|
|
|
if (check_optional_ie(tvb, offset, BSSAP_SERVICE_AREA_ID))
|
2010-05-10 15:54:57 +00:00
|
|
|
offset = dissect_bssap_service_area_id(tvb, bssap_tree, offset);
|
2014-08-20 11:34:41 +00:00
|
|
|
if (tvb_reported_length_remaining(tvb, offset) <= 0)
|
2014-11-22 16:54:54 +00:00
|
|
|
return tvb_reported_length(tvb);
|
2014-09-11 20:43:00 +00:00
|
|
|
proto_tree_add_item(tree, hf_bssap_extraneous_data, tvb, offset, -1, ENC_NA);
|
2010-05-10 15:54:57 +00:00
|
|
|
break;
|
|
|
|
case BSSAP_GPRS_DETACH_ACK: /* 17.1.5 */
|
|
|
|
/* IMSI IMSI 18.4.10 M TLV 6-10 */
|
2014-11-01 20:55:25 +00:00
|
|
|
if (check_ie(tvb, pinfo, tree, &offset, BSSAP_IMSI))
|
2014-08-20 11:19:38 +00:00
|
|
|
offset = dissect_bssap_imsi(tvb, bssap_tree, pinfo, offset);
|
2010-05-10 15:54:57 +00:00
|
|
|
|
2014-08-20 11:34:41 +00:00
|
|
|
if (tvb_reported_length_remaining(tvb, offset) <= 0)
|
2014-11-22 16:54:54 +00:00
|
|
|
return tvb_reported_length(tvb);
|
2014-09-11 20:43:00 +00:00
|
|
|
proto_tree_add_item(tree, hf_bssap_extraneous_data, tvb, offset, -1, ENC_NA);
|
2010-05-10 15:54:57 +00:00
|
|
|
break;
|
|
|
|
case BSSAP_IMSI_DETACH_INDICATION: /* 17.1.8 */
|
|
|
|
/* IMSI IMSI 18.4.10 M TLV 6-10 */
|
2014-11-01 20:55:25 +00:00
|
|
|
if (check_ie(tvb, pinfo, tree, &offset, BSSAP_IMSI))
|
2014-08-20 11:19:38 +00:00
|
|
|
offset = dissect_bssap_imsi(tvb, bssap_tree, pinfo, offset);
|
2010-05-10 15:54:57 +00:00
|
|
|
|
|
|
|
/* SGSN number SGSN number 18.4.22 M TLV 5-11 */
|
2014-11-01 20:55:25 +00:00
|
|
|
if (check_ie(tvb, pinfo, tree, &offset, BSSAP_SGSN_NUMBER))
|
2010-05-10 15:54:57 +00:00
|
|
|
offset = dissect_bssap_sgsn_number(tvb, bssap_tree, offset);
|
|
|
|
|
2011-02-07 18:49:29 +00:00
|
|
|
/* Detach type IMSI detach from non-GPRS service type 18.4.11 M TLV 3 */
|
2014-11-01 20:55:25 +00:00
|
|
|
if (check_ie(tvb, pinfo, tree, &offset, BSSAP_IMSI_DET_FROM_NON_GPRS_SERV_TYPE))
|
2010-05-10 15:54:57 +00:00
|
|
|
offset = dissect_bssap_imsi_det_from_non_gprs_serv_type(tvb, bssap_tree, offset);
|
|
|
|
|
2014-08-20 11:34:41 +00:00
|
|
|
if (tvb_reported_length_remaining(tvb, offset) <= 0)
|
2014-11-22 16:54:54 +00:00
|
|
|
return tvb_reported_length(tvb);
|
2010-05-10 15:54:57 +00:00
|
|
|
|
|
|
|
/* Cell global identity Cell global identity 18.4.1 O TLV 10 */
|
2012-10-18 17:39:45 +00:00
|
|
|
if (check_optional_ie(tvb, offset, BSSAP_CELL_GBL_ID))
|
2011-04-04 14:37:25 +00:00
|
|
|
offset = dissect_bssap_cell_global_id(tvb, bssap_tree, pinfo, offset);
|
2010-05-10 15:54:57 +00:00
|
|
|
|
2014-08-20 11:34:41 +00:00
|
|
|
if (tvb_reported_length_remaining(tvb, offset) <= 0)
|
2014-11-22 16:54:54 +00:00
|
|
|
return tvb_reported_length(tvb);
|
2010-05-10 15:54:57 +00:00
|
|
|
|
|
|
|
/* Location information age Location information age 18.4.14 O TLV 4 */
|
2012-10-18 17:39:45 +00:00
|
|
|
if (check_optional_ie(tvb, offset, BSSAP_LOC_INF_AGE))
|
2010-05-10 15:54:57 +00:00
|
|
|
offset = dissect_bssap_location_information_age(tvb, bssap_tree, offset);
|
|
|
|
|
2014-08-20 11:34:41 +00:00
|
|
|
if (tvb_reported_length_remaining(tvb, offset) <= 0)
|
2014-11-22 16:54:54 +00:00
|
|
|
return tvb_reported_length(tvb);
|
2010-05-10 15:54:57 +00:00
|
|
|
|
|
|
|
/* Service area identification Service area identification 18.4.21b O TLV 9 */
|
2012-10-18 17:39:45 +00:00
|
|
|
if (check_optional_ie(tvb, offset, BSSAP_SERVICE_AREA_ID))
|
2010-05-10 15:54:57 +00:00
|
|
|
offset = dissect_bssap_service_area_id(tvb, bssap_tree, offset);
|
2014-08-20 11:34:41 +00:00
|
|
|
if (tvb_reported_length_remaining(tvb, offset) <= 0)
|
2014-11-22 16:54:54 +00:00
|
|
|
return tvb_reported_length(tvb);
|
2014-09-11 20:43:00 +00:00
|
|
|
proto_tree_add_item(tree, hf_bssap_extraneous_data, tvb, offset, -1, ENC_NA);
|
2010-05-10 15:54:57 +00:00
|
|
|
break;
|
|
|
|
case BSSAP_IMSI_DETACH_ACK: /* 17.1.7 */
|
|
|
|
/* IMSI IMSI 18.4.10 M TLV 6-10 */
|
2014-11-01 20:55:25 +00:00
|
|
|
if (check_ie(tvb, pinfo, tree, &offset, BSSAP_IMSI))
|
2014-08-20 11:19:38 +00:00
|
|
|
offset = dissect_bssap_imsi(tvb, bssap_tree, pinfo, offset);
|
2010-05-10 15:54:57 +00:00
|
|
|
|
2014-08-20 11:34:41 +00:00
|
|
|
if (tvb_reported_length_remaining(tvb, offset) <= 0)
|
2014-11-22 16:54:54 +00:00
|
|
|
return tvb_reported_length(tvb);
|
2014-09-11 20:43:00 +00:00
|
|
|
proto_tree_add_item(tree, hf_bssap_extraneous_data, tvb, offset, -1, ENC_NA);
|
2010-05-10 15:54:57 +00:00
|
|
|
break;
|
|
|
|
case BSSAP_RESET_INDICATION: /* 17.1.21 */
|
|
|
|
/* Conditional IE:s */
|
|
|
|
/* SGSN number SGSN number 18.4.22 C TLV 5-11 */
|
2012-10-18 17:39:45 +00:00
|
|
|
if (check_optional_ie(tvb, offset, BSSAP_SGSN_NUMBER)) {
|
2010-05-10 15:54:57 +00:00
|
|
|
offset = dissect_bssap_sgsn_number(tvb, bssap_tree, offset);
|
2014-08-20 11:34:41 +00:00
|
|
|
if (tvb_reported_length_remaining(tvb, offset) <= 0)
|
2014-11-22 16:54:54 +00:00
|
|
|
return tvb_reported_length(tvb);
|
2014-09-11 20:43:00 +00:00
|
|
|
proto_tree_add_item(tree, hf_bssap_extraneous_data, tvb, offset, -1, ENC_NA);
|
2010-05-10 15:54:57 +00:00
|
|
|
}else{
|
|
|
|
/* VLR number VLR number 18.4.26 C TLV 5-11 */
|
2012-10-18 17:39:45 +00:00
|
|
|
if (check_optional_ie(tvb, offset, BSSAP_VLR_NUMBER)) {
|
2010-05-10 15:54:57 +00:00
|
|
|
offset = dissect_bssap_vlr_number(tvb, bssap_tree, offset);
|
2014-08-20 11:34:41 +00:00
|
|
|
if (tvb_reported_length_remaining(tvb, offset) <= 0)
|
2014-11-22 16:54:54 +00:00
|
|
|
return tvb_reported_length(tvb);
|
2014-09-11 20:43:00 +00:00
|
|
|
proto_tree_add_item(tree, hf_bssap_extraneous_data, tvb, offset, -1, ENC_NA);
|
2010-05-10 15:54:57 +00:00
|
|
|
}
|
|
|
|
}
|
2014-11-01 20:55:25 +00:00
|
|
|
proto_tree_add_item(tree, hf_bssap_conditional_ie, tvb, offset, -1, ENC_NA);
|
2010-05-10 15:54:57 +00:00
|
|
|
break;
|
|
|
|
case BSSAP_RESET_ACK: /* 17.1.20 */
|
|
|
|
/* Conditional IE:s */
|
|
|
|
/* SGSN number SGSN number 18.4.22 C TLV 5-11 */
|
2012-10-18 17:39:45 +00:00
|
|
|
if (check_optional_ie(tvb, offset, BSSAP_SGSN_NUMBER)) {
|
2010-05-10 15:54:57 +00:00
|
|
|
offset = dissect_bssap_sgsn_number(tvb, bssap_tree, offset);
|
2014-08-20 11:34:41 +00:00
|
|
|
if (tvb_reported_length_remaining(tvb, offset) <= 0)
|
2014-11-22 16:54:54 +00:00
|
|
|
return tvb_reported_length(tvb);
|
2014-09-11 20:43:00 +00:00
|
|
|
proto_tree_add_item(tree, hf_bssap_extraneous_data, tvb, offset, -1, ENC_NA);
|
2010-05-10 15:54:57 +00:00
|
|
|
}else{
|
|
|
|
/* VLR number VLR number 18.4.26 C TLV 5-11 */
|
2012-10-18 17:39:45 +00:00
|
|
|
if (check_optional_ie(tvb, offset, BSSAP_VLR_NUMBER)) {
|
2010-05-10 15:54:57 +00:00
|
|
|
offset = dissect_bssap_vlr_number(tvb, bssap_tree, offset);
|
2014-08-20 11:34:41 +00:00
|
|
|
if (tvb_reported_length_remaining(tvb, offset) <= 0)
|
2014-11-22 16:54:54 +00:00
|
|
|
return tvb_reported_length(tvb);
|
2014-09-11 20:43:00 +00:00
|
|
|
proto_tree_add_item(tree, hf_bssap_extraneous_data, tvb, offset, -1, ENC_NA);
|
2010-05-10 15:54:57 +00:00
|
|
|
}
|
|
|
|
}
|
2014-11-01 20:55:25 +00:00
|
|
|
proto_tree_add_item(tree, hf_bssap_conditional_ie, tvb, offset, -1, ENC_NA);
|
2010-05-10 15:54:57 +00:00
|
|
|
break;
|
|
|
|
case BSSAP_MS_INFORMATION_REQUEST: /* 17.1.15 */
|
|
|
|
/* IMSI IMSI 18.4.10 M TLV 6-10 */
|
2014-11-01 20:55:25 +00:00
|
|
|
if (check_ie(tvb, pinfo, tree, &offset, BSSAP_IMSI))
|
2014-08-20 11:19:38 +00:00
|
|
|
offset = dissect_bssap_imsi(tvb, bssap_tree, pinfo, offset);
|
2010-05-10 15:54:57 +00:00
|
|
|
|
|
|
|
/* Information requested Information requested 18.4.13 M TLV 3 */
|
2014-11-01 20:55:25 +00:00
|
|
|
if (check_ie(tvb, pinfo, tree, &offset, BSSAP_INFO_REQ))
|
2010-05-10 15:54:57 +00:00
|
|
|
offset = dissect_bssap_info_req(tvb, bssap_tree, offset);
|
|
|
|
|
2014-08-20 11:34:41 +00:00
|
|
|
if (tvb_reported_length_remaining(tvb, offset) <= 0)
|
2014-11-22 16:54:54 +00:00
|
|
|
return tvb_reported_length(tvb);
|
2010-05-10 15:54:57 +00:00
|
|
|
|
2014-09-11 20:43:00 +00:00
|
|
|
proto_tree_add_item(tree, hf_bssap_extraneous_data, tvb, offset, -1, ENC_NA);
|
2010-05-10 15:54:57 +00:00
|
|
|
break;
|
|
|
|
case BSSAP_MS_INFORMATION_RESPONSE: /* 17.1.16 */
|
|
|
|
/* IMSI IMSI 18.4.10 M TLV 6-10 */
|
2014-11-01 20:55:25 +00:00
|
|
|
if (check_ie(tvb, pinfo, tree, &offset, BSSAP_IMSI))
|
2014-08-20 11:19:38 +00:00
|
|
|
offset = dissect_bssap_imsi(tvb, bssap_tree, pinfo, offset);
|
2014-08-20 11:34:41 +00:00
|
|
|
if (tvb_reported_length_remaining(tvb, offset) <= 0)
|
2014-11-22 16:54:54 +00:00
|
|
|
return tvb_reported_length(tvb);
|
2010-05-10 15:54:57 +00:00
|
|
|
|
|
|
|
/* TMSI TMSI 18.4.23 O TLV 6 */
|
2012-10-18 17:39:45 +00:00
|
|
|
if (check_optional_ie(tvb, offset, BSSAP_TMSI))
|
2010-05-10 15:54:57 +00:00
|
|
|
offset = dissect_bssap_tmsi(tvb, bssap_tree, offset);
|
2014-08-20 11:34:41 +00:00
|
|
|
if (tvb_reported_length_remaining(tvb, offset) <= 0)
|
2014-11-22 16:54:54 +00:00
|
|
|
return tvb_reported_length(tvb);
|
2010-05-10 15:54:57 +00:00
|
|
|
|
|
|
|
/* PTMSI PTMSI 18.4.20 O TLV 6 BSSAP_PTMSI*/
|
2012-10-18 17:39:45 +00:00
|
|
|
if (check_optional_ie(tvb, offset, BSSAP_PTMSI))
|
2010-05-10 15:54:57 +00:00
|
|
|
offset = dissect_bssap_ptmsi(tvb, bssap_tree, offset);
|
2014-08-20 11:34:41 +00:00
|
|
|
if (tvb_reported_length_remaining(tvb, offset) <= 0)
|
2014-11-22 16:54:54 +00:00
|
|
|
return tvb_reported_length(tvb);
|
2010-05-10 15:54:57 +00:00
|
|
|
|
|
|
|
/* IMEI IMEI 18.4.8 O TLV 10 */
|
2012-10-18 17:39:45 +00:00
|
|
|
if (check_optional_ie(tvb, offset, BSSAP_IMEI))
|
2010-05-10 15:54:57 +00:00
|
|
|
offset = dissect_bssap_imei(tvb, bssap_tree, offset);
|
2014-08-20 11:34:41 +00:00
|
|
|
if (tvb_reported_length_remaining(tvb, offset) <= 0)
|
2014-11-22 16:54:54 +00:00
|
|
|
return tvb_reported_length(tvb);
|
2010-05-10 15:54:57 +00:00
|
|
|
/* IMEISV IMEISV 18.4.9 O TLV 10 BSSAP_IMEISV*/
|
2012-10-18 17:39:45 +00:00
|
|
|
if (check_optional_ie(tvb, offset, BSSAP_IMEISV))
|
2019-01-15 14:26:33 +00:00
|
|
|
offset = dissect_bssap_imeisv(tvb, bssap_tree, offset);
|
2014-08-20 11:34:41 +00:00
|
|
|
if (tvb_reported_length_remaining(tvb, offset) <= 0)
|
2014-11-22 16:54:54 +00:00
|
|
|
return tvb_reported_length(tvb);
|
2010-05-10 15:54:57 +00:00
|
|
|
|
|
|
|
/* Cell global identity Cell global identity 18.4.1 O TLV 10 */
|
2012-10-18 17:39:45 +00:00
|
|
|
if (check_optional_ie(tvb, offset, BSSAP_CELL_GBL_ID))
|
2011-04-04 14:37:25 +00:00
|
|
|
offset = dissect_bssap_cell_global_id(tvb, bssap_tree, pinfo, offset);
|
2010-05-10 15:54:57 +00:00
|
|
|
|
2014-08-20 11:34:41 +00:00
|
|
|
if (tvb_reported_length_remaining(tvb, offset) <= 0)
|
2014-11-22 16:54:54 +00:00
|
|
|
return tvb_reported_length(tvb);
|
2010-05-10 15:54:57 +00:00
|
|
|
/* Location information age Location information age 18.4.15 O TLV 4 */
|
2012-10-18 17:39:45 +00:00
|
|
|
if (check_optional_ie(tvb, offset, BSSAP_LOC_INF_AGE))
|
2010-05-10 15:54:57 +00:00
|
|
|
offset = dissect_bssap_location_information_age(tvb, bssap_tree, offset);
|
|
|
|
|
2014-08-20 11:34:41 +00:00
|
|
|
if (tvb_reported_length_remaining(tvb, offset) <= 0)
|
2014-11-22 16:54:54 +00:00
|
|
|
return tvb_reported_length(tvb);
|
2010-05-10 15:54:57 +00:00
|
|
|
|
|
|
|
/* Mobile station state Mobile station state 18.4.19 O TLV 3 */
|
2012-10-18 17:39:45 +00:00
|
|
|
if (check_optional_ie(tvb, offset, BSSAP_MOBILE_STN_STATE))
|
2010-05-10 15:54:57 +00:00
|
|
|
offset = dissect_bssap_mobile_station_state(tvb, bssap_tree, offset);
|
|
|
|
|
2014-08-20 11:34:41 +00:00
|
|
|
if (tvb_reported_length_remaining(tvb, offset) <= 0)
|
2014-11-22 16:54:54 +00:00
|
|
|
return tvb_reported_length(tvb);
|
2010-05-10 15:54:57 +00:00
|
|
|
|
|
|
|
/* Service area identification Service area identification 18.4.21b O TLV 9 */
|
2012-10-18 17:39:45 +00:00
|
|
|
if (check_optional_ie(tvb, offset, BSSAP_SERVICE_AREA_ID))
|
2010-05-10 15:54:57 +00:00
|
|
|
offset = dissect_bssap_service_area_id(tvb, bssap_tree, offset);
|
2014-08-20 11:34:41 +00:00
|
|
|
if (tvb_reported_length_remaining(tvb, offset) <= 0)
|
2014-11-22 16:54:54 +00:00
|
|
|
return tvb_reported_length(tvb);
|
2014-09-11 20:43:00 +00:00
|
|
|
proto_tree_add_item(tree, hf_bssap_extraneous_data, tvb, offset, -1, ENC_NA);
|
2010-05-10 15:54:57 +00:00
|
|
|
break;
|
|
|
|
case BSSAP_MM_INFORMATION_REQUEST: /* 17.1.12 */
|
|
|
|
/* IMSI IMSI 18.4.10 M TLV 6-10 */
|
2014-11-01 20:55:25 +00:00
|
|
|
if (check_ie(tvb, pinfo, tree, &offset, BSSAP_IMSI))
|
2014-08-20 11:19:38 +00:00
|
|
|
offset = dissect_bssap_imsi(tvb, bssap_tree, pinfo, offset);
|
2010-05-10 15:54:57 +00:00
|
|
|
|
2014-08-20 11:34:41 +00:00
|
|
|
if (tvb_reported_length_remaining(tvb, offset) <= 0)
|
2014-11-22 16:54:54 +00:00
|
|
|
return tvb_reported_length(tvb);
|
2010-05-10 15:54:57 +00:00
|
|
|
/* MM information MM information 18.4.16 O TLV 3-n */
|
2012-10-18 17:39:45 +00:00
|
|
|
if (check_optional_ie(tvb, offset, BSSAP_MM_INFORMATION))
|
2011-04-04 07:45:34 +00:00
|
|
|
offset = dissect_bssap_MM_information(tvb, bssap_tree, pinfo, offset);
|
2014-08-20 11:34:41 +00:00
|
|
|
if (tvb_reported_length_remaining(tvb, offset) <= 0)
|
2014-11-22 16:54:54 +00:00
|
|
|
return tvb_reported_length(tvb);
|
2014-09-11 20:43:00 +00:00
|
|
|
proto_tree_add_item(tree, hf_bssap_extraneous_data, tvb, offset, -1, ENC_NA);
|
2010-05-10 15:54:57 +00:00
|
|
|
break;
|
|
|
|
case BSSAP_MOBILE_STATUS: /* 17.1.13 */
|
|
|
|
/* IMSI IMSI 18.4.10 O TLV 6-10 */
|
2012-10-18 17:39:45 +00:00
|
|
|
if (check_optional_ie(tvb, offset, BSSAP_IMSI))
|
2014-08-20 11:19:38 +00:00
|
|
|
offset = dissect_bssap_imsi(tvb, bssap_tree, pinfo, offset);
|
2010-05-10 15:54:57 +00:00
|
|
|
/* Gs Cause Gs Cause 18.4.7 M TLV 3 */
|
2014-11-01 20:55:25 +00:00
|
|
|
if (check_ie(tvb, pinfo, tree, &offset, BSSAP_GS_CAUSE))
|
2010-05-10 15:54:57 +00:00
|
|
|
offset = dissect_bssap_Gs_cause(tvb, bssap_tree, offset);
|
|
|
|
|
|
|
|
/* Erroneous message Erroneous message 18.4.5 M TLV 3-n BSSAP_ERRONEOUS_MSG*/
|
2014-11-01 20:55:25 +00:00
|
|
|
if (check_ie(tvb, pinfo, tree, &offset, BSSAP_ERRONEOUS_MSG))
|
2010-05-10 15:54:57 +00:00
|
|
|
offset = dissect_bssap_gprs_erroneous_msg(tvb, bssap_tree, offset);
|
|
|
|
|
2014-08-20 11:34:41 +00:00
|
|
|
if (tvb_reported_length_remaining(tvb, offset) <= 0)
|
2014-11-22 16:54:54 +00:00
|
|
|
return tvb_reported_length(tvb);
|
2014-09-11 20:43:00 +00:00
|
|
|
proto_tree_add_item(tree, hf_bssap_extraneous_data, tvb, offset, -1, ENC_NA);
|
2010-05-10 15:54:57 +00:00
|
|
|
break;
|
|
|
|
case BSSAP_MS_UNREACHABLE: /* 17.1.17 */
|
|
|
|
/* IMSI IMSI 18.4.10 M TLV 6-10 */
|
2014-11-01 20:55:25 +00:00
|
|
|
if (check_ie(tvb, pinfo, tree, &offset, BSSAP_IMSI))
|
2014-08-20 11:19:38 +00:00
|
|
|
offset = dissect_bssap_imsi(tvb, bssap_tree, pinfo, offset);
|
2010-05-10 15:54:57 +00:00
|
|
|
|
|
|
|
/* Gs Cause Gs Cause 18.4.7 M TLV 3 */
|
2014-11-01 20:55:25 +00:00
|
|
|
if (check_ie(tvb, pinfo, tree, &offset, BSSAP_GS_CAUSE))
|
2010-05-10 15:54:57 +00:00
|
|
|
offset = dissect_bssap_Gs_cause(tvb, bssap_tree, offset);
|
|
|
|
|
2014-08-20 11:34:41 +00:00
|
|
|
if (tvb_reported_length_remaining(tvb, offset) <= 0)
|
2014-11-22 16:54:54 +00:00
|
|
|
return tvb_reported_length(tvb);
|
2014-09-11 20:43:00 +00:00
|
|
|
proto_tree_add_item(tree, hf_bssap_extraneous_data, tvb, offset, -1, ENC_NA);
|
2010-05-10 15:54:57 +00:00
|
|
|
break;
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
2014-11-22 16:54:54 +00:00
|
|
|
|
|
|
|
return tvb_reported_length(tvb);
|
2006-02-01 17:39:20 +00:00
|
|
|
}
|
|
|
|
|
2003-10-22 20:59:02 +00:00
|
|
|
static gboolean
|
2014-11-22 16:54:54 +00:00
|
|
|
dissect_bssap_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
|
2003-10-22 20:59:02 +00:00
|
|
|
{
|
2010-05-10 15:54:57 +00:00
|
|
|
/* Is it a BSSAP/BSAP packet?
|
|
|
|
* If octet_1 == 0x00 and octet_2 == length(tvb) - 2
|
|
|
|
* or if octet_1 == 0x01 and octet_3 == length(tvb) - 3
|
|
|
|
* then we'll assume it is a bssap packet
|
|
|
|
* If octet_1 == 0x00 a further check is done
|
|
|
|
* to differentiate a BSSMAP BLOCK message from a
|
|
|
|
* RANAP DirectTransfer (under certain conditions)
|
|
|
|
*/
|
|
|
|
switch (tvb_get_guint8(tvb, 0))
|
|
|
|
{
|
|
|
|
case 0x00:
|
2014-08-20 11:34:41 +00:00
|
|
|
if (tvb_get_guint8(tvb, 1) != (tvb_reported_length(tvb) - 2)) {
|
2012-10-18 17:39:45 +00:00
|
|
|
return(FALSE);
|
|
|
|
}
|
2011-02-07 18:49:29 +00:00
|
|
|
if (tvb_get_guint8(tvb, 2) == 0x40 && tvb_get_guint8(tvb, 3) != 0x01) {
|
2012-10-18 17:39:45 +00:00
|
|
|
return(FALSE);
|
|
|
|
}
|
2010-05-10 15:54:57 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case 0x01:
|
2014-08-20 11:34:41 +00:00
|
|
|
if (tvb_get_guint8(tvb, 2) != (tvb_reported_length(tvb) - 3)) {
|
2012-10-18 17:39:45 +00:00
|
|
|
return(FALSE);
|
|
|
|
}
|
2010-05-10 15:54:57 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
default:
|
2012-10-18 17:39:45 +00:00
|
|
|
return(FALSE);
|
2010-05-10 15:54:57 +00:00
|
|
|
}
|
|
|
|
|
2014-11-22 16:54:54 +00:00
|
|
|
dissect_bssap(tvb, pinfo, tree, data);
|
2010-05-10 15:54:57 +00:00
|
|
|
|
|
|
|
return(TRUE);
|
2003-10-22 20:59:02 +00:00
|
|
|
}
|
|
|
|
|
2006-05-28 19:49:07 +00:00
|
|
|
/* Register the protocol with Wireshark */
|
2003-10-22 20:59:02 +00:00
|
|
|
void
|
|
|
|
proto_register_bssap(void)
|
|
|
|
{
|
2010-05-10 15:54:57 +00:00
|
|
|
module_t *bssap_module;
|
2019-03-08 12:59:40 +00:00
|
|
|
module_t *bssap_plus_module;
|
2014-11-01 20:55:25 +00:00
|
|
|
expert_module_t* expert_bssap;
|
2010-05-10 15:54:57 +00:00
|
|
|
|
|
|
|
/* Setup list of header fields */
|
|
|
|
static hf_register_info hf[] = {
|
|
|
|
{ &hf_bssap_pdu_type,
|
|
|
|
{ "Message Type", "bssap.pdu_type",
|
|
|
|
FT_UINT8, BASE_HEX, VALS(bssap_pdu_type_values), 0x0,
|
|
|
|
NULL, HFILL}},
|
2012-10-18 17:39:45 +00:00
|
|
|
|
2010-05-10 15:54:57 +00:00
|
|
|
{ &hf_bsap_pdu_type,
|
|
|
|
{ "Message Type", "bsap.pdu_type",
|
|
|
|
FT_UINT8, BASE_HEX, VALS(bsap_pdu_type_values), 0x0,
|
|
|
|
NULL, HFILL}},
|
2012-10-18 17:39:45 +00:00
|
|
|
|
2010-05-10 15:54:57 +00:00
|
|
|
{ &hf_bssap_dlci_cc,
|
|
|
|
{ "Control Channel", "bssap.dlci.cc",
|
|
|
|
FT_UINT8, BASE_HEX, VALS(bssap_cc_values), CC_MASK,
|
|
|
|
NULL, HFILL}},
|
2012-10-18 17:39:45 +00:00
|
|
|
|
2010-05-10 15:54:57 +00:00
|
|
|
{ &hf_bsap_dlci_cc,
|
|
|
|
{ "Control Channel", "bsap.dlci.cc",
|
|
|
|
FT_UINT8, BASE_HEX, VALS(bsap_cc_values), CC_MASK,
|
|
|
|
NULL, HFILL}},
|
2012-10-18 17:39:45 +00:00
|
|
|
|
2010-05-10 15:54:57 +00:00
|
|
|
{ &hf_bssap_dlci_spare,
|
|
|
|
{ "Spare", "bssap.dlci.spare",
|
|
|
|
FT_UINT8, BASE_HEX, NULL, SPARE_MASK,
|
|
|
|
NULL, HFILL}},
|
2012-10-18 17:39:45 +00:00
|
|
|
|
2010-05-10 15:54:57 +00:00
|
|
|
{ &hf_bsap_dlci_rsvd,
|
|
|
|
{ "Reserved", "bsap.dlci.rsvd",
|
|
|
|
FT_UINT8, BASE_HEX, NULL, SPARE_MASK,
|
|
|
|
NULL, HFILL}},
|
2012-10-18 17:39:45 +00:00
|
|
|
|
2010-05-10 15:54:57 +00:00
|
|
|
{ &hf_bssap_dlci_sapi,
|
|
|
|
{ "SAPI", "bssap.dlci.sapi",
|
|
|
|
FT_UINT8, BASE_HEX, VALS(bssap_sapi_values), SAPI_MASK,
|
|
|
|
NULL, HFILL}},
|
2012-10-18 17:39:45 +00:00
|
|
|
|
2010-05-10 15:54:57 +00:00
|
|
|
{ &hf_bsap_dlci_sapi,
|
|
|
|
{ "SAPI", "bsap.dlci.sapi",
|
|
|
|
FT_UINT8, BASE_HEX, VALS(bsap_sapi_values), SAPI_MASK,
|
|
|
|
NULL, HFILL}},
|
2012-10-18 17:39:45 +00:00
|
|
|
|
2010-05-10 15:54:57 +00:00
|
|
|
{ &hf_bssap_length,
|
|
|
|
{ "Length", "bssap.length",
|
|
|
|
FT_UINT8, BASE_DEC, NULL, 0x0,
|
|
|
|
NULL, HFILL}},
|
|
|
|
|
2012-10-18 17:39:45 +00:00
|
|
|
|
2010-05-10 15:54:57 +00:00
|
|
|
{ &hf_bssap_plus_message_type,
|
|
|
|
{ "Message Type", "bssap_plus.msg_type",
|
2012-10-18 17:39:45 +00:00
|
|
|
FT_UINT8, BASE_DEC | BASE_EXT_STRING, &bssap_plus_message_type_values_ext, 0x0,
|
2010-05-10 15:54:57 +00:00
|
|
|
NULL, HFILL}},
|
2012-10-18 17:39:45 +00:00
|
|
|
|
2010-05-10 15:54:57 +00:00
|
|
|
{ &hf_bssap_plus_ie,
|
|
|
|
{ "IEI", "bssap_plus.iei",
|
2012-10-18 17:39:45 +00:00
|
|
|
FT_UINT8, BASE_DEC | BASE_EXT_STRING, &bssap_plus_ie_id_values_ext, 0x0,
|
2010-05-10 15:54:57 +00:00
|
|
|
NULL, HFILL}},
|
2012-10-18 17:39:45 +00:00
|
|
|
|
2010-05-10 15:54:57 +00:00
|
|
|
{ &hf_bssap_plus_ie_len,
|
2012-01-24 18:19:35 +00:00
|
|
|
{ "Length indicator", "bssap_plus.ie_len",
|
2010-05-10 15:54:57 +00:00
|
|
|
FT_UINT8, BASE_DEC, NULL, 0x0,
|
|
|
|
NULL, HFILL}},
|
2012-10-18 17:39:45 +00:00
|
|
|
|
2010-05-10 15:54:57 +00:00
|
|
|
{ &hf_bssap_extension,
|
|
|
|
{ "Extension", "bssap.extension",
|
|
|
|
FT_BOOLEAN, 8, TFS(&bssap_extension_value), 0x80,
|
|
|
|
NULL, HFILL }},
|
2012-10-18 17:39:45 +00:00
|
|
|
|
2010-05-10 15:54:57 +00:00
|
|
|
{ &hf_bssap_type_of_number,
|
|
|
|
{ "Type of number", "bssap.type_of_number",
|
2012-07-31 20:44:34 +00:00
|
|
|
FT_UINT8, BASE_HEX, VALS(gsm_a_dtap_type_of_number_values), 0x70,
|
2010-05-10 15:54:57 +00:00
|
|
|
NULL, HFILL }},
|
2012-10-18 17:39:45 +00:00
|
|
|
|
2010-05-10 15:54:57 +00:00
|
|
|
{ &hf_bssap_numbering_plan_id,
|
|
|
|
{ "Numbering plan identification", "bssap.number_plan",
|
2012-07-31 20:44:34 +00:00
|
|
|
FT_UINT8, BASE_HEX, VALS(gsm_a_dtap_numbering_plan_id_values), 0x0f,
|
2010-05-10 15:54:57 +00:00
|
|
|
NULL, HFILL }},
|
2012-10-18 17:39:45 +00:00
|
|
|
|
2010-05-10 15:54:57 +00:00
|
|
|
{ &hf_bssap_sgsn_number,
|
|
|
|
{ "SGSN number", "bssap.sgsn_number",
|
|
|
|
FT_STRING, BASE_NONE, NULL, 0,
|
|
|
|
NULL, HFILL }},
|
2012-10-18 17:39:45 +00:00
|
|
|
|
2013-01-31 17:55:31 +00:00
|
|
|
#if 0
|
2010-05-10 15:54:57 +00:00
|
|
|
{ &hf_bssap_vlr_number,
|
|
|
|
{ "VLR number", "bssap.vlr_number",
|
|
|
|
FT_STRING, BASE_NONE, NULL, 0,
|
|
|
|
NULL, HFILL }},
|
2013-01-31 17:55:31 +00:00
|
|
|
#endif
|
2012-10-18 17:39:45 +00:00
|
|
|
|
2010-05-10 15:54:57 +00:00
|
|
|
{ &hf_bssap_cell_global_id_ie,
|
|
|
|
{ "Cell global identity IE", "bssap.cell_global_id_ie",
|
|
|
|
FT_NONE, BASE_NONE, NULL, 0,
|
|
|
|
NULL, HFILL }},
|
2012-10-18 17:39:45 +00:00
|
|
|
|
2010-05-10 15:54:57 +00:00
|
|
|
{ &hf_bssap_channel_needed_ie,
|
2012-01-19 19:15:13 +00:00
|
|
|
{ "Channel needed IE", "bssap.channel_needed_ie",
|
2010-05-10 15:54:57 +00:00
|
|
|
FT_NONE, BASE_NONE, NULL, 0,
|
|
|
|
NULL, HFILL }},
|
2012-10-18 17:39:45 +00:00
|
|
|
|
2010-05-10 15:54:57 +00:00
|
|
|
{ &hf_bssap_dlink_tnl_pld_cntrl_amd_inf_ie,
|
|
|
|
{ "Downlink Tunnel Payload Control and Info IE", "bssap.dlink_tnl_pld_cntrl_amd_inf_ie",
|
|
|
|
FT_NONE, BASE_NONE, NULL, 0,
|
|
|
|
NULL, HFILL }},
|
2012-10-18 17:39:45 +00:00
|
|
|
|
2010-05-10 15:54:57 +00:00
|
|
|
{ &hf_bssap_ulink_tnl_pld_cntrl_amd_inf_ie,
|
|
|
|
{ "Uplink Tunnel Payload Control and Info IE", "bssap.ulink_tnl_pld_cntrl_amd_inf_ie",
|
|
|
|
FT_NONE, BASE_NONE, NULL, 0,
|
|
|
|
NULL, HFILL }},
|
2012-10-18 17:39:45 +00:00
|
|
|
|
2010-05-10 15:54:57 +00:00
|
|
|
{ &hf_bssap_emlpp_prio_ie,
|
|
|
|
{ "eMLPP Priority IE", "bssap.emlpp_prio_ie",
|
|
|
|
FT_NONE, BASE_NONE, NULL, 0,
|
|
|
|
NULL, HFILL }},
|
2012-10-18 17:39:45 +00:00
|
|
|
|
2010-05-10 15:54:57 +00:00
|
|
|
{ &hf_bssap_gprs_erroneous_msg_ie,
|
|
|
|
{ "Erroneous message IE", "bssap.erroneous_msg_ie",
|
|
|
|
FT_NONE, BASE_NONE, NULL, 0,
|
|
|
|
NULL, HFILL }},
|
2012-10-18 17:39:45 +00:00
|
|
|
|
2010-05-10 15:54:57 +00:00
|
|
|
{ &hf_bssap_gprs_loc_upd_type_ie,
|
|
|
|
{ "GPRS location update type IE", "bssap.loc_upd_type_ie",
|
|
|
|
FT_NONE, BASE_NONE, NULL, 0,
|
|
|
|
NULL, HFILL }},
|
2012-10-18 17:39:45 +00:00
|
|
|
|
2010-05-10 15:54:57 +00:00
|
|
|
{ &hf_bssap_Gs_cause_ie,
|
|
|
|
{ "Gs Cause IE", "bssap.Gs_cause_ie",
|
|
|
|
FT_NONE, BASE_NONE, NULL, 0,
|
|
|
|
NULL, HFILL }},
|
2012-10-18 17:39:45 +00:00
|
|
|
|
2010-05-10 15:54:57 +00:00
|
|
|
{ &hf_bssap_imei_ie,
|
|
|
|
{ "IMEI IE", "bssap.imei_ie",
|
|
|
|
FT_NONE, BASE_NONE, NULL, 0,
|
|
|
|
NULL, HFILL }},
|
2012-10-18 17:39:45 +00:00
|
|
|
|
2019-01-15 14:26:33 +00:00
|
|
|
{ &hf_bssap_imeisv_ie,
|
|
|
|
{ "IMEISV IE", "bssap.imeisv",
|
2010-05-10 15:54:57 +00:00
|
|
|
FT_NONE, BASE_NONE, NULL, 0,
|
|
|
|
NULL, HFILL }},
|
2012-10-18 17:39:45 +00:00
|
|
|
|
2010-05-10 15:54:57 +00:00
|
|
|
{ &hf_bssap_imsi_ie,
|
|
|
|
{ "IMSI IE", "bssap.imsi_ie",
|
|
|
|
FT_NONE, BASE_NONE, NULL, 0,
|
|
|
|
NULL, HFILL }},
|
2012-10-18 17:39:45 +00:00
|
|
|
|
2010-05-10 15:54:57 +00:00
|
|
|
{ &hf_bssap_imsi_det_from_gprs_serv_type_ie,
|
|
|
|
{ "IMSI detach from GPRS service type IE", "bssap.msi_det_from_gprs_serv_type_ie",
|
|
|
|
FT_NONE, BASE_NONE, NULL, 0,
|
|
|
|
NULL, HFILL }},
|
2012-10-18 17:39:45 +00:00
|
|
|
|
2010-05-10 15:54:57 +00:00
|
|
|
{ &hf_bssap_imsi_det_from_non_gprs_serv_type_ie,
|
|
|
|
{ "IMSI detach from non-GPRS service IE", "bssap.msi_det_from_non_gprs_serv_type_ie",
|
|
|
|
FT_NONE, BASE_NONE, NULL, 0,
|
|
|
|
NULL, HFILL }},
|
2012-10-18 17:39:45 +00:00
|
|
|
|
2010-05-10 15:54:57 +00:00
|
|
|
{ &hf_bssap_info_req_ie,
|
|
|
|
{ "Information requested IE", "bssap.info_req_ie",
|
|
|
|
FT_NONE, BASE_NONE, NULL, 0,
|
|
|
|
NULL, HFILL }},
|
2012-10-18 17:39:45 +00:00
|
|
|
|
2010-05-10 15:54:57 +00:00
|
|
|
{ &hf_bssap_loc_area_id_ie,
|
|
|
|
{ "Location area identifier IE", "bssap.loc_area_id_ie",
|
|
|
|
FT_NONE, BASE_NONE, NULL, 0,
|
|
|
|
NULL, HFILL }},
|
2012-10-18 17:39:45 +00:00
|
|
|
|
2010-05-10 15:54:57 +00:00
|
|
|
{ &hf_bssap_loc_inf_age_ie,
|
|
|
|
{ "Location information age IE", "bssap.loc_inf_age_ie",
|
|
|
|
FT_NONE, BASE_NONE, NULL, 0,
|
|
|
|
NULL, HFILL }},
|
2012-10-18 17:39:45 +00:00
|
|
|
|
2010-05-10 15:54:57 +00:00
|
|
|
{ &hf_bssap_mm_information_ie,
|
|
|
|
{ "MM information IE", "bssap.mm_information",
|
|
|
|
FT_NONE, BASE_NONE, NULL, 0,
|
|
|
|
NULL, HFILL }},
|
2012-10-18 17:39:45 +00:00
|
|
|
|
2010-05-10 15:54:57 +00:00
|
|
|
{ &hf_bssap_mobile_id_ie,
|
|
|
|
{ "Mobile identity IE", "bssap.mobile_id_ie",
|
|
|
|
FT_NONE, BASE_NONE, NULL, 0,
|
|
|
|
NULL, HFILL }},
|
2012-10-18 17:39:45 +00:00
|
|
|
|
2010-05-10 15:54:57 +00:00
|
|
|
{ &hf_bssap_mobile_stn_cls_mrk1_ie,
|
|
|
|
{ "Mobile station classmark 1 IE", "bssap.mobile_stn_cls_mrk1_ie",
|
|
|
|
FT_NONE, BASE_NONE, NULL, 0,
|
|
|
|
NULL, HFILL }},
|
2012-10-18 17:39:45 +00:00
|
|
|
|
2010-05-10 15:54:57 +00:00
|
|
|
{ &hf_bssap_mobile_station_state_ie,
|
|
|
|
{ "Mobile station state IE", "bssap.mobile_station_state_ie",
|
|
|
|
FT_NONE, BASE_NONE, NULL, 0,
|
|
|
|
NULL, HFILL }},
|
2012-10-18 17:39:45 +00:00
|
|
|
|
2010-05-10 15:54:57 +00:00
|
|
|
{ &hf_bssap_ptmsi_ie,
|
|
|
|
{ "PTMSI IE", "bssap.ptmsi_ie",
|
|
|
|
FT_NONE, BASE_NONE, NULL, 0,
|
|
|
|
NULL, HFILL }},
|
2012-10-18 17:39:45 +00:00
|
|
|
|
2010-05-10 15:54:57 +00:00
|
|
|
{ &hf_bssap_reject_cause_ie,
|
|
|
|
{ "Reject cause IE", "bssap.reject_cause_ie",
|
|
|
|
FT_NONE, BASE_NONE, NULL, 0,
|
|
|
|
NULL, HFILL }},
|
2012-10-18 17:39:45 +00:00
|
|
|
|
2010-05-10 15:54:57 +00:00
|
|
|
{ &hf_bssap_service_area_id_ie,
|
2012-01-19 19:15:13 +00:00
|
|
|
{ "Service area identification IE", "bssap.service_area_id_ie",
|
2010-05-10 15:54:57 +00:00
|
|
|
FT_NONE, BASE_NONE, NULL, 0,
|
|
|
|
"Mobile station classmark 1", HFILL }},
|
2012-10-18 17:39:45 +00:00
|
|
|
|
2010-05-10 15:54:57 +00:00
|
|
|
{ &hf_bssap_sgsn_nr_ie,
|
2012-01-19 19:15:13 +00:00
|
|
|
{ "SGSN number IE", "bssap.sgsn_nr_ie",
|
2010-05-10 15:54:57 +00:00
|
|
|
FT_NONE, BASE_NONE, NULL, 0,
|
2011-02-07 18:49:29 +00:00
|
|
|
NULL, HFILL }},
|
2012-10-18 17:39:45 +00:00
|
|
|
|
2010-05-10 15:54:57 +00:00
|
|
|
{ &hf_bssap_tmsi_ie,
|
|
|
|
{ "TMSI IE", "bssap.tmsi_ie",
|
|
|
|
FT_NONE, BASE_NONE, NULL, 0,
|
2011-02-07 18:49:29 +00:00
|
|
|
NULL, HFILL }},
|
2012-10-18 17:39:45 +00:00
|
|
|
|
2010-05-10 15:54:57 +00:00
|
|
|
{ &hf_bssap_tmsi_status_ie,
|
|
|
|
{ "TMSI status IE", "bssap.tmsi_status_ie",
|
|
|
|
FT_NONE, BASE_NONE, NULL, 0,
|
|
|
|
NULL, HFILL }},
|
2012-10-18 17:39:45 +00:00
|
|
|
|
2010-05-10 15:54:57 +00:00
|
|
|
{ &hf_bssap_vlr_number_ie,
|
|
|
|
{ "VLR number IE", "bssap.vlr_number_ie",
|
|
|
|
FT_NONE, BASE_NONE, NULL, 0,
|
|
|
|
NULL, HFILL }},
|
2012-10-18 17:39:45 +00:00
|
|
|
|
2010-05-10 15:54:57 +00:00
|
|
|
{ &hf_bssap_global_cn_id_ie,
|
|
|
|
{ "Global CN-Id IE", "bssap.global_cn_id_ie",
|
|
|
|
FT_NONE, BASE_NONE, NULL, 0,
|
|
|
|
NULL, HFILL }},
|
|
|
|
|
|
|
|
{ &hf_bssap_plus_ie_data,
|
|
|
|
{ "IE Data", "bssap.ie_data",
|
|
|
|
FT_BYTES, BASE_NONE, NULL, 0,
|
|
|
|
NULL, HFILL }},
|
|
|
|
|
|
|
|
{ &hf_bssap_call_priority,
|
2012-01-19 19:15:13 +00:00
|
|
|
{ "eMLPP Priority", "bssap.call_priority",
|
2012-10-18 17:39:45 +00:00
|
|
|
FT_UINT8, BASE_DEC, VALS(bssap_call_priority_values), 0x07,
|
|
|
|
NULL, HFILL}},
|
|
|
|
|
2010-05-10 15:54:57 +00:00
|
|
|
{ &hf_bssap_gprs_loc_upd_type,
|
|
|
|
{ "GPRS location update type", "bssap.gprs_loc_upd_type",
|
2012-10-18 17:39:45 +00:00
|
|
|
FT_UINT8, BASE_DEC, VALS(bssap_plus_GPRS_loc_upd_type_values), 0x0,
|
|
|
|
NULL, HFILL}},
|
|
|
|
|
2010-05-10 15:54:57 +00:00
|
|
|
{ &hf_bssap_Gs_cause,
|
2012-01-19 19:15:13 +00:00
|
|
|
{ "Gs cause", "bssap.Gs_cause",
|
2012-10-18 17:39:45 +00:00
|
|
|
FT_UINT8, BASE_DEC, VALS(bssap_Gs_cause_values), 0x0,
|
|
|
|
NULL, HFILL}},
|
|
|
|
|
2010-05-10 15:54:57 +00:00
|
|
|
{ &hf_bssap_imei,
|
|
|
|
{ "IMEI", "bssap.imei",
|
|
|
|
FT_STRING, BASE_NONE, NULL, 0,
|
|
|
|
NULL, HFILL }},
|
2012-10-18 17:39:45 +00:00
|
|
|
|
2010-05-10 15:54:57 +00:00
|
|
|
{ &hf_bssap_imeisv,
|
|
|
|
{ "IMEISV", "bssap.imeisv",
|
|
|
|
FT_STRING, BASE_NONE, NULL, 0,
|
|
|
|
NULL, HFILL }},
|
2012-10-18 17:39:45 +00:00
|
|
|
|
2010-05-10 15:54:57 +00:00
|
|
|
{ &hf_bssap_imsi_det_from_gprs_serv_type,
|
|
|
|
{ "IMSI detach from GPRS service type", "bssap.imsi_det_from_gprs_serv_type",
|
2012-10-18 17:39:45 +00:00
|
|
|
FT_UINT8, BASE_DEC, VALS(bssap_Gs_cause_values), 0x0,
|
|
|
|
NULL, HFILL}},
|
|
|
|
|
2010-05-10 15:54:57 +00:00
|
|
|
{ &hf_bssap_info_req,
|
|
|
|
{ "Information requested", "bssap.info_req",
|
2012-10-18 17:39:45 +00:00
|
|
|
FT_UINT8, BASE_DEC, VALS(bssap_info_req_values), 0x0,
|
|
|
|
NULL, HFILL}},
|
|
|
|
|
2010-05-10 15:54:57 +00:00
|
|
|
{ &hf_bssap_loc_inf_age,
|
|
|
|
{ "AgeOfLocationInformation in minutes", "bssap.loc_inf_age",
|
2012-10-18 17:39:45 +00:00
|
|
|
FT_UINT16, BASE_DEC, NULL, 0x0,
|
|
|
|
NULL, HFILL}},
|
|
|
|
|
2010-05-10 15:54:57 +00:00
|
|
|
{ &hf_bssap_mobile_station_state,
|
|
|
|
{ "Mobile station state", "bssap.mobile_station_state",
|
2012-10-18 17:39:45 +00:00
|
|
|
FT_UINT8, BASE_DEC, VALS(bssap_mobile_station_state_values), 0x0,
|
|
|
|
NULL, HFILL}},
|
|
|
|
|
2010-05-10 15:54:57 +00:00
|
|
|
{ &hf_bssap_ptmsi,
|
|
|
|
{ "PTMSI", "bssap.ptmsi",
|
2012-10-18 17:39:45 +00:00
|
|
|
FT_BYTES, BASE_NONE, NULL, 0x0,
|
|
|
|
NULL, HFILL}},
|
|
|
|
|
2010-05-10 15:54:57 +00:00
|
|
|
{ &hf_bssap_tmsi,
|
|
|
|
{ "TMSI", "bssap.tmsi",
|
2012-10-18 17:39:45 +00:00
|
|
|
FT_BYTES, BASE_NONE, NULL, 0x0,
|
|
|
|
NULL, HFILL}},
|
|
|
|
|
2010-05-10 15:54:57 +00:00
|
|
|
{ &hf_bssap_tmsi_status,
|
|
|
|
{ "TMSI status", "bssap.tmsi_status",
|
|
|
|
FT_BOOLEAN, 8, TFS(&bssap_tmsi_flag), 0x01,
|
|
|
|
NULL, HFILL }},
|
2012-10-18 17:39:45 +00:00
|
|
|
|
2010-05-10 15:54:57 +00:00
|
|
|
{ &hf_bssap_tom_prot_disc,
|
|
|
|
{ "TOM Protocol Discriminator", "bssap.Tom_prot_disc",
|
|
|
|
FT_UINT8, BASE_DEC, VALS(bssap_tom_prot_disc_values), 0x78,
|
|
|
|
NULL, HFILL}},
|
2012-10-18 17:39:45 +00:00
|
|
|
|
2010-05-10 15:54:57 +00:00
|
|
|
{ &hf_bssap_e_bit,
|
2012-01-19 19:15:13 +00:00
|
|
|
{ "E: Cipher Request", "bssap.e_bit",
|
2010-05-10 15:54:57 +00:00
|
|
|
FT_BOOLEAN, 8, TFS(&bssap_E_flag), 0x04,
|
|
|
|
NULL, HFILL }},
|
2012-10-18 17:39:45 +00:00
|
|
|
|
2010-05-10 15:54:57 +00:00
|
|
|
{ &hf_bssap_tunnel_prio,
|
|
|
|
{ "Tunnel Priority", "bssap.tunnel_prio",
|
2012-10-18 17:39:45 +00:00
|
|
|
FT_UINT8, BASE_DEC, NULL, 0x0,
|
|
|
|
NULL, HFILL}},
|
|
|
|
|
2010-05-10 15:54:57 +00:00
|
|
|
{ &hf_bssap_global_cn_id,
|
|
|
|
{ "Global CN-Id", "bssap.global_cn_id",
|
2012-10-18 17:39:45 +00:00
|
|
|
FT_BYTES, BASE_NONE, NULL, 0x0,
|
|
|
|
NULL, HFILL}},
|
|
|
|
|
2010-05-10 15:54:57 +00:00
|
|
|
{ &hf_bssap_plmn_id,
|
|
|
|
{ "PLMN-Id", "bssap.plmn_id",
|
2012-10-18 17:39:45 +00:00
|
|
|
FT_BYTES, BASE_NONE, NULL, 0x0,
|
|
|
|
NULL, HFILL}},
|
|
|
|
|
2010-05-10 15:54:57 +00:00
|
|
|
{ &hf_bssap_cn_id,
|
|
|
|
{ "CN-Id", "bssap.cn_id",
|
2012-10-18 17:39:45 +00:00
|
|
|
FT_UINT16, BASE_DEC, NULL, 0x0,
|
|
|
|
NULL, HFILL}},
|
|
|
|
|
2010-05-10 15:54:57 +00:00
|
|
|
{ &hf_bssap_cell_global_id,
|
2012-01-19 19:15:13 +00:00
|
|
|
{ "Cell global identity", "bssap.cell_global_id",
|
2012-10-18 17:39:45 +00:00
|
|
|
FT_BYTES, BASE_NONE, NULL, 0x0,
|
|
|
|
NULL, HFILL}},
|
2014-09-11 20:43:00 +00:00
|
|
|
|
|
|
|
{ &hf_bssap_extraneous_data,
|
|
|
|
{ "Extraneous data", "bssap.extraneous_data",
|
|
|
|
FT_BYTES, BASE_NONE, NULL, 0x0,
|
|
|
|
NULL, HFILL}},
|
2014-11-01 20:55:25 +00:00
|
|
|
|
|
|
|
{ &hf_bssap_conditional_ie,
|
|
|
|
{ "Conditional IE", "bssap.conditional_ie",
|
|
|
|
FT_BYTES, BASE_NONE, NULL, 0x0,
|
|
|
|
NULL, HFILL}},
|
2010-05-10 15:54:57 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
/* Setup protocol subtree array */
|
|
|
|
static gint *ett[] = {
|
|
|
|
&ett_bssap,
|
|
|
|
&ett_bssap_dlci,
|
|
|
|
&ett_bssap_imsi,
|
|
|
|
&ett_bssap_imsi_det_from_gprs_serv_type,
|
|
|
|
&ett_bssap_imsi_det_from_non_gprs_serv_type,
|
|
|
|
&ett_bssap_info_req,
|
|
|
|
&ett_bssap_loc_area_id,
|
|
|
|
&ett_bssap_loc_inf_age,
|
|
|
|
&ett_bssap_mm_information,
|
|
|
|
&ett_bssap_mobile_id,
|
|
|
|
&ett_bssap_sgsn_nr,
|
|
|
|
&ett_bssap_tmsi,
|
|
|
|
&ett_bssap_tmsi_status,
|
|
|
|
&ett_bssap_vlr_number,
|
|
|
|
&ett_bssap_global_cn,
|
|
|
|
&ett_bssap_gprs_loc_upd,
|
|
|
|
&ett_bassp_Gs_cause,
|
|
|
|
&ett_bassp_imei,
|
2019-01-15 14:26:33 +00:00
|
|
|
&ett_bassp_imeisv,
|
2010-05-10 15:54:57 +00:00
|
|
|
&ett_bssap_cell_global_id,
|
|
|
|
&ett_bssap_cgi,
|
|
|
|
&ett_bssap_channel_needed,
|
|
|
|
&ett_bssap_dlink_tnl_pld_cntrl_amd_inf,
|
|
|
|
&ett_bssap_ulink_tnl_pld_cntrl_amd_inf,
|
|
|
|
&ett_bssap_emlpp_prio,
|
|
|
|
&ett_bssap_erroneous_msg,
|
|
|
|
&ett_bssap_mobile_stn_cls_mrk1,
|
|
|
|
&ett_bssap_mobile_station_state,
|
|
|
|
&ett_bssap_ptmsi,
|
|
|
|
&ett_bssap_reject_cause,
|
|
|
|
&ett_bssap_service_area_id,
|
|
|
|
&ett_bssap_global_cn_id,
|
|
|
|
&ett_bssap_plmn,
|
|
|
|
};
|
2008-09-24 00:50:18 +00:00
|
|
|
|
2012-11-29 20:15:37 +00:00
|
|
|
static const enum_val_t gsm_or_lb_interface_options[] = {
|
2010-05-10 15:54:57 +00:00
|
|
|
{ "gsm a", "GSM A", GSM_INTERFACE },
|
|
|
|
{ "lb", "Lb", LB_INTERFACE },
|
|
|
|
{ NULL, NULL, 0 }
|
2008-11-21 06:41:00 +00:00
|
|
|
};
|
|
|
|
|
2012-11-29 20:15:37 +00:00
|
|
|
static const enum_val_t bssap_or_bsap_options[] = {
|
2010-05-10 15:54:57 +00:00
|
|
|
{ "bssap", "BSSAP", BSSAP },
|
|
|
|
{ "bsap", "BSAP", BSAP },
|
|
|
|
{ NULL, NULL, 0 }
|
|
|
|
};
|
2008-09-24 00:50:18 +00:00
|
|
|
|
2014-11-01 20:55:25 +00:00
|
|
|
static ei_register_info ei[] = {
|
|
|
|
{ &ei_bssap_unknown_message, { "bssap.unknown_message", PI_PROTOCOL, PI_WARN, "Unknown message", EXPFILL }},
|
|
|
|
{ &ei_bssap_unknown_parameter, { "bssap.unknown_parameter", PI_PROTOCOL, PI_WARN, "Unknown parameter", EXPFILL }},
|
|
|
|
{ &ei_bssap_mandatory_ie, { "bssap.mandatory_ie", PI_PROTOCOL, PI_WARN, "Mandatory IE expected", EXPFILL }},
|
|
|
|
};
|
2008-09-24 00:50:18 +00:00
|
|
|
|
2010-05-10 15:54:57 +00:00
|
|
|
/* Register the protocol name and description */
|
|
|
|
proto_bssap = proto_register_protocol("BSSAP/BSAP", "BSSAP", "bssap");
|
2014-06-19 19:39:39 +00:00
|
|
|
proto_bssap_plus = proto_register_protocol("BSSAP2", "BSSAP2", "bssap_plus");
|
2003-10-22 20:59:02 +00:00
|
|
|
|
2019-03-08 12:59:40 +00:00
|
|
|
bssap_handle = register_dissector("bssap", dissect_bssap, proto_bssap);
|
2019-01-08 13:04:29 +00:00
|
|
|
register_dissector("bssap.imei", dissect_bssap_imei_dissector, proto_bssap);
|
2015-12-09 04:04:01 +00:00
|
|
|
register_dissector("bssap_plus", dissect_bssap_plus, proto_bssap_plus);
|
2008-09-24 00:50:18 +00:00
|
|
|
|
2010-05-10 15:54:57 +00:00
|
|
|
/* Required function calls to register the header fields and subtrees used */
|
|
|
|
proto_register_field_array(proto_bssap, hf, array_length(hf));
|
|
|
|
proto_register_subtree_array(ett, array_length(ett));
|
2014-11-01 20:55:25 +00:00
|
|
|
expert_bssap = expert_register_protocol(proto_bssap);
|
|
|
|
expert_register_field_array(expert_bssap, ei, array_length(ei));
|
2008-09-24 00:50:18 +00:00
|
|
|
|
2010-05-10 15:54:57 +00:00
|
|
|
bssap_module = prefs_register_protocol(proto_bssap, proto_reg_handoff_bssap);
|
2008-09-24 00:50:18 +00:00
|
|
|
|
2010-05-10 15:54:57 +00:00
|
|
|
prefs_register_enum_preference(bssap_module,
|
|
|
|
"bsap_or_bssap",
|
|
|
|
"Identify to sub-dissector as",
|
|
|
|
"For the sake of sub-dissectors registering to accept data "
|
|
|
|
"from the BSSAP/BSAP dissector, this defines whether it is "
|
|
|
|
"identified as BSSAP or BSAP.",
|
|
|
|
&bssap_or_bsap_global,
|
|
|
|
bssap_or_bsap_options,
|
2012-10-18 17:39:45 +00:00
|
|
|
FALSE);
|
2008-09-24 00:50:18 +00:00
|
|
|
|
2010-05-10 15:54:57 +00:00
|
|
|
prefs_register_enum_preference(bssap_module,
|
2008-11-21 06:41:00 +00:00
|
|
|
"gsm_or_lb_interface",
|
|
|
|
"Identify the BSSAP interface",
|
|
|
|
"GSM-A is the interface between the BSC and the MSC. Lb is the interface between the BSC and the SMLC.",
|
|
|
|
&gsm_or_lb_interface_global,
|
|
|
|
gsm_or_lb_interface_options,
|
2012-10-18 17:39:45 +00:00
|
|
|
FALSE);
|
2008-11-21 06:41:00 +00:00
|
|
|
|
2019-03-08 12:59:40 +00:00
|
|
|
bssap_plus_module = prefs_register_protocol(proto_bssap_plus, proto_reg_handoff_bssap);
|
|
|
|
prefs_register_uint_preference(bssap_plus_module, "ssn",
|
|
|
|
"Subsystem number used for BSSAP+",
|
|
|
|
"Set Subsystem number used for BSSAP+",
|
2010-05-10 15:54:57 +00:00
|
|
|
10, &global_bssap_ssn);
|
2019-03-08 12:59:40 +00:00
|
|
|
|
2016-08-30 22:51:54 +00:00
|
|
|
bssap_dissector_table = register_dissector_table("bssap.pdu_type", "BSSAP Message Type", proto_bssap, FT_UINT8, BASE_DEC);
|
|
|
|
bsap_dissector_table = register_dissector_table("bsap.pdu_type", "BSAP Message Type", proto_bssap, FT_UINT8, BASE_DEC);
|
2003-10-22 20:59:02 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
proto_reg_handoff_bssap(void)
|
|
|
|
{
|
2010-05-10 15:54:57 +00:00
|
|
|
static gboolean initialized = FALSE;
|
|
|
|
static dissector_handle_t bssap_plus_handle;
|
|
|
|
static guint old_bssap_ssn;
|
|
|
|
|
|
|
|
if (!initialized) {
|
2015-07-13 00:40:31 +00:00
|
|
|
heur_dissector_add("sccp", dissect_bssap_heur, "BSSAP over SCCP", "bssap_sccp", proto_bssap, HEURISTIC_ENABLE);
|
|
|
|
heur_dissector_add("sua", dissect_bssap_heur, "BSSAP over SUA", "bssap_sua", proto_bssap, HEURISTIC_ENABLE);
|
2010-05-10 15:54:57 +00:00
|
|
|
/* BSSAP+ */
|
2019-03-08 12:59:40 +00:00
|
|
|
bssap_plus_handle = create_dissector_handle(dissect_bssap_plus, proto_bssap_plus);
|
2010-05-10 15:54:57 +00:00
|
|
|
|
2016-03-16 13:02:52 +00:00
|
|
|
rrlp_handle = find_dissector_add_dependency("rrlp", proto_bssap_plus);
|
|
|
|
gsm_bssmap_le_dissector_handle = find_dissector_add_dependency("gsm_bssmap_le", proto_bssap);
|
|
|
|
gsm_a_bssmap_dissector_handle = find_dissector_add_dependency("gsm_a_bssmap", proto_bssap);
|
|
|
|
|
2010-05-10 15:54:57 +00:00
|
|
|
initialized = TRUE;
|
|
|
|
} else {
|
2011-02-07 18:49:29 +00:00
|
|
|
dissector_delete_uint("sccp.ssn", old_bssap_ssn, bssap_plus_handle);
|
2010-05-10 15:54:57 +00:00
|
|
|
}
|
|
|
|
|
2019-03-08 12:59:40 +00:00
|
|
|
dissector_add_for_decode_as("sccp.ssn", bssap_handle);
|
|
|
|
|
2010-12-20 05:35:29 +00:00
|
|
|
dissector_add_uint("sccp.ssn", global_bssap_ssn, bssap_plus_handle);
|
2010-05-10 15:54:57 +00:00
|
|
|
old_bssap_ssn = global_bssap_ssn;
|
2003-10-22 20:59:02 +00:00
|
|
|
}
|
2014-09-28 23:25:09 +00:00
|
|
|
|
|
|
|
/*
|
2019-07-26 18:43:17 +00:00
|
|
|
* Editor modelines - https://www.wireshark.org/tools/modelines.html
|
2014-09-28 23:25:09 +00:00
|
|
|
*
|
|
|
|
* Local variables:
|
|
|
|
* c-basic-offset: 4
|
|
|
|
* tab-width: 8
|
|
|
|
* indent-tabs-mode: nil
|
|
|
|
* End:
|
|
|
|
*
|
|
|
|
* vi: set shiftwidth=4 tabstop=8 expandtab:
|
|
|
|
* :indentSize=4:tabSize=8:noTabs=true:
|
|
|
|
*/
|