summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPascal Quantin <pascal.quantin@gmail.com>2017-06-16 19:03:45 +0200
committerPascal Quantin <pascal.quantin@gmail.com>2017-06-16 18:46:03 +0000
commit573490f5c0f17d40ef4fca2e27b1523e2ad562d3 (patch)
tree55d42864c522304b68bce576ed0e3776140c411a
parent435c68cd2b856a6be7d015e8703c6c83d9b8eb89 (diff)
downloadwireshark-573490f5c0f17d40ef4fca2e27b1523e2ad562d3.tar.gz
GSM A DTAP: update UE test loop modes
Change-Id: If05423a765c461a1e6df4856afae4e290bd684db Reviewed-on: https://code.wireshark.org/review/22168 Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
-rw-r--r--epan/dissectors/packet-gsm_a_common.h4
-rw-r--r--epan/dissectors/packet-gsm_a_dtap.c191
2 files changed, 187 insertions, 8 deletions
diff --git a/epan/dissectors/packet-gsm_a_common.h b/epan/dissectors/packet-gsm_a_common.h
index 9915e79989..3e5a8aa0de 100644
--- a/epan/dissectors/packet-gsm_a_common.h
+++ b/epan/dissectors/packet-gsm_a_common.h
@@ -1131,6 +1131,10 @@ typedef enum
DE_TP_EPC_UE_TL_A_LB_SETUP, /* UE Test Loop Mode A LB Setup */
DE_TP_EPC_UE_TL_B_LB_SETUP, /* UE Test Loop Mode B LB Setup */
DE_TP_EPC_UE_TL_C_SETUP, /* UE Test Loop Mode C Setup */
+ DE_TP_EPC_UE_TL_D_SETUP, /* UE Test Loop Mode D Setup */
+ DE_TP_EPC_UE_TL_E_SETUP, /* UE Test Loop Mode E Setup */
+ DE_TP_EPC_UE_TL_F_SETUP, /* UE Test Loop Mode F Setup */
+ DE_TP_EPC_UE_TL_GH_SETUP, /* UE Test Loop Mode GH Setup */
DE_TP_EPC_UE_POSITIONING_TECHNOLOGY,/* UE Positioning Technology */
DE_TP_EPC_MBMS_PACKET_COUNTER_VALUE,/* MBMS Packet Counter Value */
DE_TP_EPC_ELLIPSOID_POINT_WITH_ALT, /* ellipsoidPointWithAltitude */
diff --git a/epan/dissectors/packet-gsm_a_dtap.c b/epan/dissectors/packet-gsm_a_dtap.c
index 20f7bdbdde..62d0b840e2 100644
--- a/epan/dissectors/packet-gsm_a_dtap.c
+++ b/epan/dissectors/packet-gsm_a_dtap.c
@@ -275,6 +275,10 @@ const value_string gsm_a_dtap_msg_tp_strings[] = {
{ 0x89, "UE Test Loop Mode C MBMS Packet Counter Request" },
{ 0x8a, "UE Test Loop Mode C MBMS Packet Counter Response" },
{ 0x8b, "Update UE Location Information" },
+ { 0x8c, "UE Test Loop ProSe Packet Counter Request" },
+ { 0x8d, "UE Test Loop ProSe Packet Counter Response" },
+ { 0x8e, "UE Test Loop Mode F SCPTM Packet Counter Request" },
+ { 0x8f, "UE Test Loop Mode F SCPTM Packet Counter Response" },
{ 0, NULL }
};
@@ -344,7 +348,7 @@ static const value_string gsm_dtap_elem_strings[] = {
/* Short Message Service Information Elements [5] 8.1.4 */
{ DE_CP_USER_DATA, "CP-User Data" },
{ DE_CP_CAUSE, "CP-Cause" },
- /* Tests procedures information elements 3GPP TS 44.014 6.4.0, 3GPP TS 34.109 6.4.0 and 3GPP TS 36.509 9.1.0*/
+ /* Tests procedures information elements 3GPP TS 44.014 6.4.0, 3GPP TS 34.109 6.4.0 and 3GPP TS 36.509 13.3.0 */
{ DE_TP_SUB_CHANNEL, "Close TCH Loop Cmd Sub-channel"},
{ DE_TP_ACK, "Open Loop Cmd Ack"},
{ DE_TP_LOOP_TYPE, "Close Multi-slot Loop Cmd Loop type"},
@@ -361,6 +365,10 @@ static const value_string gsm_dtap_elem_strings[] = {
{ DE_TP_EPC_UE_TL_A_LB_SETUP, "UE Test Loop Mode A LB Setup"},
{ DE_TP_EPC_UE_TL_B_LB_SETUP, "UE Test Loop Mode B LB Setup"},
{ DE_TP_EPC_UE_TL_C_SETUP, "UE Test Loop Mode C Setup"},
+ { DE_TP_EPC_UE_TL_D_SETUP, "UE Test Loop Mode D Setup"},
+ { DE_TP_EPC_UE_TL_E_SETUP, "UE Test Loop Mode E Setup"},
+ { DE_TP_EPC_UE_TL_F_SETUP, "UE Test Loop Mode F Setup"},
+ { DE_TP_EPC_UE_TL_GH_SETUP, "UE Test Loop Mode GH Setup"},
{ DE_TP_EPC_UE_POSITIONING_TECHNOLOGY, "UE Positioning Technology"},
{ DE_TP_EPC_MBMS_PACKET_COUNTER_VALUE, "MBMS Packet Counter Value"},
{ DE_TP_EPC_ELLIPSOID_POINT_WITH_ALT, "Ellipsoid Point With Altitude"},
@@ -557,6 +565,14 @@ static int hf_gsm_a_dtap_epc_ue_tl_b_ip_pdu_delay = -1;
static int hf_gsm_a_dtap_epc_ue_tl_c_mbsfn_area_id = -1;
static int hf_gsm_a_dtap_epc_ue_tl_c_mch_id = -1;
static int hf_gsm_a_dtap_epc_ue_tl_c_lcid = -1;
+static int hf_gsm_a_dtap_epc_ue_tl_d_discovery = -1;
+static int hf_gsm_a_dtap_epc_ue_tl_d_prose_app_code = -1;
+static int hf_gsm_a_dtap_epc_ue_tl_e_communication = -1;
+static int hf_gsm_a_dtap_epc_ue_tl_e_group_destination_id = -1;
+static int hf_gsm_a_dtap_epc_ue_tl_f_sc_mtch_id = -1;
+static int hf_gsm_a_dtap_epc_ue_tl_gh_ul_loopback_op_mode = -1;
+static int hf_gsm_a_dtap_epc_ue_tl_gh_repetitions = -1;
+static int hf_gsm_a_dtap_epc_ue_tl_gh_ul_data_delay = -1;
static int hf_gsm_a_dtap_epc_ue_positioning_technology = -1;
static int hf_gsm_a_dtap_epc_mbms_packet_counter_value = -1;
static int hf_gsm_a_dtap_epc_latitude_sign = -1;
@@ -3705,7 +3721,11 @@ static const value_string epc_ue_test_loop_mode_vals[] = {
{ 0, "A"},
{ 1, "B"},
{ 2, "C"},
- { 3, "reserved"},
+ { 3, "D"},
+ { 4, "E"},
+ { 5, "F"},
+ { 6, "G"},
+ { 7, "H"},
{ 0, NULL }
};
static guint16
@@ -3717,19 +3737,18 @@ de_tp_epc_ue_test_loop_mode(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo
curr_offset = offset;
bit_offset = curr_offset<<3;
- proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, bit_offset, 6, ENC_BIG_ENDIAN);
- bit_offset += 6;
- proto_tree_add_bits_item(tree, hf_gsm_a_dtap_epc_ue_tl_mode, tvb, bit_offset, 2, ENC_BIG_ENDIAN);
- /*bit_offset += 2;*/
+ proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, bit_offset, 5, ENC_BIG_ENDIAN);
+ bit_offset += 5;
+ proto_tree_add_bits_item(tree, hf_gsm_a_dtap_epc_ue_tl_mode, tvb, bit_offset, 3, ENC_BIG_ENDIAN);
/* Store test loop mode to know how to dissect Close UE Test Loop message */
- epc_test_loop_mode = tvb_get_guint8(tvb, curr_offset) & 0x03;
+ epc_test_loop_mode = tvb_get_guint8(tvb, curr_offset) & 0x07;
curr_offset++;
return (curr_offset - offset);
}
static guint16
-de_tp_epc_ue_tl_a_lb_setup(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
+de_tp_epc_ue_tl_a_lb_setup(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
{
guint32 curr_offset;
guint32 count, nb_lb;
@@ -3792,9 +3811,104 @@ de_tp_epc_ue_tl_c_setup(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_,
return (curr_offset - offset);
}
+static const true_false_string epc_ue_tl_d_discovery_value = {
+ "Announce",
+ "Monitor"
+};
+
+static const crumb_spec_t epc_ue_tl_d_prose_app_code_crumbs[] = {
+ { 15, 1},
+ { 0, 8},
+ { 0, 0}
+};
+
+static guint16
+de_tp_epc_ue_tl_d_setup(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;
+
+ proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, curr_offset<<3, 7, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_gsm_a_dtap_epc_ue_tl_d_discovery, tvb, curr_offset, 1, ENC_NA);
+ curr_offset++;
+
+ while ((curr_offset - offset) < len) {
+ proto_tree_add_split_bits_item_ret_val(tree, hf_gsm_a_dtap_epc_ue_tl_d_prose_app_code, tvb,
+ curr_offset<<3, epc_ue_tl_d_prose_app_code_crumbs, NULL);
+ proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, (curr_offset+1)<<3, 7, ENC_BIG_ENDIAN);
+ curr_offset += 2;
+ }
+
+ return len;
+}
+
+static const true_false_string epc_ue_tl_e_communication_value = {
+ "Transmit",
+ "Receive"
+};
+
+static guint16
+de_tp_epc_ue_tl_e_setup(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
+{
+ guint32 curr_offset;
+
+ curr_offset = offset;
+
+ proto_tree_add_bits_item(tree, hf_gsm_a_spare_bits, tvb, curr_offset<<3, 7, ENC_BIG_ENDIAN);
+ proto_tree_add_item(tree, hf_gsm_a_dtap_epc_ue_tl_e_communication, tvb, curr_offset, 1, ENC_NA);
+ curr_offset++;
+ while ((curr_offset - offset) < len) {
+ proto_tree_add_item(tree, hf_gsm_a_dtap_epc_ue_tl_e_group_destination_id, tvb, curr_offset, 1, ENC_NA);
+ curr_offset++;
+ }
+
+ return (curr_offset - offset);
+}
+
+static const crumb_spec_t epc_ue_tl_f_sc_mtch_id_crumbs[] = {
+ { 8, 8},
+ { 0, 8},
+ { 0, 0}
+};
+
+static guint16
+de_tp_epc_ue_tl_f_setup(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
+{
+ proto_tree_add_split_bits_item_ret_val(tree, hf_gsm_a_dtap_epc_ue_tl_f_sc_mtch_id, tvb,
+ offset<<3, epc_ue_tl_f_sc_mtch_id_crumbs, NULL);
+
+ return 2;
+}
+
+static const true_false_string epc_ue_tl_gh_communication_value = {
+ "SRB1bis (NB-IoT UE) or SRB2 (E-UTRA UE)",
+ "EMM (mode G) or SMR (mode H)"
+};
+
+static guint16
+de_tp_epc_ue_tl_gh_setup(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _U_, guint32 offset, guint len _U_, gchar *add_string _U_, int string_len _U_)
+{
+ guint32 curr_offset;
+
+ curr_offset = offset;
+
+ proto_tree_add_bits_item(tree, hf_gsm_a_dtap_epc_ue_tl_gh_ul_loopback_op_mode, tvb, curr_offset<<3, 1, ENC_BIG_ENDIAN);
+ proto_tree_add_bits_item(tree, hf_gsm_a_dtap_epc_ue_tl_gh_repetitions, tvb, (curr_offset<<3)+1, 7, ENC_BIG_ENDIAN);
+ curr_offset++;
+ proto_tree_add_item(tree, hf_gsm_a_dtap_epc_ue_tl_gh_ul_data_delay, tvb, curr_offset, 1, ENC_NA);
+ curr_offset++;
+
+ return (curr_offset - offset);
+}
+
static const value_string epc_ue_positioning_technology_vals[] = {
{ 0, "AGNSS"},
{ 1, "OTDOA"},
+ { 2, "MBS"},
+ { 3, "WLAN"},
+ { 4, "Bluetooth"},
+ { 5, "Sensor"},
{ 0, NULL }
};
@@ -4329,6 +4443,10 @@ guint16 (*dtap_elem_fcn[])(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo _
de_tp_epc_ue_tl_a_lb_setup, /* UE Test Loop Mode A LB Setup */
de_tp_epc_ue_tl_b_lb_setup, /* UE Test Loop Mode B LB Setup */
de_tp_epc_ue_tl_c_setup, /* UE Test Loop Mode C Setup */
+ de_tp_epc_ue_tl_d_setup, /* UE Test Loop Mode D Setup */
+ de_tp_epc_ue_tl_e_setup, /* UE Test Loop Mode E Setup */
+ de_tp_epc_ue_tl_f_setup, /* UE Test Loop Mode F Setup */
+ de_tp_epc_ue_tl_gh_setup, /* UE Test Loop Mode GH Setup */
de_tp_epc_ue_positioning_technology, /* UE Positioning Technology */
de_tp_epc_mbms_packet_counter_value, /* MBMS Packet Counter Value */
de_tp_epc_ellipsoid_point_with_alt, /* ellipsoidPointWithAltitude */
@@ -6440,6 +6558,19 @@ dtap_tp_epc_close_ue_test_loop(tvbuff_t *tvb, proto_tree *tree, packet_info *pin
case 2:
ELEM_MAND_V(GSM_A_PDU_TYPE_DTAP, DE_TP_EPC_UE_TL_C_SETUP, NULL, ei_gsm_a_dtap_missing_mandatory_element);
break;
+ case 3:
+ ELEM_MAND_LV_E(GSM_A_PDU_TYPE_DTAP, DE_TP_EPC_UE_TL_D_SETUP, NULL, ei_gsm_a_dtap_missing_mandatory_element);
+ break;
+ case 4:
+ ELEM_MAND_LV(GSM_A_PDU_TYPE_DTAP, DE_TP_EPC_UE_TL_E_SETUP, NULL, ei_gsm_a_dtap_missing_mandatory_element);
+ break;
+ case 5:
+ ELEM_MAND_V(GSM_A_PDU_TYPE_DTAP, DE_TP_EPC_UE_TL_F_SETUP, NULL, ei_gsm_a_dtap_missing_mandatory_element);
+ break;
+ case 6:
+ case 7:
+ ELEM_MAND_V(GSM_A_PDU_TYPE_DTAP, DE_TP_EPC_UE_TL_GH_SETUP, NULL, ei_gsm_a_dtap_missing_mandatory_element);
+ break;
default:
break;
}
@@ -6669,6 +6800,10 @@ static void (*dtap_msg_tp_fcn[])(tvbuff_t *tvb, proto_tree *tree, packet_info *p
NULL, /* UE TEST LOOP MODE C MBMS PACKET COUNTER REQUEST */
dtap_tp_epc_test_loop_mode_c_mbms_packet_counter_response, /* UE TEST LOOP MODE C MBMS PACKET COUNTER RESPONSE */
dtap_tp_epc_update_ue_location_information, /* UPDATE UE LOCATION INFORMATION */
+ NULL, /* UE TEST LOOP PROSE PACKET COUNTER REQUEST */
+ NULL, /* UE TEST LOOP PROSE PACKET COUNTER RESPONSE */
+ NULL, /* UE TEST LOOP MODE F SCPTM PACKET COUNTER REQUEST */
+ NULL, /* UE TEST LOOP MODE F SCPTM PACKET COUNTER RESPONSE */
NULL, /* NONE */
};
@@ -7448,6 +7583,46 @@ proto_register_gsm_a_dtap(void)
FT_UINT8, BASE_DEC, NULL, 0x0,
NULL, HFILL }
},
+ { &hf_gsm_a_dtap_epc_ue_tl_d_discovery,
+ { "Discovery","gsm_a.dtap.epc.ue_tl_d_discovery",
+ FT_BOOLEAN, 8, TFS(&epc_ue_tl_d_discovery_value), 0x01,
+ NULL, HFILL }
+ },
+ { &hf_gsm_a_dtap_epc_ue_tl_d_prose_app_code,
+ { "ProSe App Code (LSBs)","gsm_a.dtap.epc.ue_tl_d_prose_app_code",
+ FT_UINT16, BASE_DEC, NULL, 0x0,
+ NULL, HFILL }
+ },
+ { &hf_gsm_a_dtap_epc_ue_tl_e_communication,
+ { "Communication","gsm_a.dtap.epc.ue_tl_e_communication",
+ FT_BOOLEAN, 8, TFS(&epc_ue_tl_e_communication_value), 0x01,
+ NULL, HFILL }
+ },
+ { &hf_gsm_a_dtap_epc_ue_tl_e_group_destination_id,
+ { "Group Destination ID","gsm_a.dtap.epc.ue_tl_e_group_destination_id",
+ FT_UINT8, BASE_DEC, NULL, 0x0,
+ NULL, HFILL }
+ },
+ { &hf_gsm_a_dtap_epc_ue_tl_f_sc_mtch_id,
+ { "SC-MTCH ID","gsm_a.dtap.epc.ue_tl_f_sc_mtch_id",
+ FT_UINT16, BASE_DEC, NULL, 0x0,
+ NULL, HFILL }
+ },
+ { &hf_gsm_a_dtap_epc_ue_tl_gh_ul_loopback_op_mode,
+ { "Uplink loopback operation mode","gsm_a.dtap.epc.ue_tl_gh_ul_loopback_op_mode",
+ FT_BOOLEAN, 8, TFS(&epc_ue_tl_gh_communication_value), 0x0,
+ NULL, HFILL }
+ },
+ { &hf_gsm_a_dtap_epc_ue_tl_gh_repetitions,
+ { "Repetitions","gsm_a.dtap.epc.ue_tl_gh_repetitions",
+ FT_UINT8, BASE_DEC, NULL, 0x0,
+ NULL, HFILL }
+ },
+ { &hf_gsm_a_dtap_epc_ue_tl_gh_ul_data_delay,
+ { "Uplink data delay","gsm_a.dtap.epc.ue_tl_gh_ul_data_delay",
+ FT_UINT8, BASE_DEC|BASE_UNIT_STRING, &units_seconds, 0x0,
+ NULL, HFILL }
+ },
{ &hf_gsm_a_dtap_epc_ue_positioning_technology,
{ "UE positioning technology","gsm_a.dtap.epc.ue_positioning_technology",
FT_UINT8, BASE_DEC, VALS(epc_ue_positioning_technology_vals), 0x0,