diff options
Diffstat (limited to 'epan')
-rw-r--r-- | epan/dissectors/packet-bluetooth.c | 2 | ||||
-rw-r--r-- | epan/dissectors/packet-bluetooth.h | 29 | ||||
-rw-r--r-- | epan/dissectors/packet-bthci_cmd.c | 33 | ||||
-rw-r--r-- | epan/dissectors/packet-bthci_evt.c | 414 | ||||
-rw-r--r-- | epan/dissectors/packet-bthci_vendor.c | 69 |
5 files changed, 488 insertions, 59 deletions
diff --git a/epan/dissectors/packet-bluetooth.c b/epan/dissectors/packet-bluetooth.c index 12bfec2008..43152d4680 100644 --- a/epan/dissectors/packet-bluetooth.c +++ b/epan/dissectors/packet-bluetooth.c @@ -61,6 +61,7 @@ static wmem_tree_t *hci_vendors = NULL; static int bluetooth_tap = -1; int bluetooth_device_tap = -1; +int bluetooth_hci_summary_tap = -1; const value_string bluetooth_uuid_vals[] = { /* Protocol Identifiers - https://www.bluetooth.org/en-us/specification/assigned-numbers/service-discovery */ @@ -1554,6 +1555,7 @@ proto_register_bluetooth(void) bluetooth_tap = register_tap("bluetooth"); bluetooth_device_tap = register_tap("bluetooth.device"); + bluetooth_hci_summary_tap = register_tap("bluetooth.hci_summary"); bluetooth_uuid_table = register_dissector_table("bluetooth.uuid", "BT Service UUID", FT_STRING, BASE_NONE); diff --git a/epan/dissectors/packet-bluetooth.h b/epan/dissectors/packet-bluetooth.h index 923eb1df69..a4a55cd1f7 100644 --- a/epan/dissectors/packet-bluetooth.h +++ b/epan/dissectors/packet-bluetooth.h @@ -229,7 +229,36 @@ typedef struct _bluetooth_device_tap_t { } data; } bluetooth_device_tap_t; +enum bluetooth_hci_summary_type { + BLUETOOTH_HCI_SUMMARY_OPCODE, + BLUETOOTH_HCI_SUMMARY_EVENT_OPCODE, + BLUETOOTH_HCI_SUMMARY_EVENT, + BLUETOOTH_HCI_SUMMARY_VENDOR_OPCODE, + BLUETOOTH_HCI_SUMMARY_VENDOR_EVENT_OPCODE, + BLUETOOTH_HCI_SUMMARY_VENDOR_EVENT, + BLUETOOTH_HCI_SUMMARY_STATUS, + BLUETOOTH_HCI_SUMMARY_STATUS_PENDING, + BLUETOOTH_HCI_SUMMARY_REASON, + BLUETOOTH_HCI_SUMMARY_HARDWARE_ERROR +}; + +typedef struct _bluetooth_hci_summary_tap_t { + guint32 interface_id; + guint32 adapter_id; + + guint8 ogf; + guint8 ocf; + guint8 event; + guint8 status; + guint8 reason; + guint8 hardware_error; + + const gchar *name; + enum bluetooth_hci_summary_type type; +} bluetooth_hci_summary_tap_t; + extern int bluetooth_device_tap; +extern int bluetooth_hci_summary_tap; WS_DLL_PUBLIC const value_string bluetooth_uuid_vals[]; WS_DLL_PUBLIC const bluetooth_uuid_custom_t bluetooth_uuid_custom[]; diff --git a/epan/dissectors/packet-bthci_cmd.c b/epan/dissectors/packet-bthci_cmd.c index 8546a57ef8..70c655c25b 100644 --- a/epan/dissectors/packet-bthci_cmd.c +++ b/epan/dissectors/packet-bthci_cmd.c @@ -3122,6 +3122,33 @@ dissect_bthci_cmd(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *dat ocf = opcode & 0x03ff; ogf = (guint8) (opcode >> 10); + if (ogf == HCI_OGF_VENDOR_SPECIFIC) + proto_item_append_text(ti_cmd," - %s", val_to_str_ext(opcode, &bthci_cmd_opcode_vals_ext, "Vendor Command 0x%04x")); + else + proto_item_append_text(ti_cmd," - %s", val_to_str_ext(opcode, &bthci_cmd_opcode_vals_ext, "Unknown 0x%04x")); + + 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); + if (bluetooth_data) { + tap_hci_summary->interface_id = bluetooth_data->interface_id; + tap_hci_summary->adapter_id = bluetooth_data->adapter_id; + } else { + tap_hci_summary->interface_id = HCI_INTERFACE_DEFAULT; + tap_hci_summary->adapter_id = HCI_ADAPTER_DEFAULT; + } + + tap_hci_summary->type = BLUETOOTH_HCI_SUMMARY_OPCODE; + tap_hci_summary->ogf = ogf; + tap_hci_summary->ocf = ocf; + 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); + } + if (!pinfo->fd->flags.visited) { bthci_cmd_data = (bthci_cmd_data_t *) wmem_new(wmem_file_scope(), bthci_cmd_data_t); bthci_cmd_data->opcode = opcode; @@ -3133,12 +3160,6 @@ dissect_bthci_cmd(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *dat bthci_cmd_data->response_abs_ts = pinfo->fd->abs_ts; } - if (ogf == HCI_OGF_VENDOR_SPECIFIC) - proto_item_append_text(ti_cmd," - %s", val_to_str_ext(opcode, &bthci_cmd_opcode_vals_ext, "Vendor Command 0x%04x")); - else - proto_item_append_text(ti_cmd," - %s", val_to_str_ext(opcode, &bthci_cmd_opcode_vals_ext, "Unknown 0x%04x")); - - col_set_str(pinfo->cinfo, COL_PROTOCOL, "HCI_CMD"); ti_opcode = proto_tree_add_item(bthci_cmd_tree, hf_bthci_cmd_opcode, tvb, offset, 2, ENC_LITTLE_ENDIAN); diff --git a/epan/dissectors/packet-bthci_evt.c b/epan/dissectors/packet-bthci_evt.c index ee41d4293d..9e9466652f 100644 --- a/epan/dissectors/packet-bthci_evt.c +++ b/epan/dissectors/packet-bthci_evt.c @@ -810,10 +810,81 @@ save_remote_device_name(tvbuff_t *tvb, gint offset, packet_info *pinfo, } } +static void send_hci_summary_status_tap(guint8 status, packet_info *pinfo, bluetooth_data_t *bluetooth_data) +{ + 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); + if (bluetooth_data) { + tap_hci_summary->interface_id = bluetooth_data->interface_id; + tap_hci_summary->adapter_id = bluetooth_data->adapter_id; + } else { + tap_hci_summary->interface_id = HCI_INTERFACE_DEFAULT; + tap_hci_summary->adapter_id = HCI_ADAPTER_DEFAULT; + } + + tap_hci_summary->type = BLUETOOTH_HCI_SUMMARY_STATUS; + tap_hci_summary->status = status; + if (try_val_to_str_ext(status, &bthci_cmd_status_vals_ext)) + tap_hci_summary->name = val_to_str_ext(status, &bthci_cmd_status_vals_ext, "Unknown 0x%02x"); + else + tap_hci_summary->name = NULL; + tap_queue_packet(bluetooth_hci_summary_tap, pinfo, tap_hci_summary); + } +} + +static void send_hci_summary_pending_tap(packet_info *pinfo, bluetooth_data_t *bluetooth_data) +{ + 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); + if (bluetooth_data) { + tap_hci_summary->interface_id = bluetooth_data->interface_id; + tap_hci_summary->adapter_id = bluetooth_data->adapter_id; + } else { + tap_hci_summary->interface_id = HCI_INTERFACE_DEFAULT; + tap_hci_summary->adapter_id = HCI_ADAPTER_DEFAULT; + } + + tap_hci_summary->type = BLUETOOTH_HCI_SUMMARY_STATUS_PENDING; + tap_hci_summary->status = 0; + tap_hci_summary->name = "Pending"; + tap_queue_packet(bluetooth_hci_summary_tap, pinfo, tap_hci_summary); + } +} + +static void send_hci_summary_reason_tap(guint8 reason, packet_info *pinfo, bluetooth_data_t *bluetooth_data) +{ + 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); + if (bluetooth_data) { + tap_hci_summary->interface_id = bluetooth_data->interface_id; + tap_hci_summary->adapter_id = bluetooth_data->adapter_id; + } else { + tap_hci_summary->interface_id = HCI_INTERFACE_DEFAULT; + tap_hci_summary->adapter_id = HCI_ADAPTER_DEFAULT; + } + + tap_hci_summary->type = BLUETOOTH_HCI_SUMMARY_REASON; + tap_hci_summary->reason = reason; + if (try_val_to_str_ext(reason, &bthci_cmd_status_vals_ext)) + tap_hci_summary->name = val_to_str_ext(reason, &bthci_cmd_status_vals_ext, "Unknown 0x%02x"); + else + tap_hci_summary->name = NULL; + tap_queue_packet(bluetooth_hci_summary_tap, pinfo, tap_hci_summary); + } +} + static int -dissect_bthci_evt_inquire_complete(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree) +dissect_bthci_evt_inquire_complete(tvbuff_t *tvb, int offset, packet_info *pinfo, + proto_tree *tree, bluetooth_data_t *bluetooth_data) { proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); + send_hci_summary_status_tap(tvb_get_guint8(tvb, offset), pinfo, bluetooth_data); offset += 1; return offset; @@ -906,7 +977,7 @@ dissect_bthci_evt_connect_request(tvbuff_t *tvb, int offset, packet_info *pinfo, } static int -dissect_bthci_evt_disconnect_complete(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, +dissect_bthci_evt_disconnect_complete(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, bluetooth_data_t *bluetooth_data) { guint32 connection_handle; @@ -914,6 +985,7 @@ dissect_bthci_evt_disconnect_complete(tvbuff_t *tvb, int offset, packet_info *pi 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; proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN); @@ -921,6 +993,7 @@ dissect_bthci_evt_disconnect_complete(tvbuff_t *tvb, int offset, packet_info *pi offset += 2; proto_tree_add_item(tree, hf_bthci_evt_reason, tvb, offset, 1, ENC_LITTLE_ENDIAN); + send_hci_summary_reason_tap(tvb_get_guint8(tvb, offset), pinfo, bluetooth_data); offset += 1; if (!pinfo->fd->flags.visited && status == STATUS_SUCCESS) { @@ -952,9 +1025,11 @@ dissect_bthci_evt_disconnect_complete(tvbuff_t *tvb, int offset, packet_info *pi } static int -dissect_bthci_evt_auth_complete(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree) +dissect_bthci_evt_auth_complete(tvbuff_t *tvb, int offset, packet_info *pinfo, + proto_tree *tree, bluetooth_data_t *bluetooth_data) { proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); + send_hci_summary_status_tap(tvb_get_guint8(tvb, offset), pinfo, bluetooth_data); offset += 1; proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN); @@ -1128,9 +1203,11 @@ dissect_bthci_evt_return_link_keys(tvbuff_t *tvb, int offset, packet_info *pinfo } static int -dissect_bthci_evt_read_remote_support_features_complete(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree) +dissect_bthci_evt_read_remote_support_features_complete(tvbuff_t *tvb, int offset, + packet_info *pinfo, proto_tree *tree, bluetooth_data_t *bluetooth_data) { proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); + send_hci_summary_status_tap(tvb_get_guint8(tvb, offset), pinfo, bluetooth_data); offset += 1; proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN); @@ -1148,6 +1225,7 @@ dissect_bthci_evt_remote_name_req_complete(tvbuff_t *tvb, int offset, guint8 bd_addr[6]; proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); + send_hci_summary_status_tap(tvb_get_guint8(tvb, offset), pinfo, bluetooth_data); offset += 1; offset = dissect_bd_addr(hf_bthci_evt_bd_addr, pinfo, tree, tvb, offset, FALSE, bluetooth_data->interface_id, bluetooth_data->adapter_id, bd_addr); @@ -1211,9 +1289,11 @@ dissect_bthci_evt_remote_name_req_complete(tvbuff_t *tvb, int offset, } static int -dissect_bthci_evt_read_remote_version_information_complete(tvbuff_t *tvb, int offset, packet_info *pinfo, bluetooth_data_t *bluetooth_data, proto_tree *tree) +dissect_bthci_evt_read_remote_version_information_complete(tvbuff_t *tvb, int offset, + packet_info *pinfo, bluetooth_data_t *bluetooth_data, proto_tree *tree) { proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); + send_hci_summary_status_tap(tvb_get_guint8(tvb, offset), pinfo, bluetooth_data); offset += 1; proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN); @@ -1322,6 +1402,7 @@ dissect_bthci_evt_mode_change(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; proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN); @@ -1378,6 +1459,7 @@ dissect_bthci_evt_role_change(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; offset = dissect_bd_addr(hf_bthci_evt_bd_addr, pinfo, tree, tvb, offset, FALSE, bluetooth_data->interface_id, bluetooth_data->adapter_id, bd_addr); @@ -1430,11 +1512,30 @@ dissect_bthci_evt_role_change(tvbuff_t *tvb, int offset, packet_info *pinfo, } static int -dissect_bthci_evt_hardware_error(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree) +dissect_bthci_evt_hardware_error(tvbuff_t *tvb, int offset, packet_info *pinfo, + proto_tree *tree, bluetooth_data_t *bluetooth_data) { proto_tree_add_item(tree, hf_bthci_evt_hardware_code, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset += 1; + 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); + if (bluetooth_data) { + tap_hci_summary->interface_id = bluetooth_data->interface_id; + tap_hci_summary->adapter_id = bluetooth_data->adapter_id; + } else { + tap_hci_summary->interface_id = HCI_INTERFACE_DEFAULT; + tap_hci_summary->adapter_id = HCI_ADAPTER_DEFAULT; + } + + tap_hci_summary->type = BLUETOOTH_HCI_SUMMARY_HARDWARE_ERROR; + tap_hci_summary->hardware_error = tvb_get_guint8(tvb, offset - 1); + tap_hci_summary->name = NULL; + tap_queue_packet(bluetooth_hci_summary_tap, pinfo, tap_hci_summary); + } + return offset; } @@ -1462,12 +1563,14 @@ dissect_bthci_evt_data_buffer_overflow(tvbuff_t *tvb, int offset, packet_info *p } static int -dissect_bthci_evt_read_clock_offset_complete(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree) +dissect_bthci_evt_read_clock_offset_complete(tvbuff_t *tvb, int offset, + packet_info *pinfo, proto_tree *tree, bluetooth_data_t *bluetooth_data) { proto_item *handle_item; gint16 clk; proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); + send_hci_summary_status_tap(tvb_get_guint8(tvb, offset), pinfo, bluetooth_data); offset += 1; proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN); @@ -1503,13 +1606,15 @@ dissect_bthci_evt_qos_violation(tvbuff_t *tvb, int offset, packet_info *pinfo _U } static int -dissect_bthci_evt_conn_packet_type_changed(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree) +dissect_bthci_evt_conn_packet_type_changed(tvbuff_t *tvb, int offset, + packet_info *pinfo, proto_tree *tree, bluetooth_data_t *bluetooth_data) { guint16 packet_types; proto_tree *handle_tree; proto_item *ti_ptype_subtree; proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); + send_hci_summary_status_tap(tvb_get_guint8(tvb, offset), pinfo, bluetooth_data); offset += 1; proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN); @@ -1589,9 +1694,11 @@ dissect_bthci_evt_command_status(tvbuff_t *tvb, int offset, packet_info *pinfo, if (status_code != 0) { proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); + send_hci_summary_status_tap(tvb_get_guint8(tvb, offset), pinfo, bluetooth_data); } else { proto_tree_add_item(tree, hf_bthci_evt_status_pending, tvb, offset, 1, ENC_LITTLE_ENDIAN); + send_hci_summary_pending_tap(pinfo, bluetooth_data); } offset += 1; @@ -1601,6 +1708,28 @@ dissect_bthci_evt_command_status(tvbuff_t *tvb, int offset, packet_info *pinfo, opcode = tvb_get_letohs(tvb, offset); ogf = opcode >> 10; + 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); + if (bluetooth_data) { + tap_hci_summary->interface_id = bluetooth_data->interface_id; + tap_hci_summary->adapter_id = bluetooth_data->adapter_id; + } else { + tap_hci_summary->interface_id = HCI_INTERFACE_DEFAULT; + tap_hci_summary->adapter_id = HCI_ADAPTER_DEFAULT; + } + + tap_hci_summary->type = BLUETOOTH_HCI_SUMMARY_EVENT_OPCODE; + tap_hci_summary->ogf = ogf; + tap_hci_summary->ocf = opcode & 0x03ff; + 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); + } + if (status_code != 0) add_opcode(opcode_list, opcode, COMMAND_STATUS_RESULT); else @@ -1777,6 +1906,7 @@ static int dissect_bthci_evt_simple_pairing_complete(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, bluetooth_data_t *bluetooth_data) { proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); + send_hci_summary_status_tap(tvb_get_guint8(tvb, offset), pinfo, bluetooth_data); offset += 1; offset = dissect_bd_addr(hf_bthci_evt_bd_addr, pinfo, tree, tvb, offset, FALSE, bluetooth_data->interface_id, bluetooth_data->adapter_id, NULL); @@ -1836,6 +1966,7 @@ dissect_bthci_evt_le_meta(tvbuff_t *tvb, int offset, packet_info *pinfo, case 0x01: /* LE Connection Complete */ 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; proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN); @@ -1937,7 +2068,9 @@ dissect_bthci_evt_le_meta(tvbuff_t *tvb, int offset, packet_info *pinfo, break; case 0x03: /* LE Connection Update Complete */ proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); + send_hci_summary_status_tap(tvb_get_guint8(tvb, offset), pinfo, bluetooth_data); offset += 1; + proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN); offset += 2; item = proto_tree_add_item(tree, hf_bthci_evt_le_con_interval, tvb, offset, 2, ENC_LITTLE_ENDIAN); @@ -1954,7 +2087,9 @@ dissect_bthci_evt_le_meta(tvbuff_t *tvb, int offset, packet_info *pinfo, break; case 0x04: /* LE Read Remote Used Features Complete */ proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); + send_hci_summary_status_tap(tvb_get_guint8(tvb, offset), pinfo, bluetooth_data); offset += 1; + proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN); offset += 2; proto_tree_add_item(tree, hf_bthci_evt_le_feature_00, tvb, offset, 1, ENC_LITTLE_ENDIAN); @@ -1984,10 +2119,13 @@ dissect_bthci_evt_le_meta(tvbuff_t *tvb, int offset, packet_info *pinfo, } static int -dissect_bthci_evt_physical_link_complete(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree) +dissect_bthci_evt_physical_link_complete(tvbuff_t *tvb, int offset, + packet_info *pinfo, proto_tree *tree, bluetooth_data_t *bluetooth_data) { proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); + send_hci_summary_status_tap(tvb_get_guint8(tvb, offset), pinfo, bluetooth_data); offset += 1; + proto_tree_add_item(tree, hf_bthci_evt_physical_link_handle, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset += 1; return offset; @@ -2002,15 +2140,20 @@ dissect_bthci_evt_channel_select_physical_link_recovery(tvbuff_t *tvb, int offse } static int -dissect_bthci_evt_disconnect_physical_link_complete(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree) +dissect_bthci_evt_disconnect_physical_link_complete(tvbuff_t *tvb, int offset, + packet_info *pinfo, proto_tree *tree, bluetooth_data_t *bluetooth_data) { proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); + send_hci_summary_status_tap(tvb_get_guint8(tvb, offset), pinfo, bluetooth_data); offset += 1; proto_tree_add_item(tree, hf_bthci_evt_physical_link_handle, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset += 1; + proto_tree_add_item(tree, hf_bthci_evt_reason, tvb, offset, 1, ENC_LITTLE_ENDIAN); + send_hci_summary_reason_tap(tvb_get_guint8(tvb, offset), pinfo, bluetooth_data); offset += 1; + return offset; } @@ -2025,10 +2168,13 @@ dissect_bthci_evt_physical_link_loss_early_warning(tvbuff_t *tvb, int offset, pa } static int -dissect_bthci_evt_logical_link_complete(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree) +dissect_bthci_evt_logical_link_complete(tvbuff_t *tvb, int offset, + packet_info *pinfo, proto_tree *tree, bluetooth_data_t *bluetooth_data) { proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); + send_hci_summary_status_tap(tvb_get_guint8(tvb, offset), pinfo, bluetooth_data); offset += 1; + proto_tree_add_item(tree, hf_bthci_evt_logical_link_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN); offset += 2; proto_tree_add_item(tree, hf_bthci_evt_physical_link_handle, tvb, offset, 1, ENC_LITTLE_ENDIAN); @@ -2039,22 +2185,31 @@ dissect_bthci_evt_logical_link_complete(tvbuff_t *tvb, int offset, packet_info * } static int -dissect_bthci_evt_disconnect_logical_link_complete(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree) +dissect_bthci_evt_disconnect_logical_link_complete(tvbuff_t *tvb, int offset, + packet_info *pinfo, proto_tree *tree, bluetooth_data_t *bluetooth_data) { proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); + send_hci_summary_status_tap(tvb_get_guint8(tvb, offset), pinfo, bluetooth_data); offset += 1; + proto_tree_add_item(tree, hf_bthci_evt_logical_link_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN); offset += 2; + proto_tree_add_item(tree, hf_bthci_evt_reason, tvb, offset, 1, ENC_LITTLE_ENDIAN); + send_hci_summary_reason_tap(tvb_get_guint8(tvb, offset), pinfo, bluetooth_data); offset += 1; + return offset; } static int -dissect_bthci_evt_flow_spec_modify_complete(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree) +dissect_bthci_evt_flow_spec_modify_complete(tvbuff_t *tvb, int offset, + packet_info *pinfo, proto_tree *tree, bluetooth_data_t *bluetooth_data) { proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); + send_hci_summary_status_tap(tvb_get_guint8(tvb, offset), pinfo, bluetooth_data); offset += 1; + proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN); offset += 2; return offset; @@ -2084,10 +2239,13 @@ dissect_bthci_evt_number_of_completed_data_blocks(tvbuff_t *tvb, int offset, pac } static int -dissect_bthci_evt_amp_start_stop_test(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree) +dissect_bthci_evt_amp_start_stop_test(tvbuff_t *tvb, int offset, + packet_info *pinfo, proto_tree *tree, bluetooth_data_t *bluetooth_data) { proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); + send_hci_summary_status_tap(tvb_get_guint8(tvb, offset), pinfo, bluetooth_data); offset += 1; + proto_tree_add_item(tree, hf_bthci_evt_test_scenario, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset += 1; return offset; @@ -2114,10 +2272,13 @@ dissect_bthci_evt_amp_receiver_test(tvbuff_t *tvb, int offset, packet_info *pinf } static int -dissect_bthci_evt_short_range_mode_change_complete(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree) +dissect_bthci_evt_short_range_mode_change_complete(tvbuff_t *tvb, int offset, + packet_info *pinfo, proto_tree *tree, bluetooth_data_t *bluetooth_data) { proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); + send_hci_summary_status_tap(tvb_get_guint8(tvb, offset), pinfo, bluetooth_data); offset += 1; + proto_tree_add_item(tree, hf_bthci_evt_physical_link_handle, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset += 1; proto_tree_add_item(tree, hf_bthci_evt_short_range_mode_state, tvb, offset, 1, ENC_LITTLE_ENDIAN); @@ -2126,10 +2287,13 @@ dissect_bthci_evt_short_range_mode_change_complete(tvbuff_t *tvb, int offset, pa } static int -dissect_bthci_evt_amp_status_change(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree) +dissect_bthci_evt_amp_status_change(tvbuff_t *tvb, int offset, + packet_info *pinfo, proto_tree *tree, bluetooth_data_t *bluetooth_data) { proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); + send_hci_summary_status_tap(tvb_get_guint8(tvb, offset), pinfo, bluetooth_data); offset += 1; + proto_tree_add_item(tree, hf_bthci_evt_amp_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset += 1; return offset; @@ -2293,6 +2457,7 @@ dissect_bthci_evt_command_complete(tvbuff_t *tvb, int offset, case 0x201d: /* LE Receiver Test */ case 0x201e: /* LE Transmitter Test */ proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); + send_hci_summary_status_tap(tvb_get_guint8(tvb, offset), pinfo, bluetooth_data); offset += 1; break; @@ -2317,6 +2482,7 @@ dissect_bthci_evt_command_complete(tvbuff_t *tvb, int offset, case 0x0433: /* Remote OOB Data Request Negative Reply */ case 0x0c60: /* Send Keypress Notification */ proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); + send_hci_summary_status_tap(tvb_get_guint8(tvb, offset), pinfo, bluetooth_data); offset += 1; offset = dissect_bd_addr(hf_bthci_evt_bd_addr, pinfo, tree, tvb, offset, local_addr, bluetooth_data->interface_id, bluetooth_data->adapter_id, bd_addr); @@ -2374,6 +2540,7 @@ dissect_bthci_evt_command_complete(tvbuff_t *tvb, int offset, case 0x201a: /* LE Long Term Key Request Reply */ case 0x201b: /* LE Long Term Key Request Neg Reply */ proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); + send_hci_summary_status_tap(tvb_get_guint8(tvb, offset), pinfo, bluetooth_data); offset += 1; proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN); @@ -2383,8 +2550,19 @@ dissect_bthci_evt_command_complete(tvbuff_t *tvb, int offset, /* This is a list of Commands that all return status and timeout */ case 0x0c15: /* Read Connection Accept Timeout */ + proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); + send_hci_summary_status_tap(tvb_get_guint8(tvb, offset), pinfo, bluetooth_data); + offset += 1; + + timeout = tvb_get_letohs(tvb, offset); + item = proto_tree_add_item(tree, hf_bthci_evt_timeout, tvb, offset, 2, ENC_LITTLE_ENDIAN); + proto_item_append_text(item, " slots (%g msec)", timeout*0.625); + offset += 2; + + break; case 0x0c17: /* Read Page Timeout */ proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); + send_hci_summary_status_tap(tvb_get_guint8(tvb, offset), pinfo, bluetooth_data); offset += 1; timeout = tvb_get_letohs(tvb, offset); @@ -2398,6 +2576,7 @@ dissect_bthci_evt_command_complete(tvbuff_t *tvb, int offset, case 0x0c27: /* Read Automatic Flush Timeout */ case 0x0c36: /* Read Link Supervision Timeout */ proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); + send_hci_summary_status_tap(tvb_get_guint8(tvb, offset), pinfo, bluetooth_data); offset += 1; proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN); @@ -2414,6 +2593,7 @@ dissect_bthci_evt_command_complete(tvbuff_t *tvb, int offset, case 0x0c1b: /* Read Page Scan Activity */ case 0x0c1d: /* Read Inquiry Scan Activity */ proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); + send_hci_summary_status_tap(tvb_get_guint8(tvb, offset), pinfo, bluetooth_data); offset += 1; proto_tree_add_item(tree, hf_bthci_evt_interval, tvb, offset, 2, ENC_LITTLE_ENDIAN); @@ -2426,6 +2606,7 @@ dissect_bthci_evt_command_complete(tvbuff_t *tvb, int offset, case 0x0420: /* Read LMP Handle */ proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); + send_hci_summary_status_tap(tvb_get_guint8(tvb, offset), pinfo, bluetooth_data); offset += 1; proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN); @@ -2440,6 +2621,7 @@ dissect_bthci_evt_command_complete(tvbuff_t *tvb, int offset, case 0x043b: /* Logical Link Cancel */ proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); + send_hci_summary_status_tap(tvb_get_guint8(tvb, offset), pinfo, bluetooth_data); offset += 1; proto_tree_add_item(tree, hf_bthci_evt_physical_link_handle, tvb, offset, 1, ENC_LITTLE_ENDIAN); @@ -2451,6 +2633,7 @@ dissect_bthci_evt_command_complete(tvbuff_t *tvb, int offset, break; case 0x0809: /* Role Discovery */ proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); + send_hci_summary_status_tap(tvb_get_guint8(tvb, offset), pinfo, bluetooth_data); offset += 1; proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN); @@ -2463,6 +2646,7 @@ dissect_bthci_evt_command_complete(tvbuff_t *tvb, int offset, case 0x080c: /* Read Link Policy Settings */ proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); + send_hci_summary_status_tap(tvb_get_guint8(tvb, offset), pinfo, bluetooth_data); offset += 1; proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN); @@ -2478,6 +2662,7 @@ dissect_bthci_evt_command_complete(tvbuff_t *tvb, int offset, case 0x080e: /* Read Default Link Policy Settings */ proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); + send_hci_summary_status_tap(tvb_get_guint8(tvb, offset), pinfo, bluetooth_data); offset += 1; proto_tree_add_item(tree, hf_bthci_evt_link_policy_setting_switch, tvb, offset, 2, ENC_LITTLE_ENDIAN); @@ -2490,6 +2675,7 @@ dissect_bthci_evt_command_complete(tvbuff_t *tvb, int offset, case 0x0c09: /* Read PIN Type */ proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); + send_hci_summary_status_tap(tvb_get_guint8(tvb, offset), pinfo, bluetooth_data); offset += 1; proto_tree_add_item(tree, hf_bthci_evt_pin_type, tvb, offset, 1, ENC_LITTLE_ENDIAN); @@ -2499,6 +2685,7 @@ dissect_bthci_evt_command_complete(tvbuff_t *tvb, int offset, case 0x0c0d: /* Read Stored Link Key */ proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); + send_hci_summary_status_tap(tvb_get_guint8(tvb, offset), pinfo, bluetooth_data); offset += 1; proto_tree_add_item(tree, hf_bthci_evt_max_num_keys, tvb, offset, 2, ENC_LITTLE_ENDIAN); @@ -2511,6 +2698,7 @@ dissect_bthci_evt_command_complete(tvbuff_t *tvb, int offset, case 0x0c11: /* Write Stored Link Key */ proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); + send_hci_summary_status_tap(tvb_get_guint8(tvb, offset), pinfo, bluetooth_data); offset += 1; proto_tree_add_item(tree, hf_bthci_evt_num_keys_written, tvb, offset, 1, ENC_LITTLE_ENDIAN); @@ -2520,6 +2708,7 @@ dissect_bthci_evt_command_complete(tvbuff_t *tvb, int offset, case 0x0c12: /* Delete Stored Link Key */ proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); + send_hci_summary_status_tap(tvb_get_guint8(tvb, offset), pinfo, bluetooth_data); offset += 1; proto_tree_add_item(tree, hf_bthci_evt_num_keys_deleted, tvb, offset, 2, ENC_LITTLE_ENDIAN); @@ -2530,6 +2719,7 @@ dissect_bthci_evt_command_complete(tvbuff_t *tvb, int offset, case 0x0c14: /* Read Local Name */ 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; proto_tree_add_item(tree, hf_bthci_evt_device_name, tvb, offset, 248, ENC_UTF_8|ENC_NA); @@ -2579,6 +2769,8 @@ dissect_bthci_evt_command_complete(tvbuff_t *tvb, int offset, case 0x0c19: /* Read Scan Enable */ 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; proto_tree_add_item(tree, hf_bthci_evt_scan_enable, tvb, offset, 1, ENC_LITTLE_ENDIAN); @@ -2588,6 +2780,8 @@ dissect_bthci_evt_command_complete(tvbuff_t *tvb, int offset, case 0x0c1f: /* Read Authentication Enable */ 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; proto_tree_add_item(tree, hf_bthci_evt_authentication_enable, tvb, offset, 1, ENC_LITTLE_ENDIAN); @@ -2597,6 +2791,8 @@ dissect_bthci_evt_command_complete(tvbuff_t *tvb, int offset, case 0x0c21: /* Read Encryption Mode */ 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; proto_tree_add_item(tree, hf_bthci_evt_encryption_mode, tvb, offset, 1, ENC_LITTLE_ENDIAN); @@ -2606,6 +2802,8 @@ dissect_bthci_evt_command_complete(tvbuff_t *tvb, int offset, case 0x0c23: /* Read Class of Device */ 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; call_dissector(btcommon_cod_handle, tvb_new_subset_length(tvb, offset, 3), pinfo, tree); @@ -2615,6 +2813,8 @@ dissect_bthci_evt_command_complete(tvbuff_t *tvb, int offset, case 0x0c25: /* Read Voice Setting */ 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; proto_tree_add_item(tree, hf_bthci_evt_input_unused, tvb, offset, 2, ENC_LITTLE_ENDIAN); @@ -2629,6 +2829,7 @@ dissect_bthci_evt_command_complete(tvbuff_t *tvb, int offset, case 0x0c29: /* Read Num Broadcast Retransmissions */ proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); + send_hci_summary_status_tap(tvb_get_guint8(tvb, offset), pinfo, bluetooth_data); offset += 1; proto_tree_add_item(tree, hf_bthci_evt_num_broadcast_retransm, tvb, offset, 1, ENC_LITTLE_ENDIAN); @@ -2638,6 +2839,7 @@ dissect_bthci_evt_command_complete(tvbuff_t *tvb, int offset, case 0x0c2b: /* Read Hold Mode Activity */ proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); + send_hci_summary_status_tap(tvb_get_guint8(tvb, offset), pinfo, bluetooth_data); offset += 1; proto_tree_add_item(tree, hf_bthci_evt_hold_mode_act_page, tvb, offset, 1, ENC_LITTLE_ENDIAN); @@ -2649,6 +2851,7 @@ dissect_bthci_evt_command_complete(tvbuff_t *tvb, int offset, case 0x0c2d: /* Read Transmit Power Level */ proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); + send_hci_summary_status_tap(tvb_get_guint8(tvb, offset), pinfo, bluetooth_data); offset += 1; proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN); @@ -2661,6 +2864,7 @@ dissect_bthci_evt_command_complete(tvbuff_t *tvb, int offset, case 0x0c2e: /* Read SCO Flow Control Enable */ proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); + send_hci_summary_status_tap(tvb_get_guint8(tvb, offset), pinfo, bluetooth_data); offset += 1; proto_tree_add_item(tree, hf_bthci_evt_sco_flow_cont_enable, tvb, offset, 1, ENC_LITTLE_ENDIAN); @@ -2671,6 +2875,7 @@ dissect_bthci_evt_command_complete(tvbuff_t *tvb, int offset, case 0x0c38: /* Read Number of Supported IAC */ proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); + send_hci_summary_status_tap(tvb_get_guint8(tvb, offset), pinfo, bluetooth_data); offset += 1; proto_tree_add_item(tree, hf_bthci_evt_num_supp_iac, tvb, offset, 1, ENC_LITTLE_ENDIAN); @@ -2680,6 +2885,7 @@ dissect_bthci_evt_command_complete(tvbuff_t *tvb, int offset, case 0x0c39: /* Read Current IAC LAP */ proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); + send_hci_summary_status_tap(tvb_get_guint8(tvb, offset), pinfo, bluetooth_data); offset += 1; num8 = tvb_get_guint8(tvb, offset); @@ -2694,6 +2900,7 @@ dissect_bthci_evt_command_complete(tvbuff_t *tvb, int offset, case 0x0c3b: /* Read Page Scan Period Mode */ proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); + send_hci_summary_status_tap(tvb_get_guint8(tvb, offset), pinfo, bluetooth_data); offset += 1; proto_tree_add_item(tree, hf_bthci_evt_page_scan_period_mode, tvb, offset, 1, ENC_LITTLE_ENDIAN); @@ -2703,6 +2910,7 @@ dissect_bthci_evt_command_complete(tvbuff_t *tvb, int offset, case 0x0c3d: /* Read Page Scan Mode */ proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); + send_hci_summary_status_tap(tvb_get_guint8(tvb, offset), pinfo, bluetooth_data); offset += 1; proto_tree_add_item(tree, hf_bthci_evt_page_scan_mode, tvb, offset, 1, ENC_LITTLE_ENDIAN); @@ -2713,13 +2921,17 @@ dissect_bthci_evt_command_complete(tvbuff_t *tvb, int offset, case 0x0c42: /* Read Inquiry Scan Type */ case 0x0c46: /* Read Page Scan Type */ proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); + send_hci_summary_status_tap(tvb_get_guint8(tvb, offset), pinfo, bluetooth_data); offset += 1; + proto_tree_add_item(tree, hf_bthci_evt_scan_type, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset += 1; break; case 0x0c44: /* Read Inquiry Mode */ 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; proto_tree_add_item(tree, hf_bthci_evt_inq_mode, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset += 1; @@ -2727,6 +2939,7 @@ dissect_bthci_evt_command_complete(tvbuff_t *tvb, int offset, case 0x0c48: /* Read AFH Channel Assessment Mode */ proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); + send_hci_summary_status_tap(tvb_get_guint8(tvb, offset), pinfo, bluetooth_data); offset += 1; proto_tree_add_item(tree, hf_bthci_evt_afh_ch_assessment_mode, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset += 1; @@ -2734,6 +2947,7 @@ dissect_bthci_evt_command_complete(tvbuff_t *tvb, int offset, case 0x0c51: /* Read Extended Inquiry Response */ proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); + send_hci_summary_status_tap(tvb_get_guint8(tvb, offset), pinfo, bluetooth_data); offset += 1; proto_tree_add_item(tree, hf_bthci_evt_fec_required, tvb, offset, 1, ENC_LITTLE_ENDIAN); @@ -2746,6 +2960,8 @@ dissect_bthci_evt_command_complete(tvbuff_t *tvb, int offset, case 0x0c55: /* Read Simple Pairing Mode */ 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; proto_tree_add_item(tree, hf_bthci_evt_simple_pairing_mode, tvb, offset, 1, ENC_LITTLE_ENDIAN); @@ -2754,7 +2970,9 @@ dissect_bthci_evt_command_complete(tvbuff_t *tvb, int offset, case 0x0c57: /* Read Local OOB Data */ proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); + send_hci_summary_status_tap(tvb_get_guint8(tvb, offset), pinfo, bluetooth_data); offset += 1; + proto_tree_add_item(tree, hf_bthci_evt_hash_c, tvb, offset, 16, ENC_NA); offset += 16; proto_tree_add_item(tree, hf_bthci_evt_randomizer_r, tvb, offset, 16, ENC_NA); @@ -2763,7 +2981,9 @@ dissect_bthci_evt_command_complete(tvbuff_t *tvb, int offset, case 0x0c58: /* Read Inquiry Response Tx Power Level */ proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); + send_hci_summary_status_tap(tvb_get_guint8(tvb, offset), pinfo, bluetooth_data); offset += 1; + proto_tree_add_item(tree, hf_bthci_evt_power_level_type, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset += 1; break; @@ -2771,6 +2991,7 @@ dissect_bthci_evt_command_complete(tvbuff_t *tvb, int offset, case 0x0c5a: /* Read Default Erroneous Data Reporting */ proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); + send_hci_summary_status_tap(tvb_get_guint8(tvb, offset), pinfo, bluetooth_data); offset += 1; proto_tree_add_item(tree, hf_bthci_evt_err_data_reporting, tvb, offset, 1, ENC_LITTLE_ENDIAN); @@ -2780,6 +3001,7 @@ dissect_bthci_evt_command_complete(tvbuff_t *tvb, int offset, case 0x0c61: /* Read Logical Link Accept Timeout */ proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); + send_hci_summary_status_tap(tvb_get_guint8(tvb, offset), pinfo, bluetooth_data); offset += 1; item = proto_tree_add_item(tree, hf_bthci_evt_timeout, tvb, offset, 2, ENC_LITTLE_ENDIAN); proto_item_append_text(item, " slots (%g msec)", tvb_get_letohs(tvb, offset)*0.625); @@ -2788,6 +3010,7 @@ dissect_bthci_evt_command_complete(tvbuff_t *tvb, int offset, case 0x0c64: /* Read Location Data */ proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); + send_hci_summary_status_tap(tvb_get_guint8(tvb, offset), pinfo, bluetooth_data); offset += 1; proto_tree_add_item(tree, hf_bthci_evt_location_domain_aware, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset += 1; @@ -2801,6 +3024,7 @@ dissect_bthci_evt_command_complete(tvbuff_t *tvb, int offset, case 0x0c66: /* Read Flow Control Mode */ proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); + send_hci_summary_status_tap(tvb_get_guint8(tvb, offset), pinfo, bluetooth_data); offset += 1; proto_tree_add_item(tree, hf_bthci_evt_flow_control_mode, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset += 1; @@ -2808,6 +3032,7 @@ dissect_bthci_evt_command_complete(tvbuff_t *tvb, int offset, case 0x0c68: /* Read Enhanced Tx Power Level */ proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); + send_hci_summary_status_tap(tvb_get_guint8(tvb, offset), pinfo, bluetooth_data); offset += 1; proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN); offset += 2; @@ -2821,6 +3046,7 @@ dissect_bthci_evt_command_complete(tvbuff_t *tvb, int offset, case 0x0c69: /* Read Best Effort Timeout */ proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); + send_hci_summary_status_tap(tvb_get_guint8(tvb, offset), pinfo, bluetooth_data); offset += 1; proto_tree_add_item(tree, hf_bthci_evt_flush_to_us, tvb, offset, 4, ENC_LITTLE_ENDIAN); offset += 4; @@ -2828,6 +3054,8 @@ dissect_bthci_evt_command_complete(tvbuff_t *tvb, int offset, case 0x0c6c: /* Read LE Host Supported */ 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; proto_tree_add_item(tree, hf_bthci_evt_le_supported_host, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset += 1; @@ -2842,6 +3070,7 @@ dissect_bthci_evt_command_complete(tvbuff_t *tvb, int offset, 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; proto_tree_add_item(tree, hf_bthci_bthci_evt_hci_version, tvb, offset, 1, ENC_LITTLE_ENDIAN); @@ -2947,7 +3176,9 @@ dissect_bthci_evt_command_complete(tvbuff_t *tvb, int offset, break; case 0x1002: /* Read Local Supported Commands */ - proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); + 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; proto_tree_add_item(tree, hf_bthci_evt_local_supported_cmds, tvb, offset, 64, ENC_NA); @@ -2956,7 +3187,9 @@ dissect_bthci_evt_command_complete(tvbuff_t *tvb, int offset, break; case 0x1003: /* Read Local Supported Features */ - proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); + 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; offset = dissect_bthci_evt_lmp_features(tvb, offset, pinfo, tree, 0); @@ -2967,7 +3200,9 @@ dissect_bthci_evt_command_complete(tvbuff_t *tvb, int offset, { guint8 page_number; - proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); + 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; page_number = tvb_get_guint8(tvb, offset); @@ -2984,6 +3219,8 @@ dissect_bthci_evt_command_complete(tvbuff_t *tvb, int offset, case 0x1005: /* Read Buffer Size */ 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; proto_tree_add_item(tree, hf_bthci_evt_host_data_packet_length_acl, tvb, offset, 2, ENC_LITTLE_ENDIAN); @@ -3001,7 +3238,9 @@ dissect_bthci_evt_command_complete(tvbuff_t *tvb, int offset, break; case 0x100a: /* Read Data Block Size */ - proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); + 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; proto_tree_add_item(tree, hf_bthci_evt_max_acl_data_packet_length, tvb, offset, 2, ENC_LITTLE_ENDIAN); offset += 2; @@ -3009,10 +3248,12 @@ dissect_bthci_evt_command_complete(tvbuff_t *tvb, int offset, offset += 2; proto_tree_add_item(tree, hf_bthci_evt_total_num_data_blocks, tvb, offset, 2, ENC_LITTLE_ENDIAN); offset += 2; + break; case 0x1007: /* Read Country Code */ proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); + send_hci_summary_status_tap(tvb_get_guint8(tvb, offset), pinfo, bluetooth_data); offset += 1; proto_tree_add_item(tree, hf_bthci_evt_country_code, tvb, offset, 1, ENC_LITTLE_ENDIAN); @@ -3022,6 +3263,7 @@ dissect_bthci_evt_command_complete(tvbuff_t *tvb, int offset, case 0x1401: /* Read Failed Contact Counter */ proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); + send_hci_summary_status_tap(tvb_get_guint8(tvb, offset), pinfo, bluetooth_data); offset += 1; proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN); @@ -3034,6 +3276,7 @@ dissect_bthci_evt_command_complete(tvbuff_t *tvb, int offset, case 0x1403: /* Get Link Quality */ proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); + send_hci_summary_status_tap(tvb_get_guint8(tvb, offset), pinfo, bluetooth_data); offset += 1; proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN); @@ -3046,6 +3289,7 @@ dissect_bthci_evt_command_complete(tvbuff_t *tvb, int offset, case 0x1405: /* Read RSSI */ proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); + send_hci_summary_status_tap(tvb_get_guint8(tvb, offset), pinfo, bluetooth_data); offset += 1; proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN); @@ -3058,6 +3302,7 @@ dissect_bthci_evt_command_complete(tvbuff_t *tvb, int offset, case 0x1406: /* Read AFH Channel Map */ proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); + send_hci_summary_status_tap(tvb_get_guint8(tvb, offset), pinfo, bluetooth_data); offset += 1; proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN); @@ -3073,6 +3318,7 @@ dissect_bthci_evt_command_complete(tvbuff_t *tvb, int offset, case 0x1407: /* Read Clock */ proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); + send_hci_summary_status_tap(tvb_get_guint8(tvb, offset), pinfo, bluetooth_data); offset += 1; proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN); @@ -3089,6 +3335,7 @@ dissect_bthci_evt_command_complete(tvbuff_t *tvb, int offset, case 0x1408: /* Read Encryption Key Size */ proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); + send_hci_summary_status_tap(tvb_get_guint8(tvb, offset), pinfo, bluetooth_data); offset += 1; proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN); offset += 2; @@ -3098,7 +3345,10 @@ dissect_bthci_evt_command_complete(tvbuff_t *tvb, int offset, case 0x1409: /* Read Local AMP Info */ 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; + proto_tree_add_item(tree, hf_bthci_evt_amp_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset += 1; proto_tree_add_item(tree, hf_bthci_evt_total_bandwidth, tvb, offset, 4, ENC_LITTLE_ENDIAN); @@ -3123,6 +3373,7 @@ dissect_bthci_evt_command_complete(tvbuff_t *tvb, int offset, case 0x140a: /* Read Local AMP Assoc */ proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); + send_hci_summary_status_tap(tvb_get_guint8(tvb, offset), pinfo, bluetooth_data); offset += 1; proto_tree_add_item(tree, hf_bthci_evt_physical_link_handle, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset += 1; @@ -3134,6 +3385,7 @@ dissect_bthci_evt_command_complete(tvbuff_t *tvb, int offset, case 0x140b: /* Write Remote AMP Assoc */ proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); + send_hci_summary_status_tap(tvb_get_guint8(tvb, offset), pinfo, bluetooth_data); offset += 1; proto_tree_add_item(tree, hf_bthci_evt_physical_link_handle, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset += 1; @@ -3141,6 +3393,8 @@ dissect_bthci_evt_command_complete(tvbuff_t *tvb, int offset, case 0x1801: /* Read Loopback Mode */ 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; proto_tree_add_item(tree, hf_bthci_evt_loopback_mode, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset += 1; @@ -3148,6 +3402,8 @@ dissect_bthci_evt_command_complete(tvbuff_t *tvb, int offset, case 0x2002: /* LE Read Buffer Size */ 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; item = proto_tree_add_item(tree, hf_bthci_evt_le_acl_data_pkt_len, tvb, offset, 2, ENC_LITTLE_ENDIAN); if ( (tvb_get_letohs(tvb, offset) == 0) && (tvb_get_guint8(tvb, offset+2) == 0) ) @@ -3159,6 +3415,7 @@ dissect_bthci_evt_command_complete(tvbuff_t *tvb, int offset, case 0x2003: /* LE Read Local Supported Features */ proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); + send_hci_summary_status_tap(tvb_get_guint8(tvb, offset), pinfo, bluetooth_data); offset += 1; if (tree) { @@ -3175,6 +3432,7 @@ dissect_bthci_evt_command_complete(tvbuff_t *tvb, int offset, case 0x2007: /* LE Read Advertising Channel Tx Power */ { proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); + send_hci_summary_status_tap(tvb_get_guint8(tvb, offset), pinfo, bluetooth_data); offset += 1; proto_tree_add_item(tree, hf_bthci_evt_transmit_power_level, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset += 1; @@ -3184,6 +3442,7 @@ dissect_bthci_evt_command_complete(tvbuff_t *tvb, int offset, case 0x200f: /* LE Read White List Size */ { proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); + send_hci_summary_status_tap(tvb_get_guint8(tvb, offset), pinfo, bluetooth_data); offset += 1; proto_tree_add_item(tree, hf_bthci_evt_white_list_size, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset += 1; @@ -3196,6 +3455,7 @@ dissect_bthci_evt_command_complete(tvbuff_t *tvb, int offset, proto_item *sub_item; proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); + send_hci_summary_status_tap(tvb_get_guint8(tvb, offset), pinfo, bluetooth_data); offset += 1; proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN); offset += 2; @@ -3211,6 +3471,7 @@ dissect_bthci_evt_command_complete(tvbuff_t *tvb, int offset, case 0x2017: /* LE Encrypt */ { proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); + send_hci_summary_status_tap(tvb_get_guint8(tvb, offset), pinfo, bluetooth_data); offset += 1; proto_tree_add_item(tree, hf_bthci_evt_encrypted_data, tvb, offset, 16, ENC_NA); offset += 16; @@ -3220,6 +3481,7 @@ dissect_bthci_evt_command_complete(tvbuff_t *tvb, int offset, case 0x2018: /* LE Rand */ { proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); + send_hci_summary_status_tap(tvb_get_guint8(tvb, offset), pinfo, bluetooth_data); offset += 1; proto_tree_add_item(tree, hf_bthci_evt_random_number, tvb, offset, 8, ENC_NA); offset += 8; @@ -3232,6 +3494,7 @@ dissect_bthci_evt_command_complete(tvbuff_t *tvb, int offset, proto_item *ti_le_states_subtree; proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); + send_hci_summary_status_tap(tvb_get_guint8(tvb, offset), pinfo, bluetooth_data); offset += 1; ti_le_states = proto_tree_add_item(tree, hf_bthci_evt_le_states, tvb, offset, 8, ENC_NA); @@ -3276,6 +3539,7 @@ dissect_bthci_evt_command_complete(tvbuff_t *tvb, int offset, case 0x201f: /* LE Test End */ { proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); + send_hci_summary_status_tap(tvb_get_guint8(tvb, offset), pinfo, bluetooth_data); offset += 1; proto_tree_add_item(tree, hf_bthci_evt_le_num_packets, tvb, offset, 2, ENC_LITTLE_ENDIAN); offset += 2; @@ -3295,9 +3559,11 @@ dissect_bthci_evt_command_complete(tvbuff_t *tvb, int offset, } static int -dissect_bthci_evt_qos_setup_complete(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree) +dissect_bthci_evt_qos_setup_complete(tvbuff_t *tvb, int offset, + packet_info *pinfo, proto_tree *tree, bluetooth_data_t *bluetooth_data) { proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); + send_hci_summary_status_tap(tvb_get_guint8(tvb, offset), pinfo, bluetooth_data); offset += 1; proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN); @@ -3318,6 +3584,7 @@ dissect_bthci_evt_qos_setup_complete(tvbuff_t *tvb, int offset, packet_info *pin proto_tree_add_item(tree, hf_bthci_evt_latency, tvb, offset, 4, ENC_LITTLE_ENDIAN); offset += 4; + proto_tree_add_item(tree, hf_bthci_evt_delay_variation, tvb, offset, 4, ENC_LITTLE_ENDIAN); offset += 4; @@ -3325,9 +3592,11 @@ dissect_bthci_evt_qos_setup_complete(tvbuff_t *tvb, int offset, packet_info *pin } static int -dissect_bthci_evt_change_conn_link_key_complete(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree) +dissect_bthci_evt_change_conn_link_key_complete(tvbuff_t *tvb, int offset, + packet_info *pinfo, proto_tree *tree, bluetooth_data_t *bluetooth_data) { proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); + send_hci_summary_status_tap(tvb_get_guint8(tvb, offset), pinfo, bluetooth_data); offset += 1; proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN); @@ -3337,9 +3606,11 @@ dissect_bthci_evt_change_conn_link_key_complete(tvbuff_t *tvb, int offset, packe } static int -dissect_bthci_evt_master_link_key_complete(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree) +dissect_bthci_evt_master_link_key_complete(tvbuff_t *tvb, int offset, + packet_info *pinfo, proto_tree *tree, bluetooth_data_t *bluetooth_data) { proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); + send_hci_summary_status_tap(tvb_get_guint8(tvb, offset), pinfo, bluetooth_data); offset += 1; proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN); @@ -3352,9 +3623,11 @@ dissect_bthci_evt_master_link_key_complete(tvbuff_t *tvb, int offset, packet_inf } static int -dissect_bthci_evt_encryption_change(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree) +dissect_bthci_evt_encryption_change(tvbuff_t *tvb, int offset, + packet_info *pinfo, proto_tree *tree, bluetooth_data_t *bluetooth_data) { proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); + send_hci_summary_status_tap(tvb_get_guint8(tvb, offset), pinfo, bluetooth_data); offset += 1; proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN); @@ -3367,11 +3640,13 @@ dissect_bthci_evt_encryption_change(tvbuff_t *tvb, int offset, packet_info *pinf } static int -dissect_bthci_evt_read_remote_ext_features_complete(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree) +dissect_bthci_evt_read_remote_ext_features_complete(tvbuff_t *tvb, int offset, + packet_info *pinfo, proto_tree *tree, bluetooth_data_t *bluetooth_data) { guint8 page_number; proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); + send_hci_summary_status_tap(tvb_get_guint8(tvb, offset), pinfo, bluetooth_data); offset += 1; proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN); @@ -3405,6 +3680,7 @@ dissect_bthci_evt_sync_connection_complete(tvbuff_t *tvb, int offset, 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; proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN); @@ -3495,11 +3771,13 @@ dissect_bthci_evt_sync_connection_complete(tvbuff_t *tvb, int offset, } static int -dissect_bthci_evt_sync_connection_changed(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree) +dissect_bthci_evt_sync_connection_changed(tvbuff_t *tvb, int offset, + packet_info *pinfo, proto_tree *tree, bluetooth_data_t *bluetooth_data) { proto_item *item; proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); + send_hci_summary_status_tap(tvb_get_guint8(tvb, offset), pinfo, bluetooth_data); offset += 1; proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN); @@ -3523,11 +3801,13 @@ dissect_bthci_evt_sync_connection_changed(tvbuff_t *tvb, int offset, packet_info } static int -dissect_bthci_evt_sniff_subrating(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree) +dissect_bthci_evt_sniff_subrating(tvbuff_t *tvb, int offset, packet_info *pinfo, + proto_tree *tree, bluetooth_data_t *bluetooth_data) { proto_item *item; proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); + send_hci_summary_status_tap(tvb_get_guint8(tvb, offset), pinfo, bluetooth_data); offset += 1; proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN); @@ -3553,9 +3833,11 @@ dissect_bthci_evt_sniff_subrating(tvbuff_t *tvb, int offset, packet_info *pinfo } static int -dissect_bthci_evt_flow_specification_complete(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree) +dissect_bthci_evt_flow_specification_complete(tvbuff_t *tvb, int offset, + packet_info *pinfo, proto_tree *tree, bluetooth_data_t *bluetooth_data) { proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); + send_hci_summary_status_tap(tvb_get_guint8(tvb, offset), pinfo, bluetooth_data); offset += 1; proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN); @@ -3595,9 +3877,11 @@ dissect_bthci_evt_enhanced_flush_complete(tvbuff_t *tvb, int offset, packet_info } static int -dissect_bthci_evt_encryption_key_refresh_complete(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree) +dissect_bthci_evt_encryption_key_refresh_complete(tvbuff_t *tvb, int offset, + packet_info *pinfo, proto_tree *tree, bluetooth_data_t *bluetooth_data) { proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN); + send_hci_summary_status_tap(tvb_get_guint8(tvb, offset), pinfo, bluetooth_data); offset += 1; proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN); @@ -3715,6 +3999,27 @@ dissect_bthci_evt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *dat proto_item_append_text(bthci_evt_tree, " - %s", val_to_str_ext_const(evt_code, &bthci_evt_evt_code_vals_ext, "Unknown 0x%08x")); offset += 1; + 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); + if (bluetooth_data) { + tap_hci_summary->interface_id = bluetooth_data->interface_id; + tap_hci_summary->adapter_id = bluetooth_data->adapter_id; + } else { + tap_hci_summary->interface_id = HCI_INTERFACE_DEFAULT; + tap_hci_summary->adapter_id = HCI_ADAPTER_DEFAULT; + } + + tap_hci_summary->type = BLUETOOTH_HCI_SUMMARY_EVENT; + tap_hci_summary->event = evt_code; + if (try_val_to_str_ext(evt_code, &bthci_evt_evt_code_vals_ext)) + tap_hci_summary->name = val_to_str_ext(evt_code, &bthci_evt_evt_code_vals_ext, "Unknown 0x%04x"); + else + tap_hci_summary->name = NULL; + tap_queue_packet(bluetooth_hci_summary_tap, pinfo, tap_hci_summary); + } + param_length = tvb_get_guint8(tvb, offset); proto_tree_add_item(bthci_evt_tree, hf_bthci_evt_param_length, tvb, offset, 1, ENC_LITTLE_ENDIAN); offset += 1; @@ -3727,7 +4032,7 @@ dissect_bthci_evt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *dat if (param_length > 0) { switch(evt_code) { case 0x01: /* Inquiry Complete */ - offset = dissect_bthci_evt_inquire_complete(tvb, offset, pinfo, bthci_evt_tree); + offset = dissect_bthci_evt_inquire_complete(tvb, offset, pinfo, bthci_evt_tree, bluetooth_data); add_opcode(opcode_list, 0x0401, COMMAND_STATUS_NORMAL); /* Inquiry */ add_opcode(opcode_list, 0x0403, COMMAND_STATUS_NORMAL); /* Periodic Inquiry Mode */ break; @@ -3754,7 +4059,7 @@ dissect_bthci_evt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *dat break; case 0x06: /* Authentication Complete */ - offset = dissect_bthci_evt_auth_complete(tvb, offset, pinfo, bthci_evt_tree); + offset = dissect_bthci_evt_auth_complete(tvb, offset, pinfo, bthci_evt_tree, bluetooth_data); add_opcode(opcode_list, 0x0411, COMMAND_STATUS_NORMAL); /* Authentication Requested */ break; @@ -3764,21 +4069,21 @@ dissect_bthci_evt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *dat break; case 0x08: /* Encryption Change */ - offset = dissect_bthci_evt_encryption_change(tvb, offset, pinfo, bthci_evt_tree); + offset = dissect_bthci_evt_encryption_change(tvb, offset, pinfo, bthci_evt_tree, bluetooth_data); add_opcode(opcode_list, 0x0413, COMMAND_STATUS_NORMAL); /* Encryption Requested */ add_opcode(opcode_list, 0x2019, COMMAND_STATUS_NORMAL); /* LE Start Encryption */ break; case 0x09: /* Change Connection Link Key Complete */ - offset = dissect_bthci_evt_change_conn_link_key_complete(tvb, offset, pinfo, bthci_evt_tree); + offset = dissect_bthci_evt_change_conn_link_key_complete(tvb, offset, pinfo, bthci_evt_tree, bluetooth_data); break; case 0x0a: /* Master Link Key Complete */ - offset = dissect_bthci_evt_master_link_key_complete(tvb, offset, pinfo, bthci_evt_tree); + offset = dissect_bthci_evt_master_link_key_complete(tvb, offset, pinfo, bthci_evt_tree, bluetooth_data); break; case 0x0b: /* Read Remote Support Features Complete */ - offset = dissect_bthci_evt_read_remote_support_features_complete(tvb, offset, pinfo, bthci_evt_tree); + offset = dissect_bthci_evt_read_remote_support_features_complete(tvb, offset, pinfo, bthci_evt_tree, bluetooth_data); add_opcode(opcode_list, 0x41B, COMMAND_STATUS_NORMAL); /* Read Remote Supported Features */ break; @@ -3788,7 +4093,7 @@ dissect_bthci_evt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *dat break; case 0x0d: /* QoS Setup Complete */ - offset = dissect_bthci_evt_qos_setup_complete(tvb, offset, pinfo, bthci_evt_tree); + offset = dissect_bthci_evt_qos_setup_complete(tvb, offset, pinfo, bthci_evt_tree, bluetooth_data); break; case 0x0e: /* Command Complete */ @@ -3801,7 +4106,7 @@ dissect_bthci_evt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *dat break; case 0x10: /* Hardware Error */ - offset = dissect_bthci_evt_hardware_error(tvb, offset, pinfo, bthci_evt_tree); + offset = dissect_bthci_evt_hardware_error(tvb, offset, pinfo, bthci_evt_tree, bluetooth_data); break; case 0x11: /* Flush Occurred */ @@ -3852,11 +4157,11 @@ dissect_bthci_evt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *dat break; case 0x1c: /* Read Clock Offset Complete */ - offset = dissect_bthci_evt_read_clock_offset_complete(tvb, offset, pinfo, bthci_evt_tree); + offset = dissect_bthci_evt_read_clock_offset_complete(tvb, offset, pinfo, bthci_evt_tree, bluetooth_data); break; case 0x1d: /* Connection Packet Type Changed */ - offset = dissect_bthci_evt_conn_packet_type_changed(tvb, offset, pinfo, bthci_evt_tree); + offset = dissect_bthci_evt_conn_packet_type_changed(tvb, offset, pinfo, bthci_evt_tree, bluetooth_data); add_opcode(opcode_list, 0x040F, COMMAND_STATUS_NORMAL); /* Change Connection Packet Type */ break; @@ -3873,7 +4178,7 @@ dissect_bthci_evt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *dat break; case 0x21: /* Flow Specification Complete */ - offset = dissect_bthci_evt_flow_specification_complete(tvb, offset, pinfo, bthci_evt_tree); + offset = dissect_bthci_evt_flow_specification_complete(tvb, offset, pinfo, bthci_evt_tree, bluetooth_data); break; case 0x22: /* Inquiry Result with RSSI */ @@ -3881,7 +4186,7 @@ dissect_bthci_evt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *dat break; case 0x23: /* Read Remote Extended Features Complete */ - offset = dissect_bthci_evt_read_remote_ext_features_complete(tvb, offset, pinfo, bthci_evt_tree); + offset = dissect_bthci_evt_read_remote_ext_features_complete(tvb, offset, pinfo, bthci_evt_tree, bluetooth_data); add_opcode(opcode_list, 0x41C, COMMAND_STATUS_NORMAL); /* Read Remote Supported Features */ break; @@ -3894,12 +4199,12 @@ dissect_bthci_evt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *dat break; case 0x2d: /* Synchronous Connection Changed */ - offset = dissect_bthci_evt_sync_connection_changed(tvb, offset, pinfo, bthci_evt_tree); + offset = dissect_bthci_evt_sync_connection_changed(tvb, offset, pinfo, bthci_evt_tree, bluetooth_data); add_opcode(opcode_list, 0x043D, COMMAND_STATUS_NORMAL); /* Enhanced Setup Synchronous Connection */ break; case 0x2e: /* Sniff Subrating */ - offset = dissect_bthci_evt_sniff_subrating(tvb, offset, pinfo, bthci_evt_tree); + offset = dissect_bthci_evt_sniff_subrating(tvb, offset, pinfo, bthci_evt_tree, bluetooth_data); break; case 0x2f: /* Extended Inquiry Result */ @@ -3913,7 +4218,7 @@ dissect_bthci_evt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *dat break; case 0x30: /* Encryption Key Refresh Complete */ - offset = dissect_bthci_evt_encryption_key_refresh_complete(tvb, offset, pinfo, bthci_evt_tree); + offset = dissect_bthci_evt_encryption_key_refresh_complete(tvb, offset, pinfo, bthci_evt_tree, bluetooth_data); add_opcode(opcode_list, 0x2019, COMMAND_STATUS_NORMAL); /* LE Start Encryption */ break; @@ -3966,7 +4271,7 @@ dissect_bthci_evt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *dat break; case 0x40: /* Physical Link Complete */ - offset = dissect_bthci_evt_physical_link_complete(tvb, offset, pinfo, bthci_evt_tree); + offset = dissect_bthci_evt_physical_link_complete(tvb, offset, pinfo, bthci_evt_tree, bluetooth_data); break; case 0x41: /* Channel Selected */ @@ -3975,7 +4280,7 @@ dissect_bthci_evt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *dat break; case 0x42: /* Disconnect Physical Link Complete */ - offset = dissect_bthci_evt_disconnect_physical_link_complete(tvb, offset, pinfo, bthci_evt_tree); + offset = dissect_bthci_evt_disconnect_physical_link_complete(tvb, offset, pinfo, bthci_evt_tree, bluetooth_data); break; case 0x43: /* Physical Link Loss Early Warning */ @@ -3983,15 +4288,15 @@ dissect_bthci_evt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *dat break; case 0x45: /* Logical Link Complete */ - offset = dissect_bthci_evt_logical_link_complete(tvb, offset, pinfo, bthci_evt_tree); + offset = dissect_bthci_evt_logical_link_complete(tvb, offset, pinfo, bthci_evt_tree, bluetooth_data); break; case 0x46: /* Disconnect Logical Link Complete */ - offset = dissect_bthci_evt_disconnect_logical_link_complete(tvb, offset, pinfo, bthci_evt_tree); + offset = dissect_bthci_evt_disconnect_logical_link_complete(tvb, offset, pinfo, bthci_evt_tree, bluetooth_data); break; case 0x47: /* Flow Spec Modify Complete */ - offset = dissect_bthci_evt_flow_spec_modify_complete(tvb, offset, pinfo, bthci_evt_tree); + offset = dissect_bthci_evt_flow_spec_modify_complete(tvb, offset, pinfo, bthci_evt_tree, bluetooth_data); break; case 0x48: /* Number Of Completed Data Blocks */ @@ -3999,8 +4304,13 @@ dissect_bthci_evt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *dat break; case 0x49: /* AMP Start Test */ + offset = dissect_bthci_evt_amp_start_stop_test(tvb, offset, pinfo, bthci_evt_tree, bluetooth_data); + add_opcode(opcode_list, 0x1809, COMMAND_STATUS_NORMAL); /* AMP Test */ + break; + case 0x4a: /* AMP Test End */ - offset = dissect_bthci_evt_amp_start_stop_test(tvb, offset, pinfo, bthci_evt_tree); + offset = dissect_bthci_evt_amp_start_stop_test(tvb, offset, pinfo, bthci_evt_tree, bluetooth_data); + add_opcode(opcode_list, 0x1808, COMMAND_STATUS_NORMAL); /* AMP Test End */ break; case 0x4b: /* AMP Receiver Test */ @@ -4008,11 +4318,11 @@ dissect_bthci_evt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *dat break; case 0x4c: /* Short Range Mode Change Complete */ - offset = dissect_bthci_evt_short_range_mode_change_complete(tvb, offset, pinfo, bthci_evt_tree); + offset = dissect_bthci_evt_short_range_mode_change_complete(tvb, offset, pinfo, bthci_evt_tree, bluetooth_data); break; case 0x4d: /* AMP Status Change */ - offset = dissect_bthci_evt_amp_status_change(tvb, offset, pinfo, bthci_evt_tree); + offset = dissect_bthci_evt_amp_status_change(tvb, offset, pinfo, bthci_evt_tree, bluetooth_data); break; case 0x4e: /* Triggered Clock Capture */ diff --git a/epan/dissectors/packet-bthci_vendor.c b/epan/dissectors/packet-bthci_vendor.c index 62872ac275..813ee013ab 100644 --- a/epan/dissectors/packet-bthci_vendor.c +++ b/epan/dissectors/packet-bthci_vendor.c @@ -26,6 +26,7 @@ #include <epan/packet.h> #include <epan/expert.h> +#include <epan/tap.h> #include "packet-bluetooth.h" #include "packet-bthci_cmd.h" @@ -404,6 +405,28 @@ dissect_bthci_vendor_broadcom(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tre else col_append_fstr(pinfo->cinfo, COL_INFO, "Unknown Command 0x%04X (opcode 0x%04X)", ocf, 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); + if (bluetooth_data) { + tap_hci_summary->interface_id = bluetooth_data->interface_id; + tap_hci_summary->adapter_id = bluetooth_data->adapter_id; + } else { + tap_hci_summary->interface_id = HCI_INTERFACE_DEFAULT; + tap_hci_summary->adapter_id = HCI_ADAPTER_DEFAULT; + } + + tap_hci_summary->type = BLUETOOTH_HCI_SUMMARY_VENDOR_OPCODE; + tap_hci_summary->ogf = opcode >> 10; + tap_hci_summary->ocf = ocf; + if (try_val_to_str(ocf, opcode_ocf_vals)) + tap_hci_summary->name = description; + else + tap_hci_summary->name = NULL; + tap_queue_packet(bluetooth_hci_summary_tap, pinfo, tap_hci_summary); + } + proto_tree_add_item(main_tree, hf_parameter_length, tvb, offset, 1, ENC_NA); length = tvb_get_guint8(tvb, offset); offset += 1; @@ -757,10 +780,32 @@ dissect_bthci_vendor_broadcom(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tre col_add_fstr(pinfo->cinfo, COL_INFO, "Rcvd Broadcom "); event_code = tvb_get_guint8(tvb, offset); - col_append_str(pinfo->cinfo, COL_INFO, val_to_str_ext_const(event_code, &bthci_evt_evt_code_vals_ext, "Unknown 0x%08x")); + description = val_to_str_ext_const(event_code, &bthci_evt_evt_code_vals_ext, "Unknown 0x%08x"); + col_append_str(pinfo->cinfo, COL_INFO, description); proto_tree_add_item(main_tree, hf_event_code, tvb, offset, 1, ENC_NA); offset += 1; + 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); + if (bluetooth_data) { + tap_hci_summary->interface_id = bluetooth_data->interface_id; + tap_hci_summary->adapter_id = bluetooth_data->adapter_id; + } else { + tap_hci_summary->interface_id = HCI_INTERFACE_DEFAULT; + tap_hci_summary->adapter_id = HCI_ADAPTER_DEFAULT; + } + + tap_hci_summary->type = BLUETOOTH_HCI_SUMMARY_VENDOR_EVENT; + tap_hci_summary->event = event_code; + if (try_val_to_str_ext(event_code, &bthci_evt_evt_code_vals_ext)) + tap_hci_summary->name = description; + else + tap_hci_summary->name = NULL; + tap_queue_packet(bluetooth_hci_summary_tap, pinfo, tap_hci_summary); + } + proto_tree_add_item(main_tree, hf_parameter_length, tvb, offset, 1, ENC_NA); length = tvb_get_guint8(tvb, offset); offset += 1; @@ -785,6 +830,28 @@ dissect_bthci_vendor_broadcom(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tre else col_append_fstr(pinfo->cinfo, COL_INFO, " (Unknown Command 0x%04X [opcode 0x%04X])", ocf, 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); + if (bluetooth_data) { + tap_hci_summary->interface_id = bluetooth_data->interface_id; + tap_hci_summary->adapter_id = bluetooth_data->adapter_id; + } else { + tap_hci_summary->interface_id = HCI_INTERFACE_DEFAULT; + tap_hci_summary->adapter_id = HCI_ADAPTER_DEFAULT; + } + + tap_hci_summary->type = BLUETOOTH_HCI_SUMMARY_VENDOR_EVENT_OPCODE; + tap_hci_summary->ogf = opcode >> 10; + tap_hci_summary->ocf = ocf; + if (try_val_to_str(ocf, opcode_ocf_vals)) + tap_hci_summary->name = description; + else + tap_hci_summary->name = NULL; + tap_queue_packet(bluetooth_hci_summary_tap, pinfo, tap_hci_summary); + } + proto_tree_add_item(main_tree, hf_status, tvb, offset, 1, ENC_NA); status = tvb_get_guint8(tvb, offset); offset += 1; |