aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-gsm_map.c
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 /epan/dissectors/packet-gsm_map.c
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
Diffstat (limited to 'epan/dissectors/packet-gsm_map.c')
-rw-r--r--epan/dissectors/packet-gsm_map.c162
1 files changed, 149 insertions, 13 deletions
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 */