gsm_abis_om2000: Add very basic dissection of "MO Record"
authorHarald Welte <laforge@gnumonks.org>
Sat, 15 Oct 2016 20:02:47 +0000 (22:02 +0200)
committerMichael Mann <mmann78@netscape.net>
Wed, 26 Oct 2016 15:10:42 +0000 (15:10 +0000)
The MO Record is returned in response to a Capabilities Request and
describes the capabilities of he MO in more detail.  The exact coding of
the contents is not yet known at this point.

Change-Id: Iddfe60d286a85585bec58d340bdee793d3bfca2e
Reviewed-on: https://code.wireshark.org/review/18456
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
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 96ef007c4165e5990a768ef62b3a762af2dd9cb7..4f7173dc7072d24ca4b1e1a9bd7dfc1e84ca6311 100644 (file)
@@ -746,6 +746,26 @@ dissect_om2k_negotiation_record1(tvbuff_t *tvb, gint base_offset, proto_tree *tr
        return offset - base_offset;
 }
 
+static gint
+dissect_om2k_mo_record(tvbuff_t *tvb, gint base_offset, gint len, proto_tree *tree)
+{
+       gint offset = base_offset;
+       proto_tree_add_item(tree, hf_om2k_mo_class, tvb, offset++, 1, ENC_NA);
+       proto_tree_add_item(tree, hf_om2k_mo_instance, tvb, offset++, 1, ENC_NA);
+
+       while (offset < len) {
+               guint16 attr_id;
+               guint8 attr_len;
+
+               attr_id = tvb_get_guint16(tvb, offset, ENC_BIG_ENDIAN);
+               offset += 2;
+               attr_len = tvb_get_guint8(tvb, offset++);
+               offset += dissect_om2k_attr_unkn(tvb, offset, attr_len, attr_id, tree);
+       }
+
+       return offset - base_offset;
+}
+
 static gint
 dissect_om2k_negotiation_record2(tvbuff_t *tvb, gint base_offset, proto_tree *tree)
 {
@@ -1024,6 +1044,9 @@ dissect_om2k_attrs(tvbuff_t *tvb, gint offset, proto_tree *tree)
                                            offset, 2, ENC_BIG_ENDIAN);
                        offset += 2;
                        break;
+               case 0x85: /* MO Record */
+                       offset += dissect_om2k_mo_record(tvb, offset, tvb_reported_length_remaining(tvb, offset), tree);
+                       break;
                case 0x87: /* TTA */
                        proto_tree_add_item(tree, hf_om2k_tta, tvb,
                                            offset++, 1, ENC_BIG_ENDIAN);