diff options
author | Michal Labedzki <michal.labedzki@tieto.com> | 2015-10-18 15:06:30 +0200 |
---|---|---|
committer | Michal Labedzki <michal.labedzki@tieto.com> | 2015-11-20 16:00:15 +0000 |
commit | a90100631e1c3134313299f78760d7b1a91bc757 (patch) | |
tree | f1556dab1d60b176169b817ee164bfe0ce1549ab /epan/dissectors/packet-btsdp.c | |
parent | c44246448aea18de39dea15ad6ece062a43f348d (diff) | |
download | wireshark-a90100631e1c3134313299f78760d7b1a91bc757.tar.gz |
Bluetooth: Add ability to add custom UUID description
Some vendors use UUID128 as own services/attributes.
Sometimes they use UUID16 for it too. Support both cases.
Change-Id: I001692b94fcc2f86eafa81012790e9134b0f2a36
Reviewed-on: https://code.wireshark.org/review/11976
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
Diffstat (limited to 'epan/dissectors/packet-btsdp.c')
-rw-r--r-- | epan/dissectors/packet-btsdp.c | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/epan/dissectors/packet-btsdp.c b/epan/dissectors/packet-btsdp.c index c29c38d1e9..d9b8338506 100644 --- a/epan/dissectors/packet-btsdp.c +++ b/epan/dissectors/packet-btsdp.c @@ -1367,23 +1367,12 @@ dissect_uuid(proto_tree *tree, tvbuff_t *tvb, gint offset, gint size, bluetooth_ uuid->bt_uuid = tvb_get_ntohs(tvb, offset + 2); proto_item_append_text(item, " (%s)", val_to_str_ext_const(uuid->bt_uuid, &bluetooth_uuid_vals_ext, "Unknown")); } else { - guint i_uuid; - item = proto_tree_add_item(tree, hf_data_element_value_uuid, tvb, offset, size, ENC_NA); - - i_uuid = 0; - while (bluetooth_uuid_custom[i_uuid].name) { - if (bluetooth_uuid_custom[i_uuid].size != size) { - i_uuid += 1; - continue; - } + bluetooth_uuid_t x_uuid; - if (tvb_memeql(tvb, offset, bluetooth_uuid_custom[i_uuid].uuid, 4) == 0) { - proto_item_append_text(item, " (%s)", bluetooth_uuid_custom[i_uuid].name); - break; - } + item = proto_tree_add_item(tree, hf_data_element_value_uuid, tvb, offset, size, ENC_NA); + x_uuid = get_uuid(tvb, offset, size); - i_uuid += 1; - } + proto_item_append_text(item, " (%s)", print_uuid(&x_uuid)); uuid->bt_uuid = 0; } |