2008-11-20 07:57:24 +00:00
/* packet-gsm_bssmap_le.c
* Routines for GSM Lb Interface BSSMAP dissection
*
* Copyright 2008 , Johnny Mitrevski < mitrevj @ hotmail . com >
*
* 3 GPP TS 49.031 version v7 .4 .0 ( 2009 - 09 )
*
* Wireshark - Network traffic analyzer
* By Gerald Combs < gerald @ wireshark . org >
* Copyright 1998 Gerald Combs
*
2018-02-12 11:23:27 +00:00
* SPDX - License - Identifier : GPL - 2.0 - or - later
2008-11-20 07:57:24 +00:00
*/
2012-09-20 02:03:38 +00:00
# include "config.h"
2008-11-20 07:57:24 +00:00
# include <epan/packet.h>
2014-11-01 20:55:25 +00:00
# include <epan/expert.h>
2008-11-20 07:57:24 +00:00
# include <epan/tap.h>
# include "packet-bssap.h"
# include "packet-gsm_a_common.h"
2013-12-15 23:44:12 +00:00
void proto_register_gsm_bssmap_le ( void ) ;
void proto_reg_handoff_gsm_bssmap_le ( void ) ;
2008-11-20 07:57:24 +00:00
/* PROTOTYPES/FORWARDS */
/* Message Type definitions */
# define BSSMAP_LE_PERFORM_LOCATION_REQUEST 43
# define BSSMAP_LE_PERFORM_LOCATION_RESPONSE 45
# define BSSMAP_LE_PERFORM_LOCATION_ABORT 46
# define BSSMAP_LE_PERFORM_LOCATION_INFORMATION 47
# define BSSMAP_LE_CONNECTION_ORIENTED_INFORMATION 42
# define BSSMAP_LE_CONNECTIONLESS_INFORMATION 58
# define BSSMAP_LE_RESET 48
# define BSSMAP_LE_RESET_ACKNOWLEDGE 49
2010-10-10 23:28:40 +00:00
static const value_string gsm_bssmap_le_msg_strings [ ] = {
2008-11-20 07:57:24 +00:00
{ 0 , " Reserved " } ,
2009-01-28 21:52:57 +00:00
{ 1 , " Reserved " } ,
{ 2 , " Reserved " } ,
{ 3 , " Reserved " } ,
{ 4 , " Reserved " } ,
2014-10-03 14:13:07 +00:00
{ BSSMAP_LE_PERFORM_LOCATION_REQUEST , " Perform Location Request " } ,
{ BSSMAP_LE_PERFORM_LOCATION_RESPONSE , " Perform Location Response " } ,
{ BSSMAP_LE_PERFORM_LOCATION_ABORT , " Perform Location Abort " } ,
{ BSSMAP_LE_PERFORM_LOCATION_INFORMATION , " Perform Location Information " } ,
2009-01-28 21:52:57 +00:00
{ BSSMAP_LE_CONNECTION_ORIENTED_INFORMATION , " Connection Oriented Information " } ,
2014-10-03 14:13:07 +00:00
{ BSSMAP_LE_CONNECTIONLESS_INFORMATION , " Connectionless Information " } ,
{ BSSMAP_LE_RESET , " Reset " } ,
{ BSSMAP_LE_RESET_ACKNOWLEDGE , " Reset Acknowledge " } ,
{ 0 , NULL }
2008-11-20 07:57:24 +00:00
} ;
/* Information Element definitions */
# define BSSMAP_LE_LCS_QOS 62
# define BSSMAP_LE_LCS_PRIORITY 67
# define BSSMAP_LE_LOCATION_TYPE 68
# define BSSMAP_LE_GANSS_LOCATION_TYPE 130
# define BSSMAP_LE_GEOGRAPHIC_LOCATION 69
# define BSSMAP_LE_POSITIONING_DATA 70
# define BSSMAP_LE_GANSS_POSITIONING_DATA 131
# define BSSMAP_LE_VELOCITY_DATA 85
# define BSSMAP_LE_LCS_CAUSE 71
# define BSSMAP_LE_LCS_CLIENT_TYPE 72
# define BSSMAP_LE_APDU 73
# define BSSMAP_LE_NETWORK_ELEMENT_IDENTITY 74
# define BSSMAP_LE_REQUESTED_GPS_ASSISTANCE_DATA 75
# define BSSMAP_LE_REQUESTED_GANSS_ASSISTANCE_DATA 65
# define BSSMAP_LE_DECIPHERING_KEYS 76
# define BSSMAP_LE_RETURN_ERROR_REQUEST 77
# define BSSMAP_LE_RETURN_ERROR_CAUSE 78
# define BSSMAP_LE_SEGMENTATION 79
# define BSSMAP_LE_CLASSMARK_INFORMATION_TYPE_3 19
# define BSSMAP_LE_CAUSE 4
# define BSSMAP_LE_CELL_IDENTIFIER 5
# define BSSMAP_LE_CHOSEN_CHANNEL 33
# define BSSMAP_LE_IMSI 0
# define BSSMAP_LE_RESERVED_NOTE1 1
# define BSSMAP_LE_RESERVED_NOTE2 2
# define BSSMAP_LE_RESERVED_NOTE3 3
# define BSSMAP_LE_LCS_CAPABILITY 80
# define BSSMAP_LE_PACKET_MEASUREMENT_REPORT 81
# define BSSMAP_LE_CELL_IDENTITY_LIST 82
# define BSSMAP_LE_IMEI 128
2013-03-18 22:21:53 +00:00
static const value_string gsm_bssmap_le_elem_strings [ ] = {
2014-10-03 14:13:07 +00:00
{ DE_BMAPLE_LCSQOS , " LCS QoS " } ,
{ DE_BMAPLE_LCS_PRIO , " LCS Priority " } ,
{ DE_BMAPLE_LOC_TYPE , " Location Type " } ,
{ DE_BMAPLE_GANSS_LOC_TYPE , " GANSS Location Type " } ,
{ DE_BMAPLE_GEO_LOC , " Geographic Location " } ,
{ DE_BMAPLE_POS_DATA , " Positioning Data " } ,
{ DE_BMAPLE_GANSS_POS_DATA , " GANSS Positioning Data " } ,
{ DE_BMAPLE_VELOC_DATA , " Velocity Data " } ,
{ DE_BMAPLE_LCS_CAUSE , " LCS Cause " } ,
{ DE_BMAPLE_LCS_CLIENT_TYPE , " LCS Client Type " } ,
{ DE_BMAPLE_APDU , " APDU " } ,
{ DE_BMAPLE_NETWORK_ELEM_ID , " Network Element Identity " } ,
{ DE_BMAPLE_REQ_GPS_ASSIST_D , " Requested GPS Assistance Data " } ,
{ DE_BMAPLE_REQ_GNSS_ASSIST_D , " Requested GANSS Assistance Data " } ,
{ DE_BMAPLE_DECIPH_KEYS , " Deciphering Keys " } ,
{ DE_BMAPLE_RETURN_ERROR_REQ , " Return Error Request " } ,
2013-03-18 20:26:47 +00:00
{ DE_BMAPLE_RETURN_ERROR_CAUSE , " Return Error Cause " } ,
2014-10-03 14:13:07 +00:00
{ DE_BMAPLE_SEGMENTATION , " Segmentation " } ,
{ DE_BMAPLE_CLASSMARK_TYPE_3 , " Classmark Information Type 3 " } ,
{ DE_BMAPLE_CAUSE , " Cause " } ,
{ DE_BMAPLE_CELL_IDENTIFIER , " Cell Identifier " } ,
{ DE_BMAPLE_CHOSEN_CHANNEL , " Chosen Channel " } ,
{ DE_BMAPLE_IMSI , " IMSI " } ,
{ DE_BMAPLE_RES1 , " Reserved " } ,
{ DE_BMAPLE_RES2 , " Reserved " } ,
{ DE_BMAPLE_RES3 , " Reserved " } ,
{ DE_BMAPLE_LCS_CAPABILITY , " LCS Capability " } ,
{ DE_BMAPLE_PACKET_MEAS_REP , " Packet Measurement Report " } ,
{ DE_BMAPLE_MEAS_CELL_ID , " Cell Identity List " } ,
{ DE_BMAPLE_IMEI , " IMEI " } ,
2009-01-28 21:52:57 +00:00
{ 0 , NULL }
2008-11-20 07:57:24 +00:00
} ;
2013-03-18 22:21:53 +00:00
value_string_ext gsm_bssmap_le_elem_strings_ext = VALUE_STRING_EXT_INIT ( gsm_bssmap_le_elem_strings ) ;
2008-11-20 07:57:24 +00:00
static const value_string gsm_apdu_protocol_id_strings [ ] = {
{ 0 , " reserved " } ,
{ 1 , " BSSLAP " } ,
{ 2 , " LLP " } ,
{ 3 , " SMLCPP " } ,
{ 0 , NULL } ,
} ;
2008-11-23 21:08:46 +00:00
/* Velocity Requested definitions */
static const value_string bssmap_le_velocity_requested_vals [ ] = {
2009-01-28 21:52:57 +00:00
{ 0 , " do not report velocity " } ,
{ 1 , " report velocity if available " } ,
{ 0 , NULL }
2008-11-23 21:08:46 +00:00
} ;
/* Vertical Coordinate definitions */
static const value_string bssmap_le_vertical_coordinate_indicator_vals [ ] = {
2009-01-28 21:52:57 +00:00
{ 0 , " vertical coordinate not requested " } ,
{ 1 , " vertical coordinate is requested " } ,
{ 0 , NULL }
2008-11-23 21:08:46 +00:00
} ;
/* Horizontal Accuracy definitions */
static const value_string bssmap_le_horizontal_accuracy_indicator_vals [ ] = {
2009-01-28 21:52:57 +00:00
{ 0 , " horizontal accuracy is not specified " } ,
{ 1 , " horizontal accuracy is specified " } ,
{ 0 , NULL }
2008-11-23 21:08:46 +00:00
} ;
/* Vertical Accuracy definitions */
static const value_string bssmap_le_vertical_accuracy_indicator_vals [ ] = {
2009-01-28 21:52:57 +00:00
{ 0 , " vertical accuracy is not specified " } ,
{ 1 , " vertical accuracy is specified " } ,
{ 0 , NULL }
2008-11-23 21:08:46 +00:00
} ;
/* Response Time definitions */
static const value_string bssmap_le_response_time_definitions_vals [ ] = {
2009-01-28 21:52:57 +00:00
{ 0 , " Response Time is not specified " } ,
{ 1 , " Low Delay " } ,
{ 2 , " Delay Tolerant " } ,
{ 3 , " reserved " } ,
{ 0 , NULL }
2008-11-23 21:08:46 +00:00
} ;
2017-10-27 13:47:42 +00:00
static const value_string bssmap_le_loc_inf_vals [ ] = {
{ 0 , " Current Geographic Location " } ,
{ 1 , " Location Assistance Information for the target MS " } ,
{ 2 , " Deciphering keys for broadcast assistance data for the target MS " } ,
{ 0 , NULL }
} ;
static const value_string bssmap_le_pos_method_vals [ ] = {
{ 0 , " Reserved " } ,
{ 1 , " Mobile Assisted E-OTD " } ,
{ 2 , " Mobile Based E-OTD " } ,
{ 3 , " Assisted GPS " } ,
2017-10-30 21:01:16 +00:00
{ 4 , " Assisted GANSS " } ,
2017-10-27 13:47:42 +00:00
{ 5 , " Assisted GPS and Assisted GANSS " } ,
{ 0 , NULL }
} ;
2017-10-30 21:01:16 +00:00
static const value_string bssmap_le_pos_data_pos_method_vals [ ] = {
{ 0 , " Timing Advance " } ,
{ 1 , " Reserved " } ,
{ 2 , " Reserved " } ,
{ 3 , " Mobile Assisted E - OTD " } ,
{ 4 , " Mobile Based E - OTD " } ,
{ 5 , " Mobile Assisted GPS " } ,
{ 6 , " Mobile Based GPS " } ,
{ 7 , " Conventional GPS " } ,
{ 8 , " U - TDOA " } ,
{ 9 , " Reserved for UTRAN use only " } ,
{ 0xa , " Reserved for UTRAN use only " } ,
{ 0xb , " Reserved for UTRAN use only " } ,
{ 0xc , " Cell ID " } ,
{ 0 , NULL }
} ;
2017-10-27 13:47:42 +00:00
2017-10-30 21:01:16 +00:00
static const value_string bssmap_le_pos_data_usage_vals [ ] = {
{ 0 , " Attempted unsuccessfully due to failure or interruption " } ,
{ 1 , " Attempted successfully : results not used to generate location " } ,
{ 2 , " Attempted successfully : results used to verify but not generate location " } ,
{ 3 , " Attempted successfully : results used to generate location " } ,
{ 4 , " Attempted successfully : method or methods used by the MS cannot be determined " } ,
{ 0 , NULL }
} ;
2017-10-27 13:47:42 +00:00
2008-11-20 07:57:24 +00:00
/* Initialize the protocol and registered fields */
static int proto_bssmap_le = - 1 ;
int hf_gsm_bssmap_le_elem_id = - 1 ;
/* The following hf_* variables are used to hold the Wireshark IDs of
* our header fields ; they are filled out when we call
* proto_register_field_array ( ) in proto_register_bssmap_le ( )
*/
static int hf_gsm_bssmap_le_msg_type = - 1 ;
static int hf_gsm_bssmap_le_apdu_protocol_id = - 1 ;
2008-11-23 21:08:46 +00:00
static int hf_gsm_bssmap_le_spare = - 1 ;
static int hf_gsm_bssmap_le_ciphering_key_flag = - 1 ;
static int hf_gsm_bssmap_le_current_deciphering_key_value = - 1 ;
static int hf_gsm_bssmap_le_next_deciphering_key_value = - 1 ;
2011-01-31 15:16:45 +00:00
static int hf_gsm_bssmap_le_acq_ass = - 1 ;
static int hf_gsm_bssmap_le_ref_time = - 1 ;
static int hf_gsm_bssmap_le_ref_loc = - 1 ;
static int hf_gsm_bssmap_le_dgps_corr = - 1 ;
static int hf_gsm_bssmap_le_nav_mod = - 1 ;
static int hf_gsm_bssmap_le_iono_mod = - 1 ;
static int hf_gsm_bssmap_le_utc_mod = - 1 ;
static int hf_gsm_bssmap_le_almanac = - 1 ;
static int hf_gsm_bssmap_le_ephemeris_ext_chk = - 1 ;
static int hf_gsm_bssmap_le_ephemeris_ext = - 1 ;
static int hf_gsm_bssmap_le_real_time_int = - 1 ;
2008-11-23 21:08:46 +00:00
static int hf_gsm_bssmap_le_lcs_cause_value = - 1 ;
static int hf_gsm_bssmap_le_diagnostic_value = - 1 ;
static int hf_gsm_bssmap_le_client_category = - 1 ;
static int hf_gsm_bssmap_le_client_subtype = - 1 ;
static int hf_gsm_bssmap_le_velocity_requested = - 1 ;
static int hf_gsm_bssmap_le_vertical_coordinate_indicator = - 1 ;
static int hf_gsm_bssmap_le_horizontal_accuracy_indicator = - 1 ;
static int hf_gsm_bssmap_le_horizontal_accuracy = - 1 ;
static int hf_gsm_bssmap_le_vertical_accuracy_indicator = - 1 ;
static int hf_gsm_bssmap_le_vertical_accuracy = - 1 ;
static int hf_gsm_bssmap_le_response_time_category = - 1 ;
2014-11-01 20:55:25 +00:00
static int hf_gsm_bssmap_le_apdu = - 1 ;
static int hf_gsm_bssmap_le_message_elements = - 1 ;
2017-10-27 13:47:42 +00:00
static int hf_gsm_bssmap_le_location_inf = - 1 ;
static int hf_gsm_bssmap_le_pos_method = - 1 ;
2017-10-30 21:01:16 +00:00
static int hf_gsm_bssmap_le_pos_data_disc = - 1 ;
static int hf_gsm_bssmap_le_pos_data_pos_method = - 1 ;
static int hf_gsm_bssmap_le_pos_data_usage = - 1 ;
2014-11-01 20:55:25 +00:00
2008-11-20 07:57:24 +00:00
/* Initialize the subtree pointers */
static gint ett_bssmap_le_msg = - 1 ;
2014-11-01 20:55:25 +00:00
static expert_field ei_gsm_a_bssmap_le_not_decoded_yet = EI_INIT ;
2015-01-02 17:19:10 +00:00
static expert_field ei_gsm_a_bssmap_le_extraneous_data = EI_INIT ;
static expert_field ei_gsm_a_bssmap_le_missing_mandatory_element = EI_INIT ;
2014-11-01 20:55:25 +00:00
2008-11-20 07:57:24 +00:00
static dissector_handle_t gsm_bsslap_handle = NULL ;
2016-12-17 01:06:11 +00:00
static dissector_handle_t bssmap_le_handle ;
2008-11-20 07:57:24 +00:00
static proto_tree * g_tree ;
# define NUM_GSM_BSSMAP_LE_ELEM (sizeof(gsm_bssmap_le_elem_strings) / sizeof(value_string))
gint ett_gsm_bssmap_le_elem [ NUM_GSM_BSSMAP_LE_ELEM ] ;
2008-11-23 21:08:46 +00:00
/*
* 10.3 APDU
*/
2008-11-20 07:57:24 +00:00
2008-12-23 20:49:15 +00:00
static guint16
2013-05-03 14:54:39 +00:00
de_bmaple_apdu ( tvbuff_t * tvb , proto_tree * tree , packet_info * pinfo , guint32 offset , guint len , gchar * add_string _U_ , int string_len _U_ )
2008-11-20 07:57:24 +00:00
{
2014-10-03 14:13:07 +00:00
guint32 curr_offset ;
guint8 apdu_protocol_id ;
2008-11-20 07:57:24 +00:00
tvbuff_t * APDU_tvb ;
curr_offset = offset ;
2014-11-01 20:55:25 +00:00
proto_tree_add_item ( tree , hf_gsm_bssmap_le_apdu , tvb , curr_offset , len , ENC_NA ) ;
2008-11-20 07:57:24 +00:00
/*
* dissect the embedded APDU message
* if someone writes a TS 09.31 dissector
*
* The APDU octets 4 to n are coded in the same way as the
* equivalent octet in the APDU element of 3 GPP TS 49.031 BSSAP - LE .
*/
2014-03-09 10:06:17 +00:00
apdu_protocol_id = tvb_get_guint8 ( tvb , curr_offset ) ;
proto_tree_add_item ( tree , hf_gsm_bssmap_le_apdu_protocol_id , tvb , curr_offset , 1 , ENC_BIG_ENDIAN ) ;
2008-11-20 07:57:24 +00:00
switch ( apdu_protocol_id ) {
case 1 :
/* BSSLAP
* the embedded message is as defined in 3 GPP TS 08.71 ( 3 GPP TS 48.071 version 7.2 .0 Release 7 )
*/
2014-06-06 14:35:50 +00:00
APDU_tvb = tvb_new_subset_length ( tvb , curr_offset + 1 , len - 1 ) ;
2008-11-20 07:57:24 +00:00
if ( gsm_bsslap_handle )
2013-05-03 14:54:39 +00:00
call_dissector ( gsm_bsslap_handle , APDU_tvb , pinfo , g_tree ) ;
2008-11-20 07:57:24 +00:00
break ;
case 2 :
/* LLP
* The embedded message contains a Facility Information Element as defined in 3 GPP TS 04.71
* excluding the Facility IEI and length of Facility IEI octets defined in 3 GPP TS 04.71 . ( 3 GPP TS 44.071 ) .
*/
break ;
case 3 :
/* SMLCPP
* The embedded message is as defined in 3 GPP TS 08.31 ( TS 48.031 ) .
*/
break ;
default :
break ;
}
curr_offset + = len ;
2015-01-02 17:19:10 +00:00
EXTRANEOUS_DATA_CHECK ( len , curr_offset - offset , pinfo , & ei_gsm_a_bssmap_le_extraneous_data ) ;
2008-11-20 07:57:24 +00:00
return ( curr_offset - offset ) ;
}
2008-11-23 21:08:46 +00:00
/*
* 10.4 Cause
* coded as the value part of the Cause IE defined in 3 GPP TS 48.008
*/
/*
* 10.5 Cell Identifier
* coded as the value part of the Cell Identifier IE defined in 3 GPP TS 48.008
*/
/*
* 10.6 Chosen Channel
* coded as the value part of the Chosen Channel IE defined in 3 GPP TS 48.008
*/
/*
* 10.7 Classmark Information Type 3
* coded as the value part of the Classmark Information Type 3 IE defined in 3 GPP TS 48.008
*/
/*
* 10.8 Deciphering Keys
*/
2008-12-23 20:49:15 +00:00
static guint16
2011-04-04 14:37:25 +00:00
de_bmaple_decihp_keys ( tvbuff_t * tvb , proto_tree * tree , packet_info * pinfo _U_ , guint32 offset , guint len , gchar * add_string _U_ , int string_len _U_ )
2008-11-23 21:08:46 +00:00
{
2009-01-28 21:52:57 +00:00
gint bit_offset ;
2008-11-23 21:08:46 +00:00
2009-01-28 21:52:57 +00:00
/* Spare bits */
bit_offset = ( offset < < 3 ) ;
2011-09-27 12:05:32 +00:00
proto_tree_add_bits_item ( tree , hf_gsm_bssmap_le_spare , tvb , bit_offset , 7 , ENC_BIG_ENDIAN ) ;
2009-01-28 21:52:57 +00:00
bit_offset + = 7 ;
2008-11-23 21:08:46 +00:00
2009-01-28 21:52:57 +00:00
/* Extract the Ciphering Key Flag and add to protocol tree */
2011-09-27 12:05:32 +00:00
proto_tree_add_bits_item ( tree , hf_gsm_bssmap_le_ciphering_key_flag , tvb , bit_offset , 1 , ENC_BIG_ENDIAN ) ;
2009-01-28 21:52:57 +00:00
bit_offset + + ;
2012-03-10 17:47:07 +00:00
/*offset++;*/
2008-11-23 21:08:46 +00:00
2009-01-28 21:52:57 +00:00
/* Extract the Current Deciphering Key Value and add to protocol tree */
2011-09-27 12:05:32 +00:00
proto_tree_add_bits_item ( tree , hf_gsm_bssmap_le_current_deciphering_key_value , tvb , bit_offset , 56 , ENC_NA ) ;
2009-01-28 21:52:57 +00:00
bit_offset + = 56 ;
2012-03-10 17:47:07 +00:00
/*offset += 7;*/
2008-11-23 21:08:46 +00:00
2009-01-28 21:52:57 +00:00
/* Extract the Next Deciphering Key Value and add to protocol tree */
2011-09-27 12:05:32 +00:00
proto_tree_add_bits_item ( tree , hf_gsm_bssmap_le_next_deciphering_key_value , tvb , bit_offset , 56 , ENC_NA ) ;
2012-03-10 17:47:07 +00:00
/*offset += 7;*/
2008-11-23 21:08:46 +00:00
return ( len ) ;
}
/*
* 10.9 Geographic Location
2011-09-21 23:42:55 +00:00
* contains an octet sequence identical to that for Geographical Information
2008-11-23 21:08:46 +00:00
* defined in 3 GPP TS 23.032 . .
*/
/*
* 10.10 Requested GPS Assistance Data
*/
2011-01-31 15:16:45 +00:00
static guint16
2011-04-04 14:37:25 +00:00
de_bmaple_req_gps_ass_data ( tvbuff_t * tvb , proto_tree * tree , packet_info * pinfo _U_ , guint32 offset , guint len , gchar * add_string _U_ , int string_len _U_ )
2011-01-31 15:16:45 +00:00
{
guint32 curr_offset ;
curr_offset = offset ;
/* Octet 3 H G F E D C B A */
/* bit H Acquisition Assistance */
2011-09-27 12:05:32 +00:00
proto_tree_add_item ( tree , hf_gsm_bssmap_le_acq_ass , tvb , curr_offset , 1 , ENC_BIG_ENDIAN ) ;
2011-01-31 15:16:45 +00:00
/* bit G Reference Time */
2011-09-27 12:05:32 +00:00
proto_tree_add_item ( tree , hf_gsm_bssmap_le_ref_time , tvb , curr_offset , 1 , ENC_BIG_ENDIAN ) ;
2011-01-31 15:16:45 +00:00
/* bit F Reference Location */
2011-09-27 12:05:32 +00:00
proto_tree_add_item ( tree , hf_gsm_bssmap_le_ref_loc , tvb , curr_offset , 1 , ENC_BIG_ENDIAN ) ;
2011-01-31 15:16:45 +00:00
/* bit E DGPS Corrections */
2011-09-27 12:05:32 +00:00
proto_tree_add_item ( tree , hf_gsm_bssmap_le_dgps_corr , tvb , curr_offset , 1 , ENC_BIG_ENDIAN ) ;
2011-01-31 15:16:45 +00:00
/* bit D Navigation Model */
2011-09-27 12:05:32 +00:00
proto_tree_add_item ( tree , hf_gsm_bssmap_le_nav_mod , tvb , curr_offset , 1 , ENC_BIG_ENDIAN ) ;
2011-01-31 15:16:45 +00:00
/* bit C Ionospheric Model */
2011-09-27 12:05:32 +00:00
proto_tree_add_item ( tree , hf_gsm_bssmap_le_iono_mod , tvb , curr_offset , 1 , ENC_BIG_ENDIAN ) ;
2011-01-31 15:16:45 +00:00
/* bit B UTC Model */
2011-09-27 12:05:32 +00:00
proto_tree_add_item ( tree , hf_gsm_bssmap_le_utc_mod , tvb , curr_offset , 1 , ENC_BIG_ENDIAN ) ;
2011-01-31 15:16:45 +00:00
/* bit A Almanac */
2011-09-27 12:05:32 +00:00
proto_tree_add_item ( tree , hf_gsm_bssmap_le_almanac , tvb , curr_offset , 1 , ENC_BIG_ENDIAN ) ;
2011-01-31 15:16:45 +00:00
curr_offset + + ;
2011-09-21 23:42:55 +00:00
/* Octet 4 P O N M L K J I
2011-01-31 15:16:45 +00:00
* bits L through P are Spare bits
*/
/* bit K Ephemeris Extension Check */
2011-09-27 12:05:32 +00:00
proto_tree_add_item ( tree , hf_gsm_bssmap_le_ephemeris_ext_chk , tvb , curr_offset , 1 , ENC_BIG_ENDIAN ) ;
2011-01-31 15:16:45 +00:00
/* bit J Ephemeris Extension */
2011-09-27 12:05:32 +00:00
proto_tree_add_item ( tree , hf_gsm_bssmap_le_ephemeris_ext , tvb , curr_offset , 1 , ENC_BIG_ENDIAN ) ;
2011-01-31 15:16:45 +00:00
/* bit I Real-Time Integrity */
2011-09-27 12:05:32 +00:00
proto_tree_add_item ( tree , hf_gsm_bssmap_le_real_time_int , tvb , curr_offset , 1 , ENC_BIG_ENDIAN ) ;
2011-01-31 15:16:45 +00:00
curr_offset + + ;
/* Octet 5 to Octet 8+2n Satellite related data */
2014-11-01 20:55:25 +00:00
proto_tree_add_expert_format ( tree , pinfo , & ei_gsm_a_bssmap_le_not_decoded_yet , tvb , curr_offset , len - 2 , " Satellite related data Not decoded yet " ) ;
2011-01-31 15:16:45 +00:00
return ( len ) ;
}
2008-11-23 21:08:46 +00:00
/*
* 10.11 IMSI
* coded as the value part of the Mobile Identity IE defined in 3 GPP TS 24.008 ( NOTE 1 )
* NOTE 1 : The Type of identity field in the Mobile Identity IE shall
* be ignored by the receiver
*/
/*
* 10.12 ( void )
*/
/*
* 10.13 LCS Cause
*/
static const value_string bssmap_le_lcs_cause_values [ ] = {
2009-01-28 21:52:57 +00:00
{ 0 , " Unspecified " } ,
{ 1 , " System Failure " } ,
{ 2 , " Protocol Error " } ,
{ 3 , " Data missing in position request " } ,
{ 4 , " Unexpected data value in position request " } ,
{ 5 , " Position method failure " } ,
{ 6 , " Target MS Unreachable " } ,
{ 7 , " Location request aborted " } ,
{ 8 , " Facility not supported " } ,
{ 9 , " Inter-BSC Handover Ongoing " } ,
{ 10 , " Intra-BSC Handover Complete " } ,
{ 11 , " Congestion " } ,
{ 12 , " Inter NSE cell change " } ,
{ 13 , " Routing Area Update " } ,
{ 14 , " PTMSI reallocation " } ,
{ 15 , " Suspension of GPRS services " } ,
{ 0 , NULL }
2008-11-23 21:08:46 +00:00
} ;
static const value_string bssmap_le_position_method_failure_diagnostic_vals [ ] = {
2009-01-28 21:52:57 +00:00
{ 0 , " Congestion " } ,
{ 1 , " insufficientResources " } ,
{ 2 , " insufficientMeasurementData " } ,
{ 3 , " inconsistentMeasurementData " } ,
{ 4 , " locationProcedureNotCompleted " } ,
{ 5 , " locationProcedureNotSupportedByTargetMS " } ,
{ 6 , " qoSNotAttainable " } ,
{ 7 , " positionMethodNotAvailableInNetwork " } ,
{ 8 , " positionMethodNotAvailableInLocaitonArea " } ,
{ 0 , NULL }
2008-11-23 21:08:46 +00:00
} ;
2008-12-23 20:49:15 +00:00
static guint16
2011-04-04 14:37:25 +00:00
de_bmaple_cause ( tvbuff_t * tvb , proto_tree * tree , packet_info * pinfo _U_ , guint32 offset , guint len , gchar * add_string _U_ , int string_len _U_ )
2008-11-23 21:08:46 +00:00
{
guint32 curr_offset ;
curr_offset = offset ;
2009-01-28 21:52:57 +00:00
/* cause value */
2011-09-27 12:05:32 +00:00
proto_tree_add_item ( tree , hf_gsm_bssmap_le_lcs_cause_value , tvb , curr_offset , 1 , ENC_BIG_ENDIAN ) ;
2009-01-28 21:52:57 +00:00
curr_offset + + ;
2008-11-23 21:08:46 +00:00
2009-01-28 21:52:57 +00:00
if ( len = = 2 )
{
/* Diagnostic value (note) */
2011-09-27 12:05:32 +00:00
proto_tree_add_item ( tree , hf_gsm_bssmap_le_diagnostic_value , tvb , curr_offset , 1 , ENC_BIG_ENDIAN ) ;
2009-01-28 21:52:57 +00:00
curr_offset + + ;
}
2008-11-23 21:08:46 +00:00
return ( curr_offset - offset ) ;
}
/*
* 10.14 LCS Client Type
*/
/* Client Category definitions */
static const value_string bssmap_le_client_category [ ] = {
2009-01-28 21:52:57 +00:00
{ 0 , " Value Added Client " } ,
{ 2 , " PLMN Operator " } ,
{ 3 , " Emergency Services " } ,
{ 4 , " Lawful Intercept Services " } ,
{ 0 , NULL }
2008-11-23 21:08:46 +00:00
} ;
/* Client Subtype definitions */
static const value_string bssmap_le_client_subtype [ ] = {
2009-01-28 21:52:57 +00:00
{ 0 , " unspecified " } ,
{ 1 , " broadcast service " } ,
{ 2 , " O&M " } ,
{ 3 , " anonymous statistics " } ,
{ 4 , " Target MS service support " } ,
{ 0 , NULL }
2008-11-23 21:08:46 +00:00
} ;
2008-12-23 20:49:15 +00:00
static guint16
2011-04-04 14:37:25 +00:00
de_bmaple_client ( tvbuff_t * tvb , proto_tree * tree , packet_info * pinfo _U_ , guint32 offset , guint len _U_ , gchar * add_string _U_ , int string_len _U_ )
2008-11-23 21:08:46 +00:00
{
guint32 curr_offset ;
2014-10-03 14:13:07 +00:00
guint8 bitCount ;
2008-11-23 21:08:46 +00:00
2009-01-28 21:52:57 +00:00
bitCount = offset < < 3 ;
2008-11-23 21:08:46 +00:00
curr_offset = offset ;
2009-01-28 21:52:57 +00:00
/* Extract the client category and add to protocol tree */
2011-09-27 12:05:32 +00:00
proto_tree_add_bits_item ( tree , hf_gsm_bssmap_le_client_category , tvb , bitCount , 4 , ENC_BIG_ENDIAN ) ;
2009-01-28 21:52:57 +00:00
bitCount = bitCount + 4 ;
2008-11-23 21:08:46 +00:00
2009-01-28 21:52:57 +00:00
/* Extract the client subtype and add to protocol tree */
2011-09-27 12:05:32 +00:00
proto_tree_add_bits_item ( tree , hf_gsm_bssmap_le_client_subtype , tvb , bitCount , 4 , ENC_BIG_ENDIAN ) ;
2012-03-10 17:47:07 +00:00
/*bitCount = bitCount + 4;*/
2008-11-23 21:08:46 +00:00
curr_offset + + ;
return ( curr_offset - offset ) ;
}
/*
* 10.15 LCS Priority
* coded as the LCS - Priority octet in 3 GPP TS 29.002
*/
/*
* 10.16 LCS QoS
*/
2008-12-23 20:49:15 +00:00
static guint16
2011-04-04 14:37:25 +00:00
de_bmaple_lcs_qos ( tvbuff_t * tvb , proto_tree * tree , packet_info * pinfo _U_ , guint32 offset , guint len , gchar * add_string _U_ , int string_len _U_ )
2008-11-23 21:08:46 +00:00
{
2009-01-28 21:52:57 +00:00
guint64 verticalCoordIndicator , velocityRequested , horizontalAccuracyIndicator , verticalAccuracyIndicator ;
guint16 bitCount ;
bitCount = offset < < 3 ;
2011-09-27 12:05:32 +00:00
proto_tree_add_bits_item ( tree , hf_gsm_bssmap_le_spare , tvb , bitCount , 6 , ENC_BIG_ENDIAN ) ;
2009-01-28 21:52:57 +00:00
bitCount = bitCount + 6 ;
/* Extract Velocity requested element */
2011-09-27 12:05:32 +00:00
proto_tree_add_bits_ret_val ( tree , hf_gsm_bssmap_le_velocity_requested , tvb , bitCount , 1 , & velocityRequested , ENC_BIG_ENDIAN ) ;
2009-01-28 21:52:57 +00:00
bitCount + + ;
/* Extract vertical coordinator element */
2011-09-27 12:05:32 +00:00
proto_tree_add_bits_ret_val ( tree , hf_gsm_bssmap_le_vertical_coordinate_indicator , tvb , bitCount , 1 , & verticalCoordIndicator , ENC_BIG_ENDIAN ) ;
2009-01-28 21:52:57 +00:00
bitCount + + ;
/* Extract horizontal accuracy element */
2011-09-27 12:05:32 +00:00
proto_tree_add_bits_ret_val ( tree , hf_gsm_bssmap_le_horizontal_accuracy_indicator , tvb , bitCount , 1 , & horizontalAccuracyIndicator , ENC_BIG_ENDIAN ) ;
2009-01-28 21:52:57 +00:00
bitCount + + ;
if ( horizontalAccuracyIndicator = = 1 )
{
2011-09-27 12:05:32 +00:00
proto_tree_add_bits_item ( tree , hf_gsm_bssmap_le_horizontal_accuracy , tvb , bitCount , 7 , ENC_BIG_ENDIAN ) ;
2009-01-28 21:52:57 +00:00
bitCount = bitCount + 7 ;
}
else
{
2011-09-27 12:05:32 +00:00
proto_tree_add_bits_item ( tree , hf_gsm_bssmap_le_spare , tvb , bitCount , 7 , ENC_BIG_ENDIAN ) ;
2009-01-28 21:52:57 +00:00
bitCount = bitCount + 7 ;
}
/* Extract vertical accuracy element */
2011-09-27 12:05:32 +00:00
proto_tree_add_bits_ret_val ( tree , hf_gsm_bssmap_le_vertical_accuracy_indicator , tvb , bitCount , 1 , & verticalAccuracyIndicator , ENC_BIG_ENDIAN ) ;
2009-01-28 21:52:57 +00:00
bitCount + + ;
if ( verticalAccuracyIndicator = = 1 )
{
2011-09-27 12:05:32 +00:00
proto_tree_add_bits_item ( tree , hf_gsm_bssmap_le_vertical_accuracy , tvb , bitCount , 7 , ENC_BIG_ENDIAN ) ;
2009-01-28 21:52:57 +00:00
bitCount = bitCount + 7 ;
}
else
{
2011-09-27 12:05:32 +00:00
proto_tree_add_bits_item ( tree , hf_gsm_bssmap_le_spare , tvb , bitCount , 7 , ENC_BIG_ENDIAN ) ;
2009-01-28 21:52:57 +00:00
bitCount = bitCount + 7 ;
}
2011-09-27 12:05:32 +00:00
proto_tree_add_bits_item ( tree , hf_gsm_bssmap_le_response_time_category , tvb , bitCount , 2 , ENC_BIG_ENDIAN ) ;
2012-03-10 17:47:07 +00:00
/*bitCount = bitCount + 2;*/
2008-11-23 21:08:46 +00:00
return ( len ) ;
}
/*
* 10.17 ( void )
*/
/*
* 10.18 Location Type
*/
2017-10-27 13:47:42 +00:00
static guint16
de_bmaple_location_type ( tvbuff_t * tvb , proto_tree * tree , packet_info * pinfo _U_ , guint32 offset , guint len , gchar * add_string _U_ , int string_len _U_ )
{
guint32 curr_offset ;
curr_offset = offset ;
/* Location information (octet 3) */
proto_tree_add_item ( tree , hf_gsm_bssmap_le_location_inf , tvb , curr_offset , 1 , ENC_BIG_ENDIAN ) ;
curr_offset + + ;
if ( len = = 1 ) {
return len ;
}
/* Positioning Method (octet 4) */
proto_tree_add_item ( tree , hf_gsm_bssmap_le_pos_method , tvb , curr_offset , 1 , ENC_BIG_ENDIAN ) ;
curr_offset + + ;
return ( curr_offset - offset ) ;
}
2008-11-23 21:08:46 +00:00
/*
* 10.19 Network Element Identity
*/
/*
* 10.20 Positioning Data
*/
2008-12-23 20:49:15 +00:00
static guint16
2017-10-30 21:01:16 +00:00
de_bmaple_pos_dta ( tvbuff_t * tvb , proto_tree * tree , packet_info * pinfo _U_ , guint32 offset , guint len , gchar * add_string _U_ , int string_len _U_ )
2008-11-23 21:08:46 +00:00
{
2017-10-30 21:01:16 +00:00
guint32 curr_offset , value ;
2008-11-23 21:08:46 +00:00
curr_offset = offset ;
2017-10-30 21:01:16 +00:00
/* Octet 3 spare Positioning Data Discriminator*/
proto_tree_add_item_ret_uint ( tree , hf_gsm_bssmap_le_pos_data_disc , tvb , curr_offset , 1 , ENC_BIG_ENDIAN , & value ) ;
curr_offset + + ;
if ( value ! = 0 ) {
return len ;
}
/* 0000 indicate usage of each positioning method that was attempted either successfully or unsuccessfully;
* 1 octet of data is provided for each positioning method included
*/
while ( curr_offset < ( offset + len ) ) {
/* Octet x positioning method usage*/
proto_tree_add_item ( tree , hf_gsm_bssmap_le_pos_data_pos_method , tvb , curr_offset , 1 , ENC_BIG_ENDIAN ) ;
proto_tree_add_item ( tree , hf_gsm_bssmap_le_pos_data_usage , tvb , curr_offset , 1 , ENC_BIG_ENDIAN ) ;
curr_offset + + ;
}
2008-11-23 21:08:46 +00:00
return ( len ) ;
}
/*
* 10.21 Return Error Request
*/
/*
* 10.22 Return Error Cause
*/
/*
* 10.23 ( void )
*/
/*
* 10.24 Segmentation
*/
/*
* 10.25 ( void )
*/
/*
* 10.26 LCS Capability
* coded as the value part of the LCS Capability
* information element in 3 GPP TS 48.018 , not including
* 3 GPP TS 48.018 IEI and length indicator
*/
/* Dissector for the LCS Capability element */
2008-12-23 20:49:15 +00:00
static guint16
2014-11-01 20:55:25 +00:00
be_lcs_capability ( tvbuff_t * tvb , proto_tree * tree , packet_info * pinfo , guint32 offset , guint len , gchar * add_string _U_ , int string_len _U_ )
2008-11-23 21:08:46 +00:00
{
/* Extract the LCS Capability element and add to protocol tree */
2014-11-01 20:55:25 +00:00
proto_tree_add_expert ( tree , pinfo , & ei_gsm_a_bssmap_le_not_decoded_yet , tvb , offset , len ) ;
2008-11-23 21:08:46 +00:00
return len ;
}
/*
* 10.27 Packet Measurement Report
* coded as the Packet Measurement Report
* message or the Packet Enhanced Measurement Report message
* starting with the 6 - bit MESSAGE_TYPE ( see clause 11 in
* 3 GPP TS 44.060 ) and ending with the Non - distribution contents
* ( i . e . the RLC / MAC padding bits are not included ) . The end of the
* message is padded with 0 - bits to the nearest octet boundary .
*/
/* Dissector for the Packet Measurement Report element */
2008-12-23 20:49:15 +00:00
static guint16
2014-11-01 20:55:25 +00:00
be_packet_meas_rep ( tvbuff_t * tvb , proto_tree * tree , packet_info * pinfo , guint32 offset , guint len , gchar * add_string _U_ , int string_len _U_ )
2008-11-23 21:08:46 +00:00
{
2009-01-28 21:52:57 +00:00
/* Extract the Packet Measurement Report element and add to protocol tree */
2014-11-01 20:55:25 +00:00
proto_tree_add_expert ( tree , pinfo , & ei_gsm_a_bssmap_le_not_decoded_yet , tvb , offset , len ) ;
2008-11-23 21:08:46 +00:00
return len ;
}
/*
* 10.28 Cell Identity List
2011-09-21 23:42:55 +00:00
* coded as the value part of the Cell Identity List IE
2008-11-23 21:08:46 +00:00
* defined in 3 GPP TS 48.071 .
*/
/* Dissector for the Measured Cell Identity List element */
2008-12-23 20:49:15 +00:00
static guint16
2014-11-01 20:55:25 +00:00
be_measured_cell_identity ( tvbuff_t * tvb , proto_tree * tree , packet_info * pinfo , guint32 offset , guint len , gchar * add_string _U_ , int string_len _U_ )
2008-11-23 21:08:46 +00:00
{
/* Extract the Measured Cell Identity List element and add to protocol tree */
2014-11-01 20:55:25 +00:00
proto_tree_add_expert ( tree , pinfo , & ei_gsm_a_bssmap_le_not_decoded_yet , tvb , offset , len ) ;
2008-11-23 21:08:46 +00:00
return len ;
}
/*
* 10.29 IMEI
* IMEI coded as the value part of the Mobile Identity IE defined in
* 3 GPP TS 24.008 ( NOTE 1 )
* NOTE 1 : The Type of identity field in the Mobile Identity IE shall
* be ignored by the receiver .
*/
/*
* 10.30 Velocity Data
2011-09-21 23:42:55 +00:00
* contains an octet sequence identical to that for Description of
2008-11-23 21:08:46 +00:00
* Velocity defined in 3 GPP TS 23.032 .
*/
/*
* 10.31 Requested GANSS Assistance Data
*/
/*
* 10.32 GANSS Positioning Data
*/
/*
* 10.33 GANSS Location Type
*/
2008-11-20 07:57:24 +00:00
# define NUM_GSM_BSSMAP_LE_MSG (sizeof(gsm_bssmap_le_msg_strings) / sizeof(value_string))
static gint ett_gsm_bssmap_le_msg [ NUM_GSM_BSSMAP_LE_MSG ] ;
/*
This enum is defined in packet - gsm_a_common . h to
make it possible to use element dissecton from this dissector
in other dissectors .
It is shown here as a comment for easier reference .
Note this enum must be of the same size as the element decoding list below
typedef enum
{
2008-11-23 21:08:46 +00:00
DE_BMAPLE_LCSQOS , / 10.16 LCS QoS /
2008-11-20 07:57:24 +00:00
DE_BMAPLE_LCS_PRIO , / LCS Priority /
2008-11-23 21:08:46 +00:00
DE_BMAPLE_LOC_TYPE , / 10.18 Location Type /
2011-09-21 23:42:55 +00:00
DE_BMAPLE_GANSS_LOC_TYPE , / GANSS Location Type /
DE_BMAPLE_GEO_LOC , / 10.9 Geographic Location /
DE_BMAPLE_POS_DATA , / 10.20 Positioning Data /
2008-11-20 07:57:24 +00:00
DE_BMAPLE_GANSS_POS_DATA , / GANSS Positioning Data /
DE_BMAPLE_VELOC_DATA , / Velocity Data /
2011-09-21 23:42:55 +00:00
DE_BMAPLE_LCS_CAUSE , / 10.13 LCS Cause /
2008-11-20 07:57:24 +00:00
DE_BMAPLE_LCS_CLIENT_TYPE , / LCS Client Type /
2011-09-21 23:42:55 +00:00
DE_BMAPLE_APDU , / 10.3 APDU /
2008-11-20 07:57:24 +00:00
DE_BMAPLE_NETWORK_ELEM_ID , / Network Element Identity /
2011-09-21 23:42:55 +00:00
DE_BMAPLE_REQ_GPS_ASSIST_D , / 10.10 Requested GPS Assistance Data /
2008-11-20 07:57:24 +00:00
DE_BMAPLE_REQ_GNSS_ASSIST_D , / Requested GANSS Assistance Data /
2008-11-23 21:08:46 +00:00
DE_BMAPLE_DECIPH_KEYS , / 10.8 Deciphering Keys /
2008-11-20 07:57:24 +00:00
DE_BMAPLE_RETURN_ERROR_REQ , / Return Error Request /
DE_BMAPLE_RETURN_ERROR_CAUSE , / Return Error Cause /
DE_BMAPLE_SEGMENTATION , / Segmentation /
2008-11-23 21:08:46 +00:00
DE_BMAPLE_CLASSMARK_TYPE_3 , / 10.7 Classmark Information Type 3 /
DE_BMAPLE_CAUSE , / 10.4 Cause /
DE_BMAPLE_CELL_IDENTIFIER , / 10.5 Cell Identifier /
DE_BMAPLE_CHOSEN_CHANNEL , / 10.6 Chosen Channel /
DE_BMAPLE_IMSI , / 10.11 IMSI /
2008-11-20 07:57:24 +00:00
DE_BMAPLE_RES1 , / Reserved /
DE_BMAPLE_RES2 , / Reserved /
DE_BMAPLE_RES3 , / Reserved /
DE_BMAPLE_LCS_CAPABILITY , / LCS Capability /
DE_BMAPLE_PACKET_MEAS_REP , / Packet Measurement Report /
DE_BMAPLE_MEAS_CELL_ID , / Measured Cell Identity /
DE_BMAPLE_IMEI , / IMEI /
BMAPLE_NONE / NONE /
}
bssmap_le_elem_idx_t ;
*/
2011-04-04 14:37:25 +00:00
guint16 ( * bssmap_le_elem_fcn [ ] ) ( tvbuff_t * tvb , proto_tree * tree , packet_info * pinfo _U_ , guint32 offset , guint len , gchar * add_string , int string_len ) = {
2008-11-20 07:57:24 +00:00
/* NOTE: The null types below are defined elsewhere. i.e in packet-gsm_a_bssmap.c */
2011-01-31 15:16:45 +00:00
de_bmaple_lcs_qos , /* 10.16 LCS QoS */
NULL , /* LCS Priority */
2017-10-27 13:47:42 +00:00
de_bmaple_location_type , /* 10.18 Location Type */
2011-01-31 15:16:45 +00:00
be_ganss_loc_type , /* GANSS Location Type */
NULL , /* 10.9 Geographic Location */
de_bmaple_pos_dta , /* 10.20 Positioning Data */
be_ganss_pos_dta , /* GANSS Positioning Data */
NULL , /* Velocity Data */
de_bmaple_cause , /* 10.13 LCS Cause */
de_bmaple_client , /* LCS Client Type */
de_bmaple_apdu , /* APDU */
NULL , /* Network Element Identity */
de_bmaple_req_gps_ass_data , /* 10.10 Requested GPS Assistance Data */
be_ganss_ass_dta , /* Requested GANSS Assistance Data */
de_bmaple_decihp_keys , /* 10.8 Deciphering Keys */
NULL , /* Return Error Request */
NULL , /* Return Error Cause */
NULL , /* Segmentation */
NULL , /* 10.7 Classmark Information Type 3 */
NULL , /* Cause */
NULL , /* Cell Identifier */
NULL , /* 10.6 Chosen Channel */
de_mid , /* 10.11 IMSI */
NULL , /* Reserved */
NULL , /* Reserved */
NULL , /* Reserved */
be_lcs_capability , /* LCS Capability */
be_packet_meas_rep , /* Packet Measurement Report */
be_measured_cell_identity , /* Measured Cell Identity List */
de_mid , /* IMEI (use same dissector as IMSI) */
2008-11-20 07:57:24 +00:00
NULL , /* NONE */
2011-09-21 23:42:55 +00:00
2008-11-20 07:57:24 +00:00
} ;
/*
* 9.1 PERFORM LOCATION REQUEST
*/
static void
2011-04-04 07:45:34 +00:00
bssmap_le_perf_loc_request ( tvbuff_t * tvb , proto_tree * tree , packet_info * pinfo _U_ , guint32 offset , guint len )
2008-11-20 07:57:24 +00:00
{
guint32 curr_offset ;
guint32 consumed ;
guint curr_len ;
curr_offset = offset ;
curr_len = len ;
/* Location Type 9.1.1 M 3-n */
2015-01-02 17:19:10 +00:00
ELEM_MAND_TLV ( BSSMAP_LE_LOCATION_TYPE , GSM_A_PDU_TYPE_BSSMAP , BE_LOC_TYPE , NULL , ei_gsm_a_bssmap_le_missing_mandatory_element )
2008-11-20 07:57:24 +00:00
/* Cell Identifier 9.1.2 O 5-10 */
2015-01-02 17:19:10 +00:00
ELEM_MAND_TLV ( BSSMAP_LE_CELL_IDENTIFIER , GSM_A_PDU_TYPE_BSSMAP , BE_CELL_ID , NULL , ei_gsm_a_bssmap_le_missing_mandatory_element ) ;
2008-11-20 07:57:24 +00:00
/* Classmark Information Type 3 9.1.3 O 3-14 */
2013-01-22 23:25:44 +00:00
ELEM_OPT_TLV ( BSSMAP_LE_CLASSMARK_INFORMATION_TYPE_3 , GSM_A_PDU_TYPE_BSSMAP , BE_CM_INFO_3 , NULL ) ;
2008-11-20 07:57:24 +00:00
/* LCS Client Type 9.1.4 C (note 3) 3-n */
2013-01-22 23:25:44 +00:00
ELEM_OPT_TLV ( BSSMAP_LE_LCS_CLIENT_TYPE , GSM_PDU_TYPE_BSSMAP_LE , DE_BMAPLE_LCS_CLIENT_TYPE , NULL ) ;
2008-11-20 07:57:24 +00:00
/* Chosen Channel 9.1.5 O 2 */
2014-03-09 10:06:17 +00:00
ELEM_OPT_TLV ( BSSMAP_LE_CHOSEN_CHANNEL , GSM_A_PDU_TYPE_BSSMAP , BE_CHOSEN_CHAN , NULL ) ;
2008-11-20 07:57:24 +00:00
/* LCS Priority 9.1.6 O 3-n */
2013-01-22 23:25:44 +00:00
ELEM_OPT_TLV ( BSSMAP_LE_LCS_PRIORITY , GSM_A_PDU_TYPE_BSSMAP , BE_LCS_PRIO , NULL ) ;
2008-11-20 07:57:24 +00:00
/* LCS QoS 9.1.6a C (note 1) 3-n */
2013-01-22 23:25:44 +00:00
ELEM_OPT_TLV ( BSSMAP_LE_LCS_QOS , GSM_PDU_TYPE_BSSMAP_LE , DE_BMAPLE_LCSQOS , NULL ) ;
2008-11-20 07:57:24 +00:00
/* GPS Assistance Data 9.1.7 C (note 2) 3-n */
2013-01-22 23:25:44 +00:00
ELEM_OPT_TLV ( BSSMAP_LE_REQUESTED_GPS_ASSISTANCE_DATA , GSM_A_PDU_TYPE_BSSMAP , BE_GPS_ASSIST_DATA , NULL ) ;
2008-11-20 07:57:24 +00:00
/* APDU 9.1.8 O 3-n */
2015-01-02 17:19:10 +00:00
ELEM_MAND_TELV ( BSSMAP_LE_APDU , GSM_PDU_TYPE_BSSMAP_LE , DE_BMAPLE_APDU , NULL , ei_gsm_a_bssmap_le_missing_mandatory_element ) ;
2008-11-20 07:57:24 +00:00
/* LCS Capability 9.1.9 O */
2013-01-22 23:25:44 +00:00
ELEM_OPT_TLV ( BSSMAP_LE_LCS_CAPABILITY , GSM_PDU_TYPE_BSSMAP_LE , DE_BMAPLE_LCS_CAPABILITY , NULL ) ;
2008-11-20 07:57:24 +00:00
/* Packet Measurement Report 9.1.10 O*/
2013-01-22 23:25:44 +00:00
ELEM_OPT_TLV ( BSSMAP_LE_PACKET_MEASUREMENT_REPORT , GSM_PDU_TYPE_BSSMAP_LE , DE_BMAPLE_PACKET_MEAS_REP , NULL ) ;
2008-11-20 07:57:24 +00:00
/* Measured Cell Identity List 9.1.11 O*/
2013-01-22 23:25:44 +00:00
ELEM_OPT_TLV ( BSSMAP_LE_CELL_IDENTITY_LIST , GSM_PDU_TYPE_BSSMAP_LE , DE_BMAPLE_MEAS_CELL_ID , NULL ) ;
2008-11-20 07:57:24 +00:00
/* IMSI 9.1.12 O (note 4) 5-10 */
2013-01-22 23:25:44 +00:00
ELEM_OPT_TLV ( BSSMAP_LE_IMSI , GSM_PDU_TYPE_BSSMAP_LE , DE_BMAPLE_IMSI , NULL ) ;
2008-11-20 07:57:24 +00:00
/* IMEI 9.1.13 O (note 4) 10 (use same decode as IMSI) */
2013-01-22 23:25:44 +00:00
ELEM_OPT_TLV ( BSSMAP_LE_IMEI , GSM_PDU_TYPE_BSSMAP_LE , DE_BMAPLE_IMEI , NULL ) ;
2008-11-20 07:57:24 +00:00
/* GANSS Location Type 9.1.14 C 3 */
2013-01-22 23:25:44 +00:00
ELEM_OPT_TLV ( BSSMAP_LE_GANSS_LOCATION_TYPE , GSM_PDU_TYPE_BSSMAP_LE , DE_BMAPLE_GANSS_LOC_TYPE , NULL ) ;
2008-11-20 07:57:24 +00:00
/* GANSS Assistance Data 9.1.15 C (note 5) 3-n */
2013-01-22 23:25:44 +00:00
ELEM_OPT_TLV ( BSSMAP_LE_REQUESTED_GANSS_ASSISTANCE_DATA , GSM_PDU_TYPE_BSSMAP_LE , DE_BMAPLE_REQ_GNSS_ASSIST_D , NULL ) ;
2008-11-20 07:57:24 +00:00
2015-01-02 17:19:10 +00:00
EXTRANEOUS_DATA_CHECK ( curr_len , 0 , pinfo , & ei_gsm_a_bssmap_le_extraneous_data ) ;
2008-11-20 07:57:24 +00:00
}
/*
* 9.2 PERFORM LOCATION RESPONSE
*/
static void
2011-04-04 07:45:34 +00:00
bssmap_le_perf_loc_resp ( tvbuff_t * tvb , proto_tree * tree , packet_info * pinfo _U_ , guint32 offset , guint len )
2008-11-20 07:57:24 +00:00
{
guint32 curr_offset ;
guint32 consumed ;
guint curr_len ;
curr_offset = offset ;
curr_len = len ;
/* Location Estimate 9.2.1 C (note 1) 3-n */
2013-01-22 23:25:44 +00:00
ELEM_OPT_TLV ( BSSMAP_LE_GEOGRAPHIC_LOCATION , BSSAP_PDU_TYPE_BSSMAP , BE_LOC_EST , NULL ) ;
2008-11-20 07:57:24 +00:00
/* Positioning Data 9.2.2 O 3-n */
2013-01-22 23:25:44 +00:00
ELEM_OPT_TLV ( BSSMAP_LE_POSITIONING_DATA , GSM_PDU_TYPE_BSSMAP_LE , DE_BMAPLE_POS_DATA , NULL ) ;
2008-11-20 07:57:24 +00:00
/* Deciphering Keys 9.2.3 C (note 2) 3-n */
2013-01-22 23:25:44 +00:00
ELEM_OPT_TLV ( BSSMAP_LE_DECIPHERING_KEYS , GSM_PDU_TYPE_BSSMAP_LE , DE_BMAPLE_DECIPH_KEYS , NULL ) ;
2008-11-20 07:57:24 +00:00
/* LCS Cause 9.2.4 C (note 3) 3-n */
2013-01-22 23:25:44 +00:00
ELEM_OPT_TLV ( BSSMAP_LE_LCS_CAUSE , GSM_PDU_TYPE_BSSMAP_LE , DE_BMAPLE_LCS_CAUSE , NULL ) ;
2008-11-20 07:57:24 +00:00
/* Velocity Estimate 9.2.5 O 3-n */
2013-01-22 23:25:44 +00:00
ELEM_OPT_TLV ( BSSMAP_LE_VELOCITY_DATA , BSSAP_PDU_TYPE_BSSMAP , BE_VEL_EST , NULL ) ;
2008-11-20 07:57:24 +00:00
/* GANSS Positioning Data 9.2.6 O 3-n */
2013-01-22 23:25:44 +00:00
ELEM_OPT_TLV ( BSSMAP_LE_GANSS_POSITIONING_DATA , GSM_PDU_TYPE_BSSMAP_LE , DE_BMAPLE_GANSS_POS_DATA , NULL ) ;
2008-11-20 07:57:24 +00:00
2015-01-02 17:19:10 +00:00
EXTRANEOUS_DATA_CHECK ( curr_len , 0 , pinfo , & ei_gsm_a_bssmap_le_extraneous_data ) ;
2008-11-20 07:57:24 +00:00
}
/*
* 9.8 CONNECTION ORIENTED INFORMATION
*/
static void
2011-04-04 07:45:34 +00:00
bssmap_le_connection_oriented ( tvbuff_t * tvb , proto_tree * tree , packet_info * pinfo _U_ , guint32 offset , guint len )
2008-11-20 07:57:24 +00:00
{
guint32 curr_offset ;
guint32 consumed ;
guint curr_len ;
curr_offset = offset ;
curr_len = len ;
/* APDU 9.8.1 M 3-n */
2015-01-02 17:19:10 +00:00
ELEM_MAND_TELV ( BSSMAP_LE_APDU , GSM_PDU_TYPE_BSSMAP_LE , DE_BMAPLE_APDU , NULL , ei_gsm_a_bssmap_le_missing_mandatory_element ) ;
2008-11-20 07:57:24 +00:00
/* Segmentation 9.8.2 */
2013-01-22 23:25:44 +00:00
ELEM_OPT_TLV ( BSSMAP_LE_SEGMENTATION , BSSAP_PDU_TYPE_BSSMAP , BE_SEG , NULL ) ;
2008-11-20 07:57:24 +00:00
2015-01-02 17:19:10 +00:00
EXTRANEOUS_DATA_CHECK ( curr_len , 0 , pinfo , & ei_gsm_a_bssmap_le_extraneous_data ) ;
2008-11-20 07:57:24 +00:00
}
/*
* 9.9 CONNECTIONLESS INFORMATION
*
Network Element Identity ( source ) 3.2 .2 .69 Both M 3 - n
Network Element Identity ( target ) 3.2 .2 .69 Both M 3 - n
2011-09-21 23:42:55 +00:00
APDU 3.2 .2 .68 Both M 3 - n
2008-11-20 07:57:24 +00:00
Segmentation 3.2 , 2 , 74 Both C ( note 1 ) 5
Return Error Request 3.2 .2 .72 Both C ( note 2 ) 3 - n
2011-09-21 23:42:55 +00:00
Return Error Cause 3.2 .2 .73 Both C ( note 3 ) 3 - n
2008-11-20 07:57:24 +00:00
*/
/*
* 9.11 RESET ACKNOWLEDGE
* no data
*/
/*
* 9.12 PERFORM LOCATION INFORMATION
*/
static void
2011-04-04 07:45:34 +00:00
bssmap_le_perf_loc_info ( tvbuff_t * tvb , proto_tree * tree , packet_info * pinfo _U_ , guint32 offset , guint len )
2008-11-20 07:57:24 +00:00
{
guint32 curr_offset ;
guint32 consumed ;
guint curr_len ;
curr_offset = offset ;
curr_len = len ;
/* Cell Identifier 9.12.1 M */
2015-01-02 17:19:10 +00:00
ELEM_MAND_TLV ( BSSMAP_LE_CELL_IDENTIFIER , GSM_A_PDU_TYPE_BSSMAP , BE_CELL_ID , NULL , ei_gsm_a_bssmap_le_missing_mandatory_element ) ;
2008-11-20 07:57:24 +00:00
/* APDU 9.1.8 O 3-n */
2015-01-02 17:19:10 +00:00
ELEM_MAND_TELV ( BSSMAP_LE_APDU , GSM_PDU_TYPE_BSSMAP_LE , DE_BMAPLE_APDU , NULL , ei_gsm_a_bssmap_le_missing_mandatory_element ) ;
2008-11-20 07:57:24 +00:00
2015-01-02 17:19:10 +00:00
EXTRANEOUS_DATA_CHECK ( curr_len , 0 , pinfo , & ei_gsm_a_bssmap_le_extraneous_data ) ;
2008-11-20 07:57:24 +00:00
}
2011-04-04 07:45:34 +00:00
static void ( * bssmap_le_msg_fcn [ ] ) ( tvbuff_t * tvb , proto_tree * tree , packet_info * pinfo _U_ , guint32 offset , guint len ) = {
2008-11-20 07:57:24 +00:00
NULL ,
NULL ,
NULL ,
NULL ,
NULL ,
bssmap_le_perf_loc_request , /* Perform Location Request */
bssmap_le_perf_loc_resp , /* Perform Location Response */
bssmap_perf_loc_abort , /* Abort */
bssmap_le_perf_loc_info , /* Perform Location Information */
bssmap_le_connection_oriented , /* Connection Oriented Information */
NULL , /* Connectionless Information */
bssmap_reset , /* Reset */
NULL , /* Reset Acknowledge */
NULL , /* NONE */
} ;
2014-12-11 10:32:25 +00:00
static int
2014-11-22 16:54:54 +00:00
dissect_bssmap_le ( tvbuff_t * tvb , packet_info * pinfo , proto_tree * tree , void * data )
2008-11-20 07:57:24 +00:00
{
static gsm_a_tap_rec_t tap_rec [ 4 ] ;
2014-10-03 14:13:07 +00:00
static gsm_a_tap_rec_t * tap_p ;
static guint tap_current = 0 ;
2008-11-20 07:57:24 +00:00
guint8 oct ;
guint32 offset , saved_offset ;
guint32 len ;
gint idx ;
proto_item * bssmap_le_item = NULL ;
proto_tree * bssmap_le_tree = NULL ;
const gchar * str ;
2014-11-22 16:54:54 +00:00
sccp_msg_info_t * sccp_msg_p = ( sccp_msg_info_t * ) data ;
2008-11-20 07:57:24 +00:00
2010-01-18 21:49:47 +00:00
if ( ! ( sccp_msg_p & & sccp_msg_p - > data . co . assoc ) ) {
sccp_msg_p = NULL ;
2008-11-20 07:57:24 +00:00
}
2009-09-24 20:00:21 +00:00
col_append_str ( pinfo - > cinfo , COL_INFO , " (BSSMAP LE) " ) ;
2008-11-20 07:57:24 +00:00
/*
* set tap record pointer
*/
tap_current + + ;
if ( tap_current > = 4 )
{
tap_current = 0 ;
}
tap_p = & tap_rec [ tap_current ] ;
offset = 0 ;
saved_offset = offset ;
g_tree = tree ;
2014-11-03 15:19:10 +00:00
len = tvb_reported_length ( tvb ) ;
2008-11-20 07:57:24 +00:00
/*
* add BSSMAP message name
*/
oct = tvb_get_guint8 ( tvb , offset + + ) ;
2013-03-29 00:26:23 +00:00
str = try_val_to_str_idx ( ( guint32 ) oct , gsm_bssmap_le_msg_strings , & idx ) ;
2008-11-20 07:57:24 +00:00
2010-01-18 21:49:47 +00:00
if ( sccp_msg_p & & ! sccp_msg_p - > data . co . label ) {
2013-09-15 10:29:49 +00:00
sccp_msg_p - > data . co . label = wmem_strdup ( wmem_file_scope ( ) ,
val_to_str ( ( guint32 ) oct ,
gsm_bssmap_le_msg_strings , " BSSMAP LE(0x%02x) " ) ) ;
2008-11-20 07:57:24 +00:00
}
/*
* create the protocol tree
*/
if ( str = = NULL )
{
bssmap_le_item =
proto_tree_add_protocol_format ( tree , proto_bssmap_le , tvb , 0 , len ,
" Lb - I/F BSSMAP LE - Unknown BSSMAP Message Type (0x%02x) " ,
oct ) ;
bssmap_le_tree = proto_item_add_subtree ( bssmap_le_item , ett_bssmap_le_msg ) ;
}
else
{
bssmap_le_item =
proto_tree_add_protocol_format ( tree , proto_bssmap_le , tvb , 0 , - 1 ,
" Lb - I/F BSSMAP LE - %s " ,
str ) ;
bssmap_le_tree = proto_item_add_subtree ( bssmap_le_item , ett_gsm_bssmap_le_msg [ idx ] ) ;
2011-09-27 12:05:32 +00:00
col_append_fstr ( pinfo - > cinfo , COL_INFO , " %s " , str ) ;
2008-11-20 07:57:24 +00:00
/*
* add BSSMAP message name
*/
proto_tree_add_uint_format ( bssmap_le_tree , hf_gsm_bssmap_le_msg_type ,
tvb , saved_offset , 1 , oct , " Message Type %s " , str ) ;
}
tap_p - > pdu_type = BSSAP_PDU_TYPE_BSSMAP ;
tap_p - > message_type = oct ;
tap_queue_packet ( gsm_a_tap , pinfo , tap_p ) ;
2014-11-22 16:54:54 +00:00
if ( str = = NULL ) return len ;
2008-11-20 07:57:24 +00:00
2014-11-22 16:54:54 +00:00
if ( offset > = len ) return len ;
2008-11-20 07:57:24 +00:00
/*
* decode elements
*/
if ( bssmap_le_msg_fcn [ idx ] = = NULL )
{
2014-11-01 20:55:25 +00:00
proto_tree_add_item ( bssmap_le_tree , hf_gsm_bssmap_le_message_elements , tvb , offset , len - offset , ENC_NA ) ;
2008-11-20 07:57:24 +00:00
}
else
{
2011-04-04 07:45:34 +00:00
( * bssmap_le_msg_fcn [ idx ] ) ( tvb , bssmap_le_tree , pinfo , offset , len - offset ) ;
2008-11-20 07:57:24 +00:00
}
2014-11-22 16:54:54 +00:00
return len ;
2008-11-20 07:57:24 +00:00
}
2009-01-28 21:52:57 +00:00
/* Register the protocol with Wireshark */
void
proto_register_gsm_bssmap_le ( void )
{
2014-10-03 14:13:07 +00:00
guint i ;
guint last_offset ;
2009-01-28 21:52:57 +00:00
/* Setup list of header fields */
static hf_register_info hf [ ] = {
{ & hf_gsm_bssmap_le_msg_type ,
2012-07-31 18:54:11 +00:00
{ " BSSMAP LE Message Type " , " gsm_bssmap_le.msgtype " ,
2009-01-28 21:52:57 +00:00
FT_UINT8 , BASE_HEX , VALS ( gsm_bssmap_le_msg_strings ) , 0x0 ,
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
NULL , HFILL }
2009-01-28 21:52:57 +00:00
} ,
{ & hf_gsm_bssmap_le_elem_id ,
2012-07-31 18:54:11 +00:00
{ " Element ID " , " gsm_bssmap_le.elem_id " ,
2012-05-21 19:27:38 +00:00
FT_UINT8 , BASE_HEX , NULL , 0 ,
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
NULL , HFILL }
2009-01-28 21:52:57 +00:00
} ,
{ & hf_gsm_bssmap_le_apdu_protocol_id ,
2012-07-31 18:54:11 +00:00
{ " Protocol ID " , " gsm_bssmap_le.apdu_protocol_id " ,
2009-01-28 21:52:57 +00:00
FT_UINT8 , BASE_DEC , VALS ( gsm_apdu_protocol_id_strings ) , 0x0 ,
" APDU embedded protocol id " , HFILL }
} ,
{ & hf_gsm_bssmap_le_spare ,
2011-09-21 23:42:55 +00:00
{ " Spare " , " gsm_bssmap_le.spare " ,
2009-01-28 21:52:57 +00:00
FT_UINT8 , BASE_HEX , NULL , 0x0 ,
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
NULL , HFILL }
2009-01-28 21:52:57 +00:00
} ,
{ & hf_gsm_bssmap_le_ciphering_key_flag ,
2011-09-21 23:42:55 +00:00
{ " Ciphering Key Flag " , " gsm_bssmap_le.decipheringKeys.flag " ,
FT_UINT8 , BASE_DEC , NULL , 0x0 ,
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
NULL , HFILL }
2009-01-28 21:52:57 +00:00
} ,
{ & hf_gsm_bssmap_le_current_deciphering_key_value ,
2011-09-21 23:42:55 +00:00
{ " Current Deciphering Key Value " , " gsm_bssmap_le.decipheringKeys.current " ,
2011-09-27 12:05:32 +00:00
FT_UINT64 , BASE_HEX , NULL , 0x0 , NULL ,
2009-01-28 21:52:57 +00:00
HFILL }
} ,
{ & hf_gsm_bssmap_le_next_deciphering_key_value ,
2011-09-21 23:42:55 +00:00
{ " Next Deciphering Key Value " , " gsm_bssmap_le.decipheringKeys.next " ,
2011-09-27 12:05:32 +00:00
FT_UINT64 , BASE_HEX , NULL , 0x0 ,
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
NULL , HFILL }
2009-01-28 21:52:57 +00:00
} ,
2011-01-31 15:16:45 +00:00
{ & hf_gsm_bssmap_le_acq_ass ,
2014-10-03 14:13:07 +00:00
{ " Acquisition Assistance " , " gsm_bssmap_le.acq_ass " ,
FT_BOOLEAN , 8 , TFS ( & tfs_requested_not_requested ) , 0x80 ,
NULL , HFILL }
2011-01-31 15:16:45 +00:00
} ,
{ & hf_gsm_bssmap_le_ref_time ,
2014-10-03 14:13:07 +00:00
{ " Reference Time " , " gsm_bssmap_le.ref_time " ,
FT_BOOLEAN , 8 , TFS ( & tfs_requested_not_requested ) , 0x40 ,
NULL , HFILL }
2011-01-31 15:16:45 +00:00
} ,
{ & hf_gsm_bssmap_le_ref_loc ,
2014-10-03 14:13:07 +00:00
{ " Reference Location " , " gsm_bssmap_le.ref_loc " ,
FT_BOOLEAN , 8 , TFS ( & tfs_requested_not_requested ) , 0x20 ,
NULL , HFILL }
2011-01-31 15:16:45 +00:00
} ,
{ & hf_gsm_bssmap_le_dgps_corr ,
2014-10-03 14:13:07 +00:00
{ " DGPS Corrections " , " gsm_bssmap_le.gps_corr " ,
FT_BOOLEAN , 8 , TFS ( & tfs_requested_not_requested ) , 0x08 ,
NULL , HFILL }
2011-01-31 15:16:45 +00:00
} ,
{ & hf_gsm_bssmap_le_nav_mod ,
2014-10-03 14:13:07 +00:00
{ " Navigation Model " , " gsm_bssmap_le.nav_mod " ,
FT_BOOLEAN , 8 , TFS ( & tfs_requested_not_requested ) , 0x10 ,
NULL , HFILL }
2011-01-31 15:16:45 +00:00
} ,
{ & hf_gsm_bssmap_le_iono_mod ,
2014-10-03 14:13:07 +00:00
{ " Ionospheric Model " , " gsm_bssmap_le.iono_mod " ,
FT_BOOLEAN , 8 , TFS ( & tfs_requested_not_requested ) , 0x04 ,
NULL , HFILL }
2011-01-31 15:16:45 +00:00
} ,
{ & hf_gsm_bssmap_le_utc_mod ,
2014-10-03 14:13:07 +00:00
{ " UTC Model " , " gsm_bssmap_le.utc_mod " ,
FT_BOOLEAN , 8 , TFS ( & tfs_requested_not_requested ) , 0x02 ,
NULL , HFILL }
2011-01-31 15:16:45 +00:00
} ,
{ & hf_gsm_bssmap_le_almanac ,
2014-10-03 14:13:07 +00:00
{ " Almanac " , " gsm_bssmap_le.almanac " ,
FT_BOOLEAN , 8 , TFS ( & tfs_requested_not_requested ) , 0x01 ,
NULL , HFILL }
2011-01-31 15:16:45 +00:00
} ,
{ & hf_gsm_bssmap_le_ephemeris_ext_chk ,
2014-10-03 14:13:07 +00:00
{ " Ephemeris Extension Check " , " gsm_bssmap_le.ephemeris_ext_chk " ,
FT_BOOLEAN , 8 , TFS ( & tfs_requested_not_requested ) , 0x04 ,
NULL , HFILL }
2011-01-31 15:16:45 +00:00
} ,
{ & hf_gsm_bssmap_le_ephemeris_ext ,
2014-10-03 14:13:07 +00:00
{ " Ephemeris Extension " , " gsm_bssmap_le.ephemeris_ext " ,
FT_BOOLEAN , 8 , TFS ( & tfs_requested_not_requested ) , 0x02 ,
NULL , HFILL }
2011-01-31 15:16:45 +00:00
} ,
{ & hf_gsm_bssmap_le_real_time_int ,
2014-10-03 14:13:07 +00:00
{ " Real-Time Integrity " , " gsm_bssmap_le.real_time_int " ,
FT_BOOLEAN , 8 , TFS ( & tfs_requested_not_requested ) , 0x01 ,
NULL , HFILL }
2011-01-31 15:16:45 +00:00
} ,
2009-01-28 21:52:57 +00:00
{ & hf_gsm_bssmap_le_lcs_cause_value ,
2011-09-21 23:42:55 +00:00
{ " Cause Value " , " gsm_bssmap_le.lcsCauseValue " ,
2009-01-28 21:52:57 +00:00
FT_UINT8 , BASE_HEX , VALS ( bssmap_le_lcs_cause_values ) , 0x0 ,
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
NULL , HFILL }
2009-01-28 21:52:57 +00:00
} ,
{ & hf_gsm_bssmap_le_diagnostic_value ,
2011-09-21 23:42:55 +00:00
{ " Diagnostic Value " , " gsm_bssmap_le.diagnosticValue " ,
2009-01-28 21:52:57 +00:00
FT_UINT8 , BASE_HEX , VALS ( bssmap_le_position_method_failure_diagnostic_vals ) , 0x0 ,
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
NULL , HFILL }
2009-01-28 21:52:57 +00:00
} ,
{ & hf_gsm_bssmap_le_client_category ,
2011-09-21 23:42:55 +00:00
{ " Client Category " , " gsm_bssmap_le.lcsClientType.clientCategory " ,
2009-01-28 21:52:57 +00:00
FT_UINT8 , BASE_HEX , VALS ( bssmap_le_client_category ) , 0x0 ,
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
NULL , HFILL }
2009-01-28 21:52:57 +00:00
} ,
{ & hf_gsm_bssmap_le_client_subtype ,
2011-09-21 23:42:55 +00:00
{ " Client Subtype " , " gsm_bssmap_le.lcsClientType.clientSubtype " ,
2009-01-28 21:52:57 +00:00
FT_UINT8 , BASE_HEX , VALS ( bssmap_le_client_subtype ) , 0x0 ,
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
NULL , HFILL }
2009-01-28 21:52:57 +00:00
} ,
{ & hf_gsm_bssmap_le_velocity_requested ,
2011-09-21 23:42:55 +00:00
{ " Velocity Requested " , " gsm_bssmap_le.lcsQos.velocityRequested " ,
2009-01-28 21:52:57 +00:00
FT_UINT8 , BASE_HEX , VALS ( bssmap_le_velocity_requested_vals ) , 0x0 ,
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
NULL , HFILL }
2009-01-28 21:52:57 +00:00
} ,
{ & hf_gsm_bssmap_le_vertical_coordinate_indicator ,
2011-09-21 23:42:55 +00:00
{ " Vertical Coordinate Indicator " , " gsm_bssmap_le.lcsQos.verticalCoordinateIndicator " ,
2009-01-28 21:52:57 +00:00
FT_UINT8 , BASE_HEX , VALS ( bssmap_le_vertical_coordinate_indicator_vals ) , 0x0 ,
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
NULL , HFILL }
2009-01-28 21:52:57 +00:00
} ,
{ & hf_gsm_bssmap_le_horizontal_accuracy_indicator ,
2011-09-21 23:42:55 +00:00
{ " Horizontal Accuracy Indicator " , " gsm_bssmap_le.lcsQos.horizontalAccuracyIndicator " ,
2009-01-28 21:52:57 +00:00
FT_UINT8 , BASE_HEX , VALS ( bssmap_le_horizontal_accuracy_indicator_vals ) , 0x0 ,
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
NULL , HFILL }
2009-01-28 21:52:57 +00:00
} ,
{ & hf_gsm_bssmap_le_horizontal_accuracy ,
2011-09-21 23:42:55 +00:00
{ " Horizontal Accuracy " , " gsm_bssmap_le.lcsQos.horizontalAccuracy " ,
2009-01-28 21:52:57 +00:00
FT_UINT8 , BASE_HEX , NULL , 0x0 ,
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
NULL , HFILL }
2009-01-28 21:52:57 +00:00
} ,
{ & hf_gsm_bssmap_le_vertical_accuracy ,
2011-09-21 23:42:55 +00:00
{ " Vertical Accuracy " , " gsm_bssmap_le.lcsQos.verticalAccuracy " ,
2009-01-28 21:52:57 +00:00
FT_UINT8 , BASE_HEX , NULL , 0x0 ,
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
NULL , HFILL }
2009-01-28 21:52:57 +00:00
} ,
{ & hf_gsm_bssmap_le_vertical_accuracy_indicator ,
2011-09-21 23:42:55 +00:00
{ " Vertical Accuracy Indicator " , " gsm_bssmap_le.lcsQos.verticalAccuracyIndicator " ,
2009-01-28 21:52:57 +00:00
FT_UINT8 , BASE_HEX , VALS ( bssmap_le_vertical_accuracy_indicator_vals ) , 0x0 ,
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
NULL , HFILL }
2009-01-28 21:52:57 +00:00
} ,
{ & hf_gsm_bssmap_le_response_time_category ,
{ " Response Time Category " , " gsm_bssmap_le.lcsQos.responseTimeCategory " ,
FT_UINT8 , BASE_HEX , VALS ( bssmap_le_response_time_definitions_vals ) , 0x0 ,
From Kovarththanan Rajaratnam via bug 3548:
(1) Trailing/leading spaces are removed from 'name's/'blurb's
(2) Duplicate 'blurb's are replaced with NULL
(3) Empty ("") 'blurb's are replaced with NULL
(4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields
for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME,
FT_PROTOCOL, FT_STRING and FT_STRINGZ field types
(5) Only allow non-zero value for 'display' if 'bitmask' is non-zero
svn path=/trunk/; revision=28770
2009-06-18 21:30:42 +00:00
NULL , HFILL }
2009-01-28 21:52:57 +00:00
} ,
2014-11-01 20:55:25 +00:00
{ & hf_gsm_bssmap_le_apdu ,
{ " APDU " , " gsm_bssmap_le.apdu " ,
FT_BYTES , BASE_NONE , NULL , 0x0 ,
NULL , HFILL }
} ,
{ & hf_gsm_bssmap_le_message_elements ,
{ " Message Elements " , " gsm_bssmap_le.message_elements " ,
FT_BYTES , BASE_NONE , NULL , 0x0 ,
NULL , HFILL }
} ,
2017-10-27 13:47:42 +00:00
{ & hf_gsm_bssmap_le_location_inf ,
{ " Location Information " , " gsm_bssmap_le.location_inf " ,
FT_UINT8 , BASE_HEX , VALS ( bssmap_le_loc_inf_vals ) , 0x0 ,
NULL , HFILL }
} ,
{ & hf_gsm_bssmap_le_pos_method ,
{ " Positioning Method " , " gsm_bssmap_le.pos_method " ,
FT_UINT8 , BASE_HEX , VALS ( bssmap_le_pos_method_vals ) , 0x0 ,
NULL , HFILL }
} ,
2017-10-30 21:01:16 +00:00
{ & hf_gsm_bssmap_le_pos_data_disc ,
{ " Positioning Data Discriminator " , " gsm_bssmap_le.pos_data_disc " ,
FT_UINT8 , BASE_HEX , NULL , 0x0f ,
NULL , HFILL }
} ,
{ & hf_gsm_bssmap_le_pos_data_pos_method ,
{ " Positioning Method " , " gsm_bssmap_le.pos_data.pos_method " ,
FT_UINT8 , BASE_HEX , VALS ( bssmap_le_pos_data_pos_method_vals ) , 0xf8 ,
NULL , HFILL }
} ,
{ & hf_gsm_bssmap_le_pos_data_usage ,
{ " Usage " , " gsm_bssmap_le.pos_data.usage " ,
FT_UINT8 , BASE_HEX , VALS ( bssmap_le_pos_data_usage_vals ) , 0x03 ,
NULL , HFILL }
} ,
2009-01-28 21:52:57 +00:00
} ;
2014-11-01 20:55:25 +00:00
2014-12-11 10:36:34 +00:00
expert_module_t * expert_gsm_a_bssmap_le ;
2014-11-01 20:55:25 +00:00
2014-12-11 10:36:34 +00:00
static ei_register_info ei [ ] = {
{ & ei_gsm_a_bssmap_le_not_decoded_yet , { " gsm_bssmap_le.not_decoded_yet " , PI_UNDECODED , PI_WARN , " Not decoded yet " , EXPFILL } } ,
2015-01-02 17:19:10 +00:00
{ & ei_gsm_a_bssmap_le_extraneous_data , { " gsm_bssmap_le.extraneous_data " , PI_PROTOCOL , PI_NOTE , " Extraneous Data, dissector bug or later version spec(report to wireshark.org) " , EXPFILL } } ,
{ & ei_gsm_a_bssmap_le_missing_mandatory_element , { " gsm_bssmap_le.missing_mandatory_element " , PI_PROTOCOL , PI_WARN , " Missing Mandatory element, rest of dissection is suspect " , EXPFILL } } ,
2014-12-11 10:36:34 +00:00
} ;
2014-11-01 20:55:25 +00:00
2009-01-28 21:52:57 +00:00
/* Setup protocol subtree array */
# define NUM_INDIVIDUAL_ELEMS 1
2009-09-15 17:37:54 +00:00
gint * ett [ NUM_INDIVIDUAL_ELEMS + NUM_GSM_BSSMAP_LE_MSG +
NUM_GSM_BSSMAP_LE_ELEM ] ;
2009-01-28 21:52:57 +00:00
ett [ 0 ] = & ett_bssmap_le_msg ;
last_offset = NUM_INDIVIDUAL_ELEMS ;
for ( i = 0 ; i < NUM_GSM_BSSMAP_LE_MSG ; i + + , last_offset + + )
{
ett_gsm_bssmap_le_msg [ i ] = - 1 ;
ett [ last_offset ] = & ett_gsm_bssmap_le_msg [ i ] ;
}
for ( i = 0 ; i < NUM_GSM_BSSMAP_LE_ELEM ; i + + , last_offset + + )
{
ett_gsm_bssmap_le_elem [ i ] = - 1 ;
ett [ last_offset ] = & ett_gsm_bssmap_le_elem [ i ] ;
}
/* Register the protocol name and description */
proto_bssmap_le =
proto_register_protocol ( " Lb-I/F BSSMAP LE " , " GSM BSSMAP LE " , " gsm_bssmap_le " ) ;
proto_register_field_array ( proto_bssmap_le , hf , array_length ( hf ) ) ;
proto_register_subtree_array ( ett , array_length ( ett ) ) ;
2014-12-11 10:36:34 +00:00
expert_gsm_a_bssmap_le = expert_register_protocol ( proto_bssmap_le ) ;
expert_register_field_array ( expert_gsm_a_bssmap_le , ei , array_length ( ei ) ) ;
2009-01-28 21:52:57 +00:00
2016-12-17 01:06:11 +00:00
bssmap_le_handle = register_dissector ( " gsm_bssmap_le " , dissect_bssmap_le , proto_bssmap_le ) ;
2009-01-28 21:52:57 +00:00
}
2008-11-20 07:57:24 +00:00
void
proto_reg_handoff_gsm_bssmap_le ( void )
{
2010-12-20 05:35:29 +00:00
dissector_add_uint ( " bssap.pdu_type " , BSSAP_PDU_TYPE_BSSMAP , bssmap_le_handle ) ;
2008-11-20 07:57:24 +00:00
2016-03-16 13:02:52 +00:00
gsm_bsslap_handle = find_dissector_add_dependency ( " gsm_bsslap " , proto_bssmap_le ) ;
2008-11-20 07:57:24 +00:00
}
2014-10-03 14:13:07 +00:00
/*
* Editor modelines - http : //www.wireshark.org/tools/modelines.html
*
* Local variables :
* c - basic - offset : 8
* tab - width : 8
* indent - tabs - mode : t
* End :
*
* vi : set shiftwidth = 8 tabstop = 8 noexpandtab :
* : indentSize = 8 : tabSize = 8 : noTabs = false :
*/