forked from osmocom/wireshark
[BSSMAP-LE] Correct dissection of 10.20 Positioning Data.
Change-Id: Ia0c3b688dfdcd9fdad4f65df12ef97db99bdb095 Reviewed-on: https://code.wireshark.org/review/24192 Reviewed-by: Anders Broman <a.broman58@gmail.com> Petri-Dish: Anders Broman <a.broman58@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Michael Mann <mmann78@netscape.net>
This commit is contained in:
parent
90867dd8e3
commit
d887d76f27
|
@ -188,12 +188,36 @@ static const value_string bssmap_le_pos_method_vals[] = {
|
|||
{ 1, "Mobile Assisted E-OTD" },
|
||||
{ 2, "Mobile Based E-OTD" },
|
||||
{ 3, "Assisted GPS" },
|
||||
{ 4, "Assisted GANSS " },
|
||||
{ 4, "Assisted GANSS" },
|
||||
{ 5, "Assisted GPS and Assisted GANSS" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
|
||||
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 }
|
||||
};
|
||||
|
||||
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 }
|
||||
};
|
||||
|
||||
/* Initialize the protocol and registered fields */
|
||||
static int proto_bssmap_le = -1;
|
||||
|
@ -235,6 +259,9 @@ static int hf_gsm_bssmap_le_apdu = -1;
|
|||
static int hf_gsm_bssmap_le_message_elements = -1;
|
||||
static int hf_gsm_bssmap_le_location_inf = -1;
|
||||
static int hf_gsm_bssmap_le_pos_method = -1;
|
||||
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;
|
||||
|
||||
|
||||
/* Initialize the subtree pointers */
|
||||
|
@ -601,15 +628,29 @@ de_bmaple_location_type(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
|
|||
* 10.20 Positioning Data
|
||||
*/
|
||||
static guint16
|
||||
de_bmaple_pos_dta(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
|
||||
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_)
|
||||
{
|
||||
tvbuff_t *data_tvb;
|
||||
guint32 curr_offset;
|
||||
guint32 curr_offset, value;
|
||||
|
||||
curr_offset = offset;
|
||||
|
||||
data_tvb = tvb_new_subset_length(tvb, curr_offset, len);
|
||||
dissect_geographical_description(data_tvb, pinfo, tree);
|
||||
/* 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++;
|
||||
}
|
||||
|
||||
|
||||
return(len);
|
||||
}
|
||||
|
@ -1222,6 +1263,21 @@ proto_register_gsm_bssmap_le(void)
|
|||
FT_UINT8, BASE_HEX, VALS(bssmap_le_pos_method_vals), 0x0,
|
||||
NULL, HFILL }
|
||||
},
|
||||
{ &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 }
|
||||
},
|
||||
};
|
||||
|
||||
expert_module_t* expert_gsm_a_bssmap_le;
|
||||
|
|
Loading…
Reference in New Issue