From 5172ec96aa0899e77e8a17dc701518d1a79f6b65 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Sat, 15 Oct 2016 22:02:47 +0200 Subject: gsm_abis_om2000: Add very basic dissection of "MO Record" 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 Tested-by: Petri Dish Buildbot Reviewed-by: Michael Mann --- epan/dissectors/packet-gsm_abis_om2000.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'epan/dissectors/packet-gsm_abis_om2000.c') diff --git a/epan/dissectors/packet-gsm_abis_om2000.c b/epan/dissectors/packet-gsm_abis_om2000.c index 96ef007c41..4f7173dc70 100644 --- a/epan/dissectors/packet-gsm_abis_om2000.c +++ b/epan/dissectors/packet-gsm_abis_om2000.c @@ -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); -- cgit v1.2.3