aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors
diff options
context:
space:
mode:
authorMichal Labedzki <michal.labedzki@tieto.com>2016-01-26 09:02:15 +0100
committerMichal Labedzki <michal.labedzki@tieto.com>2016-03-03 10:47:35 +0000
commitd25bdd7c4603e97acc5081f0798280bc44c0ab75 (patch)
tree143b43dc3236a1f92b65dbe50117e6c242897862 /epan/dissectors
parentc785c511372905409b61e8d2a08313fdae257c7b (diff)
Qt/Bluetooth: HCI Summary: Miscellaneous fixes
1. Count vendor commands once 2. Fill Event column in case of Command Status/Command Complete types while displaying command 3. Add missing Status from Connect Complete event 4. Add missing Command Complete events opcodes Change-Id: Ie5a0e373f92f62fcb890cef7ab54762df3bb8a35 Reviewed-on: https://code.wireshark.org/review/14315 Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
Diffstat (limited to 'epan/dissectors')
-rw-r--r--epan/dissectors/packet-bthci_evt.c32
1 files changed, 32 insertions, 0 deletions
diff --git a/epan/dissectors/packet-bthci_evt.c b/epan/dissectors/packet-bthci_evt.c
index de94562675..9795aa9ad4 100644
--- a/epan/dissectors/packet-bthci_evt.c
+++ b/epan/dissectors/packet-bthci_evt.c
@@ -889,6 +889,7 @@ dissect_bthci_evt_connect_complete(tvbuff_t *tvb, int offset, packet_info *pinfo
proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN);
status = tvb_get_guint8(tvb, offset);
+ send_hci_summary_status_tap(status, pinfo, bluetooth_data);
offset += 1;
connection_handle = tvb_get_letohs(tvb, offset) & 0x0FFF;
@@ -1704,6 +1705,7 @@ dissect_bthci_evt_command_status(tvbuff_t *tvb, int offset, packet_info *pinfo,
tap_hci_summary->type = BLUETOOTH_HCI_SUMMARY_EVENT_OPCODE;
tap_hci_summary->ogf = ogf;
tap_hci_summary->ocf = opcode & 0x03ff;
+ tap_hci_summary->event = 0x0f; /* Command Status */
if (try_val_to_str_ext(opcode, &bthci_cmd_opcode_vals_ext))
tap_hci_summary->name = val_to_str_ext(opcode, &bthci_cmd_opcode_vals_ext, "Unknown 0x%04x");
else
@@ -2324,6 +2326,25 @@ dissect_bthci_evt_command_complete(tvbuff_t *tvb, int offset,
if (out_opcode)
*out_opcode = opcode;
+ if (have_tap_listener(bluetooth_hci_summary_tap)) {
+ bluetooth_hci_summary_tap_t *tap_hci_summary;
+
+ tap_hci_summary = wmem_new(wmem_packet_scope(), bluetooth_hci_summary_tap_t);
+
+ tap_hci_summary->interface_id = bluetooth_data->interface_id;
+ tap_hci_summary->adapter_id = bluetooth_data->adapter_id;
+
+ tap_hci_summary->type = BLUETOOTH_HCI_SUMMARY_EVENT_OPCODE;
+ tap_hci_summary->ogf = ogf;
+ tap_hci_summary->ocf = opcode & 0x03ff;
+ tap_hci_summary->event = 0x0e; /* Command Complete */
+ if (try_val_to_str_ext(opcode, &bthci_cmd_opcode_vals_ext))
+ tap_hci_summary->name = val_to_str_ext(opcode, &bthci_cmd_opcode_vals_ext, "Unknown 0x%04x");
+ else
+ tap_hci_summary->name = NULL;
+ tap_queue_packet(bluetooth_hci_summary_tap, pinfo, tap_hci_summary);
+ }
+
interface_id = bluetooth_data->interface_id;
adapter_id = bluetooth_data->adapter_id;
frame_number = pinfo->num;
@@ -3259,6 +3280,17 @@ dissect_bthci_evt_command_complete(tvbuff_t *tvb, int offset,
offset += 2;
break;
+ case 0x100b: /* Read Local Supported Codecs */
+ proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_NA);
+ status = tvb_get_guint8(tvb, offset);
+ send_hci_summary_status_tap(status, pinfo, bluetooth_data);
+ offset += 1;
+
+/* TODO: Implement */
+ proto_tree_add_expert(tree, pinfo, &ei_event_undecoded, tvb, offset, tvb_captured_length_remaining(tvb, offset));
+ offset += tvb_reported_length_remaining(tvb, offset);
+
+ break;
case 0x1007: /* Read Country Code */
proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN);