gsm_abis_om2000: Dissect "Reason Code" and "Result Code"
authorHarald Welte <laforge@gnumonks.org>
Mon, 1 Aug 2016 06:34:01 +0000 (08:34 +0200)
committerMichael Mann <mmann78@netscape.net>
Fri, 5 Aug 2016 13:46:59 +0000 (13:46 +0000)
Change-Id: Ie2495b6333b021de53c674ca8bdad0712228a7c1
Reviewed-on: https://code.wireshark.org/review/16820
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
epan/dissectors/packet-gsm_abis_om2000.c

index 4fe66fb0457c2730f452c49bec3455ba267896d0..0688072acb8b2e1d44e25be4a5d8ed824412ddb7 100644 (file)
@@ -110,6 +110,8 @@ static int hf_om2k_tf_mode = -1;
 static int hf_om2k_tf_fs_offset = -1;
 static int hf_om2k_attr_id = -1;
 static int hf_om2k_attr_index = -1;
+static int hf_om2k_result_code = -1;
+static int hf_om2k_reason_code = -1;
 
 /* initialize the subtree pointers */
 static int ett_om2000 = -1;
@@ -578,6 +580,19 @@ static const value_string om2k_attr_id_vals[] = {
 
 static value_string_ext om2k_attr_id_vals_ext = VALUE_STRING_EXT_INIT(om2k_attr_id_vals);
 
+static const value_string om2k_res_code_vals[] = {
+       { 0x02, "Wrong state or out of sequence" },
+       { 0x03, "File error" },
+       { 0x04, "Fault, unspecified" },
+       { 0x05, "Tuning fault" },
+       { 0x06, "Protocol error" },
+       { 0x07, "MO not connected" },
+       { 0x08, "Parameter error" },
+       { 0x09, "Operational functio not supported" },
+       { 0x0a, "Local Access state LOCALLY DISCONNECTED" },
+       { 0, NULL }
+};
+
 static gint
 dissect_tss_mo_state(tvbuff_t *tvb, gint offset, proto_tree *tree)
 {
@@ -841,6 +856,10 @@ dissect_om2k_attrs(tvbuff_t *tvb, gint offset, proto_tree *tree)
                        proto_tree_add_item(tree, hf_om2k_nom_pwr, tvb,
                                            offset++, 1, ENC_BIG_ENDIAN);
                        break;
+               case 0x32: /* Reason Code */
+                       proto_tree_add_item(tree, hf_om2k_reason_code, tvb,
+                                           offset++, 1, ENC_BIG_ENDIAN);
+                       break;
                case 0x33: /* Receiver Diversity */
                        proto_tree_add_item(tree, hf_om2k_diversity, tvb,
                                            offset++, 1, ENC_BIG_ENDIAN);
@@ -849,6 +868,10 @@ dissect_om2k_attrs(tvbuff_t *tvb, gint offset, proto_tree *tree)
                        /* FIXME */
                        offset += dissect_om2k_attr_unkn(tvb, offset, 6, iei, tree);
                        break;
+               case 0x35: /* Result Code */
+                       proto_tree_add_item(tree, hf_om2k_result_code, tvb,
+                                           offset++, 1, ENC_BIG_ENDIAN);
+                       break;
                case 0x38: /* T3105 */
                        proto_tree_add_item(tree, hf_om2k_t3105, tvb,
                                            offset++, 1, ENC_BIG_ENDIAN);
@@ -1466,6 +1489,16 @@ proto_register_abis_om2000(void)
                    FT_UINT8, BASE_DEC, NULL, 0,
                    NULL, HFILL }
                },
+               { &hf_om2k_reason_code,
+                 { "Reason Code", "gsm_abis_om2000.reason_code",
+                   FT_UINT8, BASE_HEX, NULL, 0,
+                   NULL, HFILL }
+               },
+               { &hf_om2k_result_code,
+                 { "Result Code", "gsm_abis_om2000.res_code",
+                   FT_UINT8, BASE_HEX, VALS(om2k_res_code_vals), 0,
+                   NULL, HFILL }
+               },
        };
        static gint *ett[] = {
                &ett_om2000,