aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnders Broman <anders.broman@ericsson.com>2006-01-19 18:20:14 +0000
committerAnders Broman <anders.broman@ericsson.com>2006-01-19 18:20:14 +0000
commit9d6de675a4a29a829caa0e4482e60544bf18445b (patch)
tree0e7a6809bf6f26b77348dd5aa749d0b7ea049685
parent28e69752b2448b9c9cefcefe0e6d65f9ead89443 (diff)
ext_qos_subscribed was not correctly decoded in Camel and GSM MAP
Change to use proto_add_item in packet-gsm_a.c for some octets and export value strings. svn path=/trunk/; revision=17055
-rw-r--r--asn1/gsmmap/gsmmap.cnf8
-rw-r--r--asn1/gsmmap/packet-gsm_map-template.c142
-rw-r--r--epan/dissectors/packet-gsm_a.c187
-rw-r--r--epan/dissectors/packet-gsm_a.h6
-rw-r--r--epan/dissectors/packet-gsm_map.c162
5 files changed, 402 insertions, 103 deletions
diff --git a/asn1/gsmmap/gsmmap.cnf b/asn1/gsmmap/gsmmap.cnf
index dbe2f93a79..f39aae214a 100644
--- a/asn1/gsmmap/gsmmap.cnf
+++ b/asn1/gsmmap/gsmmap.cnf
@@ -458,7 +458,6 @@ Component
tvbuff_t *parameter_tvb;
-
%(DEFAULT_BODY)s
if (!parameter_tvb)
@@ -473,13 +472,12 @@ Component
tvbuff_t *parameter_tvb;
-
%(DEFAULT_BODY)s
- if (!parameter_tvb)
+ if (!parameter_tvb)
return offset;
- de_sm_qos(parameter_tvb, tree, 0, 9, NULL, 0);
-
+ dissect_gsm_map_ext_qos_subscribed(tvb, pinfo, tree);
+
#----------------------------------------------------------------------------------------
#.TYPE_ATTR
SS-Code TYPE = FT_UINT8 DISPLAY = BASE_DEC STRINGS = VALS(ssCode_vals)
diff --git a/asn1/gsmmap/packet-gsm_map-template.c b/asn1/gsmmap/packet-gsm_map-template.c
index 5052113cae..fc9485a084 100644
--- a/asn1/gsmmap/packet-gsm_map-template.c
+++ b/asn1/gsmmap/packet-gsm_map-template.c
@@ -92,6 +92,20 @@ static int hf_gsm_map_forwarding_reason = -1;
static int hf_gsm_map_pdp_type_org = -1;
static int hf_gsm_map_etsi_pdp_type_number = -1;
static int hf_gsm_map_ietf_pdp_type_number = -1;
+static int hf_gsm_map_ext_qos_subscribed_pri = -1;
+
+static int hf_gsm_map_qos_traffic_cls = -1;
+static int hf_gsm_map_qos_del_order = -1;
+static int hf_gsm_map_qos_del_of_err_sdu = -1;
+static int hf_gsm_map_qos_ber = -1;
+static int hf_gsm_map_qos_sdu_err_rat = -1;
+static int hf_gsm_map_qos_traff_hdl_pri = -1;
+static int hf_gsm_map_qos_max_sdu = -1;
+static int hf_gsm_map_max_brate_ulink = -1;
+static int hf_gsm_map_max_brate_dlink = -1;
+static int hf_gsm_map_qos_transfer_delay = -1;
+static int hf_gsm_map_guaranteed_max_brate_ulink = -1;
+static int hf_gsm_map_guaranteed_max_brate_dlink = -1;
#include "packet-gsm_map-hf.c"
@@ -104,6 +118,7 @@ static gint ett_gsm_map_ReturnErrorPDU = -1;
static gint ett_gsm_map_ReturnResult_result = -1;
static gint ett_gsm_map_ReturnError_result = -1;
static gint ett_gsm_map_GSMMAPPDU = -1;
+static gint ett_gsm_map_ext_qos_subscribed = -1;
#include "packet-gsm_map-ett.c"
@@ -168,6 +183,77 @@ unpack_digits(tvbuff_t *tvb, int offset){
}
+
+static void
+dissect_gsm_map_ext_qos_subscribed(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree){
+ int offset = 0;
+ proto_item *item;
+ proto_tree *subtree;
+ guint8 octet;
+
+ item = get_ber_last_created_item();
+ subtree = proto_item_add_subtree(item, ett_gsm_map_ext_qos_subscribed);
+ /* OCTET 1:
+ Allocation/Retention Priority (This octet encodes each priority level defined in
+ 23.107 as the binary value of the priority level, declaration in 29.060)
+ Octets 2-9 are coded according to 3GPP TS 24.008[35] Quality of Service Octets
+ 6-13.
+ */
+ /* Allocation/Retention Priority */
+ proto_tree_add_item(subtree, hf_gsm_map_ext_qos_subscribed_pri, tvb, offset, 1, FALSE);
+ offset++;
+
+ /* Quality of Service Octets 6-13.( Octet 2 - 9 Here) */
+
+ /* Traffic class, octet 6 (see 3GPP TS 23.107) Bits 8 7 6 */
+ proto_tree_add_item(subtree, hf_gsm_map_qos_traffic_cls, tvb, offset, 1, FALSE);
+ /* Delivery order, octet 6 (see 3GPP TS 23.107) Bits 5 4 */
+ proto_tree_add_item(subtree, hf_gsm_map_qos_del_order, tvb, offset, 1, FALSE);
+ /* Delivery of erroneous SDUs, octet 6 (see 3GPP TS 23.107) Bits 3 2 1 */
+ proto_tree_add_item(subtree, hf_gsm_map_qos_del_of_err_sdu, tvb, offset, 1, FALSE);
+ offset++;
+
+ /* Maximum SDU size, octet 7 (see 3GPP TS 23.107) */
+ octet = tvb_get_guint8(tvb,offset);
+ proto_tree_add_uint(subtree, hf_gsm_map_qos_max_sdu, tvb, offset, 1, octet);
+
+
+ offset++;
+ /* Maximum bit rate for uplink, octet 8 */
+ octet = tvb_get_guint8(tvb,offset);
+ proto_tree_add_uint(subtree, hf_gsm_map_max_brate_ulink, tvb, offset, 1, octet);
+ offset++;
+ /* Maximum bit rate for downlink, octet 9 (see 3GPP TS 23.107) */
+ octet = tvb_get_guint8(tvb,offset);
+ proto_tree_add_uint(subtree, hf_gsm_map_max_brate_dlink, tvb, offset, 1, octet);
+ offset++;
+ /* Residual Bit Error Rate (BER), octet 10 (see 3GPP TS 23.107) Bits 8 7 6 5 */
+ proto_tree_add_item(subtree, hf_gsm_map_qos_ber, tvb, offset, 1, FALSE);
+ /* SDU error ratio, octet 10 (see 3GPP TS 23.107) */
+ proto_tree_add_item(subtree, hf_gsm_map_qos_sdu_err_rat, tvb, offset, 1, FALSE);
+ offset++;
+
+ /* Traffic handling priority, octet 11 (see 3GPP TS 23.107) Bits 2 1 */
+ proto_tree_add_item(subtree, hf_gsm_map_qos_traff_hdl_pri, tvb, offset, 1, FALSE);
+ /* Transfer delay, octet 11 (See 3GPP TS 23.107) Bits 8 7 6 5 4 3 */
+ proto_tree_add_item(subtree, hf_gsm_map_qos_transfer_delay, tvb, offset, 1, FALSE);
+ offset++;
+
+ /* Guaranteed bit rate for uplink, octet 12 (See 3GPP TS 23.107)
+ Coding is identical to that of Maximum bit rate for uplink.
+ */
+ octet = tvb_get_guint8(tvb,offset);
+ proto_tree_add_uint(subtree, hf_gsm_map_guaranteed_max_brate_ulink, tvb, offset, 1, octet);
+ offset++;
+
+ /* Guaranteed bit rate for downlink, octet 13(See 3GPP TS 23.107)
+ Coding is identical to that of Maximum bit rate for uplink.
+ */
+ octet = tvb_get_guint8(tvb,offset);
+ proto_tree_add_uint(subtree, hf_gsm_map_guaranteed_max_brate_dlink, tvb, offset, 1, octet);
+
+}
+
#include "packet-gsm_map-fn.c"
const value_string gsm_map_opr_code_strings[] = {
@@ -1605,8 +1691,59 @@ void proto_register_gsm_map(void) {
{ "PDP Type Number", "gsm_map.ietf_pdp_type_number",
FT_UINT8, BASE_HEX, VALS(ietf_pdp_type_number_values), 0,
"IETF PDP Type Number", HFILL }},
-
-
+ { &hf_gsm_map_ext_qos_subscribed_pri,
+ { "Allocation/Retention priority", "gsm_map.ext_qos_subscribed_pri",
+ FT_UINT8, BASE_DEC, NULL, 0xff,
+ "Allocation/Retention priority", HFILL }},
+ { &hf_gsm_map_qos_traffic_cls,
+ { "Traffic class", "gsm_map.qos.traffic_cls",
+ FT_UINT8, BASE_DEC, VALS(gsm_a_qos_traffic_cls_vals), 0xe0,
+ "Traffic class", HFILL }},
+ { &hf_gsm_map_qos_del_order,
+ { "Delivery order", "gsm_map.qos.del_order",
+ FT_UINT8, BASE_DEC, VALS(gsm_a_qos_traffic_cls_vals), 0x18,
+ "Delivery order", HFILL }},
+ { &hf_gsm_map_qos_del_of_err_sdu,
+ { "Delivery of erroneous SDUs", "gsm_map.qos.del_of_err_sdu",
+ FT_UINT8, BASE_DEC, VALS(gsm_a_qos_del_of_err_sdu_vals), 0x03,
+ "Delivery of erroneous SDUs", HFILL }},
+ { &hf_gsm_map_qos_ber,
+ { "Residual Bit Error Rate (BER)", "gsm_map.qos.ber",
+ FT_UINT8, BASE_DEC, VALS(gsm_a_qos_ber_vals), 0xf0,
+ "Residual Bit Error Rate (BER)", HFILL }},
+ { &hf_gsm_map_qos_sdu_err_rat,
+ { "SDU error ratio", "gsm_map.qos.sdu_err_rat",
+ FT_UINT8, BASE_DEC, VALS(gsm_a_qos_sdu_err_rat_vals), 0x0f,
+ "SDU error ratio", HFILL }},
+ { &hf_gsm_map_qos_traff_hdl_pri,
+ { "Traffic handling priority", "gsm_map.qos.traff_hdl_pri",
+ FT_UINT8, BASE_DEC, VALS(gsm_a_qos_traff_hdl_pri_vals), 0x03,
+ "Traffic handling priority", HFILL }},
+
+ { &hf_gsm_map_qos_max_sdu,
+ { "Maximum SDU size (Raw data see TS 24.008 for interpretation)", "gsm_map.qos.max_sdu",
+ FT_UINT8, BASE_DEC, NULL, 0xff,
+ "Maximum SDU size", HFILL }},
+ { &hf_gsm_map_max_brate_ulink,
+ { "Maximum bit rate for uplink (Raw data see TS 24.008 for interpretation)", "gsm_map.qos.max_brate_ulink",
+ FT_UINT8, BASE_DEC, NULL, 0xff,
+ "Maximum bit rate for uplink", HFILL }},
+ { &hf_gsm_map_max_brate_dlink,
+ { "Maximum bit rate for downlink (Raw data see TS 24.008 for interpretation)", "gsm_map.qos.max_brate_dlink",
+ FT_UINT8, BASE_DEC, NULL, 0xff,
+ "Maximum bit rate for downlink", HFILL }},
+ { &hf_gsm_map_qos_transfer_delay,
+ { "Transfer delay (Raw data see TS 24.008 for interpretation)", "gsm_map.qos.transfer_delay",
+ FT_UINT8, BASE_DEC, NULL, 0xfc,
+ "Transfer delay", HFILL }},
+ { &hf_gsm_map_guaranteed_max_brate_ulink,
+ { "Guaranteed bit rate for uplink (Raw data see TS 24.008 for interpretation)", "gsm_map.qos.brate_ulink",
+ FT_UINT8, BASE_DEC, NULL, 0xff,
+ "Guaranteed bit rate for uplink", HFILL }},
+ { &hf_gsm_map_guaranteed_max_brate_dlink,
+ { "Guaranteed bit rate for downlink (Raw data see TS 24.008 for interpretation)", "gsm_map.qos.brate_dlink",
+ FT_UINT8, BASE_DEC, NULL, 0xff,
+ "Guaranteed bit rate for downlink", HFILL }},
#include "packet-gsm_map-hfarr.c"
};
@@ -1620,6 +1757,7 @@ void proto_register_gsm_map(void) {
&ett_gsm_map_ReturnResult_result,
&ett_gsm_map_ReturnError_result,
&ett_gsm_map_GSMMAPPDU,
+ &ett_gsm_map_ext_qos_subscribed,
#include "packet-gsm_map-ettarr.c"
};
diff --git a/epan/dissectors/packet-gsm_a.c b/epan/dissectors/packet-gsm_a.c
index 342e8b8205..6c37582a38 100644
--- a/epan/dissectors/packet-gsm_a.c
+++ b/epan/dissectors/packet-gsm_a.c
@@ -1069,6 +1069,12 @@ static int hf_gsm_a_dtap_cause = -1;
static int hf_gsm_a_MSC_rev = -1;
static int hf_gsm_a_ES_IND = -1;
+static int hf_gsm_a_qos_traffic_cls = -1;
+static int hf_gsm_a_qos_del_order = -1;
+static int hf_gsm_a_qos_del_of_err_sdu = -1;
+static int hf_gsm_a_qos_ber = -1;
+static int hf_gsm_a_qos_sdu_err_rat = -1;
+static int hf_gsm_a_qos_traff_hdl_pri = -1;
static int hf_gsm_a_A5_1_algorithm_sup = -1;
static int hf_gsm_a_RF_power_capability = -1;
static int hf_gsm_a_ps_sup_cap = -1;
@@ -11336,7 +11342,75 @@ de_sm_pdp_addr(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar
/*
* [7] 10.5.6.5
*/
-guint8
+ /* Delivery of erroneous SDUs, octet 6 (see 3GPP TS 23.107) Bits 3 2 1 */
+const value_string gsm_a_qos_del_of_err_sdu_vals[] = {
+ { 0, "Subscribed delivery of erroneous SDUs/Reserved" },
+ { 1, "No detect('-')" },
+ { 2, "Erroneous SDUs are delivered('yes')" },
+ { 3, "Erroneous SDUs are not delivered('No')" },
+ { 7, "Reserved" },
+ { 0, NULL }
+};
+
+ /* Delivery order, octet 6 (see 3GPP TS 23.107) Bits 5 4 3 */
+const value_string gsm_a_qos_del_order_vals[] = {
+ { 0, "Subscribed delivery order/Reserved" },
+ { 1, "With delivery order ('yes')" },
+ { 2, "Without delivery order ('no')" },
+ { 3, "Reserved" },
+ { 0, NULL }
+};
+/* Traffic class, octet 6 (see 3GPP TS 23.107) Bits 8 7 6 */
+const value_string gsm_a_qos_traffic_cls_vals[] = {
+ { 0, "Subscribed traffic class/Reserved" },
+ { 1, "Conversational class" },
+ { 2, "Streaming class" },
+ { 3, "Interactive class" },
+ { 4, "Background class" },
+ { 7, "Reserved" },
+ { 0, NULL }
+};
+
+/* Residual Bit Error Rate (BER), octet 10 (see 3GPP TS 23.107) Bits 8 7 6 5 */
+const value_string gsm_a_qos_ber_vals[] = {
+ { 0, "Subscribed residual BER/Reserved" },
+ { 1, "5*10-2" },
+ { 2, "1*10-2" },
+ { 3, "5*10-3" },
+ { 4, "4*10-3" },
+ { 5, "1*10-3" },
+ { 6, "1*10-4" },
+ { 7, "1*10-5" },
+ { 8, "1*10-6" },
+ { 9, "6*10-8" },
+ { 10, "Reserved" },
+ { 0, NULL }
+};
+
+/* SDU error ratio, octet 10 (see 3GPP TS 23.107) Bits 4 3 2 1 */
+const value_string gsm_a_qos_sdu_err_rat_vals[] = {
+ { 0, "Subscribed SDU error ratio/Reserved" },
+ { 1, "1*10-2" },
+ { 2, "7*10-3" },
+ { 3, "1*10-3" },
+ { 4, "1*10-4" },
+ { 5, "1*10-5" },
+ { 6, "1*10-6" },
+ { 7, "1*10-1" },
+ { 15, "Reserved" },
+ { 0, NULL }
+};
+
+/* Traffic handling priority, octet 11 (see 3GPP TS 23.107) Bits 2 1 */
+const value_string gsm_a_qos_traff_hdl_pri_vals[] = {
+ { 0, "Subscribed traffic handling priority/Reserved" },
+ { 1, "Priority level 1" },
+ { 2, "Priority level 2" },
+ { 3, "Priority level 3" },
+ { 0, NULL }
+};
+
+ guint8
de_sm_qos(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add_string _U_, int string_len _U_)
{
guint32 curr_offset;
@@ -11478,49 +11552,9 @@ de_sm_qos(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add
return(curr_offset - offset);
}
- oct = tvb_get_guint8(tvb, curr_offset);
-
- switch ( oct>>5 )
- {
- case 0x00: str="Subscribed traffic class/reserved"; break;
- case 0x01: str="Conversational class"; break;
- case 0x02: str="Streaming class"; break;
- case 0x03: str="Interactive class"; break;
- case 0x04: str="Background class"; break;
- case 0x07: str="Reserved"; break;
- default: str="Unspecified";
- }
-
- proto_tree_add_text(tree,
- tvb, curr_offset, 1,
- "Traffic class: (%u) %s",oct>>5,str);
-
- switch ( (oct>>3)&3 )
- {
- case 0x00: str="Subscribed delivery order"; break;
- case 0x01: str="With delivery order ('yes')"; break;
- case 0x02: str="Without delivery order ('no')"; break;
- case 0x03: str="Reserved"; break;
- default: str="This should not happen - BUG";
- }
-
- proto_tree_add_text(tree,
- tvb, curr_offset, 1,
- "Delivery order: (%u) %s",(oct>>3)&3,str);
-
- switch ( oct&7 )
- {
- case 0x00: str="Subscribed delivery of erroneous SDUs/reserved"; break;
- case 0x01: str="No detect ('-')"; break;
- case 0x02: str="Erroneous SDUs are delivered ('yes')"; break;
- case 0x03: str="Erroneous SDUs are not delivered ('no')"; break;
- case 0x07: str="Reserved"; break;
- default: str="Unspecified";
- }
-
- proto_tree_add_text(tree,
- tvb, curr_offset, 1,
- "Delivery of erroneous SDUs: (%u) %s",oct&7,str);
+ proto_tree_add_item(tree, hf_gsm_a_qos_traffic_cls, tvb, offset, 1, FALSE);
+ proto_tree_add_item(tree, hf_gsm_a_qos_del_order, tvb, offset, 1, FALSE);
+ proto_tree_add_item(tree, hf_gsm_a_qos_del_of_err_sdu, tvb, offset, 1, FALSE);
curr_offset+= 1;
curr_len-= 1;
@@ -11635,45 +11669,8 @@ de_sm_qos(tvbuff_t *tvb, proto_tree *tree, guint32 offset, guint len, gchar *add
return(curr_offset - offset);
}
- oct = tvb_get_guint8(tvb, curr_offset);
-
- switch ( oct>>4 )
- {
- case 0x00: str="Subscribed residual BER/reserved"; break;
- case 0x01: str="5*10-2"; break;
- case 0x02: str="1*10-2"; break;
- case 0x03: str="5*10-3"; break;
- case 0x04: str="4*10-3"; break;
- case 0x05: str="1*10-3"; break;
- case 0x06: str="1*10-4"; break;
- case 0x07: str="1*10-5"; break;
- case 0x08: str="1*10-6"; break;
- case 0x09: str="6*10-8"; break;
- case 0x0f: str="Reserved"; break;
- default: str="Unspecified";
- }
-
- proto_tree_add_text(tree,
- tvb, curr_offset, 1,
- "Residual BER: (%u) %s",oct>>4,str);
-
- switch ( oct&0x0f )
- {
- case 0x00: str="Subscribed SDU error ratio/reserved"; break;
- case 0x01: str="1*10-2"; break;
- case 0x02: str="7*10-3"; break;
- case 0x03: str="1*10-3"; break;
- case 0x04: str="1*10-4"; break;
- case 0x05: str="1*10-5"; break;
- case 0x06: str="1*10-6"; break;
- case 0x07: str="1*10-1"; break;
- case 0x0f: str="Reserved"; break;
- default: str="Unspecified";
- }
-
- proto_tree_add_text(tree,
- tvb, curr_offset, 1,
- "SDU error ratio: (%u) %s",oct&0x0f,str);
+ proto_tree_add_item(tree, hf_gsm_a_qos_ber, tvb, offset, 1, FALSE);
+ proto_tree_add_item(tree, hf_gsm_a_qos_sdu_err_rat, tvb, offset, 1, FALSE);
curr_offset+= 1;
curr_len-= 1;
@@ -18294,6 +18291,30 @@ proto_register_gsm_a(void)
FT_UINT8,BASE_DEC, VALS(ES_IND_vals), 0x10,
"ES IND", HFILL }
},
+ { &hf_gsm_a_qos_traffic_cls,
+ { "Traffic class", "gsm_a.qos.traffic_cls",
+ FT_UINT8, BASE_DEC, VALS(gsm_a_qos_traffic_cls_vals), 0xe0,
+ "Traffic class", HFILL }},
+ { &hf_gsm_a_qos_del_order,
+ { "Delivery order", "gsm_a.qos.del_order",
+ FT_UINT8, BASE_DEC, VALS(gsm_a_qos_traffic_cls_vals), 0x18,
+ "Delivery order", HFILL }},
+ { &hf_gsm_a_qos_del_of_err_sdu,
+ { "Delivery of erroneous SDUs", "gsm_a.qos.del_of_err_sdu",
+ FT_UINT8, BASE_DEC, VALS(gsm_a_qos_del_of_err_sdu_vals), 0x03,
+ "Delivery of erroneous SDUs", HFILL }},
+ { &hf_gsm_a_qos_ber,
+ { "Residual Bit Error Rate (BER)", "gsm_a.qos.ber",
+ FT_UINT8, BASE_DEC, VALS(gsm_a_qos_ber_vals), 0xf0,
+ "Residual Bit Error Rate (BER)", HFILL }},
+ { &hf_gsm_a_qos_sdu_err_rat,
+ { "SDU error ratio", "gsm_a.qos.sdu_err_rat",
+ FT_UINT8, BASE_DEC, VALS(gsm_a_qos_sdu_err_rat_vals), 0x0f,
+ "SDU error ratio", HFILL }},
+ { &hf_gsm_a_qos_traff_hdl_pri,
+ { "Traffic handling priority", "gsm_a.qos.traff_hdl_pri",
+ FT_UINT8, BASE_DEC, VALS(gsm_a_qos_traff_hdl_pri_vals), 0x03,
+ "Traffic handling priority", HFILL }},
{ &hf_gsm_a_A5_1_algorithm_sup,
{ "A5/1 algorithm supported","gsm_a.MSC2_rev",
FT_UINT8,BASE_DEC, VALS(A5_1_algorithm_sup_vals), 0x08,
diff --git a/epan/dissectors/packet-gsm_a.h b/epan/dissectors/packet-gsm_a.h
index d41feac1f0..e9d2398ebc 100644
--- a/epan/dissectors/packet-gsm_a.h
+++ b/epan/dissectors/packet-gsm_a.h
@@ -101,3 +101,9 @@ ETH_VAR_IMPORT const value_string gsm_a_dtap_msg_sm_strings[];
ETH_VAR_IMPORT const value_string gsm_a_dtap_msg_ss_strings[];
ETH_VAR_IMPORT const gchar *gsm_a_pd_str[];
+extern const value_string gsm_a_qos_del_of_err_sdu_vals[];
+extern const value_string gsm_a_qos_del_order_vals[];
+extern const value_string gsm_a_qos_traffic_cls_vals[];
+extern const value_string gsm_a_qos_ber_vals[];
+extern const value_string gsm_a_qos_sdu_err_rat_vals[];
+extern const value_string gsm_a_qos_traff_hdl_pri_vals[]; \ No newline at end of file
diff --git a/epan/dissectors/packet-gsm_map.c b/epan/dissectors/packet-gsm_map.c
index 4bac6a9e80..0c2dcdd8bd 100644
--- a/epan/dissectors/packet-gsm_map.c
+++ b/epan/dissectors/packet-gsm_map.c
@@ -100,6 +100,20 @@ static int hf_gsm_map_forwarding_reason = -1;
static int hf_gsm_map_pdp_type_org = -1;
static int hf_gsm_map_etsi_pdp_type_number = -1;
static int hf_gsm_map_ietf_pdp_type_number = -1;
+static int hf_gsm_map_ext_qos_subscribed_pri = -1;
+
+static int hf_gsm_map_qos_traffic_cls = -1;
+static int hf_gsm_map_qos_del_order = -1;
+static int hf_gsm_map_qos_del_of_err_sdu = -1;
+static int hf_gsm_map_qos_ber = -1;
+static int hf_gsm_map_qos_sdu_err_rat = -1;
+static int hf_gsm_map_qos_traff_hdl_pri = -1;
+static int hf_gsm_map_qos_max_sdu = -1;
+static int hf_gsm_map_max_brate_ulink = -1;
+static int hf_gsm_map_max_brate_dlink = -1;
+static int hf_gsm_map_qos_transfer_delay = -1;
+static int hf_gsm_map_guaranteed_max_brate_ulink = -1;
+static int hf_gsm_map_guaranteed_max_brate_dlink = -1;
/*--- Included file: packet-gsm_map-hf.c ---*/
@@ -924,7 +938,7 @@ static int hf_gsm_map_SupportedGADShapes_ellipsoidPointWithAltitudeAndUncertaint
static int hf_gsm_map_SupportedGADShapes_ellipsoidArc = -1;
/*--- End of included file: packet-gsm_map-hf.c ---*/
-#line 97 "packet-gsm_map-template.c"
+#line 111 "packet-gsm_map-template.c"
/* Initialize the subtree pointers */
static gint ett_gsm_map = -1;
@@ -935,6 +949,7 @@ static gint ett_gsm_map_ReturnErrorPDU = -1;
static gint ett_gsm_map_ReturnResult_result = -1;
static gint ett_gsm_map_ReturnError_result = -1;
static gint ett_gsm_map_GSMMAPPDU = -1;
+static gint ett_gsm_map_ext_qos_subscribed = -1;
/*--- Included file: packet-gsm_map-ett.c ---*/
@@ -1337,7 +1352,7 @@ static gint ett_gsm_map_SecureTransportErrorParam = -1;
static gint ett_gsm_map_ExtensionContainer = -1;
/*--- End of included file: packet-gsm_map-ett.c ---*/
-#line 109 "packet-gsm_map-template.c"
+#line 124 "packet-gsm_map-template.c"
static dissector_table_t sms_dissector_table; /* SMS TPDU */
static dissector_handle_t data_handle;
@@ -1401,6 +1416,77 @@ unpack_digits(tvbuff_t *tvb, int offset){
+static void
+dissect_gsm_map_ext_qos_subscribed(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree){
+ int offset = 0;
+ proto_item *item;
+ proto_tree *subtree;
+ guint8 octet;
+
+ item = get_ber_last_created_item();
+ subtree = proto_item_add_subtree(item, ett_gsm_map_ext_qos_subscribed);
+ /* OCTET 1:
+ Allocation/Retention Priority (This octet encodes each priority level defined in
+ 23.107 as the binary value of the priority level, declaration in 29.060)
+ Octets 2-9 are coded according to 3GPP TS 24.008[35] Quality of Service Octets
+ 6-13.
+ */
+ /* Allocation/Retention Priority */
+ proto_tree_add_item(subtree, hf_gsm_map_ext_qos_subscribed_pri, tvb, offset, 1, FALSE);
+ offset++;
+
+ /* Quality of Service Octets 6-13.( Octet 2 - 9 Here) */
+
+ /* Traffic class, octet 6 (see 3GPP TS 23.107) Bits 8 7 6 */
+ proto_tree_add_item(subtree, hf_gsm_map_qos_traffic_cls, tvb, offset, 1, FALSE);
+ /* Delivery order, octet 6 (see 3GPP TS 23.107) Bits 5 4 */
+ proto_tree_add_item(subtree, hf_gsm_map_qos_del_order, tvb, offset, 1, FALSE);
+ /* Delivery of erroneous SDUs, octet 6 (see 3GPP TS 23.107) Bits 3 2 1 */
+ proto_tree_add_item(subtree, hf_gsm_map_qos_del_of_err_sdu, tvb, offset, 1, FALSE);
+ offset++;
+
+ /* Maximum SDU size, octet 7 (see 3GPP TS 23.107) */
+ octet = tvb_get_guint8(tvb,offset);
+ proto_tree_add_uint(subtree, hf_gsm_map_qos_max_sdu, tvb, offset, 1, octet);
+
+
+ offset++;
+ /* Maximum bit rate for uplink, octet 8 */
+ octet = tvb_get_guint8(tvb,offset);
+ proto_tree_add_uint(subtree, hf_gsm_map_max_brate_ulink, tvb, offset, 1, octet);
+ offset++;
+ /* Maximum bit rate for downlink, octet 9 (see 3GPP TS 23.107) */
+ octet = tvb_get_guint8(tvb,offset);
+ proto_tree_add_uint(subtree, hf_gsm_map_max_brate_dlink, tvb, offset, 1, octet);
+ offset++;
+ /* Residual Bit Error Rate (BER), octet 10 (see 3GPP TS 23.107) Bits 8 7 6 5 */
+ proto_tree_add_item(subtree, hf_gsm_map_qos_ber, tvb, offset, 1, FALSE);
+ /* SDU error ratio, octet 10 (see 3GPP TS 23.107) */
+ proto_tree_add_item(subtree, hf_gsm_map_qos_sdu_err_rat, tvb, offset, 1, FALSE);
+ offset++;
+
+ /* Traffic handling priority, octet 11 (see 3GPP TS 23.107) Bits 2 1 */
+ proto_tree_add_item(subtree, hf_gsm_map_qos_traff_hdl_pri, tvb, offset, 1, FALSE);
+ /* Transfer delay, octet 11 (See 3GPP TS 23.107) Bits 8 7 6 5 4 3 */
+ proto_tree_add_item(subtree, hf_gsm_map_qos_transfer_delay, tvb, offset, 1, FALSE);
+ offset++;
+
+ /* Guaranteed bit rate for uplink, octet 12 (See 3GPP TS 23.107)
+ Coding is identical to that of Maximum bit rate for uplink.
+ */
+ octet = tvb_get_guint8(tvb,offset);
+ proto_tree_add_uint(subtree, hf_gsm_map_guaranteed_max_brate_ulink, tvb, offset, 1, octet);
+ offset++;
+
+ /* Guaranteed bit rate for downlink, octet 13(See 3GPP TS 23.107)
+ Coding is identical to that of Maximum bit rate for uplink.
+ */
+ octet = tvb_get_guint8(tvb,offset);
+ proto_tree_add_uint(subtree, hf_gsm_map_guaranteed_max_brate_dlink, tvb, offset, 1, octet);
+
+}
+
+
/*--- Included file: packet-gsm_map-fn.c ---*/
#line 1 "packet-gsm_map-fn.c"
/*--- Fields for imported types ---*/
@@ -6835,7 +6921,6 @@ dissect_gsm_map_QoS_Subscribed(gboolean implicit_tag _U_, tvbuff_t *tvb, int off
tvbuff_t *parameter_tvb;
-
offset = dissect_ber_octet_string(implicit_tag, pinfo, tree, tvb, offset, hf_index,
&parameter_tvb);
@@ -6878,19 +6963,18 @@ static int dissect_lcsAPN_impl(packet_info *pinfo, proto_tree *tree, tvbuff_t *t
int
dissect_gsm_map_Ext_QoS_Subscribed(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) {
-#line 473 "gsmmap.cnf"
+#line 472 "gsmmap.cnf"
tvbuff_t *parameter_tvb;
-
offset = dissect_ber_octet_string(implicit_tag, pinfo, tree, tvb, offset, hf_index,
&parameter_tvb);
- if (!parameter_tvb)
+ if (!parameter_tvb)
return offset;
- de_sm_qos(parameter_tvb, tree, 0, 9, NULL, 0);
-
+ dissect_gsm_map_ext_qos_subscribed(tvb, pinfo, tree);
+
return offset;
@@ -14209,7 +14293,7 @@ static void dissect_Component_PDU(tvbuff_t *tvb, packet_info *pinfo, proto_tree
/*--- End of included file: packet-gsm_map-fn.c ---*/
-#line 172 "packet-gsm_map-template.c"
+#line 258 "packet-gsm_map-template.c"
const value_string gsm_map_opr_code_strings[] = {
{ 2, "updateLocation" },
@@ -15646,8 +15730,59 @@ void proto_register_gsm_map(void) {
{ "PDP Type Number", "gsm_map.ietf_pdp_type_number",
FT_UINT8, BASE_HEX, VALS(ietf_pdp_type_number_values), 0,
"IETF PDP Type Number", HFILL }},
-
-
+ { &hf_gsm_map_ext_qos_subscribed_pri,
+ { "Allocation/Retention priority", "gsm_map.ext_qos_subscribed_pri",
+ FT_UINT8, BASE_DEC, NULL, 0xff,
+ "Allocation/Retention priority", HFILL }},
+ { &hf_gsm_map_qos_traffic_cls,
+ { "Traffic class", "gsm_map.qos.traffic_cls",
+ FT_UINT8, BASE_DEC, VALS(gsm_a_qos_traffic_cls_vals), 0xe0,
+ "Traffic class", HFILL }},
+ { &hf_gsm_map_qos_del_order,
+ { "Delivery order", "gsm_map.qos.del_order",
+ FT_UINT8, BASE_DEC, VALS(gsm_a_qos_traffic_cls_vals), 0x18,
+ "Delivery order", HFILL }},
+ { &hf_gsm_map_qos_del_of_err_sdu,
+ { "Delivery of erroneous SDUs", "gsm_map.qos.del_of_err_sdu",
+ FT_UINT8, BASE_DEC, VALS(gsm_a_qos_del_of_err_sdu_vals), 0x03,
+ "Delivery of erroneous SDUs", HFILL }},
+ { &hf_gsm_map_qos_ber,
+ { "Residual Bit Error Rate (BER)", "gsm_map.qos.ber",
+ FT_UINT8, BASE_DEC, VALS(gsm_a_qos_ber_vals), 0xf0,
+ "Residual Bit Error Rate (BER)", HFILL }},
+ { &hf_gsm_map_qos_sdu_err_rat,
+ { "SDU error ratio", "gsm_map.qos.sdu_err_rat",
+ FT_UINT8, BASE_DEC, VALS(gsm_a_qos_sdu_err_rat_vals), 0x0f,
+ "SDU error ratio", HFILL }},
+ { &hf_gsm_map_qos_traff_hdl_pri,
+ { "Traffic handling priority", "gsm_map.qos.traff_hdl_pri",
+ FT_UINT8, BASE_DEC, VALS(gsm_a_qos_traff_hdl_pri_vals), 0x03,
+ "Traffic handling priority", HFILL }},
+
+ { &hf_gsm_map_qos_max_sdu,
+ { "Maximum SDU size (Raw data see TS 24.008 for interpretation)", "gsm_map.qos.max_sdu",
+ FT_UINT8, BASE_DEC, NULL, 0xff,
+ "Maximum SDU size", HFILL }},
+ { &hf_gsm_map_max_brate_ulink,
+ { "Maximum bit rate for uplink (Raw data see TS 24.008 for interpretation)", "gsm_map.qos.max_brate_ulink",
+ FT_UINT8, BASE_DEC, NULL, 0xff,
+ "Maximum bit rate for uplink", HFILL }},
+ { &hf_gsm_map_max_brate_dlink,
+ { "Maximum bit rate for downlink (Raw data see TS 24.008 for interpretation)", "gsm_map.qos.max_brate_dlink",
+ FT_UINT8, BASE_DEC, NULL, 0xff,
+ "Maximum bit rate for downlink", HFILL }},
+ { &hf_gsm_map_qos_transfer_delay,
+ { "Transfer delay (Raw data see TS 24.008 for interpretation)", "gsm_map.qos.transfer_delay",
+ FT_UINT8, BASE_DEC, NULL, 0xfc,
+ "Transfer delay", HFILL }},
+ { &hf_gsm_map_guaranteed_max_brate_ulink,
+ { "Guaranteed bit rate for uplink (Raw data see TS 24.008 for interpretation)", "gsm_map.qos.brate_ulink",
+ FT_UINT8, BASE_DEC, NULL, 0xff,
+ "Guaranteed bit rate for uplink", HFILL }},
+ { &hf_gsm_map_guaranteed_max_brate_dlink,
+ { "Guaranteed bit rate for downlink (Raw data see TS 24.008 for interpretation)", "gsm_map.qos.brate_dlink",
+ FT_UINT8, BASE_DEC, NULL, 0xff,
+ "Guaranteed bit rate for downlink", HFILL }},
/*--- Included file: packet-gsm_map-hfarr.c ---*/
#line 1 "packet-gsm_map-hfarr.c"
@@ -18921,7 +19056,7 @@ void proto_register_gsm_map(void) {
"", HFILL }},
/*--- End of included file: packet-gsm_map-hfarr.c ---*/
-#line 1611 "packet-gsm_map-template.c"
+#line 1748 "packet-gsm_map-template.c"
};
/* List of subtrees */
@@ -18934,6 +19069,7 @@ void proto_register_gsm_map(void) {
&ett_gsm_map_ReturnResult_result,
&ett_gsm_map_ReturnError_result,
&ett_gsm_map_GSMMAPPDU,
+ &ett_gsm_map_ext_qos_subscribed,
/*--- Included file: packet-gsm_map-ettarr.c ---*/
#line 1 "packet-gsm_map-ettarr.c"
@@ -19335,7 +19471,7 @@ void proto_register_gsm_map(void) {
&ett_gsm_map_ExtensionContainer,
/*--- End of included file: packet-gsm_map-ettarr.c ---*/
-#line 1624 "packet-gsm_map-template.c"
+#line 1762 "packet-gsm_map-template.c"
};
/* Register protocol */