Coverage Report

Created: 2025-02-15 06:25

/src/wireshark/epan/dissectors/packet-bthci_evt.c
Line
Count
Source (jump to first uncovered line)
1
/* packet-bthci_evt.c
2
 * Routines for the Bluetooth HCI Event dissection
3
 * Copyright 2002, Christoph Scholz <scholz@cs.uni-bonn.de>
4
 *  From: http://affix.sourceforge.net/archive/ethereal_affix-3.patch
5
 *
6
 * Refactored for wireshark checkin
7
 *   Ronnie Sahlberg 2006
8
 *
9
 * Updated to HCI specification 2.1 + EDR
10
 *   Allan M. Madsen 2007
11
 * Updated to HCI specification 3.0+HS & 4.0
12
 *   Allan M. Madsen 2012
13
 * Updated to HCI specification 5.3
14
 *   Allan M. Madsen 2022
15
 * Updated to HCI specification 5.4
16
 *   Allan M. Madsen 2023
17
 * Updated to HCI specification 6.0
18
 *   Allan M. Madsen 2024
19
 *
20
 * Wireshark - Network traffic analyzer
21
 * By Gerald Combs <gerald@wireshark.org>
22
 * Copyright 1998 Gerald Combs
23
 *
24
 * SPDX-License-Identifier: GPL-2.0-or-later
25
 */
26
27
#include "config.h"
28
29
#include <epan/packet.h>
30
#include <epan/addr_resolv.h>
31
#include <epan/expert.h>
32
#include <epan/prefs.h>
33
#include <epan/decode_as.h>
34
#include <epan/tap.h>
35
#include <epan/proto_data.h>
36
#include <epan/unit_strings.h>
37
38
#include <wsutil/utf8_entities.h>
39
40
#include "packet-bluetooth.h"
41
#include "packet-bthci_sco.h"
42
#include "packet-bthci_cmd.h"
43
#include "packet-bthci_evt.h"
44
45
static dissector_handle_t bthci_cmd_handle;
46
static dissector_handle_t bthci_evt_handle;
47
static dissector_handle_t btcommon_cod_handle;
48
static dissector_handle_t btcommon_eir_handle;
49
static dissector_handle_t btcommon_ad_handle;
50
static dissector_handle_t btcommon_le_channel_map_handle;
51
52
/* Initialize the protocol and registered fields */
53
static int proto_bthci_evt;
54
static int hf_bthci_evt_code;
55
static int hf_bthci_evt_param_length;
56
static int hf_bthci_evt_num_command_packets;
57
static int hf_bthci_evt_num_handles;
58
static int hf_bthci_evt_connection_handle;
59
static int hf_bthci_evt_num_compl_packets;
60
static int hf_bthci_evt_ret_params;
61
static int hf_bthci_evt_status;
62
static int hf_bthci_evt_status_pending;
63
static int hf_bthci_evt_opcode;
64
static int hf_bthci_evt_ogf;
65
static int hf_bthci_evt_ocf;
66
static int hf_bthci_evt_ocf_link_control;
67
static int hf_bthci_evt_ocf_link_policy;
68
static int hf_bthci_evt_ocf_host_controller_and_baseband;
69
static int hf_bthci_evt_ocf_informational;
70
static int hf_bthci_evt_ocf_status;
71
static int hf_bthci_evt_ocf_testing;
72
static int hf_bthci_evt_ocf_logo_testing;
73
static int hf_bthci_evt_ocf_low_energy;
74
static int hf_bthci_evt_bd_addr;
75
static int hf_bthci_evt_link_type;
76
static int hf_bthci_evt_encryption_mode;
77
static int hf_bthci_evt_reason;
78
static int hf_bthci_evt_remote_name;
79
static int hf_bthci_evt_encryption_enable;
80
static int hf_bthci_evt_key_flag;
81
static int hf_bthci_evt_vers_nr;
82
static int hf_bthci_bthci_evt_hci_version;
83
static int hf_bthci_evt_hci_revision;
84
static int hf_bthci_evt_comp_id;
85
static int hf_bthci_evt_sub_vers_nr;
86
static int hf_bthci_evt_flags;
87
static int hf_bthci_evt_service_type;
88
static int hf_bthci_evt_token_rate;
89
static int hf_bthci_evt_peak_bandwidth;
90
static int hf_bthci_evt_latency;
91
static int hf_bthci_evt_delay_variation;
92
static int hf_bthci_evt_hardware_code;
93
static int hf_bthci_evt_role;
94
static int hf_bthci_evt_curr_role;
95
static int hf_bthci_evt_curr_mode;
96
static int hf_bthci_evt_interval;
97
static int hf_bthci_evt_link_key;
98
static int hf_bthci_evt_key_type;
99
static int hf_bthci_evt_max_slots;
100
static int hf_bthci_evt_clock_offset;
101
static int hf_bthci_evt_clock_offset_32;
102
static int hf_bthci_evt_page_scan_mode;
103
static int hf_bthci_evt_page_scan_repetition_mode;
104
static int hf_bthci_evt_reserved;
105
static int hf_bthci_evt_page_scan_period_mode;
106
static int hf_bthci_evt_num_keys;
107
static int hf_bthci_evt_num_keys_read;
108
static int hf_bthci_evt_max_num_keys;
109
static int hf_bthci_evt_num_responses;
110
static int hf_bthci_evt_num_keys_written;
111
static int hf_bthci_evt_num_keys_deleted;
112
static int hf_bthci_evt_link_policy_setting_switch;
113
static int hf_bthci_evt_link_policy_setting_hold;
114
static int hf_bthci_evt_link_policy_setting_sniff;
115
static int hf_bthci_evt_link_policy_setting_park;
116
static int hf_bthci_evt_pin_type;
117
static int hf_bthci_evt_device_name;
118
static int hf_bthci_evt_timeout;
119
static int hf_bthci_evt_scan_enable;
120
static int hf_bthci_evt_authentication_enable;
121
static int hf_bthci_evt_sco_flow_cont_enable;
122
static int hf_bthci_evt_window;
123
static int hf_bthci_evt_input_unused;
124
static int hf_bthci_evt_input_coding;
125
static int hf_bthci_evt_input_data_format;
126
static int hf_bthci_evt_input_sample_size;
127
static int hf_bthci_evt_linear_pcm_bit_pos;
128
static int hf_bthci_evt_air_coding_format;
129
static int hf_bthci_evt_num_broadcast_retransm;
130
static int hf_bthci_evt_hold_mode_act_page;
131
static int hf_bthci_evt_hold_mode_act_inquiry;
132
static int hf_bthci_evt_hold_mode_act_periodic;
133
static int hf_bthci_evt_transmit_power_level;
134
static int hf_bthci_evt_max_transmit_power_level;
135
static int hf_bthci_evt_transmit_power_level_gfsk;
136
static int hf_bthci_evt_transmit_power_level_dqpsk;
137
static int hf_bthci_evt_transmit_power_level_8dpsk;
138
static int hf_bthci_evt_flush_to_us;
139
static int hf_bthci_evt_num_supp_iac;
140
static int hf_bthci_evt_num_curr_iac;
141
static int hf_bthci_evt_iac_lap;
142
static int hf_bthci_evt_loopback_mode;
143
static int hf_bthci_evt_country_code;
144
static int hf_bthci_evt_failed_contact_counter;
145
static int hf_bthci_evt_link_quality;
146
static int hf_bthci_evt_rssi;
147
static int hf_bthci_evt_host_data_packet_length_acl;
148
static int hf_bthci_evt_host_data_packet_length_sco;
149
static int hf_bthci_evt_host_total_num_acl_data_packets;
150
static int hf_bthci_evt_host_total_num_sco_data_packets;
151
static int hf_bthci_evt_page_number;
152
static int hf_bthci_evt_max_page_number;
153
static int hf_bthci_evt_local_supported_cmds;
154
static int hf_bthci_evt_fec_required;
155
static int hf_bthci_evt_err_data_reporting;
156
static int hf_bthci_evt_scan_type;
157
static int hf_bthci_evt_inq_mode;
158
static int hf_bthci_evt_power_level_type;
159
static int hf_lmp_features;
160
static int hf_lmp_feature_3slot_packets;
161
static int hf_lmp_feature_5slot_packets;
162
static int hf_lmp_feature_encryption;
163
static int hf_lmp_feature_slot_offset;
164
static int hf_lmp_feature_timing_accuracy;
165
static int hf_lmp_feature_role_switch;
166
static int hf_lmp_feature_hold_mode;
167
static int hf_lmp_feature_sniff_mode;
168
static int hf_lmp_feature_park_state;
169
static int hf_lmp_feature_power_control_requests;
170
static int hf_lmp_feature_channel_quality_driven_data_rate;
171
static int hf_lmp_feature_sco_link;
172
static int hf_lmp_feature_hv2_packets;
173
static int hf_lmp_feature_hv3_packets;
174
static int hf_lmp_feature_u_law_log_synchronous_data;
175
static int hf_lmp_feature_a_law_log_synchronous_data;
176
static int hf_lmp_feature_cvsd_synchronous_data;
177
static int hf_lmp_feature_paging_parameter_negotiation;
178
static int hf_lmp_feature_power_control;
179
static int hf_lmp_feature_transparent_synchronous_data;
180
static int hf_lmp_feature_flow_control_lag;
181
static int hf_lmp_feature_broadcast_encryption;
182
static int hf_lmp_feature_reserved_24;
183
static int hf_lmp_feature_edr_acl_2mbps_mode;
184
static int hf_lmp_feature_edr_acl_3mbps_mode;
185
static int hf_lmp_feature_enhanced_inquiry_scan;
186
static int hf_lmp_feature_interlaced_inquiry_scan;
187
static int hf_lmp_feature_interlaced_page_scan;
188
static int hf_lmp_feature_rssi_with_inquiry_results;
189
static int hf_lmp_feature_ev3_packets;
190
static int hf_lmp_feature_ev4_packets;
191
static int hf_lmp_feature_ev5_packets;
192
static int hf_lmp_feature_reserved_34;
193
static int hf_lmp_feature_afh_capable_peripheral;
194
static int hf_lmp_feature_afh_classification_peripheral;
195
static int hf_lmp_feature_br_edr_not_supported;
196
static int hf_lmp_feature_le_supported_controller;
197
static int hf_lmp_feature_3slot_edr_acl_packets;
198
static int hf_lmp_feature_5slot_edr_acl_packets;
199
static int hf_lmp_feature_sniff_subrating;
200
static int hf_lmp_feature_pause_encryption;
201
static int hf_lmp_feature_afh_capable_central;
202
static int hf_lmp_feature_afh_classification_central;
203
static int hf_lmp_feature_edr_esco_2mbps_mode;
204
static int hf_lmp_feature_edr_esco_3mbps_mode;
205
static int hf_lmp_feature_3slot_edr_esco_packets;
206
static int hf_lmp_feature_extended_inquiry_response;
207
static int hf_lmp_feature_simultaneous_le_and_br_edr_controller;
208
static int hf_lmp_feature_reserved_50;
209
static int hf_lmp_feature_secure_simple_pairing;
210
static int hf_lmp_feature_encapsulated_pdu;
211
static int hf_lmp_feature_erroneous_data_reporting;
212
static int hf_lmp_feature_non_flushable_packet_boundary_flag;
213
static int hf_lmp_feature_reserved_55;
214
static int hf_lmp_feature_link_supervision_timeout_changed_event;
215
static int hf_lmp_feature_inquiry_tx_power_level;
216
static int hf_lmp_feature_enhanced_power_control;
217
static int hf_lmp_feature_reserved_59_62;
218
static int hf_lmp_feature_extended_features;
219
static int hf_lmp_feature_secure_simple_pairing_host;
220
static int hf_lmp_feature_le_supported_host;
221
static int hf_lmp_feature_simultaneous_le_and_br_edr_host;
222
static int hf_lmp_feature_secure_connections_host;
223
static int hf_lmp_feature_reserved_68_71;
224
static int hf_lmp_feature_cpb_central_operation;
225
static int hf_lmp_feature_cpb_peripheral_operation;
226
static int hf_lmp_feature_synchronization_train;
227
static int hf_lmp_feature_synchronization_scan;
228
static int hf_lmp_feature_inquiry_response_notification_event;
229
static int hf_lmp_feature_generalized_interlaced_scan;
230
static int hf_lmp_feature_coarse_clock_adjustment;
231
static int hf_lmp_feature_reserved_135;
232
static int hf_lmp_feature_secure_connections_controller;
233
static int hf_lmp_feature_ping;
234
static int hf_lmp_feature_reserved_138;
235
static int hf_lmp_feature_train_nudging;
236
static int hf_lmp_feature_slot_availability_mask;
237
static int hf_lmp_feature_reserved;
238
static int hf_bthci_evt_sync_link_type;
239
static int hf_bthci_evt_sync_tx_interval;
240
static int hf_bthci_evt_sync_rtx_window;
241
static int hf_bthci_evt_sync_rx_packet_length;
242
static int hf_bthci_evt_sync_tx_packet_length;
243
static int hf_bthci_evt_air_mode;
244
static int hf_bthci_evt_max_tx_latency;
245
static int hf_bthci_evt_max_rx_latency;
246
static int hf_bthci_evt_min_remote_timeout;
247
static int hf_bthci_evt_min_local_timeout;
248
static int hf_bthci_evt_link_supervision_timeout;
249
static int hf_bthci_evt_token_bucket_size;
250
static int hf_bthci_evt_flow_direction;
251
static int hf_bthci_evt_afh_ch_assessment_mode;
252
static int hf_bthci_evt_lmp_handle;
253
static int hf_bthci_evt_clock;
254
static int hf_bthci_evt_clock_accuracy;
255
static int hf_bthci_evt_afh_mode;
256
static int hf_bthci_evt_afh_channel_map;
257
static int hf_bthci_evt_simple_pairing_mode;
258
static int hf_bthci_evt_randomizer_r;
259
static int hf_bthci_evt_hash_c;
260
static int hf_bthci_evt_io_capability;
261
static int hf_bthci_evt_oob_data_present;
262
static int hf_bthci_evt_auth_requirements;
263
static int hf_bthci_evt_numeric_value;
264
static int hf_bthci_evt_passkey;
265
static int hf_bthci_evt_notification_type;
266
static int hf_bthci_evt_data_length;
267
static int hf_bthci_evt_location_domain_aware;
268
static int hf_bthci_evt_location_domain;
269
static int hf_bthci_evt_location_domain_options;
270
static int hf_bthci_evt_location_options;
271
static int hf_bthci_evt_flow_control_mode;
272
static int hf_bthci_evt_physical_link_handle;
273
static int hf_bthci_evt_flow_spec_identifier;
274
static int hf_bthci_evt_logical_link_handle;
275
static int hf_bthci_evt_max_acl_data_packet_length;
276
static int hf_bthci_evt_data_block_length;
277
static int hf_bthci_evt_total_num_data_blocks;
278
static int hf_bthci_evt_enc_key_size;
279
static int hf_bthci_evt_amp_remaining_assoc_length;
280
static int hf_bthci_evt_amp_assoc_fragment;
281
static int hf_bthci_evt_amp_status;
282
static int hf_bthci_evt_total_bandwidth;
283
static int hf_bthci_evt_max_guaranteed_bandwidth;
284
static int hf_bthci_evt_min_latency;
285
static int hf_bthci_evt_max_pdu_size;
286
static int hf_bthci_evt_amp_controller_type;
287
static int hf_bthci_evt_pal_capabilities_00;
288
static int hf_bthci_evt_max_amp_assoc_length;
289
static int hf_bthci_evt_max_flush_to_us;
290
static int hf_bthci_evt_best_effort_flush_to_us;
291
static int hf_bthci_evt_link_loss_reason;
292
static int hf_bthci_evt_num_compl_blocks;
293
static int hf_bthci_evt_test_scenario;
294
static int hf_bthci_evt_report_reason;
295
static int hf_bthci_evt_report_event_type;
296
static int hf_bthci_evt_num_frames;
297
static int hf_bthci_evt_num_error_frames;
298
static int hf_bthci_evt_num_bits;
299
static int hf_bthci_evt_num_error_bits;
300
static int hf_bthci_evt_short_range_mode_state;
301
static int hf_bthci_evt_le_supported_host;
302
static int hf_bthci_evt_le_simultaneous_host;
303
static int hf_bthci_evt_le_acl_data_pkt_len;
304
static int hf_bthci_evt_total_num_le_acl_data_pkts;
305
static int hf_bthci_evt_iso_data_pkt_len;
306
static int hf_bthci_evt_total_num_iso_data_pkts;
307
static int hf_bthci_evt_filter_accept_list_size;
308
static int hf_bthci_evt_le_channel_map;
309
static int hf_bthci_evt_encrypted_data;
310
static int hf_bthci_evt_random_number;
311
static int hf_bthci_evt_le_num_packets;
312
static int hf_bthci_evt_le_meta_subevent;
313
static int hf_bthci_evt_le_peer_address_type;
314
static int hf_bthci_evt_le_local_rpa;
315
static int hf_bthci_evt_le_peer_rpa;
316
static int hf_bthci_evt_le_con_interval;
317
static int hf_bthci_evt_le_min_interval;
318
static int hf_bthci_evt_le_max_interval;
319
static int hf_bthci_evt_le_con_latency;
320
static int hf_bthci_evt_le_supervision_timeout;
321
static int hf_bthci_evt_le_max_tx_octets;
322
static int hf_bthci_evt_le_max_tx_time;
323
static int hf_bthci_evt_le_max_rx_octets;
324
static int hf_bthci_evt_le_max_rx_time;
325
static int hf_bthci_evt_le_local_p_256_public_key;
326
static int hf_bthci_evt_le_dhkey;
327
static int hf_bthci_evt_encrypted_diversifier;
328
static int hf_bthci_evt_le_central_clock_accuracy;
329
static int hf_bthci_evt_num_reports;
330
static int hf_bthci_evt_advts_event_type;
331
static int hf_bthci_evt_le_states;
332
static int hf_bthci_evt_le_states_00;
333
static int hf_bthci_evt_le_states_01;
334
static int hf_bthci_evt_le_states_02;
335
static int hf_bthci_evt_le_states_03;
336
static int hf_bthci_evt_le_states_04;
337
static int hf_bthci_evt_le_states_05;
338
static int hf_bthci_evt_le_states_06;
339
static int hf_bthci_evt_le_states_07;
340
static int hf_bthci_evt_le_states_10;
341
static int hf_bthci_evt_le_states_11;
342
static int hf_bthci_evt_le_states_12;
343
static int hf_bthci_evt_le_states_13;
344
static int hf_bthci_evt_le_states_14;
345
static int hf_bthci_evt_le_states_15;
346
static int hf_bthci_evt_le_states_16;
347
static int hf_bthci_evt_le_states_17;
348
static int hf_bthci_evt_le_states_20;
349
static int hf_bthci_evt_le_states_21;
350
static int hf_bthci_evt_le_states_22;
351
static int hf_bthci_evt_le_states_23;
352
static int hf_bthci_evt_le_states_24;
353
static int hf_bthci_evt_le_states_25;
354
static int hf_bthci_evt_le_states_26;
355
static int hf_bthci_evt_le_states_27;
356
static int hf_bthci_evt_le_states_30;
357
static int hf_bthci_evt_le_states_31;
358
static int hf_bthci_evt_le_states_32;
359
static int hf_bthci_evt_le_states_33;
360
static int hf_bthci_evt_le_states_34;
361
static int hf_changed_in_frame;
362
static int hf_command_in_frame;
363
static int hf_pending_in_frame;
364
static int hf_response_in_frame;
365
static int hf_command_pending_time_delta;
366
static int hf_command_response_time_delta;
367
static int hf_pending_response_time_delta;
368
static int hf_bthci_evt_le_features;
369
static int hf_bthci_evt_le_features_encryption;
370
static int hf_bthci_evt_le_features_connection_parameters_request_procedure;
371
static int hf_bthci_evt_le_features_extended_reject_indication;
372
static int hf_bthci_evt_le_features_peripheral_initiated_features_exchange;
373
static int hf_bthci_evt_le_features_ping;
374
static int hf_bthci_evt_le_features_data_packet_length_extension;
375
static int hf_bthci_evt_le_features_ll_privacy;
376
static int hf_bthci_evt_le_features_extended_scanner_filter_policies;
377
static int hf_bthci_evt_le_features_2m_phy;
378
static int hf_bthci_evt_le_features_stable_modulation_index_tx;
379
static int hf_bthci_evt_le_features_stable_modulation_index_rx;
380
static int hf_bthci_evt_le_features_coded_phy;
381
static int hf_bthci_evt_le_features_extended_advertising;
382
static int hf_bthci_evt_le_features_periodic_advertising;
383
static int hf_bthci_evt_le_features_channel_selection_algorithm_2;
384
static int hf_bthci_evt_le_features_power_class_1;
385
static int hf_bthci_evt_le_features_minimum_number_of_used_channels_procedure;
386
static int hf_bthci_evt_le_features_connection_cte_request;
387
static int hf_bthci_evt_le_features_connection_cte_response;
388
static int hf_bthci_evt_le_features_connectionless_cte_tx;
389
static int hf_bthci_evt_le_features_connectionless_cte_rx;
390
static int hf_bthci_evt_le_features_antenna_switching_during_cte_tx_aod;
391
static int hf_bthci_evt_le_features_antenna_switching_during_cte_rx_aoa;
392
static int hf_bthci_evt_le_features_receiving_cte;
393
static int hf_bthci_evt_le_features_periodic_advertising_sync_transfer_sender;
394
static int hf_bthci_evt_le_features_periodic_advertising_sync_transfer_receiver;
395
static int hf_bthci_evt_le_features_sleep_clock_accuracy_updates;
396
static int hf_bthci_evt_le_features_remote_public_key_validation;
397
static int hf_bthci_evt_le_features_cis_central;
398
static int hf_bthci_evt_le_features_cis_peripheral;
399
static int hf_bthci_evt_le_features_isochronous_broadcaster;
400
static int hf_bthci_evt_le_features_synchronized_receiver;
401
static int hf_bthci_evt_le_features_isochronous_channels_host_support;
402
static int hf_bthci_evt_le_features_power_control_request;
403
static int hf_bthci_evt_le_features_power_change_indication;
404
static int hf_bthci_evt_le_features_path_loss_monitoring;
405
static int hf_bthci_evt_le_features_periodic_advertising_adi;
406
static int hf_bthci_evt_le_features_connection_subrating;
407
static int hf_bthci_evt_le_features_connection_subrating_host_support;
408
static int hf_bthci_evt_le_features_channel_classification;
409
static int hf_bthci_evt_le_features_coding_selection;
410
static int hf_bthci_evt_le_features_coding_selection_host_support;
411
static int hf_bthci_evt_le_features_decision_based_advertising_filtering;
412
static int hf_bthci_evt_le_features_periodic_advertising_responses_advertiser;
413
static int hf_bthci_evt_le_features_periodic_advertising_responses_scanner;
414
static int hf_bthci_evt_le_features_unsegmented_framed_mode;
415
static int hf_bthci_evt_le_features_channel_sounding;
416
static int hf_bthci_evt_le_features_channel_sounding_host_support;
417
static int hf_bthci_evt_le_features_channel_sounding_tone_quality_indication;
418
static int hf_bthci_evt_le_features_ext_feature_set;
419
static int hf_bthci_evt_le_features_reserved;
420
static int hf_bthci_evt_le_ext_features_1;
421
static int hf_bthci_evt_le_ext_features_1_monitoring_advertisers;
422
static int hf_bthci_evt_le_ext_features_1_frame_space_update;
423
static int hf_bthci_evt_le_ext_features_1_reserved;
424
static int hf_bthci_evt_mws_number_of_transports;
425
static int hf_bthci_evt_mws_transport_layers;
426
static int hf_bthci_evt_mws_transport_layers_item;
427
static int hf_bthci_evt_mws_transport_layer;
428
static int hf_bthci_evt_mws_number_of_baud_rates;
429
static int hf_bthci_evt_mws_to_mws_baud_rates;
430
static int hf_bthci_evt_mws_to_mws_baud_rates_tranport_item;
431
static int hf_bthci_evt_mws_to_mws_baud_rate;
432
static int hf_bthci_evt_mws_from_mws_baud_rates;
433
static int hf_bthci_evt_mws_from_mws_baud_rates_tranport_item;
434
static int hf_bthci_evt_mws_from_mws_baud_rate;
435
static int hf_bthci_evt_selected_tx_power;
436
static int hf_bthci_evt_which_clock;
437
static int hf_bthci_evt_slot_offset;
438
static int hf_bthci_evt_lt_addr;
439
static int hf_bthci_evt_next_broadcast_instant;
440
static int hf_bthci_evt_connectionless_peripheral_broadcast_interval;
441
static int hf_bthci_evt_service_data;
442
static int hf_bthci_evt_local_sam_index;
443
static int hf_bthci_evt_local_sam_tx_availability;
444
static int hf_bthci_evt_local_sam_rx_availability;
445
static int hf_bthci_evt_remote_sam_index;
446
static int hf_bthci_evt_remote_sam_tx_availability;
447
static int hf_bthci_evt_remote_sam_rx_availability;
448
static int hf_bthci_evt_receive_status;
449
static int hf_bthci_evt_fragment;
450
static int hf_bthci_evt_data;
451
static int hf_bthci_evt_le_number_of_reports;
452
static int hf_bthci_evt_le_report;
453
static int hf_bthci_evt_le_event_type;
454
static int hf_bthci_evt_le_direct_address_type;
455
static int hf_bthci_evt_le_direct_bd_addr;
456
static int hf_bthci_evt_le_address_type;
457
static int hf_bthci_evt_le_rssi;
458
static int hf_bthci_evt_le_tx_phy;
459
static int hf_bthci_evt_le_rx_phy;
460
static int hf_bthci_evt_max_adv_data_length;
461
static int hf_bthci_evt_num_supported_adv_sets;
462
static int hf_bthci_evt_number_of_supported_codecs;
463
static int hf_bthci_evt_number_of_supported_vendor_codecs;
464
static int hf_bthci_evt_codecs;
465
static int hf_bthci_evt_vendor_codecs;
466
static int hf_bthci_evt_vendor_codecs_item;
467
static int hf_bthci_evt_codec_id;
468
static int hf_bthci_evt_vendor_codec_id;
469
static int hf_bthci_evt_mws_bt_rx_priority_assert_offset;
470
static int hf_bthci_evt_mws_bt_rx_priority_assert_jitter;
471
static int hf_bthci_evt_mws_bt_rx_priority_deassert_offset;
472
static int hf_bthci_evt_mws_bt_rx_priority_deassert_jitter;
473
static int hf_bthci_evt_mws_bt_tx_priority_assert_offset;
474
static int hf_bthci_evt_mws_bt_tx_priority_assert_jitter;
475
static int hf_bthci_evt_mws_bt_tx_priority_deassert_offset;
476
static int hf_bthci_evt_mws_bt_tx_priority_deassert_jitter;
477
static int hf_bthci_evt_mws_802_rx_priority_assert_offset;
478
static int hf_bthci_evt_mws_802_rx_priority_assert_jitter;
479
static int hf_bthci_evt_mws_802_rx_priority_deassert_offset;
480
static int hf_bthci_evt_mws_802_rx_priority_deassert_jitter;
481
static int hf_bthci_evt_mws_802_tx_priority_assert_offset;
482
static int hf_bthci_evt_mws_802_tx_priority_assert_jitter;
483
static int hf_bthci_evt_mws_802_tx_priority_deassert_offset;
484
static int hf_bthci_evt_mws_802_tx_priority_deassert_jitter;
485
static int hf_bthci_evt_sync_train_interval;
486
static int hf_bthci_evt_sync_train_to;
487
static int hf_bthci_evt_secure_connection_host_support;
488
static int hf_bthci_evt_authenticated_payload_timeout;
489
static int hf_bthci_evt_c192;
490
static int hf_bthci_evt_r192;
491
static int hf_bthci_evt_c256;
492
static int hf_bthci_evt_r256;
493
static int hf_bthci_evt_extended_inquiry_length;
494
static int hf_bthci_evt_suggested_max_tx_octets;
495
static int hf_bthci_evt_suggested_max_tx_time;
496
static int hf_bthci_evt_suggested_max_rx_octets;
497
static int hf_bthci_evt_suggested_max_rx_time;
498
static int hf_bthci_evt_resolving_list_size;
499
static int hf_bthci_evt_primary_phy;
500
static int hf_bthci_evt_secondary_phy;
501
static int hf_bthci_evt_advertising_sid;
502
static int hf_bthci_evt_tx_power;
503
static int hf_bthci_evt_periodic_advertising_interval;
504
static int hf_bthci_evt_num_compl_ext_advertising_events;
505
static int hf_bthci_evt_channel_selection_algorithm;
506
static int hf_bthci_evt_advertiser_clock_accuracy;
507
static int hf_bthci_evt_advertiser_phy;
508
static int hf_bthci_evt_periodic_adv_list_size;
509
static int hf_bthci_evt_min_tx_power;
510
static int hf_bthci_evt_max_tx_power;
511
static int hf_bthci_evt_rf_tx_path_compensation;
512
static int hf_bthci_evt_rf_rx_path_compensation;
513
static int hf_bthci_evt_sync_handle;
514
static int hf_bthci_evt_data_status;
515
static int hf_bthci_evt_advertising_handle;
516
static int hf_bthci_evt_channel_index;
517
static int hf_bthci_evt_cte_rssi;
518
static int hf_bthci_evt_antenna_id;
519
static int hf_bthci_evt_cte_type;
520
static int hf_bthci_evt_slot_durations;
521
static int hf_bthci_evt_packet_status;
522
static int hf_bthci_evt_event_counter;
523
static int hf_bthci_evt_sample_count;
524
static int hf_bthci_evt_i_sample;
525
static int hf_bthci_evt_q_sample;
526
static int hf_bthci_evt_service_data_past;
527
static int hf_bthci_evt_number_antennae;
528
static int hf_bthci_evt_max_cte_length;
529
static int hf_bthci_evt_max_length_antenna_switching_pattern;
530
static int hf_bthci_evt_max_encryption_key_size;
531
static int hf_bthci_evt_sdu_packet_seq_num;
532
static int hf_bthci_evt_sdu_packet_timestamp;
533
static int hf_bthci_evt_sdu_packet_offset;
534
static int hf_bthci_evt_cig_id;
535
static int hf_bthci_evt_cis_id;
536
static int hf_bthci_evt_cis_count;
537
static int hf_bthci_evt_cis_handle;
538
static int hf_bthci_evt_cis_bis_handle;
539
static int hf_bthci_evt_big_handle;
540
static int hf_bthci_evt_received_packet_counter;
541
static int hf_bthci_evt_missed_packet_counter;
542
static int hf_bthci_evt_failed_packet_counter;
543
static int hf_bthci_evt_pkt_count_tx_unacked;
544
static int hf_bthci_evt_pkt_count_tx_flushed;
545
static int hf_bthci_evt_pkt_count_tx_last_subevent;
546
static int hf_bthci_evt_pkt_count_tx_retransmitted;
547
static int hf_bthci_evt_pkt_count_rx_crc_error;
548
static int hf_bthci_evt_pkt_count_rx_unreceived;
549
static int hf_bthci_evt_pkt_count_rx_duplicate;
550
static int hf_bthci_evt_phy_and_coding;
551
static int hf_bthci_evt_cig_sync_delay;
552
static int hf_bthci_evt_big_sync_delay;
553
static int hf_bthci_evt_cis_sync_delay;
554
static int hf_bthci_evt_transport_latency_c_to_p;
555
static int hf_bthci_evt_transport_latency_p_to_c;
556
static int hf_bthci_evt_big_transport_latency;
557
static int hf_bthci_evt_phy_c_to_p;
558
static int hf_bthci_evt_phy_p_to_c;
559
static int hf_bthci_evt_bn_c_to_p;
560
static int hf_bthci_evt_bn_p_to_c;
561
static int hf_bthci_evt_ft_c_to_p;
562
static int hf_bthci_evt_ft_p_to_c;
563
static int hf_bthci_evt_max_pdu_c_to_p;
564
static int hf_bthci_evt_max_pdu_p_to_c;
565
static int hf_bthci_evt_sub_interval;
566
static int hf_bthci_evt_max_sdu_c_to_p;
567
static int hf_bthci_evt_max_sdu_p_to_c;
568
static int hf_bthci_evt_sdu_interval_c_to_p;
569
static int hf_bthci_evt_sdu_interval_p_to_c;
570
static int hf_bthci_evt_phy;
571
static int hf_bthci_evt_nse;
572
static int hf_bthci_evt_bn;
573
static int hf_bthci_evt_pto;
574
static int hf_bthci_evt_irc;
575
static int hf_bthci_evt_max_pdu;
576
static int hf_bthci_evt_iso_interval;
577
static int hf_bthci_evt_num_bis;
578
static int hf_bthci_evt_bis_handle;
579
static int hf_bthci_evt_current_path_loss;
580
static int hf_bthci_evt_zone_entered;
581
static int hf_bthci_evt_power_report_reason;
582
static int hf_bthci_evt_power_level_delta;
583
static int hf_bthci_evt_sdu_interval;
584
static int hf_bthci_evt_max_sdu;
585
static int hf_bthci_evt_framing;
586
static int hf_bthci_evt_peer_clock_accuracy;
587
static int hf_bthci_evt_subrate_factor;
588
static int hf_bthci_evt_continuation_number;
589
static int hf_bthci_evt_subevent_start;
590
static int hf_bthci_evt_subevent_count;
591
static int hf_bthci_evt_subevent;
592
static int hf_bthci_evt_subevent_tx_status;
593
static int hf_bthci_evt_subevent_responses;
594
static int hf_bthci_evt_response_slot;
595
static int hf_bthci_evt_num_subevents;
596
static int hf_bthci_evt_subevent_interval;
597
static int hf_bthci_evt_response_slot_delay;
598
static int hf_bthci_evt_response_slot_spacing;
599
static int hf_bthci_evt_periodic_event_counter;
600
static int hf_packet_type_acl;
601
static int hf_packet_type_acl_dh5;
602
static int hf_packet_type_acl_dm5;
603
static int hf_packet_type_acl_3dh5;
604
static int hf_packet_type_acl_2dh5;
605
static int hf_packet_type_acl_dh3;
606
static int hf_packet_type_acl_dm3;
607
static int hf_packet_type_acl_3dh3;
608
static int hf_packet_type_acl_2dh3;
609
static int hf_packet_type_acl_reserved_5_7;
610
static int hf_packet_type_acl_dh1;
611
static int hf_packet_type_acl_dm1;
612
static int hf_packet_type_acl_3dh1;
613
static int hf_packet_type_acl_2dh1;
614
static int hf_packet_type_acl_reserved_0;
615
static int hf_packet_type_sco;
616
static int hf_packet_type_sco_reserved_15_8;
617
static int hf_packet_type_sco_hv3;
618
static int hf_packet_type_sco_hv2;
619
static int hf_packet_type_sco_hv1;
620
static int hf_packet_type_sco_reserved_4_0;
621
static int hf_bthci_evt_max_remote_page;
622
static int hf_bthci_evt_max_valid_page;
623
static int hf_bthci_evt_monitoring_adv_list_size;
624
static int hf_bthci_evt_config_id;
625
static int hf_bthci_evt_num_config;
626
static int hf_bthci_evt_max_consecutive_procedures;
627
static int hf_bthci_evt_remote_fae_table;
628
static int hf_bthci_evt_channel_map;
629
static int hf_bthci_evt_cs_action;
630
static int hf_bthci_evt_main_mode_type;
631
static int hf_bthci_evt_sub_mode_type;
632
static int hf_bthci_evt_min_main_mode_steps;
633
static int hf_bthci_evt_max_main_mode_steps;
634
static int hf_bthci_evt_main_mode_repetition;
635
static int hf_bthci_evt_mode_0_steps;
636
static int hf_bthci_evt_cs_role;
637
static int hf_bthci_evt_rtt_type;
638
static int hf_bthci_evt_cs_sync_phy;
639
static int hf_bthci_evt_channel_map_repetition;
640
static int hf_bthci_evt_channel_selection_type;
641
static int hf_bthci_evt_ch3c_shape;
642
static int hf_bthci_evt_ch3c_jump;
643
static int hf_bthci_evt_companion_signal_enable;
644
static int hf_bthci_evt_t_ip1_time;
645
static int hf_bthci_evt_t_ip2_time;
646
static int hf_bthci_evt_t_fcs_time;
647
static int hf_bthci_evt_t_pm_time;
648
static int hf_bthci_evt_cs_state;
649
static int hf_bthci_evt_tone_antenna_selection;
650
static int hf_bthci_evt_cs_subevent_len;
651
static int hf_bthci_evt_cs_subevents_per_event;
652
static int hf_bthci_evt_cs_subevent_interval;
653
static int hf_bthci_evt_cs_event_interval;
654
static int hf_bthci_evt_cs_procedure_interval;
655
static int hf_bthci_evt_cs_procedure_count;
656
static int hf_bthci_evt_max_procedure_len;
657
static int hf_bthci_evt_start_acl_conn_event;
658
static int hf_bthci_evt_procedure_counter;
659
static int hf_bthci_evt_freq_compensation;
660
static int hf_bthci_evt_ref_power_level;
661
static int hf_bthci_evt_procedure_done_status;
662
static int hf_bthci_evt_subevent_done_status;
663
static int hf_bthci_evt_cs_abort_reason;
664
static int hf_bthci_evt_cs_abort_reason_procedure;
665
static int hf_bthci_evt_cs_abort_reason_subevent;
666
static int hf_bthci_evt_num_antenna_paths;
667
static int hf_bthci_evt_cs_roles;
668
static int hf_bthci_evt_cs_roles_initiator;
669
static int hf_bthci_evt_cs_roles_reflector;
670
static int hf_bthci_evt_cs_roles_reserved;
671
static int hf_bthci_evt_cs_modes_supported;
672
static int hf_bthci_evt_cs_modes_supported_3;
673
static int hf_bthci_evt_cs_modes_supported_reserved;
674
static int hf_bthci_evt_rtt_capability;
675
static int hf_bthci_evt_rtt_capability_coarse_precision;
676
static int hf_bthci_evt_rtt_capability_sounding_precision;
677
static int hf_bthci_evt_rtt_capability_random_precision;
678
static int hf_bthci_evt_rtt_capability_reserved;
679
static int hf_bthci_evt_rtt_aa_only_n;
680
static int hf_bthci_evt_rtt_sounding_n;
681
static int hf_bthci_evt_rtt_random_n;
682
static int hf_bthci_evt_nadm_sounding_capability;
683
static int hf_bthci_evt_nadm_sounding_capability_supported;
684
static int hf_bthci_evt_nadm_sounding_capability_reserved;
685
static int hf_bthci_evt_nadm_random_capability;
686
static int hf_bthci_evt_nadm_random_capability_supported;
687
static int hf_bthci_evt_nadm_random_capability_reserved;
688
static int hf_bthci_evt_cs_sync_phys_supported;
689
static int hf_bthci_evt_cs_sync_phys_supported_2m;
690
static int hf_bthci_evt_cs_sync_phys_supported_2m2bt;
691
static int hf_bthci_evt_cs_sync_phys_supported_reserved;
692
static int hf_bthci_evt_cs_subfeatures;
693
static int hf_bthci_evt_cs_subfeatures_companion_signal;
694
static int hf_bthci_evt_cs_subfeatures_freq_actuation_error;
695
static int hf_bthci_evt_cs_subfeatures_channel_selection_3c;
696
static int hf_bthci_evt_cs_subfeatures_pbr_from_rtt;
697
static int hf_bthci_evt_cs_subfeatures_reserved;
698
static int hf_bthci_evt_tip1_times_supported;
699
static int hf_bthci_evt_tip2_times_supported;
700
static int hf_bthci_evt_tip_times_supported_10us;
701
static int hf_bthci_evt_tip_times_supported_20us;
702
static int hf_bthci_evt_tip_times_supported_30us;
703
static int hf_bthci_evt_tip_times_supported_40us;
704
static int hf_bthci_evt_tip_times_supported_50us;
705
static int hf_bthci_evt_tip_times_supported_60us;
706
static int hf_bthci_evt_tip_times_supported_80us;
707
static int hf_bthci_evt_tip_times_supported_reserved;
708
static int hf_bthci_evt_tfcs_times_supported;
709
static int hf_bthci_evt_tfcs_times_supported_15us;
710
static int hf_bthci_evt_tfcs_times_supported_20us;
711
static int hf_bthci_evt_tfcs_times_supported_30us;
712
static int hf_bthci_evt_tfcs_times_supported_40us;
713
static int hf_bthci_evt_tfcs_times_supported_50us;
714
static int hf_bthci_evt_tfcs_times_supported_60us;
715
static int hf_bthci_evt_tfcs_times_supported_80us;
716
static int hf_bthci_evt_tfcs_times_supported_100us;
717
static int hf_bthci_evt_tfcs_times_supported_120us;
718
static int hf_bthci_evt_tfcs_times_supported_reserved;
719
static int hf_bthci_evt_tpm_times_supported;
720
static int hf_bthci_evt_tpm_times_supported_10us;
721
static int hf_bthci_evt_tpm_times_supported_20us;
722
static int hf_bthci_evt_tpm_times_supported_reserved;
723
static int hf_bthci_evt_tsw_time_supported;
724
static int hf_bthci_evt_tx_snr_capability;
725
static int hf_bthci_evt_tx_snr_capability_18dB;
726
static int hf_bthci_evt_tx_snr_capability_21dB;
727
static int hf_bthci_evt_tx_snr_capability_24dB;
728
static int hf_bthci_evt_tx_snr_capability_27dB;
729
static int hf_bthci_evt_tx_snr_capability_30dB;
730
static int hf_bthci_evt_tx_snr_capability_reserved;
731
static int hf_bthci_evt_num_steps_reported;
732
static int hf_bthci_evt_cs_step;
733
static int hf_bthci_evt_step_mode;
734
static int hf_bthci_evt_step_channel;
735
static int hf_bthci_evt_step_data_length;
736
static int hf_bthci_evt_packet_quality;
737
static int hf_bthci_evt_packet_quality_aa_check;
738
static int hf_bthci_evt_packet_quality_bit_errors;
739
static int hf_bthci_evt_measured_freq_offset;
740
static int hf_bthci_evt_nadm_attack_chance;
741
static int hf_bthci_evt_toa_tod_initiator;
742
static int hf_bthci_evt_tod_toa_reflector;
743
static int hf_bthci_evt_pct1;
744
static int hf_bthci_evt_pct2;
745
static int hf_bthci_evt_pct_not_available;
746
static int hf_bthci_evt_tone_pct;
747
static int hf_bthci_evt_pct_i_sample;
748
static int hf_bthci_evt_pct_q_sample;
749
static int hf_bthci_evt_antenna_permutation_index;
750
static int hf_bthci_evt_tone_quality;
751
static int hf_bthci_evt_tone_extension_presence;
752
static int hf_bthci_evt_cs_tone;
753
static int hf_bthci_evt_monitoring_condition;
754
static int hf_bthci_evt_initiator;
755
static int hf_bthci_evt_frame_space;
756
static int hf_bthci_evt_spacing_types;
757
static int hf_bthci_evt_spacing_types_tifs_acl_cp;
758
static int hf_bthci_evt_spacing_types_tifs_acl_pc;
759
static int hf_bthci_evt_spacing_types_tmces;
760
static int hf_bthci_evt_spacing_types_tifs_cis;
761
static int hf_bthci_evt_spacing_types_tmss_cis;
762
static int hf_bthci_evt_spacing_types_reserved;
763
static int hf_bthci_evt_le_phys;
764
static int hf_bthci_evt_le_phys_le_1m;
765
static int hf_bthci_evt_le_phys_le_2m;
766
static int hf_bthci_evt_le_phys_le_coded;
767
static int hf_bthci_evt_le_phys_reserved;
768
769
static int * const hfx_bthci_evt_le_features[] = {
770
    &hf_bthci_evt_le_features_encryption,
771
    &hf_bthci_evt_le_features_connection_parameters_request_procedure,
772
    &hf_bthci_evt_le_features_extended_reject_indication,
773
    &hf_bthci_evt_le_features_peripheral_initiated_features_exchange,
774
    &hf_bthci_evt_le_features_ping,
775
    &hf_bthci_evt_le_features_data_packet_length_extension,
776
    &hf_bthci_evt_le_features_ll_privacy,
777
    &hf_bthci_evt_le_features_extended_scanner_filter_policies,
778
    &hf_bthci_evt_le_features_2m_phy,
779
    &hf_bthci_evt_le_features_stable_modulation_index_tx,
780
    &hf_bthci_evt_le_features_stable_modulation_index_rx,
781
    &hf_bthci_evt_le_features_coded_phy,
782
    &hf_bthci_evt_le_features_extended_advertising,
783
    &hf_bthci_evt_le_features_periodic_advertising,
784
    &hf_bthci_evt_le_features_channel_selection_algorithm_2,
785
    &hf_bthci_evt_le_features_power_class_1,
786
    &hf_bthci_evt_le_features_minimum_number_of_used_channels_procedure,
787
    &hf_bthci_evt_le_features_connection_cte_request,
788
    &hf_bthci_evt_le_features_connection_cte_response,
789
    &hf_bthci_evt_le_features_connectionless_cte_tx,
790
    &hf_bthci_evt_le_features_connectionless_cte_rx,
791
    &hf_bthci_evt_le_features_antenna_switching_during_cte_tx_aod,
792
    &hf_bthci_evt_le_features_antenna_switching_during_cte_rx_aoa,
793
    &hf_bthci_evt_le_features_receiving_cte,
794
    &hf_bthci_evt_le_features_periodic_advertising_sync_transfer_sender,
795
    &hf_bthci_evt_le_features_periodic_advertising_sync_transfer_receiver,
796
    &hf_bthci_evt_le_features_sleep_clock_accuracy_updates,
797
    &hf_bthci_evt_le_features_remote_public_key_validation,
798
    &hf_bthci_evt_le_features_cis_central,
799
    &hf_bthci_evt_le_features_cis_peripheral,
800
    &hf_bthci_evt_le_features_isochronous_broadcaster,
801
    &hf_bthci_evt_le_features_synchronized_receiver,
802
    &hf_bthci_evt_le_features_isochronous_channels_host_support,
803
    &hf_bthci_evt_le_features_power_control_request,
804
    &hf_bthci_evt_le_features_power_change_indication,
805
    &hf_bthci_evt_le_features_path_loss_monitoring,
806
    &hf_bthci_evt_le_features_periodic_advertising_adi,
807
    &hf_bthci_evt_le_features_connection_subrating,
808
    &hf_bthci_evt_le_features_connection_subrating_host_support,
809
    &hf_bthci_evt_le_features_channel_classification,
810
    &hf_bthci_evt_le_features_coding_selection,
811
    &hf_bthci_evt_le_features_coding_selection_host_support,
812
    &hf_bthci_evt_le_features_decision_based_advertising_filtering,
813
    &hf_bthci_evt_le_features_periodic_advertising_responses_advertiser,
814
    &hf_bthci_evt_le_features_periodic_advertising_responses_scanner,
815
    &hf_bthci_evt_le_features_unsegmented_framed_mode,
816
    &hf_bthci_evt_le_features_channel_sounding,
817
    &hf_bthci_evt_le_features_channel_sounding_host_support,
818
    &hf_bthci_evt_le_features_channel_sounding_tone_quality_indication,
819
    &hf_bthci_evt_le_features_ext_feature_set,
820
    &hf_bthci_evt_le_features_reserved,
821
    NULL
822
};
823
824
static int * const hfx_bthci_evt_le_ext_features_1[] = {
825
    &hf_bthci_evt_le_ext_features_1_monitoring_advertisers,
826
    &hf_bthci_evt_le_ext_features_1_frame_space_update,
827
    &hf_bthci_evt_le_ext_features_1_reserved,
828
    NULL
829
};
830
831
static int * const hfx_packet_type_acl[] = {
832
    &hf_packet_type_acl_dh5,
833
    &hf_packet_type_acl_dm5,
834
    &hf_packet_type_acl_3dh5,
835
    &hf_packet_type_acl_2dh5,
836
    &hf_packet_type_acl_dh3,
837
    &hf_packet_type_acl_dm3,
838
    &hf_packet_type_acl_3dh3,
839
    &hf_packet_type_acl_2dh3,
840
    &hf_packet_type_acl_reserved_5_7,
841
    &hf_packet_type_acl_dh1,
842
    &hf_packet_type_acl_dm1,
843
    &hf_packet_type_acl_3dh1,
844
    &hf_packet_type_acl_2dh1,
845
    &hf_packet_type_acl_reserved_0,
846
    NULL
847
};
848
849
static int * const hfx_packet_type_sco[] = {
850
    &hf_packet_type_sco_reserved_15_8,
851
    &hf_packet_type_sco_hv3,
852
    &hf_packet_type_sco_hv2,
853
    &hf_packet_type_sco_hv1,
854
    &hf_packet_type_sco_reserved_4_0,
855
    NULL
856
};
857
858
static int * const hfx_bthci_evt_cs_roles[] = {
859
    &hf_bthci_evt_cs_roles_initiator,
860
    &hf_bthci_evt_cs_roles_reflector,
861
    &hf_bthci_evt_cs_roles_reserved,
862
    NULL
863
};
864
865
static int * const hfx_bthci_evt_cs_modes_supported[] = {
866
    &hf_bthci_evt_cs_modes_supported_3,
867
    &hf_bthci_evt_cs_modes_supported_reserved,
868
    NULL
869
};
870
871
static int * const hfx_bthci_evt_rtt_capability[] = {
872
    &hf_bthci_evt_rtt_capability_coarse_precision,
873
    &hf_bthci_evt_rtt_capability_sounding_precision,
874
    &hf_bthci_evt_rtt_capability_random_precision,
875
    &hf_bthci_evt_rtt_capability_reserved,
876
    NULL
877
};
878
879
static int * const hfx_bthci_evt_nadm_sounding_capability[] = {
880
    &hf_bthci_evt_nadm_sounding_capability_supported,
881
    &hf_bthci_evt_nadm_sounding_capability_reserved,
882
    NULL
883
};
884
885
static int * const hfx_bthci_evt_nadm_random_capability[] = {
886
    &hf_bthci_evt_nadm_random_capability_supported,
887
    &hf_bthci_evt_nadm_random_capability_reserved,
888
    NULL
889
};
890
891
static int * const hfx_bthci_evt_cs_sync_phys_supported[] = {
892
    &hf_bthci_evt_cs_sync_phys_supported_2m,
893
    &hf_bthci_evt_cs_sync_phys_supported_2m2bt,
894
    &hf_bthci_evt_cs_sync_phys_supported_reserved,
895
    NULL
896
};
897
898
static int * const hfx_bthci_evt_cs_subfeatures[] = {
899
    &hf_bthci_evt_cs_subfeatures_companion_signal,
900
    &hf_bthci_evt_cs_subfeatures_freq_actuation_error,
901
    &hf_bthci_evt_cs_subfeatures_channel_selection_3c,
902
    &hf_bthci_evt_cs_subfeatures_pbr_from_rtt,
903
    &hf_bthci_evt_cs_subfeatures_reserved,
904
    NULL
905
};
906
907
static int * const hfx_bthci_evt_tip_times_supported[] = {
908
    &hf_bthci_evt_tip_times_supported_10us,
909
    &hf_bthci_evt_tip_times_supported_20us,
910
    &hf_bthci_evt_tip_times_supported_30us,
911
    &hf_bthci_evt_tip_times_supported_40us,
912
    &hf_bthci_evt_tip_times_supported_50us,
913
    &hf_bthci_evt_tip_times_supported_60us,
914
    &hf_bthci_evt_tip_times_supported_80us,
915
    &hf_bthci_evt_tip_times_supported_reserved,
916
    NULL
917
};
918
919
static int * const hfx_bthci_evt_tfcs_times_supported[] = {
920
    &hf_bthci_evt_tfcs_times_supported_15us,
921
    &hf_bthci_evt_tfcs_times_supported_20us,
922
    &hf_bthci_evt_tfcs_times_supported_30us,
923
    &hf_bthci_evt_tfcs_times_supported_40us,
924
    &hf_bthci_evt_tfcs_times_supported_50us,
925
    &hf_bthci_evt_tfcs_times_supported_60us,
926
    &hf_bthci_evt_tfcs_times_supported_80us,
927
    &hf_bthci_evt_tfcs_times_supported_100us,
928
    &hf_bthci_evt_tfcs_times_supported_120us,
929
    &hf_bthci_evt_tfcs_times_supported_reserved,
930
    NULL
931
};
932
933
static int * const hfx_bthci_evt_tpm_times_supported[] = {
934
    &hf_bthci_evt_tpm_times_supported_10us,
935
    &hf_bthci_evt_tpm_times_supported_20us,
936
    &hf_bthci_evt_tpm_times_supported_reserved,
937
    NULL
938
};
939
940
static int * const hfx_bthci_evt_tx_snr_capability[] = {
941
    &hf_bthci_evt_tx_snr_capability_18dB,
942
    &hf_bthci_evt_tx_snr_capability_21dB,
943
    &hf_bthci_evt_tx_snr_capability_24dB,
944
    &hf_bthci_evt_tx_snr_capability_27dB,
945
    &hf_bthci_evt_tx_snr_capability_30dB,
946
    &hf_bthci_evt_tx_snr_capability_reserved,
947
    NULL
948
};
949
950
static int * const hfx_bthci_evt_cs_abort_reason[] = {
951
    &hf_bthci_evt_cs_abort_reason_procedure,
952
    &hf_bthci_evt_cs_abort_reason_subevent,
953
    NULL
954
};
955
956
static int * const hfx_bthci_evt_spacing_types[] = {
957
    &hf_bthci_evt_spacing_types_tifs_acl_cp,
958
    &hf_bthci_evt_spacing_types_tifs_acl_pc,
959
    &hf_bthci_evt_spacing_types_tmces,
960
    &hf_bthci_evt_spacing_types_tifs_cis,
961
    &hf_bthci_evt_spacing_types_tmss_cis,
962
    &hf_bthci_evt_spacing_types_reserved,
963
    NULL
964
};
965
966
static int * const hfx_bthci_evt_le_phys[] = {
967
    &hf_bthci_evt_le_phys_le_1m,
968
    &hf_bthci_evt_le_phys_le_2m,
969
    &hf_bthci_evt_le_phys_le_coded,
970
    &hf_bthci_evt_le_phys_reserved,
971
    NULL
972
};
973
974
static expert_field ei_event_undecoded;
975
static expert_field ei_event_unknown_event;
976
static expert_field ei_event_unexpected_event;
977
static expert_field ei_event_unexpected_parameter;
978
static expert_field ei_event_unknown_command;
979
static expert_field ei_parameter_unexpected;
980
static expert_field ei_manufacturer_data_changed;
981
static expert_field ei_hci_revision_changed;
982
static expert_field ei_lmp_subversion_changed;
983
static expert_field ei_bad_link_type;
984
985
static dissector_table_t hci_cmd_vendor_dissector_table;
986
static dissector_table_t hci_evt_vendor_dissector_table;
987
static dissector_table_t hci_vendor_table;
988
989
static int hf_bthci_evt_ext_advts_event_type;
990
static int hf_bthci_evt_ext_advts_event_type_connectable;
991
static int hf_bthci_evt_ext_advts_event_type_scannable;
992
static int hf_bthci_evt_ext_advts_event_type_directed;
993
static int hf_bthci_evt_ext_advts_event_type_scan_response;
994
static int hf_bthci_evt_ext_advts_event_type_legacy;
995
static int hf_bthci_evt_ext_advts_event_type_data_status;
996
static int hf_bthci_evt_ext_advts_event_type_reserved;
997
998
static int * const hfx_bthci_evt_le_ext_advts_evt_type[] = {
999
    &hf_bthci_evt_ext_advts_event_type_connectable,
1000
    &hf_bthci_evt_ext_advts_event_type_scannable,
1001
    &hf_bthci_evt_ext_advts_event_type_directed,
1002
    &hf_bthci_evt_ext_advts_event_type_scan_response,
1003
    &hf_bthci_evt_ext_advts_event_type_legacy,
1004
    &hf_bthci_evt_ext_advts_event_type_data_status,
1005
    &hf_bthci_evt_ext_advts_event_type_reserved,
1006
    NULL
1007
};
1008
1009
static int hf_bthci_evt_supported_switching_sample_rates;
1010
static int hf_bthci_evt_supported_switching_sample_rates_1us_switching_aod_tx;
1011
static int hf_bthci_evt_supported_switching_sample_rates_1us_sampling_aod_rx;
1012
static int hf_bthci_evt_supported_switching_sample_rates_1us_switching_and_sampling_aoa_rx;
1013
static int hf_bthci_evt_supported_switching_sample_rates_reserved;
1014
1015
static int * const hfx_bthci_evt_supported_switching_sample_rates[] = {
1016
    &hf_bthci_evt_supported_switching_sample_rates_1us_switching_aod_tx,
1017
    &hf_bthci_evt_supported_switching_sample_rates_1us_sampling_aod_rx,
1018
    &hf_bthci_evt_supported_switching_sample_rates_1us_switching_and_sampling_aoa_rx,
1019
    &hf_bthci_evt_supported_switching_sample_rates_reserved,
1020
    NULL
1021
};
1022
1023
static int hf_bthci_evt_simple_pairing_options;
1024
static int hf_bthci_evt_simple_pairing_options_remote_public_key_validation;
1025
static int hf_bthci_evt_simple_pairing_options_reserved;
1026
1027
static int * const hfx_bthci_evt_simple_pairing_options[] = {
1028
    &hf_bthci_evt_simple_pairing_options_remote_public_key_validation,
1029
    &hf_bthci_evt_simple_pairing_options_reserved,
1030
    NULL
1031
};
1032
1033
static int hf_bthci_evt_transmit_power_level_flags;
1034
static int hf_bthci_evt_transmit_power_level_flags_minimum_power;
1035
static int hf_bthci_evt_transmit_power_level_flags_maximum_power;
1036
static int hf_bthci_evt_transmit_power_level_flags_reserved;
1037
1038
static int * const hfx_bthci_evt_transmit_power_level_flags[] = {
1039
    &hf_bthci_evt_transmit_power_level_flags_minimum_power,
1040
    &hf_bthci_evt_transmit_power_level_flags_maximum_power,
1041
    &hf_bthci_evt_transmit_power_level_flags_reserved,
1042
    NULL
1043
};
1044
1045
/* Initialize the subtree pointers */
1046
static int ett_bthci_evt;
1047
static int ett_opcode;
1048
static int ett_lmp_subtree;
1049
static int ett_ptype_subtree;
1050
static int ett_le_state_subtree;
1051
static int ett_le_channel_map;
1052
static int ett_le_features;
1053
static int ett_le_report;
1054
static int ett_codecs;
1055
static int ett_mws_transport_layers;
1056
static int ett_mws_transport_layers_item;
1057
static int ett_mws_to_mws_baud_rates;
1058
static int ett_mws_to_mws_baud_rates_transport_item;
1059
static int ett_mws_from_mws_baud_rates;
1060
static int ett_mws_from_mws_baud_rates_transport_item;
1061
static int ett_expert;
1062
static int ett_le_ext_advts_event_type;
1063
static int ett_iq_sample_list;
1064
static int ett_iq_samples;
1065
static int ett_simple_pairing_options;
1066
static int ett_supported_switching_sample_rates;
1067
static int ett_transmit_power_level_flags;
1068
static int ett_adv_subevent_responses;
1069
static int ett_cs_abort_reason;
1070
static int ett_cs_step;
1071
static int ett_packet_quality;
1072
static int ett_cs_tone;
1073
static int ett_cs_pct_sample;
1074
static int ett_cs_roles;
1075
static int ett_cs_modes;
1076
static int ett_cs_capability;
1077
static int ett_cs_times;
1078
static int ett_spacing_types;
1079
static int ett_phys;
1080
1081
extern value_string_ext ext_usb_vendors_vals;
1082
extern value_string_ext ext_usb_products_vals;
1083
extern value_string_ext did_vendor_id_source_vals_ext;
1084
1085
enum command_status {
1086
    COMMAND_STATUS_NORMAL,
1087
    COMMAND_STATUS_PENDING,
1088
    COMMAND_STATUS_RESULT
1089
};
1090
1091
typedef struct _opcode_list_data_t {
1092
    uint16_t             opcode;
1093
    enum command_status  command_status;
1094
} opcode_list_data_t;
1095
1096
static const value_string evt_code_vals[] = {
1097
    {0x01, "Inquiry Complete"},
1098
    {0x02, "Inquiry Result"},
1099
    {0x03, "Connect Complete"},
1100
    {0x04, "Connect Request"},
1101
    {0x05, "Disconnect Complete"},
1102
    {0x06, "Authentication Complete"},
1103
    {0x07, "Remote Name Request Complete"},
1104
    {0x08, "Encryption Change [v1]"},
1105
    {0x09, "Change Connection Link Key Complete"},
1106
    {0x0a, "Link Key Type Changed"},
1107
    {0x0b, "Read Remote Supported Features"},
1108
    {0x0c, "Read Remote Version Information Complete"},
1109
    {0x0d, "QoS Setup Complete"},
1110
    {0x0e, "Command Complete"},
1111
    {0x0f, "Command Status"},
1112
    {0x10, "Hardware Error"},
1113
    {0x11, "Flush Occurred"},
1114
    {0x12, "Role Change"},
1115
    {0x13, "Number of Completed Packets"},
1116
    {0x14, "Mode Change"},
1117
    {0x15, "Return Link Keys"},
1118
    {0x16, "PIN Code Request"},
1119
    {0x17, "Link Key Request"},
1120
    {0x18, "Link Key Notification"},
1121
    {0x19, "Loopback Command"},
1122
    {0x1a, "Data Buffer Overflow"},
1123
    {0x1b, "Max Slots Change"},
1124
    {0x1c, "Read Clock Offset Complete"},
1125
    {0x1d, "Connection Packet Type Changed"},
1126
    {0x1e, "QoS Violation"},
1127
    {0x1f, "Page Scan Mode Change"},
1128
    {0x20, "Page Scan Repetition Mode Change"},
1129
    {0x21, "Flow Specification Complete"},
1130
    {0x22, "Inquiry Result With RSSI"},
1131
    {0x23, "Read Remote Extended Features Complete"},
1132
    {0x2c, "Synchronous Connection Complete"},
1133
    {0x2d, "Synchronous Connection Changed"},
1134
    {0x2e, "Sniff Subrating"},
1135
    {0x2f, "Extended Inquiry Result"},
1136
    {0x30, "Encryption Key Refresh Complete"},
1137
    {0x31, "IO Capability Request"},
1138
    {0x32, "IO Capability Response"},
1139
    {0x33, "User Confirmation Request"},
1140
    {0x34, "User Passkey Request"},
1141
    {0x35, "Remote OOB Data Request"},
1142
    {0x36, "Simple Pairing Complete"},
1143
    {0x38, "Link Supervision Timeout Changed"},
1144
    {0x39, "Enhanced Flush Complete"},
1145
    {0x3b, "User Passkey Notification"},
1146
    {0x3c, "Keypress Notification"},
1147
    {0x3d, "Remote Host Supported Features Notification"},
1148
    {0x3e, "LE Meta"},
1149
    {0x40, "Physical Link Complete"},
1150
    {0x41, "Channel Selected"},
1151
    {0x42, "Disconnect Physical Link Complete"},
1152
    {0x43, "Physical Link Loss Early Warning"},
1153
    {0x44, "Physical Link Recovery"},
1154
    {0x45, "Logical Link Complete"},
1155
    {0x46, "Disconnect Logical Link Complete"},
1156
    {0x47, "Flow Spec Modify Complete"},
1157
    {0x48, "Number Of Completed Data Blocks"},
1158
    {0x49, "AMP Start Test"},
1159
    {0x4a, "AMP Test End"},
1160
    {0x4b, "AMP Receiver Report"},
1161
    {0x4c, "Short Range Mode Change Complete"},
1162
    {0x4d, "AMP Status Change"},
1163
    /* From "Bluetooth Core Specification Addendum 4 */
1164
    {0x4e, "Triggered Clock Capture"},
1165
    {0x4f, "Synchronization Train Complete"},
1166
    {0x50, "Synchronization Train Received"},
1167
    {0x51, "Connectionless Peripheral Broadcast Receive"},
1168
    {0x52, "Connectionless Peripheral Broadcast Timeout"},
1169
    {0x53, "Truncated Page Complete"},
1170
    {0x54, "Peripheral Page Response Timeout"},
1171
    {0x55, "Connectionless Peripheral Broadcast Channel Map Change"},
1172
    {0x56, "Inquiry Response Notification"},
1173
    /* Core 4 */
1174
    {0x57, "Authenticated Payload Timeout Expired"},
1175
    /* Core 5 */
1176
    {0x58, "SAM Status Change"},
1177
    {0x59, "Encryption Change [v2]"},
1178
    /* Other */
1179
    /*{0xfe, "Bluetooth Logo Testing"}, // According to ESR05 it is not assigned */
1180
    {0xff, "Vendor-Specific"},
1181
    {0, NULL}
1182
};
1183
value_string_ext bthci_evt_evt_code_vals_ext = VALUE_STRING_EXT_INIT(evt_code_vals);
1184
1185
static const value_string bthci_cmd_status_pending_vals[] = {
1186
    {0x00, "Pending"},
1187
    {0, NULL }
1188
};
1189
1190
static const value_string evt_link_types[]  = {
1191
    {0x00, "SCO connection (Voice Channels)"},
1192
    {0x01, "ACL connection (Data Channels)"},
1193
    {0x02, "eSCO connection (Voice Channels)"},
1194
    {0, NULL }
1195
};
1196
1197
static const value_string evt_sync_link_types[]  = {
1198
    {0x00, "SCO connection"},
1199
    {0x02, "eSCO connection"},
1200
    {0, NULL }
1201
};
1202
1203
static const value_string evt_encryption_modes[] = {
1204
    {0x00, "Encryption Disabled"},
1205
    {0x01, "Encryption only for point-to-point packets"},
1206
    {0x02, "Encryption for both point-to-point and broadcast packets"},
1207
    {0, NULL }
1208
};
1209
1210
static const value_string evt_encryption_enable[] = {
1211
    {0x00, "Link Level Encryption is OFF"},
1212
    {0x01, "Link Level Encryption is ON"},
1213
    {0, NULL }
1214
};
1215
1216
static const value_string evt_key_flag[] = {
1217
    {0x00, "Using Semi-permanent Link Key"},
1218
    {0x01, "Using Temporary Link Key"},
1219
    {0, NULL }
1220
};
1221
1222
/* Taken from https://www.bluetooth.org/Technical/AssignedNumbers/link_manager.htm */
1223
const value_string bthci_evt_lmp_version[] = {
1224
    {0x00, "1.0b"},
1225
    {0x01, "1.1"},
1226
    {0x02, "1.2"},
1227
    {0x03, "2.0 + EDR"},
1228
    {0x04, "2.1 + EDR"},
1229
    {0x05, "3.0 + HS"},
1230
    {0x06, "4.0"},
1231
    {0x07, "4.1"},
1232
    {0x08, "4.2"},
1233
    {0x09, "5.0"},
1234
    {0x0a, "5.1"},
1235
    {0x0b, "5.2"},
1236
    {0x0c, "5.3"},
1237
    {0x0d, "5.4"},
1238
    {0x0e, "6.0"},
1239
    {0, NULL }
1240
};
1241
1242
/* Taken from https://www.bluetooth.org/Technical/AssignedNumbers/hci.htm
1243
 * (requires a login/password)
1244
 */
1245
const value_string bthci_evt_hci_version[] = {
1246
    {0x00, "1.0b"},
1247
    {0x01, "1.1"},
1248
    {0x02, "1.2"},
1249
    {0x03, "2.0 + EDR"},
1250
    {0x04, "2.1 + EDR"},
1251
    {0x05, "3.0 + HS"},
1252
    {0x06, "4.0"},
1253
    {0x07, "4.1"},
1254
    {0x08, "4.2"},
1255
    {0x09, "5.0"},
1256
    {0x0a, "5.1"},
1257
    {0x0b, "5.2"},
1258
    {0x0c, "5.3"},
1259
    {0x0d, "5.4"},
1260
    {0x0e, "6.0"},
1261
    {0, NULL }
1262
};
1263
1264
static const value_string evt_service_types[] = {
1265
    {0x00, "No Traffic Available"},
1266
    {0x01, "Best Effort Available"},
1267
    {0x02, "Guaranteed Available"},
1268
    {0, NULL }
1269
};
1270
1271
static const value_string evt_role_vals[] = {
1272
    {0x00, "Currently the Central for specified BD_ADDR"},
1273
    {0x01, "Currently the Peripheral for specified BD_ADDR"},
1274
    {0, NULL }
1275
};
1276
1277
static const value_string evt_role_vals_handle[] = {
1278
    {0x00, "Currently the Central for this connection handle"},
1279
    {0x01, "Currently the Peripheral for this connection handle"},
1280
    {0, NULL }
1281
};
1282
1283
static const value_string evt_modes[] = {
1284
    {0x00, "Active Mode"},
1285
    {0x01, "Hold Mode"},
1286
    {0x02, "Sniff Mode"},
1287
    {0x03, "Park Mode"},
1288
    {0, NULL }
1289
};
1290
1291
static const value_string evt_key_types[] = {
1292
    {0x00, "Combination Key"},
1293
    {0x01, "Local Unit Key"},
1294
    {0x02, "Remote Unit Key"},
1295
    {0x03, "Debug Combination Key"},
1296
    {0x04, "Unauthenticated Combination Key, P-192"},
1297
    {0x05, "Authenticated Combination Key, P-192"},
1298
    {0x06, "Changed Combination Key"},
1299
    {0x07, "Unauthenticated Combination Key, P-256"},
1300
    {0x08, "Authenticated Combination Key, P-256"},
1301
    {0, NULL }
1302
};
1303
1304
static const value_string evt_scan_types[] = {
1305
    {0x00, "Standard Scan" },
1306
    {0x01, "Interlaced Scan" },
1307
    {0, NULL }
1308
};
1309
1310
static const value_string evt_power_level_types[] = {
1311
    {0x00, "Read Current Transmission Power Level" },
1312
    {0x01, "Read Maximum Transmission Power Level" },
1313
    {0, NULL }
1314
};
1315
1316
static const value_string evt_pin_types[] = {
1317
    {0x00, "Variable PIN" },
1318
    {0x01, "Fixed PIN" },
1319
    {0, NULL }
1320
};
1321
1322
static const value_string evt_auth_enable_values[] = {
1323
    {0x00, "Disabled" },
1324
    {0x01, "Enabled for all connections "},
1325
    {0, NULL }
1326
};
1327
1328
static const value_string evt_enable_values[] = {
1329
    {0x00, "Disabled" },
1330
    {0x01, "Enabled"},
1331
    {0, NULL }
1332
};
1333
1334
static const value_string evt_loopback_modes[] = {
1335
    {0x00, "No Loopback mode enabled" },
1336
    {0x01, "Enable Local Loopback" },
1337
    {0x02, "Enable Remote Loopback" },
1338
    {0, NULL }
1339
};
1340
1341
static const value_string evt_country_code_values[] = {
1342
    {0x0, "North America & Europe (except France) and Japan" },
1343
    {0x1, "France" },
1344
    {0, NULL }
1345
};
1346
1347
static const value_string evt_flow_direction_values[] = {
1348
    {0x0, "Outgoing Traffic" },
1349
    {0x1, "Incoming Traffic" },
1350
    {0, NULL }
1351
};
1352
1353
static const value_string evt_flow_ctrl_mode[] = {
1354
    { 0x00, "Packet based" },
1355
    { 0x01, "Data Block based" },
1356
    { 0, NULL }
1357
};
1358
1359
static const value_string evt_amp_status[] = {
1360
    { 0x00, "Controller available but currently physically powered down" },
1361
    { 0x01, "Controller available exclusively for Bluetooth" },
1362
    { 0x02, "No capacity available for Bluetooth operation" },
1363
    { 0x03, "Low capacity available for Bluetooth operation" },
1364
    { 0x04, "Medium capacity available for Bluetooth operation" },
1365
    { 0x05, "High capacity available for Bluetooth operation" },
1366
    { 0x06, "Full capacity available for Bluetooth operation" },
1367
    { 0, NULL }
1368
};
1369
1370
const value_string bthci_evt_controller_types[] = {
1371
    { 0x00, "Primary BR/EDR" },
1372
    { 0x01, "802.11 AMP" },
1373
    { 0, NULL }
1374
};
1375
1376
static const value_string evt_link_loss_reasons[] = {
1377
    { 0x00, "Unknown" },
1378
    { 0x01, "Range related" },
1379
    { 0x02, "Bandwidth related" },
1380
    { 0x03, "Resolving Conflict" },
1381
    { 0x04, "Interference" },
1382
    { 0, NULL }
1383
};
1384
1385
static const value_string evt_report_reasons[] = {
1386
    { 0x00, "Configured Interval" },
1387
    { 0x01, "Test Ended" },
1388
    { 0, NULL }
1389
};
1390
1391
static const value_string evt_report_event_types[] = {
1392
    { 0x00, "Frames Received" },
1393
    { 0x01, "Frames Received & Bits in Error" },
1394
    { 0, NULL }
1395
};
1396
1397
static const value_string evt_le_meta_subevent[] = {
1398
    { 0x01, "LE Connection Complete" },
1399
    { 0x02, "LE Advertising Report" },
1400
    { 0x03, "LE Connection Update Complete" },
1401
    { 0x04, "LE Read Remote Features Complete" },
1402
    { 0x05, "LE Long Term Key Request" },
1403
    { 0x06, "LE Remote Connection Parameter Request" },
1404
    { 0x07, "LE Data Length Change" },
1405
    { 0x08, "LE Read Local P-256 Public Key Complete" },
1406
    { 0x09, "LE Generate DHKey Complete" },
1407
    { 0x0A, "LE Enhanced Connection Complete [v1]" },
1408
    { 0x0B, "LE Direct Advertising Report" },
1409
    { 0x0C, "LE PHY Update Complete" },
1410
    { 0x0D, "LE Extended Advertising Report" },
1411
    { 0x0E, "LE Periodic Advertising Sync Established [v1]" },
1412
    { 0x0F, "LE Periodic Advertising Report [v1]" },
1413
    { 0x10, "LE Periodic Advertising Sync Lost" },
1414
    { 0x11, "LE Scan Timeout" },
1415
    { 0x12, "LE Advertising Set Terminated" },
1416
    { 0x13, "LE Scan Request Received" },
1417
    { 0x14, "LE Channel Selection Algorithm" },
1418
    { 0x15, "LE Connectionless IQ Report" },
1419
    { 0x16, "LE Connection IQ Report" },
1420
    { 0x17, "LE CTE Request Failed" },
1421
    { 0x18, "LE Periodic Advertising Sync Transfer Received [v1]" },
1422
    { 0x19, "LE CIS Established [v1]" },
1423
    { 0x1A, "LE CIS Request" },
1424
    { 0x1B, "LE Create BIG Complete" },
1425
    { 0x1C, "LE Terminate BIG Complete" },
1426
    { 0x1D, "LE BIG Sync Established" },
1427
    { 0x1E, "LE BIG Sync Lost" },
1428
    { 0x1F, "LE Request Peer SCA Complete" },
1429
    { 0x20, "LE Path Loss Threshold" },
1430
    { 0x21, "LE Transmit Power Reporting" },
1431
    { 0x22, "LE BIGInfo Advertising Report" },
1432
    { 0x23, "LE Subrate Change" },
1433
    { 0x24, "LE Periodic Advertising Sync Established [v2]" },
1434
    { 0x25, "LE Periodic Advertising Report [v2]" },
1435
    { 0x26, "LE Periodic Advertising Sync Transfer Received [v2]" },
1436
    { 0x27, "LE Periodic Advertising Subevent Data Request" },
1437
    { 0x28, "LE Periodic Advertising Response Report" },
1438
    { 0x29, "LE Enhanced Connection Complete [v2]" },
1439
    { 0x2A, "LE CIS Established [v2]" },
1440
    { 0x2B, "LE Read All Remote Features Complete" },
1441
    { 0x2C, "LE CS Read Remote Supported Capabilities Complete" },
1442
    { 0x2D, "LE CS Read Remote FAE Table Complete" },
1443
    { 0x2E, "LE CS Security Enable Complete" },
1444
    { 0x2F, "LE CS Config Complete" },
1445
    { 0x30, "LE CS Procedure Enable Complete" },
1446
    { 0x31, "LE CS Subevent Result" },
1447
    { 0x32, "LE CS Subevent Result Continue" },
1448
    { 0x33, "LE CS Test End Complete" },
1449
    { 0x34, "LE Monitored Advertisers Report" },
1450
    { 0x35, "LE Frame Space Update Complete" },
1451
    { 0, NULL }
1452
};
1453
1454
static const value_string evt_le_advertising_evt_types[] = {
1455
    { 0x00, "Connectable Undirected Advertising" },
1456
    { 0x01, "Connectable Directed Advertising" },
1457
    { 0x02, "Scannable Undirected Advertising" },
1458
    { 0x03, "Non-Connectable Undirected Advertising" },
1459
    { 0x04, "Scan Response" },
1460
    { 0, NULL }
1461
};
1462
1463
static const value_string evt_air_mode_vals[] = {
1464
    { 0x00,  UTF8_MICRO_SIGN "-law log" },
1465
    { 0x01,  "A-law log" },
1466
    { 0x02,  "CVSD" },
1467
    { 0x03,  "Transparent Data" },
1468
    { 0, NULL }
1469
};
1470
1471
const value_string bthci_evt_mws_transport_layer_vals[] = {
1472
    { 0x00,  "Disabled" },
1473
    { 0x01,  "WCI-1 Transport" },
1474
    { 0x02,  "WCI-2 Transport" },
1475
    { 0, NULL }
1476
};
1477
1478
static const value_string which_clock_vals[] = {
1479
    { 0x00,  "Local Clock" },
1480
    { 0x01,  "Piconet Clock" },
1481
    { 0, NULL }
1482
};
1483
1484
static const value_string receive_status_vals[] = {
1485
    { 0x00,  "Packet Received Successfully" },
1486
    { 0x01,  "Fragment, Data_Length or Data Fields Invalid" },
1487
    { 0, NULL }
1488
};
1489
1490
static const value_string fragment_vals[] = {
1491
    { 0x00,  "Continuation" },
1492
    { 0x01,  "Start" },
1493
    { 0x02,  "End" },
1494
    { 0x03,  "No Fragmentation" },
1495
    { 0, NULL }
1496
};
1497
1498
static const value_string event_type_vals[] = {
1499
    { 0x01,  "Connectable directed advertising (ADV_DIRECT_IND)" },
1500
    { 0, NULL }
1501
};
1502
1503
const value_string bthci_evt_codec_id_vals[] = {
1504
    { 0x00,  "u-Law log" },
1505
    { 0x01,  "A-law log" },
1506
    { 0x02,  "CVSD" },
1507
    { 0x03,  "Transparent" },
1508
    { 0x04,  "Linear PCM" },
1509
    { 0x05,  "mSBC" },
1510
    { 0x06,  "LC3" },
1511
    { 0x07,  "G.729A" },
1512
    { 0xFF,  "Vendor Specific" },
1513
    { 0, NULL }
1514
};
1515
1516
static const value_string ext_adv_data_status_vals[] = {
1517
    {0x00, "Complete" },
1518
    {0x01, "Incomplete, more to come"},
1519
    {0x02, "Incomplete, truncated, no more to come"},
1520
    {0x03, "Reserved"},
1521
    {0, NULL }
1522
};
1523
1524
static const value_string bthci_evt_primary_phy_vals[] = {
1525
    {0x01, "LE 1M"},
1526
    {0x03, "LE Coded"},
1527
    {0x04, "LE Coded, S=2"},
1528
    {0, NULL }
1529
};
1530
1531
static const value_string bthci_evt_secondary_phy_vals[] = {
1532
    {0x00, "No packets on the secondary advertising channel"},
1533
    {0x01, "LE 1M"},
1534
    {0x02, "LE 2M"},
1535
    {0x03, "LE Coded"},
1536
    {0x04, "LE Coded, S=2"},
1537
    {0, NULL }
1538
};
1539
1540
static const value_string channel_selection_algo_vals[] = {
1541
    { 0x00,  "#1" },
1542
    { 0x01,  "#2" },
1543
    { 0, NULL }
1544
};
1545
1546
static const value_string unique_sam_disabled[] = {
1547
    { 0xFF, "SAM disabled, all slots available" },
1548
    { 0, NULL }
1549
};
1550
1551
static const value_string packet_status_vals[] = {
1552
    { 0x00, "CRC correct" },
1553
    { 0x01, "CRC incorrect, Length and CTETime fields used to determine sampling points" },
1554
    { 0x02, "CRC incorrect, position and length of the CTE determined in some other way" },
1555
    { 0xFF, "Insufficient resources, Channel Index, CTE Type, and Slot Durations invalid" },
1556
    { 0, NULL }
1557
};
1558
1559
static const value_string zone_entered_vals[] = {
1560
    { 0x00, "Low" },
1561
    { 0x01, "Medium" },
1562
    { 0x02, "High" },
1563
    { 0, NULL }
1564
};
1565
1566
static const value_string power_report_reason_vals[] = {
1567
    { 0x00, "Local Transmit Power Changed" },
1568
    { 0x01, "Remote Transmit Power Changed" },
1569
    { 0x02, "Host Requested Read Command Completed" },
1570
    { 0, NULL }
1571
};
1572
1573
static const unit_name_string units_number_events = { " (connection events)", NULL };
1574
1575
static const value_string tx_status_vals[] = {
1576
    {0x00, "Transmitted"},
1577
    {0x01, "Not Transmitted"},
1578
    {0, NULL }
1579
};
1580
1581
static const value_string cs_done_status_vals[] = {
1582
    {0x0, "Completed"},
1583
    {0x1, "Partial, more follows"},
1584
    {0xf, "Aborted"},
1585
    {0, NULL }
1586
};
1587
1588
static const value_string cs_procedure_abort_reason_vals[] = {
1589
    {0x0, "-"},
1590
    {0x1, "Host/Peer Requested"},
1591
    {0x2, "<15 Channels"},
1592
    {0x3, "Channel Map Instant Passed"},
1593
    {0xf, "Unspecified"},
1594
    {0, NULL }
1595
};
1596
1597
static const value_string cs_subevent_abort_reason_vals[] = {
1598
    {0x0, "-"},
1599
    {0x1, "Host/Peer Requested"},
1600
    {0x2, "No Mode-0 Sync"},
1601
    {0x3, "Scheduling Conflict/Limited Resources"},
1602
    {0xf, "Unspecified"},
1603
    {0, NULL }
1604
};
1605
1606
static const value_string cs_action_vals[] = {
1607
    {0x0, "CS Configuration Removed"},
1608
    {0x1, "CS Configuration Created"},
1609
    {0, NULL }
1610
};
1611
1612
static const value_string uint8_no_handle[] = {
1613
    {0xFF, "No Handle"},
1614
    {0, NULL}
1615
};
1616
1617
static const value_string uint16_no_handle[] = {
1618
    {0xFFFF, "No Handle"},
1619
    {0, NULL}
1620
};
1621
1622
static const value_string access_address_check_vals[] = {
1623
    {0x00, "Matching"},
1624
    {0x01, "Contain bit errors"},
1625
    {0x02, "Not Found"},
1626
    {0, NULL}
1627
};
1628
1629
static const value_string nadm_attack_chance_vals[] = {
1630
    {0x00, "Extremely Unlikely"},
1631
    {0x01, "Very Unlikely"},
1632
    {0x02, "Unlikely"},
1633
    {0x03, "Possible"},
1634
    {0x04, "Likely"},
1635
    {0x05, "Very Likely"},
1636
    {0x06, "Extremely Likely"},
1637
    {0xff, "Unknown"},
1638
    {0, NULL}
1639
};
1640
1641
static const value_string tone_quality_vals[] = {
1642
    {0x0, "High"},
1643
    {0x1, "Medium"},
1644
    {0x2, "Low"},
1645
    {0x3, "Unavailable"},
1646
    {0, NULL}
1647
};
1648
1649
static const value_string tone_ext_presence_vals[] = {
1650
    {0x0, "-"},
1651
    {0x1, "Not Present"},
1652
    {0x2, "Present"},
1653
    {0, NULL}
1654
};
1655
1656
static const value_string monitoring_condition_vals[] = {
1657
    {0x00, "RSSI below threshold for timeout period"},
1658
    {0x01, "RSSI greater or equal threshold"},
1659
    {0, NULL}
1660
};
1661
1662
static const value_string initiator_vals[] = {
1663
    {0x00, "Local Host"},
1664
    {0x01, "Local Controller"},
1665
    {0x02, "Peer"},
1666
    {0, NULL}
1667
};
1668
1669
0
static void freq_compensation(char *buf, int16_t value) {
1670
0
    if (value != -16384)
1671
0
        snprintf(buf, ITEM_LABEL_LENGTH, "%g ppm", 0.01 * value);
1672
0
    else
1673
0
        snprintf(buf, ITEM_LABEL_LENGTH, "Not Available");
1674
0
}
1675
1676
0
static void ref_power_level(char *buf, int8_t value) {
1677
0
    if (value != 127)
1678
0
        snprintf(buf, ITEM_LABEL_LENGTH, "%i dBm", value);
1679
0
    else
1680
0
        snprintf(buf, ITEM_LABEL_LENGTH, "Not Available");
1681
0
}
1682
1683
0
static void convert_time_unit_0p5_ns(char *buf, int16_t value) {
1684
0
    if (value != (int16_t)0x8000)
1685
0
        snprintf(buf, ITEM_LABEL_LENGTH, "%g ns (%i)", 0.5 * value, value);
1686
0
    else
1687
0
        snprintf(buf, ITEM_LABEL_LENGTH, "Not Available");
1688
0
}
1689
1690
0
static void sint12_convert(char *buf, uint16_t value) {
1691
0
    if (value > 0x800)
1692
0
        snprintf(buf, ITEM_LABEL_LENGTH, "%i", (int16_t)(0xf000 + value));
1693
0
    else
1694
0
        snprintf(buf, ITEM_LABEL_LENGTH, "%i", value);
1695
0
}
1696
1697
void proto_register_bthci_evt(void);
1698
void proto_reg_handoff_bthci_evt(void);
1699
1700
static void bthci_evt_vendor_prompt(packet_info *pinfo _U_, char* result)
1701
0
{
1702
0
    snprintf(result, MAX_DECODE_AS_PROMPT_LEN, "Vendor as");
1703
0
}
1704
1705
static void *bthci_evt_vendor_value(packet_info *pinfo _U_)
1706
0
{
1707
0
    return NULL;
1708
0
}
1709
1710
1
static void add_opcode(wmem_allocator_t *scope, wmem_list_t *opcode_list, uint16_t opcode, enum command_status command_status) {
1711
1
    opcode_list_data_t *opcode_list_data;
1712
1713
1
    opcode_list_data = wmem_new(scope, opcode_list_data_t);
1714
1
    if (opcode_list_data) {
1715
1
        opcode_list_data->opcode  = opcode;
1716
1
        opcode_list_data->command_status = command_status;
1717
1
        wmem_list_append(opcode_list, opcode_list_data);
1718
1
    }
1719
1
}
1720
1721
static void
1722
save_remote_device_name(tvbuff_t *tvb, int offset, packet_info *pinfo,
1723
        uint8_t size, uint8_t *bd_addr, bluetooth_data_t *bluetooth_data)
1724
9
{
1725
9
    int              i = 0;
1726
9
    uint8_t          length;
1727
9
    wmem_tree_key_t  key[6];
1728
9
    uint32_t         interface_id;
1729
9
    uint32_t         adapter_id;
1730
9
    uint32_t         bd_addr_oui;
1731
9
    uint32_t         bd_addr_id;
1732
9
    uint32_t         frame_number;
1733
9
    char            *name;
1734
9
    device_name_t   *device_name;
1735
1736
9
    if (!(!pinfo->fd->visited && bd_addr)) return;
1737
1738
9
    interface_id = bluetooth_data->interface_id;
1739
9
    adapter_id   = bluetooth_data->adapter_id;
1740
1741
52
    while (i < size) {
1742
50
        length = tvb_get_uint8(tvb, offset + i);
1743
50
        if (length == 0) break;
1744
1745
45
        switch(tvb_get_uint8(tvb, offset + i + 1)) {
1746
1
        case 0x08: /* Device Name, shortened */
1747
2
        case 0x09: /* Device Name, full */
1748
2
            name = tvb_get_string_enc(pinfo->pool, tvb, offset + i + 2, length - 1, ENC_UTF_8);
1749
1750
2
            frame_number = pinfo->num;
1751
2
            bd_addr_oui = bd_addr[0] << 16 | bd_addr[1] << 8 | bd_addr[2];
1752
2
            bd_addr_id  = bd_addr[3] << 16 | bd_addr[4] << 8 | bd_addr[5];
1753
1754
2
            key[0].length = 1;
1755
2
            key[0].key    = &interface_id;
1756
2
            key[1].length = 1;
1757
2
            key[1].key    = &adapter_id;
1758
2
            key[2].length = 1;
1759
2
            key[2].key    = &bd_addr_id;
1760
2
            key[3].length = 1;
1761
2
            key[3].key    = &bd_addr_oui;
1762
2
            key[4].length = 1;
1763
2
            key[4].key    = &frame_number;
1764
2
            key[5].length = 0;
1765
2
            key[5].key    = NULL;
1766
1767
2
            device_name = (device_name_t *) wmem_new(wmem_file_scope(), device_name_t);
1768
2
            device_name->bd_addr_oui =  bd_addr[0] << 16 | bd_addr[1] << 8 | bd_addr[2];
1769
2
            device_name->bd_addr_id =  bd_addr[3] << 16 | bd_addr[4] << 8 | bd_addr[5];
1770
2
            device_name->name = wmem_strdup(wmem_file_scope(), name);
1771
1772
2
            wmem_tree_insert32_array(bluetooth_data->bdaddr_to_name, key, device_name);
1773
1774
2
            break;
1775
45
        }
1776
1777
43
        i += length + 1;
1778
43
    }
1779
9
}
1780
1781
static void send_hci_summary_status_tap(uint8_t status, packet_info *pinfo, bluetooth_data_t *bluetooth_data)
1782
2
{
1783
2
    if (have_tap_listener(bluetooth_hci_summary_tap)) {
1784
0
        bluetooth_hci_summary_tap_t  *tap_hci_summary;
1785
1786
0
        tap_hci_summary = wmem_new(pinfo->pool, bluetooth_hci_summary_tap_t);
1787
1788
0
        tap_hci_summary->interface_id  = bluetooth_data->interface_id;
1789
0
        tap_hci_summary->adapter_id    = bluetooth_data->adapter_id;
1790
1791
0
        tap_hci_summary->type = BLUETOOTH_HCI_SUMMARY_STATUS;
1792
0
        tap_hci_summary->status = status;
1793
0
        if (try_val_to_str_ext(status, &bthci_cmd_status_vals_ext))
1794
0
            tap_hci_summary->name = val_to_str_ext(status, &bthci_cmd_status_vals_ext, "Unknown 0x%02x");
1795
0
        else
1796
0
            tap_hci_summary->name = NULL;
1797
0
        tap_queue_packet(bluetooth_hci_summary_tap, pinfo, tap_hci_summary);
1798
0
    }
1799
2
}
1800
1801
static void send_hci_summary_pending_tap(packet_info *pinfo, bluetooth_data_t *bluetooth_data)
1802
0
{
1803
0
    if (have_tap_listener(bluetooth_hci_summary_tap)) {
1804
0
        bluetooth_hci_summary_tap_t  *tap_hci_summary;
1805
1806
0
        tap_hci_summary = wmem_new(pinfo->pool, bluetooth_hci_summary_tap_t);
1807
1808
0
        tap_hci_summary->interface_id  = bluetooth_data->interface_id;
1809
0
        tap_hci_summary->adapter_id    = bluetooth_data->adapter_id;
1810
1811
0
        tap_hci_summary->type = BLUETOOTH_HCI_SUMMARY_STATUS_PENDING;
1812
0
        tap_hci_summary->status = 0;
1813
0
        tap_hci_summary->name = "Pending";
1814
0
        tap_queue_packet(bluetooth_hci_summary_tap, pinfo, tap_hci_summary);
1815
0
    }
1816
0
}
1817
1818
static void send_hci_summary_reason_tap(uint8_t reason, packet_info *pinfo, bluetooth_data_t *bluetooth_data)
1819
0
{
1820
0
    if (have_tap_listener(bluetooth_hci_summary_tap)) {
1821
0
        bluetooth_hci_summary_tap_t  *tap_hci_summary;
1822
1823
0
        tap_hci_summary = wmem_new(pinfo->pool, bluetooth_hci_summary_tap_t);
1824
1825
0
        tap_hci_summary->interface_id  = bluetooth_data->interface_id;
1826
0
        tap_hci_summary->adapter_id    = bluetooth_data->adapter_id;
1827
1828
0
        tap_hci_summary->type = BLUETOOTH_HCI_SUMMARY_REASON;
1829
0
        tap_hci_summary->reason = reason;
1830
0
        if (try_val_to_str_ext(reason, &bthci_cmd_status_vals_ext))
1831
0
            tap_hci_summary->name = val_to_str_ext(reason, &bthci_cmd_status_vals_ext, "Unknown 0x%02x");
1832
0
        else
1833
0
            tap_hci_summary->name = NULL;
1834
0
        tap_queue_packet(bluetooth_hci_summary_tap, pinfo, tap_hci_summary);
1835
0
    }
1836
0
}
1837
1838
static int
1839
dissect_iq_sample_list(tvbuff_t *tvb, int offset, proto_tree *tree)
1840
0
{
1841
0
    uint8_t samples;
1842
1843
0
    proto_tree_add_item(tree, hf_bthci_evt_sample_count, tvb, offset, 1, ENC_NA);
1844
0
    samples = tvb_get_uint8(tvb, offset);
1845
0
    offset += 1;
1846
1847
0
    if (samples > 0) {
1848
0
        uint8_t i;
1849
0
        proto_item *sub_item;
1850
0
        proto_tree *sub_tree;
1851
1852
0
        sub_item = proto_tree_add_none_format(tree, hf_bthci_evt_le_report, tvb, offset, 2 * samples, "IQ Samples");
1853
0
        sub_tree = proto_item_add_subtree(sub_item, ett_iq_sample_list);
1854
1855
0
        for (i = 0; i < samples; i++) {
1856
0
            proto_item *sample_item;
1857
0
            proto_tree *sample_tree;
1858
1859
0
            sample_item = proto_tree_add_none_format(sub_tree, hf_bthci_evt_le_report, tvb, offset, 2, "Sample %2d, I:%4d, Q:%4d",
1860
0
                                                        i, tvb_get_int8(tvb, offset), tvb_get_int8(tvb, offset+1));
1861
0
            sample_tree = proto_item_add_subtree(sample_item, ett_iq_samples);
1862
1863
0
            proto_tree_add_item(sample_tree, hf_bthci_evt_i_sample, tvb, offset, 1, ENC_NA);
1864
0
            offset += 1;
1865
0
            proto_tree_add_item(sample_tree, hf_bthci_evt_q_sample, tvb, offset, 1, ENC_NA);
1866
0
            offset += 1;
1867
0
        }
1868
0
    }
1869
0
    return offset;
1870
0
}
1871
1872
1873
static int
1874
dissect_bthci_evt_inquire_complete(tvbuff_t *tvb, int offset, packet_info *pinfo,
1875
        proto_tree *tree, bluetooth_data_t *bluetooth_data)
1876
0
{
1877
0
    proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN);
1878
0
    send_hci_summary_status_tap(tvb_get_uint8(tvb, offset), pinfo, bluetooth_data);
1879
0
    offset += 1;
1880
1881
0
    return offset;
1882
0
}
1883
1884
static int
1885
dissect_bthci_evt_connect_complete(tvbuff_t *tvb, int offset, packet_info *pinfo,
1886
        proto_tree *tree, bluetooth_data_t *bluetooth_data)
1887
0
{
1888
0
    uint32_t      connection_handle;
1889
0
    uint8_t       bd_addr[6];
1890
0
    uint8_t       status;
1891
1892
0
    proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN);
1893
0
    status = tvb_get_uint8(tvb, offset);
1894
0
    send_hci_summary_status_tap(status, pinfo, bluetooth_data);
1895
0
    offset += 1;
1896
1897
0
    connection_handle = tvb_get_letohs(tvb, offset) & 0x0FFF;
1898
0
    proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
1899
0
    offset += 2;
1900
1901
0
    offset = dissect_bd_addr(hf_bthci_evt_bd_addr, pinfo, tree, tvb, offset, false, bluetooth_data->interface_id, bluetooth_data->adapter_id, bd_addr);
1902
0
    if (!pinfo->fd->visited && status == STATUS_SUCCESS) {
1903
0
        wmem_tree_key_t    key[5];
1904
0
        uint32_t           k_interface_id;
1905
0
        uint32_t           k_adapter_id;
1906
0
        uint32_t           k_connection_handle;
1907
0
        uint32_t           k_frame_number;
1908
0
        remote_bdaddr_t   *remote_bdaddr;
1909
0
        chandle_session_t *chandle_session;
1910
0
        connection_mode_t *connection_mode;
1911
1912
0
        k_interface_id = bluetooth_data->interface_id;
1913
0
        k_adapter_id = bluetooth_data->adapter_id;
1914
0
        k_connection_handle = connection_handle;
1915
0
        k_frame_number = pinfo->num;
1916
1917
0
        key[0].length = 1;
1918
0
        key[0].key    = &k_interface_id;
1919
0
        key[1].length = 1;
1920
0
        key[1].key    = &k_adapter_id;
1921
0
        key[2].length = 1;
1922
0
        key[2].key    = &k_connection_handle;
1923
0
        key[3].length = 1;
1924
0
        key[3].key    = &k_frame_number;
1925
0
        key[4].length = 0;
1926
0
        key[4].key    = NULL;
1927
1928
0
        remote_bdaddr = (remote_bdaddr_t *) wmem_new(wmem_file_scope(), remote_bdaddr_t);
1929
0
        remote_bdaddr->interface_id = bluetooth_data->interface_id;
1930
0
        remote_bdaddr->adapter_id = bluetooth_data->adapter_id;
1931
0
        remote_bdaddr->chandle = connection_handle;
1932
0
        memcpy(remote_bdaddr->bd_addr, bd_addr, 6);
1933
1934
0
        wmem_tree_insert32_array(bluetooth_data->chandle_to_bdaddr, key, remote_bdaddr);
1935
1936
0
        chandle_session = (chandle_session_t *) wmem_new(wmem_file_scope(), chandle_session_t);
1937
0
        chandle_session->connect_in_frame = k_frame_number;
1938
0
        chandle_session->disconnect_in_frame = bluetooth_max_disconnect_in_frame;
1939
0
        chandle_session->link_type = BT_LINK_TYPE_ACL;
1940
0
        wmem_tree_insert32_array(bluetooth_data->chandle_sessions, key, chandle_session);
1941
1942
0
        connection_mode = (connection_mode_t *) wmem_new(wmem_file_scope(), connection_mode_t);
1943
0
        connection_mode->mode = 0;
1944
0
        connection_mode->change_in_frame = k_frame_number;
1945
1946
0
        wmem_tree_insert32_array(bluetooth_data->chandle_to_mode, key, connection_mode);
1947
0
    }
1948
1949
0
    proto_tree_add_item(tree, hf_bthci_evt_link_type, tvb, offset, 1, ENC_LITTLE_ENDIAN);
1950
0
    offset += 1;
1951
1952
0
    proto_tree_add_item(tree, hf_bthci_evt_encryption_mode, tvb, offset, 1, ENC_LITTLE_ENDIAN);
1953
0
    offset += 1;
1954
1955
0
    return offset;
1956
0
}
1957
1958
static int
1959
dissect_bthci_evt_connect_request(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, bluetooth_data_t *bluetooth_data)
1960
1
{
1961
1
    offset = dissect_bd_addr(hf_bthci_evt_bd_addr, pinfo, tree, tvb, offset, false, bluetooth_data->interface_id, bluetooth_data->adapter_id, NULL);
1962
1963
1
    call_dissector(btcommon_cod_handle, tvb_new_subset_length(tvb, offset, 3), pinfo, tree);
1964
1
    offset += 3;
1965
1966
1
    proto_tree_add_item(tree, hf_bthci_evt_link_type, tvb, offset, 1, ENC_LITTLE_ENDIAN);
1967
1
    offset += 1;
1968
1969
1
    return offset;
1970
1
}
1971
1972
static int
1973
dissect_bthci_evt_disconnect_complete(tvbuff_t *tvb, int offset, packet_info *pinfo,
1974
        proto_tree *tree, bluetooth_data_t *bluetooth_data)
1975
0
{
1976
0
    uint32_t         connection_handle;
1977
0
    uint8_t          status;
1978
1979
0
    proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN);
1980
0
    status = tvb_get_uint8(tvb, offset);
1981
0
    send_hci_summary_status_tap(status, pinfo, bluetooth_data);
1982
0
    offset += 1;
1983
1984
0
    proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
1985
0
    connection_handle = tvb_get_letohs(tvb, offset) & 0x0FFF;
1986
0
    offset += 2;
1987
1988
0
    proto_tree_add_item(tree, hf_bthci_evt_reason, tvb, offset, 1, ENC_LITTLE_ENDIAN);
1989
0
    send_hci_summary_reason_tap(tvb_get_uint8(tvb, offset), pinfo, bluetooth_data);
1990
0
    offset += 1;
1991
1992
0
    if (!pinfo->fd->visited && status == STATUS_SUCCESS) {
1993
0
        wmem_tree_key_t     key[4];
1994
0
        uint32_t            interface_id;
1995
0
        uint32_t            adapter_id;
1996
0
        chandle_session_t  *chandle_session;
1997
0
        wmem_tree_t        *subtree;
1998
1999
0
        interface_id      = bluetooth_data->interface_id;
2000
0
        adapter_id        = bluetooth_data->adapter_id;
2001
2002
0
        key[0].length = 1;
2003
0
        key[0].key    = &interface_id;
2004
0
        key[1].length = 1;
2005
0
        key[1].key    = &adapter_id;
2006
0
        key[2].length = 1;
2007
0
        key[2].key    = &connection_handle;
2008
0
        key[3].length = 0;
2009
0
        key[3].key    = NULL;
2010
2011
0
        subtree = (wmem_tree_t *) wmem_tree_lookup32_array(bluetooth_data->chandle_sessions, key);
2012
0
        chandle_session = (subtree) ? (chandle_session_t *) wmem_tree_lookup32_le(subtree, pinfo->num) : NULL;
2013
0
        if (chandle_session && chandle_session->connect_in_frame < pinfo->num)
2014
0
            chandle_session->disconnect_in_frame = pinfo->num;
2015
0
    }
2016
2017
0
    return offset;
2018
0
}
2019
2020
static int
2021
dissect_bthci_evt_auth_complete(tvbuff_t *tvb, int offset, packet_info *pinfo,
2022
        proto_tree *tree, bluetooth_data_t *bluetooth_data)
2023
0
{
2024
0
    proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN);
2025
0
    send_hci_summary_status_tap(tvb_get_uint8(tvb, offset), pinfo, bluetooth_data);
2026
0
    offset += 1;
2027
2028
0
    proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
2029
0
    offset += 2;
2030
2031
0
    return offset;
2032
0
}
2033
2034
static int
2035
dissect_bthci_evt_lmp_features(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, uint8_t page_numer)
2036
0
{
2037
0
    uint8_t     fc_lag;
2038
0
    proto_item *fl_lag_item;
2039
0
    proto_tree *lmp_tree = NULL;
2040
2041
0
    if (tree) {
2042
0
        proto_item *lmp_item;
2043
2044
0
        lmp_item = proto_tree_add_item(tree, hf_lmp_features, tvb, offset, 8, ENC_NA);
2045
0
        lmp_tree = proto_item_add_subtree(lmp_item, ett_lmp_subtree);
2046
0
    }
2047
2048
0
    switch (page_numer) {
2049
0
    case 0:
2050
0
        proto_tree_add_item(lmp_tree, hf_lmp_feature_3slot_packets,                          tvb, offset, 1, ENC_LITTLE_ENDIAN);
2051
0
        proto_tree_add_item(lmp_tree, hf_lmp_feature_5slot_packets,                          tvb, offset, 1, ENC_LITTLE_ENDIAN);
2052
0
        proto_tree_add_item(lmp_tree, hf_lmp_feature_encryption,                             tvb, offset, 1, ENC_LITTLE_ENDIAN);
2053
0
        proto_tree_add_item(lmp_tree, hf_lmp_feature_slot_offset,                            tvb, offset, 1, ENC_LITTLE_ENDIAN);
2054
0
        proto_tree_add_item(lmp_tree, hf_lmp_feature_timing_accuracy,                        tvb, offset, 1, ENC_LITTLE_ENDIAN);
2055
0
        proto_tree_add_item(lmp_tree, hf_lmp_feature_role_switch,                            tvb, offset, 1, ENC_LITTLE_ENDIAN);
2056
0
        proto_tree_add_item(lmp_tree, hf_lmp_feature_hold_mode,                              tvb, offset, 1, ENC_LITTLE_ENDIAN);
2057
0
        proto_tree_add_item(lmp_tree, hf_lmp_feature_sniff_mode,                             tvb, offset, 1, ENC_LITTLE_ENDIAN);
2058
0
        offset += 1;
2059
2060
0
        proto_tree_add_item(lmp_tree, hf_lmp_feature_park_state,                             tvb, offset, 1, ENC_LITTLE_ENDIAN);
2061
0
        proto_tree_add_item(lmp_tree, hf_lmp_feature_power_control_requests,                 tvb, offset, 1, ENC_LITTLE_ENDIAN);
2062
0
        proto_tree_add_item(lmp_tree, hf_lmp_feature_channel_quality_driven_data_rate,       tvb, offset, 1, ENC_LITTLE_ENDIAN);
2063
0
        proto_tree_add_item(lmp_tree, hf_lmp_feature_sco_link,                               tvb, offset, 1, ENC_LITTLE_ENDIAN);
2064
0
        proto_tree_add_item(lmp_tree, hf_lmp_feature_hv2_packets,                            tvb, offset, 1, ENC_LITTLE_ENDIAN);
2065
0
        proto_tree_add_item(lmp_tree, hf_lmp_feature_hv3_packets,                            tvb, offset, 1, ENC_LITTLE_ENDIAN);
2066
0
        proto_tree_add_item(lmp_tree, hf_lmp_feature_u_law_log_synchronous_data,             tvb, offset, 1, ENC_LITTLE_ENDIAN);
2067
0
        proto_tree_add_item(lmp_tree, hf_lmp_feature_a_law_log_synchronous_data,             tvb, offset, 1, ENC_LITTLE_ENDIAN);
2068
0
        offset += 1;
2069
2070
0
        proto_tree_add_item(lmp_tree, hf_lmp_feature_cvsd_synchronous_data,                  tvb, offset, 1, ENC_LITTLE_ENDIAN);
2071
0
        proto_tree_add_item(lmp_tree, hf_lmp_feature_paging_parameter_negotiation,           tvb, offset, 1, ENC_LITTLE_ENDIAN);
2072
0
        proto_tree_add_item(lmp_tree, hf_lmp_feature_power_control,                          tvb, offset, 1, ENC_LITTLE_ENDIAN);
2073
0
        proto_tree_add_item(lmp_tree, hf_lmp_feature_transparent_synchronous_data,           tvb, offset, 1, ENC_LITTLE_ENDIAN);
2074
0
        fl_lag_item = proto_tree_add_item(lmp_tree,hf_lmp_feature_flow_control_lag,          tvb, offset, 1, ENC_LITTLE_ENDIAN);
2075
0
        fc_lag = (tvb_get_uint8(tvb, offset) & 0x70) >> 4;
2076
0
        proto_item_append_text(fl_lag_item, " (%i bytes)", 256 * fc_lag);
2077
2078
0
        proto_tree_add_item(lmp_tree,hf_lmp_feature_broadcast_encryption,                    tvb, offset, 1, ENC_LITTLE_ENDIAN);
2079
0
        offset += 1;
2080
2081
0
        proto_tree_add_item(lmp_tree, hf_lmp_feature_reserved_24,                            tvb, offset, 1, ENC_NA);
2082
0
        proto_tree_add_item(lmp_tree, hf_lmp_feature_edr_acl_2mbps_mode,                     tvb, offset, 1, ENC_LITTLE_ENDIAN);
2083
0
        proto_tree_add_item(lmp_tree, hf_lmp_feature_edr_acl_3mbps_mode,                     tvb, offset, 1, ENC_LITTLE_ENDIAN);
2084
0
        proto_tree_add_item(lmp_tree, hf_lmp_feature_enhanced_inquiry_scan,                  tvb, offset, 1, ENC_LITTLE_ENDIAN);
2085
0
        proto_tree_add_item(lmp_tree, hf_lmp_feature_interlaced_inquiry_scan,                tvb, offset, 1, ENC_LITTLE_ENDIAN);
2086
0
        proto_tree_add_item(lmp_tree, hf_lmp_feature_interlaced_page_scan,                   tvb, offset, 1, ENC_LITTLE_ENDIAN);
2087
0
        proto_tree_add_item(lmp_tree, hf_lmp_feature_rssi_with_inquiry_results,              tvb, offset, 1, ENC_LITTLE_ENDIAN);
2088
0
        proto_tree_add_item(lmp_tree, hf_lmp_feature_ev3_packets,                            tvb, offset, 1, ENC_LITTLE_ENDIAN);
2089
0
        offset += 1;
2090
2091
0
        proto_tree_add_item(lmp_tree, hf_lmp_feature_ev4_packets,                            tvb, offset, 1, ENC_LITTLE_ENDIAN);
2092
0
        proto_tree_add_item(lmp_tree, hf_lmp_feature_ev5_packets,                            tvb, offset, 1, ENC_LITTLE_ENDIAN);
2093
0
        proto_tree_add_item(lmp_tree, hf_lmp_feature_reserved_34,                            tvb, offset, 1, ENC_LITTLE_ENDIAN);
2094
0
        proto_tree_add_item(lmp_tree, hf_lmp_feature_afh_capable_peripheral,                 tvb, offset, 1, ENC_LITTLE_ENDIAN);
2095
0
        proto_tree_add_item(lmp_tree, hf_lmp_feature_afh_classification_peripheral,          tvb, offset, 1, ENC_LITTLE_ENDIAN);
2096
0
        proto_tree_add_item(lmp_tree, hf_lmp_feature_br_edr_not_supported,                   tvb, offset, 1, ENC_LITTLE_ENDIAN);
2097
0
        proto_tree_add_item(lmp_tree, hf_lmp_feature_le_supported_controller,                tvb, offset, 1, ENC_LITTLE_ENDIAN);
2098
0
        proto_tree_add_item(lmp_tree, hf_lmp_feature_3slot_edr_acl_packets,                  tvb, offset, 1, ENC_LITTLE_ENDIAN);
2099
0
        offset += 1;
2100
2101
0
        proto_tree_add_item(lmp_tree, hf_lmp_feature_5slot_edr_acl_packets,                  tvb, offset, 1, ENC_LITTLE_ENDIAN);
2102
0
        proto_tree_add_item(lmp_tree, hf_lmp_feature_sniff_subrating,                        tvb, offset, 1, ENC_LITTLE_ENDIAN);
2103
0
        proto_tree_add_item(lmp_tree, hf_lmp_feature_pause_encryption,                       tvb, offset, 1, ENC_LITTLE_ENDIAN);
2104
0
        proto_tree_add_item(lmp_tree, hf_lmp_feature_afh_capable_central,                    tvb, offset, 1, ENC_LITTLE_ENDIAN);
2105
0
        proto_tree_add_item(lmp_tree, hf_lmp_feature_afh_classification_central,             tvb, offset, 1, ENC_LITTLE_ENDIAN);
2106
0
        proto_tree_add_item(lmp_tree, hf_lmp_feature_edr_esco_2mbps_mode,                    tvb, offset, 1, ENC_LITTLE_ENDIAN);
2107
0
        proto_tree_add_item(lmp_tree, hf_lmp_feature_edr_esco_3mbps_mode,                    tvb, offset, 1, ENC_LITTLE_ENDIAN);
2108
0
        proto_tree_add_item(lmp_tree, hf_lmp_feature_3slot_edr_esco_packets,                 tvb, offset, 1, ENC_LITTLE_ENDIAN);
2109
0
        offset += 1;
2110
2111
0
        proto_tree_add_item(lmp_tree, hf_lmp_feature_extended_inquiry_response,              tvb, offset, 1, ENC_LITTLE_ENDIAN);
2112
0
        proto_tree_add_item(lmp_tree, hf_lmp_feature_simultaneous_le_and_br_edr_controller,  tvb, offset, 1, ENC_LITTLE_ENDIAN);
2113
0
        proto_tree_add_item(lmp_tree, hf_lmp_feature_reserved_50,                            tvb, offset, 1, ENC_LITTLE_ENDIAN);
2114
0
        proto_tree_add_item(lmp_tree, hf_lmp_feature_secure_simple_pairing,                  tvb, offset, 1, ENC_LITTLE_ENDIAN);
2115
0
        proto_tree_add_item(lmp_tree, hf_lmp_feature_encapsulated_pdu,                       tvb, offset, 1, ENC_LITTLE_ENDIAN);
2116
0
        proto_tree_add_item(lmp_tree, hf_lmp_feature_erroneous_data_reporting,               tvb, offset, 1, ENC_LITTLE_ENDIAN);
2117
0
        proto_tree_add_item(lmp_tree, hf_lmp_feature_non_flushable_packet_boundary_flag,     tvb, offset, 1, ENC_LITTLE_ENDIAN);
2118
0
        proto_tree_add_item(lmp_tree, hf_lmp_feature_reserved_55,                            tvb, offset, 1, ENC_LITTLE_ENDIAN);
2119
0
        offset += 1;
2120
2121
0
        proto_tree_add_item(lmp_tree, hf_lmp_feature_link_supervision_timeout_changed_event, tvb, offset, 1, ENC_LITTLE_ENDIAN);
2122
0
        proto_tree_add_item(lmp_tree, hf_lmp_feature_inquiry_tx_power_level,                 tvb, offset, 1, ENC_LITTLE_ENDIAN);
2123
0
        proto_tree_add_item(lmp_tree, hf_lmp_feature_enhanced_power_control,                 tvb, offset, 1, ENC_LITTLE_ENDIAN);
2124
0
        proto_tree_add_item(lmp_tree, hf_lmp_feature_reserved_59_62,                         tvb, offset, 1, ENC_LITTLE_ENDIAN);
2125
0
        proto_tree_add_item(lmp_tree, hf_lmp_feature_extended_features,                      tvb, offset, 1, ENC_LITTLE_ENDIAN);
2126
0
        offset += 1;
2127
2128
0
        break;
2129
0
    case 1:
2130
0
        proto_tree_add_item(lmp_tree, hf_lmp_feature_secure_simple_pairing_host,             tvb, offset, 1, ENC_LITTLE_ENDIAN);
2131
0
        proto_tree_add_item(lmp_tree, hf_lmp_feature_le_supported_host,                      tvb, offset, 1, ENC_LITTLE_ENDIAN);
2132
0
        proto_tree_add_item(lmp_tree, hf_lmp_feature_simultaneous_le_and_br_edr_host,        tvb, offset, 1, ENC_LITTLE_ENDIAN);
2133
0
        proto_tree_add_item(lmp_tree, hf_lmp_feature_secure_connections_host,                tvb, offset, 1, ENC_LITTLE_ENDIAN);
2134
0
        proto_tree_add_item(lmp_tree, hf_lmp_feature_reserved_68_71,                         tvb, offset, 1, ENC_LITTLE_ENDIAN);
2135
0
        offset += 1;
2136
2137
0
        proto_tree_add_item(lmp_tree, hf_lmp_feature_reserved,                               tvb, offset, 7, ENC_NA);
2138
0
        offset += 7;
2139
2140
0
        break;
2141
0
    case 2:
2142
0
        proto_tree_add_item(lmp_tree, hf_lmp_feature_cpb_central_operation,                  tvb, offset, 1, ENC_LITTLE_ENDIAN);
2143
0
        proto_tree_add_item(lmp_tree, hf_lmp_feature_cpb_peripheral_operation,               tvb, offset, 1, ENC_LITTLE_ENDIAN);
2144
0
        proto_tree_add_item(lmp_tree, hf_lmp_feature_synchronization_train,                  tvb, offset, 1, ENC_LITTLE_ENDIAN);
2145
0
        proto_tree_add_item(lmp_tree, hf_lmp_feature_synchronization_scan,                   tvb, offset, 1, ENC_LITTLE_ENDIAN);
2146
0
        proto_tree_add_item(lmp_tree, hf_lmp_feature_inquiry_response_notification_event,    tvb, offset, 1, ENC_LITTLE_ENDIAN);
2147
0
        proto_tree_add_item(lmp_tree, hf_lmp_feature_generalized_interlaced_scan,            tvb, offset, 1, ENC_LITTLE_ENDIAN);
2148
0
        proto_tree_add_item(lmp_tree, hf_lmp_feature_coarse_clock_adjustment,                tvb, offset, 1, ENC_LITTLE_ENDIAN);
2149
0
        proto_tree_add_item(lmp_tree, hf_lmp_feature_reserved_135,                           tvb, offset, 1, ENC_LITTLE_ENDIAN);
2150
0
        offset += 1;
2151
2152
0
        proto_tree_add_item(lmp_tree, hf_lmp_feature_secure_connections_controller,          tvb, offset, 1, ENC_LITTLE_ENDIAN);
2153
0
        proto_tree_add_item(lmp_tree, hf_lmp_feature_ping,                                   tvb, offset, 1, ENC_LITTLE_ENDIAN);
2154
0
        proto_tree_add_item(lmp_tree, hf_lmp_feature_reserved_138,                           tvb, offset, 1, ENC_LITTLE_ENDIAN);
2155
0
        proto_tree_add_item(lmp_tree, hf_lmp_feature_train_nudging,                          tvb, offset, 1, ENC_LITTLE_ENDIAN);
2156
0
        proto_tree_add_item(lmp_tree, hf_lmp_feature_slot_availability_mask,                 tvb, offset, 1, ENC_LITTLE_ENDIAN);
2157
0
        offset += 1;
2158
2159
0
        proto_tree_add_item(lmp_tree, hf_lmp_feature_reserved,                               tvb, offset, 6, ENC_NA);
2160
0
        offset += 6;
2161
2162
0
        break;
2163
0
    default:
2164
0
        proto_tree_add_item(lmp_tree, hf_lmp_feature_reserved,                               tvb, offset, 8, ENC_NA);
2165
0
        offset += 8;
2166
0
    }
2167
2168
0
    return offset;
2169
0
}
2170
2171
static int
2172
dissect_bthci_evt_pin_code_request(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, bluetooth_data_t *bluetooth_data)
2173
0
{
2174
0
    offset = dissect_bd_addr(hf_bthci_evt_bd_addr, pinfo, tree, tvb, offset, false, bluetooth_data->interface_id, bluetooth_data->adapter_id, NULL);
2175
2176
0
    return offset;
2177
0
}
2178
2179
static int
2180
dissect_bthci_evt_link_key_request(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, bluetooth_data_t *bluetooth_data)
2181
0
{
2182
0
    offset = dissect_bd_addr(hf_bthci_evt_bd_addr, pinfo, tree, tvb, offset, false, bluetooth_data->interface_id, bluetooth_data->adapter_id, NULL);
2183
2184
0
    return offset;
2185
0
}
2186
2187
static int
2188
dissect_bthci_evt_link_key_notification(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, bluetooth_data_t *bluetooth_data)
2189
0
{
2190
0
    offset = dissect_bd_addr(hf_bthci_evt_bd_addr, pinfo, tree, tvb, offset, false, bluetooth_data->interface_id, bluetooth_data->adapter_id, NULL);
2191
2192
0
    proto_tree_add_item(tree, hf_bthci_evt_link_key, tvb, offset, 16, ENC_NA);
2193
0
    offset += 16;
2194
2195
0
    proto_tree_add_item(tree, hf_bthci_evt_key_type, tvb, offset, 1, ENC_LITTLE_ENDIAN);
2196
0
    offset += 1;
2197
2198
0
    return offset;
2199
0
}
2200
2201
static int
2202
dissect_bthci_evt_return_link_keys(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, bluetooth_data_t *bluetooth_data)
2203
0
{
2204
0
    uint8_t evt_num_keys;
2205
2206
0
    evt_num_keys = tvb_get_uint8(tvb, offset);
2207
0
    proto_tree_add_item(tree, hf_bthci_evt_num_keys, tvb, offset, 1, ENC_LITTLE_ENDIAN);
2208
0
    offset += 1;
2209
2210
0
    while (evt_num_keys--) {
2211
0
        offset = dissect_bd_addr(hf_bthci_evt_bd_addr, pinfo, tree, tvb, offset, false, bluetooth_data->interface_id, bluetooth_data->adapter_id, NULL);
2212
2213
0
        proto_tree_add_item(tree, hf_bthci_evt_link_key, tvb, offset, 16, ENC_NA);
2214
0
        offset += 16;
2215
2216
0
    }
2217
2218
0
    return offset;
2219
0
}
2220
2221
static int
2222
dissect_bthci_evt_read_remote_support_features_complete(tvbuff_t *tvb, int offset,
2223
        packet_info *pinfo, proto_tree *tree, bluetooth_data_t *bluetooth_data)
2224
0
{
2225
0
    proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN);
2226
0
    send_hci_summary_status_tap(tvb_get_uint8(tvb, offset), pinfo, bluetooth_data);
2227
0
    offset += 1;
2228
2229
0
    proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
2230
0
    offset += 2;
2231
2232
0
    offset = dissect_bthci_evt_lmp_features(tvb, offset, pinfo, tree, 0);
2233
2234
0
    return offset;
2235
0
}
2236
2237
static int
2238
dissect_bthci_evt_remote_name_req_complete(tvbuff_t *tvb, int offset,
2239
        packet_info *pinfo, proto_tree *tree, bluetooth_data_t *bluetooth_data)
2240
0
{
2241
0
    uint8_t     bd_addr[6];
2242
2243
0
    proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN);
2244
0
    send_hci_summary_status_tap(tvb_get_uint8(tvb, offset), pinfo, bluetooth_data);
2245
0
    offset += 1;
2246
2247
0
    offset = dissect_bd_addr(hf_bthci_evt_bd_addr, pinfo, tree, tvb, offset, false, bluetooth_data->interface_id, bluetooth_data->adapter_id, bd_addr);
2248
2249
0
    proto_tree_add_item(tree, hf_bthci_evt_remote_name, tvb, offset, 248, ENC_UTF_8);
2250
0
    if (!pinfo->fd->visited) {
2251
0
        wmem_tree_key_t key[6];
2252
0
        uint32_t        interface_id;
2253
0
        uint32_t        adapter_id;
2254
0
        uint32_t        bd_addr_oui;
2255
0
        uint32_t        bd_addr_id;
2256
0
        uint32_t        frame_number;
2257
0
        char            *name;
2258
0
        device_name_t   *device_name;
2259
2260
0
        name = tvb_get_string_enc(wmem_file_scope(), tvb, offset, 248, ENC_UTF_8);
2261
0
        interface_id = bluetooth_data->interface_id;
2262
0
        adapter_id   = bluetooth_data->adapter_id;
2263
0
        frame_number = pinfo->num;
2264
0
        bd_addr_oui  = bd_addr[0] << 16 | bd_addr[1] << 8 | bd_addr[2];
2265
0
        bd_addr_id   = bd_addr[3] << 16 | bd_addr[4] << 8 | bd_addr[5];
2266
2267
0
        key[0].length = 1;
2268
0
        key[0].key    = &interface_id;
2269
0
        key[1].length = 1;
2270
0
        key[1].key    = &adapter_id;
2271
0
        key[2].length = 1;
2272
0
        key[2].key    = &bd_addr_id;
2273
0
        key[3].length = 1;
2274
0
        key[3].key    = &bd_addr_oui;
2275
0
        key[4].length = 1;
2276
0
        key[4].key    = &frame_number;
2277
0
        key[5].length = 0;
2278
0
        key[5].key    = NULL;
2279
2280
0
        device_name = (device_name_t *) wmem_new(wmem_file_scope(), device_name_t);
2281
0
        device_name->bd_addr_oui =  bd_addr[0] << 16 | bd_addr[1] << 8 | bd_addr[2];
2282
0
        device_name->bd_addr_id =  bd_addr[3] << 16 | bd_addr[4] << 8 | bd_addr[5];
2283
0
        device_name->name = name;
2284
2285
0
        wmem_tree_insert32_array(bluetooth_data->bdaddr_to_name, key, device_name);
2286
0
    }
2287
2288
0
    if (have_tap_listener(bluetooth_device_tap)) {
2289
0
        bluetooth_device_tap_t  *tap_device;
2290
2291
0
        tap_device = wmem_new(pinfo->pool, bluetooth_device_tap_t);
2292
0
        tap_device->interface_id  = bluetooth_data->interface_id;
2293
0
        tap_device->adapter_id    = bluetooth_data->adapter_id;
2294
0
        memcpy(tap_device->bd_addr, bd_addr, 6);
2295
0
        tap_device->has_bd_addr = true;
2296
0
        tap_device->is_local = false;
2297
0
        tap_device->type = BLUETOOTH_DEVICE_NAME;
2298
0
        tap_device->data.name = tvb_get_string_enc(pinfo->pool, tvb, offset, 248, ENC_UTF_8);
2299
0
        tap_queue_packet(bluetooth_device_tap, pinfo, tap_device);
2300
0
    }
2301
2302
0
    offset += 248;
2303
2304
0
    return offset;
2305
0
}
2306
2307
static int
2308
dissect_bthci_evt_read_remote_version_information_complete(tvbuff_t *tvb, int offset,
2309
        packet_info *pinfo, bluetooth_data_t *bluetooth_data, proto_tree *tree)
2310
0
{
2311
0
    proto_tree_add_item(tree, hf_bthci_evt_status,            tvb, offset, 1, ENC_LITTLE_ENDIAN);
2312
0
    send_hci_summary_status_tap(tvb_get_uint8(tvb, offset), pinfo, bluetooth_data);
2313
0
    offset += 1;
2314
2315
0
    proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
2316
0
    offset += 2;
2317
2318
0
    proto_tree_add_item(tree, hf_bthci_evt_vers_nr,           tvb, offset, 1, ENC_LITTLE_ENDIAN);
2319
0
    offset += 1;
2320
2321
0
    proto_tree_add_item(tree, hf_bthci_evt_comp_id,           tvb, offset, 2, ENC_LITTLE_ENDIAN);
2322
0
    offset += 2;
2323
2324
0
    proto_tree_add_item(tree, hf_bthci_evt_sub_vers_nr,       tvb, offset, 2, ENC_LITTLE_ENDIAN);
2325
0
    offset += 2;
2326
2327
0
    if (have_tap_listener(bluetooth_device_tap)) {
2328
0
        wmem_tree_t              *subtree;
2329
0
        wmem_tree_key_t           key[4];
2330
0
        uint32_t                  interface_id;
2331
0
        uint32_t                  adapter_id;
2332
0
        uint32_t                  connection_handle;
2333
0
        remote_bdaddr_t          *remote_bdaddr;
2334
0
        bluetooth_device_tap_t   *tap_device;
2335
0
        uint8_t                   lmp_version;
2336
0
        uint16_t                  lmp_subversion;
2337
0
        uint16_t                  manufacturer;
2338
2339
0
        lmp_version    = tvb_get_uint8(tvb, offset - 5);
2340
0
        manufacturer   = tvb_get_letohs(tvb, offset - 4);
2341
0
        lmp_subversion = tvb_get_letohs(tvb, offset - 2);
2342
2343
0
        interface_id      = bluetooth_data->interface_id;
2344
0
        adapter_id        = bluetooth_data->adapter_id;
2345
0
        connection_handle = tvb_get_uint16(tvb, offset - 7, ENC_LITTLE_ENDIAN) & 0x0fff;
2346
2347
0
        key[0].length = 1;
2348
0
        key[0].key    = &interface_id;
2349
0
        key[1].length = 1;
2350
0
        key[1].key    = &adapter_id;
2351
0
        key[2].length = 1;
2352
0
        key[2].key    = &connection_handle;
2353
0
        key[3].length = 0;
2354
0
        key[3].key    = NULL;
2355
2356
0
        subtree = (wmem_tree_t *) wmem_tree_lookup32_array(bluetooth_data->chandle_to_bdaddr, key);
2357
0
        remote_bdaddr = (subtree) ? (remote_bdaddr_t *) wmem_tree_lookup32_le(subtree, pinfo->num) : NULL;
2358
2359
0
        tap_device = wmem_new(pinfo->pool, bluetooth_device_tap_t);
2360
0
        tap_device->type = BLUETOOTH_DEVICE_REMOTE_VERSION;
2361
0
        tap_device->interface_id  = bluetooth_data->interface_id;
2362
0
        tap_device->adapter_id    = bluetooth_data->adapter_id;
2363
2364
0
        if (remote_bdaddr) {
2365
0
            tap_device->has_bd_addr = true;
2366
0
            memcpy(tap_device->bd_addr, remote_bdaddr->bd_addr, 6);
2367
0
        } else {
2368
0
            tap_device->has_bd_addr = false;
2369
0
        }
2370
0
        tap_device->is_local = false;
2371
0
        tap_device->data.remote_version.lmp_version     = lmp_version;
2372
0
        tap_device->data.remote_version.lmp_subversion  = lmp_subversion;
2373
0
        tap_device->data.remote_version.manufacturer    = manufacturer;
2374
0
        tap_queue_packet(bluetooth_device_tap, pinfo, tap_device);
2375
0
    }
2376
2377
0
    return offset;
2378
0
}
2379
2380
static int
2381
dissect_bthci_evt_flush_occurred(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree)
2382
0
{
2383
0
    proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
2384
0
    offset += 2;
2385
2386
0
    return offset;
2387
0
}
2388
2389
static int
2390
dissect_bthci_evt_number_of_completed_packets(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree)
2391
0
{
2392
0
    uint8_t evt_num_handles;
2393
2394
0
    evt_num_handles = tvb_get_uint8(tvb, offset);
2395
0
    proto_tree_add_item(tree, hf_bthci_evt_num_handles, tvb, offset, 1, ENC_LITTLE_ENDIAN);
2396
0
    offset += 1;
2397
2398
0
    while (evt_num_handles--) {
2399
0
        proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
2400
0
        offset += 2;
2401
2402
0
        proto_tree_add_item(tree, hf_bthci_evt_num_compl_packets, tvb, offset, 2, ENC_LITTLE_ENDIAN);
2403
0
        offset += 2;
2404
2405
0
    }
2406
2407
0
    return offset;
2408
0
}
2409
2410
static int
2411
dissect_bthci_evt_mode_change(tvbuff_t *tvb, int offset, packet_info *pinfo,
2412
        proto_tree *tree, bluetooth_data_t *bluetooth_data)
2413
0
{
2414
0
    uint32_t    connection_handle;
2415
0
    uint8_t     mode;
2416
0
    uint8_t     status;
2417
2418
0
    proto_tree_add_item(tree, hf_bthci_evt_status,                   tvb, offset, 1, ENC_LITTLE_ENDIAN);
2419
0
    status = tvb_get_uint8(tvb, offset);
2420
0
    send_hci_summary_status_tap(status, pinfo, bluetooth_data);
2421
0
    offset += 1;
2422
2423
0
    proto_tree_add_item(tree, hf_bthci_evt_connection_handle,        tvb, offset, 2, ENC_LITTLE_ENDIAN);
2424
0
    connection_handle = tvb_get_letohs(tvb, offset) & 0x0FFF;
2425
0
    offset += 2;
2426
2427
0
    proto_tree_add_item(tree, hf_bthci_evt_curr_mode,                tvb, offset, 1, ENC_LITTLE_ENDIAN);
2428
0
    mode = tvb_get_uint8(tvb, offset);
2429
0
    offset += 1;
2430
2431
0
    proto_tree_add_item(tree, hf_bthci_evt_interval,   tvb, offset, 2, ENC_LITTLE_ENDIAN);
2432
0
    offset += 2;
2433
2434
0
    if (!pinfo->fd->visited && status == STATUS_SUCCESS) {
2435
0
        wmem_tree_key_t     key[5];
2436
0
        uint32_t            interface_id;
2437
0
        uint32_t            adapter_id;
2438
0
        uint32_t            frame_number;
2439
0
        connection_mode_t  *connection_mode;
2440
2441
0
        interface_id = bluetooth_data->interface_id;
2442
0
        adapter_id   = bluetooth_data->adapter_id;
2443
0
        frame_number = pinfo->num;
2444
2445
0
        key[0].length = 1;
2446
0
        key[0].key    = &interface_id;
2447
0
        key[1].length = 1;
2448
0
        key[1].key    = &adapter_id;
2449
0
        key[2].length = 1;
2450
0
        key[2].key    = &connection_handle;
2451
0
        key[3].length = 1;
2452
0
        key[3].key    = &frame_number;
2453
0
        key[4].length = 0;
2454
0
        key[4].key    = NULL;
2455
2456
0
        connection_mode = (connection_mode_t *) wmem_new(wmem_file_scope(), connection_mode_t);
2457
0
        connection_mode->mode = mode;
2458
0
        connection_mode->change_in_frame = frame_number;
2459
2460
0
        wmem_tree_insert32_array(bluetooth_data->chandle_to_mode, key, connection_mode);
2461
0
    }
2462
2463
0
    return offset;
2464
0
}
2465
2466
static int
2467
dissect_bthci_evt_role_change(tvbuff_t *tvb, int offset, packet_info *pinfo,
2468
        proto_tree *tree, bluetooth_data_t *bluetooth_data)
2469
0
{
2470
0
    uint8_t bd_addr[6];
2471
0
    uint8_t role;
2472
0
    uint8_t status;
2473
2474
0
    proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN);
2475
0
    status = tvb_get_uint8(tvb, offset);
2476
0
    send_hci_summary_status_tap(status, pinfo, bluetooth_data);
2477
0
    offset += 1;
2478
2479
0
    offset = dissect_bd_addr(hf_bthci_evt_bd_addr, pinfo, tree, tvb, offset, false, bluetooth_data->interface_id, bluetooth_data->adapter_id, bd_addr);
2480
2481
0
    proto_tree_add_item(tree, hf_bthci_evt_role,   tvb, offset, 1, ENC_LITTLE_ENDIAN);
2482
0
    role = tvb_get_uint8(tvb, offset);
2483
0
    offset += 1;
2484
2485
0
    if (!pinfo->fd->visited && status == STATUS_SUCCESS) {
2486
0
        uint32_t          interface_id;
2487
0
        uint32_t          adapter_id;
2488
0
        uint32_t          bd_addr_oui;
2489
0
        uint32_t          bd_addr_id;
2490
0
        uint32_t          frame_number;
2491
0
        wmem_tree_key_t   key[6];
2492
0
        device_role_t    *device_role;
2493
2494
0
        interface_id = bluetooth_data->interface_id;
2495
0
        adapter_id   = bluetooth_data->adapter_id;
2496
0
        frame_number = pinfo->num;
2497
0
        bd_addr_oui  = bd_addr[0] << 16 | bd_addr[1] << 8 | bd_addr[2];
2498
0
        bd_addr_id   = bd_addr[3] << 16 | bd_addr[4] << 8 | bd_addr[5];
2499
2500
0
        key[0].length = 1;
2501
0
        key[0].key    = &interface_id;
2502
0
        key[1].length = 1;
2503
0
        key[1].key    = &adapter_id;
2504
0
        key[2].length = 1;
2505
0
        key[2].key    = &bd_addr_id;
2506
0
        key[3].length = 1;
2507
0
        key[3].key    = &bd_addr_oui;
2508
0
        key[4].length = 1;
2509
0
        key[4].key    = &frame_number;
2510
0
        key[5].length = 0;
2511
0
        key[5].key    = NULL;
2512
2513
0
        device_role = (device_role_t *) wmem_new(wmem_file_scope(), device_role_t);
2514
0
        device_role->change_in_frame = frame_number;
2515
0
        if (role == 0)
2516
0
            device_role->role = ROLE_PERIPHERAL;
2517
0
        else if (role == 1)
2518
0
            device_role->role = ROLE_CENTRAL;
2519
0
        else
2520
0
            device_role->role = ROLE_UNKNOWN;
2521
2522
0
        wmem_tree_insert32_array(bluetooth_data->bdaddr_to_role, key, device_role);
2523
0
    }
2524
2525
0
    return offset;
2526
0
}
2527
2528
static int
2529
dissect_bthci_evt_hardware_error(tvbuff_t *tvb, int offset, packet_info *pinfo,
2530
        proto_tree *tree, bluetooth_data_t *bluetooth_data)
2531
0
{
2532
0
    proto_tree_add_item(tree, hf_bthci_evt_hardware_code, tvb, offset, 1, ENC_LITTLE_ENDIAN);
2533
0
    offset += 1;
2534
2535
0
    if (have_tap_listener(bluetooth_hci_summary_tap)) {
2536
0
        bluetooth_hci_summary_tap_t  *tap_hci_summary;
2537
2538
0
        tap_hci_summary = wmem_new(pinfo->pool, bluetooth_hci_summary_tap_t);
2539
2540
0
        tap_hci_summary->interface_id  = bluetooth_data->interface_id;
2541
0
        tap_hci_summary->adapter_id    = bluetooth_data->adapter_id;
2542
2543
0
        tap_hci_summary->type = BLUETOOTH_HCI_SUMMARY_HARDWARE_ERROR;
2544
0
        tap_hci_summary->hardware_error = tvb_get_uint8(tvb, offset - 1);
2545
0
        tap_hci_summary->name = NULL;
2546
0
        tap_queue_packet(bluetooth_hci_summary_tap, pinfo, tap_hci_summary);
2547
0
    }
2548
2549
0
    return offset;
2550
0
}
2551
2552
static int
2553
dissect_bthci_evt_loopback_command(tvbuff_t *tvb, int offset,
2554
        packet_info *pinfo, proto_tree *tree, bluetooth_data_t *bluetooth_data)
2555
0
{
2556
0
    tvbuff_t *next_tvb;
2557
2558
0
    next_tvb = tvb_new_subset_remaining(tvb, offset);
2559
0
    call_dissector_with_data(bthci_cmd_handle, next_tvb, pinfo, tree, bluetooth_data);
2560
2561
0
    offset += tvb_reported_length_remaining(tvb, offset);
2562
2563
0
    return offset;
2564
0
}
2565
2566
static int
2567
dissect_bthci_evt_data_buffer_overflow(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree)
2568
0
{
2569
0
    proto_tree_add_item(tree, hf_bthci_evt_link_type, tvb, offset, 1, ENC_LITTLE_ENDIAN);
2570
0
    offset += 1;
2571
2572
0
    return offset;
2573
0
}
2574
2575
static int
2576
dissect_bthci_evt_read_clock_offset_complete(tvbuff_t *tvb, int offset,
2577
        packet_info *pinfo, proto_tree *tree, bluetooth_data_t *bluetooth_data)
2578
0
{
2579
0
    proto_item *handle_item;
2580
0
    int16_t     clk;
2581
2582
0
    proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN);
2583
0
    send_hci_summary_status_tap(tvb_get_uint8(tvb, offset), pinfo, bluetooth_data);
2584
0
    offset += 1;
2585
2586
0
    proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
2587
0
    offset += 2;
2588
2589
0
    handle_item = proto_tree_add_item(tree, hf_bthci_evt_clock_offset, tvb, offset, 2, ENC_LITTLE_ENDIAN);
2590
0
    clk = tvb_get_letohs(tvb, offset) & 0x7FFF; /* only bits 0-14 are valid  */
2591
0
    proto_item_append_text(handle_item, " (%g ms)", 1.25*clk);
2592
0
    offset += 2;
2593
2594
0
    return offset;
2595
0
}
2596
2597
static int
2598
dissect_bthci_evt_max_slots_change(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree)
2599
0
{
2600
0
    proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
2601
0
    offset += 2;
2602
2603
0
    proto_tree_add_item(tree, hf_bthci_evt_max_slots,         tvb, offset, 1, ENC_LITTLE_ENDIAN);
2604
0
    offset += 1;
2605
2606
0
    return offset;
2607
0
}
2608
2609
static int
2610
dissect_bthci_evt_qos_violation(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree)
2611
0
{
2612
0
    proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
2613
0
    offset += 2;
2614
2615
0
    return offset;
2616
0
}
2617
2618
static int
2619
dissect_bthci_evt_conn_packet_type_changed(tvbuff_t *tvb, int offset,
2620
        packet_info *pinfo, proto_tree *tree, bluetooth_data_t *bluetooth_data)
2621
0
{
2622
0
    proto_item         *connection_handle_subtree;
2623
0
    uint32_t            connection_handle;
2624
0
    uint32_t            link_type = BT_LINK_TYPE_UNKNOWN;
2625
0
    wmem_tree_key_t     key[4];
2626
0
    uint32_t            interface_id;
2627
0
    uint32_t            adapter_id;
2628
0
    chandle_session_t  *chandle_session;
2629
0
    wmem_tree_t        *subtree;
2630
2631
2632
0
    proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN);
2633
0
    send_hci_summary_status_tap(tvb_get_uint8(tvb, offset), pinfo, bluetooth_data);
2634
0
    offset += 1;
2635
2636
0
    connection_handle_subtree = proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
2637
0
    connection_handle = tvb_get_letohs(tvb, offset) & 0x0FFF;
2638
0
    offset += 2;
2639
2640
0
    interface_id      = bluetooth_data->interface_id;
2641
0
    adapter_id        = bluetooth_data->adapter_id;
2642
2643
0
    key[0].length = 1;
2644
0
    key[0].key    = &interface_id;
2645
0
    key[1].length = 1;
2646
0
    key[1].key    = &adapter_id;
2647
0
    key[2].length = 1;
2648
0
    key[2].key    = &connection_handle;
2649
0
    key[3].length = 0;
2650
0
    key[3].key    = NULL;
2651
2652
0
    subtree = (wmem_tree_t *) wmem_tree_lookup32_array(bluetooth_data->chandle_sessions, key);
2653
0
    chandle_session = (subtree) ? (chandle_session_t *) wmem_tree_lookup32_le(subtree, pinfo->num) : NULL;
2654
0
    if (chandle_session && chandle_session->connect_in_frame < pinfo->num)
2655
0
        link_type = chandle_session->link_type;
2656
2657
0
    if (link_type == BT_LINK_TYPE_ACL) {
2658
0
        proto_tree_add_bitmask(tree, tvb, offset, hf_packet_type_acl, ett_ptype_subtree, hfx_packet_type_acl, ENC_LITTLE_ENDIAN);
2659
0
    } else if (link_type == BT_LINK_TYPE_SCO) {
2660
0
        proto_tree_add_bitmask(tree, tvb, offset, hf_packet_type_sco, ett_ptype_subtree, hfx_packet_type_sco, ENC_LITTLE_ENDIAN);
2661
0
    } else {
2662
        /* Unknown or wrong link type (Link Layer from BTLE), show mix or ACL and SCO */
2663
0
        expert_add_info(pinfo, connection_handle_subtree, &ei_bad_link_type);
2664
2665
0
        proto_tree_add_bitmask(tree, tvb, offset, hf_packet_type_acl, ett_ptype_subtree, hfx_packet_type_acl, ENC_LITTLE_ENDIAN);
2666
0
        proto_tree_add_bitmask(tree, tvb, offset, hf_packet_type_sco, ett_ptype_subtree, hfx_packet_type_sco, ENC_LITTLE_ENDIAN);
2667
0
    }
2668
0
    offset += 2;
2669
2670
0
    return offset;
2671
0
}
2672
2673
static int
2674
dissect_bthci_evt_command_status(tvbuff_t *tvb, int offset, packet_info *pinfo,
2675
        proto_tree *main_tree, proto_tree *tree, wmem_list_t *opcode_list,
2676
        bluetooth_data_t *bluetooth_data)
2677
0
{
2678
0
    proto_item  *ti_opcode;
2679
0
    proto_tree  *opcode_tree;
2680
0
    uint8_t      status_code;
2681
0
    uint16_t     opcode;
2682
0
    uint8_t      ogf;
2683
0
    int          hfx;
2684
2685
0
    status_code = tvb_get_uint8(tvb, offset);
2686
2687
0
    if (status_code != 0) {
2688
0
        proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN);
2689
0
        send_hci_summary_status_tap(tvb_get_uint8(tvb, offset), pinfo, bluetooth_data);
2690
0
    }
2691
0
    else {
2692
0
        proto_tree_add_item(tree, hf_bthci_evt_status_pending, tvb, offset, 1, ENC_LITTLE_ENDIAN);
2693
0
        send_hci_summary_pending_tap(pinfo, bluetooth_data);
2694
0
    }
2695
0
    offset += 1;
2696
2697
0
    proto_tree_add_item(tree, hf_bthci_evt_num_command_packets, tvb, offset, 1, ENC_LITTLE_ENDIAN);
2698
0
    offset += 1;
2699
2700
0
    opcode = tvb_get_letohs(tvb, offset);
2701
0
    ogf = opcode >> 10;
2702
2703
0
    if (have_tap_listener(bluetooth_hci_summary_tap)) {
2704
0
        bluetooth_hci_summary_tap_t  *tap_hci_summary;
2705
2706
0
        tap_hci_summary = wmem_new(pinfo->pool, bluetooth_hci_summary_tap_t);
2707
2708
0
        tap_hci_summary->interface_id  = bluetooth_data->interface_id;
2709
0
        tap_hci_summary->adapter_id    = bluetooth_data->adapter_id;
2710
2711
0
        tap_hci_summary->type = BLUETOOTH_HCI_SUMMARY_EVENT_OPCODE;
2712
0
        tap_hci_summary->ogf = ogf;
2713
0
        tap_hci_summary->ocf = opcode & 0x03ff;
2714
0
        tap_hci_summary->event = 0x0f; /* Command Status */
2715
0
        if (try_val_to_str_ext(opcode, &bthci_cmd_opcode_vals_ext))
2716
0
            tap_hci_summary->name = val_to_str_ext(opcode, &bthci_cmd_opcode_vals_ext, "Unknown 0x%04x");
2717
0
        else
2718
0
            tap_hci_summary->name = NULL;
2719
0
        tap_queue_packet(bluetooth_hci_summary_tap, pinfo, tap_hci_summary);
2720
0
    }
2721
2722
0
    if (status_code != 0)
2723
0
        add_opcode(pinfo->pool, opcode_list, opcode, COMMAND_STATUS_RESULT);
2724
0
    else
2725
0
        add_opcode(pinfo->pool, opcode_list, opcode, COMMAND_STATUS_PENDING);
2726
2727
0
    ti_opcode = proto_tree_add_item(tree, hf_bthci_evt_opcode, tvb, offset, 2, ENC_LITTLE_ENDIAN);
2728
0
    opcode_tree = proto_item_add_subtree(ti_opcode, ett_opcode);
2729
0
    proto_tree_add_item(opcode_tree, hf_bthci_evt_ogf, tvb, offset, 2, ENC_LITTLE_ENDIAN);
2730
2731
0
    if (ogf == HCI_OGF_LINK_CONTROL)
2732
0
        hfx = hf_bthci_evt_ocf_link_control;
2733
0
    else if (ogf == HCI_OGF_LINK_POLICY)
2734
0
        hfx = hf_bthci_evt_ocf_link_policy;
2735
0
    else if (ogf == HCI_OGF_HOST_CONTROLLER)
2736
0
        hfx = hf_bthci_evt_ocf_host_controller_and_baseband;
2737
0
    else if (ogf == HCI_OGF_INFORMATIONAL)
2738
0
        hfx = hf_bthci_evt_ocf_informational;
2739
0
    else if (ogf == HCI_OGF_STATUS)
2740
0
        hfx = hf_bthci_evt_ocf_status;
2741
0
    else if (ogf == HCI_OGF_TESTING)
2742
0
        hfx = hf_bthci_evt_ocf_testing;
2743
0
    else if (ogf == HCI_OGF_LOW_ENERGY)
2744
0
        hfx = hf_bthci_evt_ocf_low_energy;
2745
0
    else if (ogf == HCI_OGF_LOGO_TESTING)
2746
0
        hfx = hf_bthci_evt_ocf_logo_testing;
2747
0
    else
2748
0
        hfx = hf_bthci_evt_ocf;
2749
0
    proto_tree_add_item(opcode_tree, hfx, tvb, offset, 2, ENC_LITTLE_ENDIAN);
2750
0
    offset += 2;
2751
2752
0
    if (ogf == HCI_OGF_VENDOR_SPECIFIC) {
2753
0
        col_append_fstr(pinfo->cinfo, COL_INFO, " (Vendor Command 0x%04X [(opcode 0x%04X])", opcode & 0x03ff, opcode);
2754
2755
0
        if (!dissector_try_payload_with_data(hci_cmd_vendor_dissector_table, tvb, pinfo, main_tree, true, bluetooth_data)) {
2756
0
            if (bluetooth_data) {
2757
0
                hci_vendor_data_t  *hci_vendor_data;
2758
0
                wmem_tree_key_t     key[3];
2759
0
                uint32_t            interface_id;
2760
0
                uint32_t            adapter_id;
2761
2762
0
                interface_id = bluetooth_data->interface_id;
2763
0
                adapter_id   = bluetooth_data->adapter_id;
2764
2765
0
                key[0].length = 1;
2766
0
                key[0].key    = &interface_id;
2767
0
                key[1].length = 1;
2768
0
                key[1].key    = &adapter_id;
2769
0
                key[2].length = 0;
2770
0
                key[2].key    = NULL;
2771
2772
0
                hci_vendor_data = (hci_vendor_data_t *) wmem_tree_lookup32_array(bluetooth_data->hci_vendors, key);
2773
0
                if (hci_vendor_data) {
2774
0
                    int sub_offset = 0;
2775
2776
0
                    if (bthci_vendor_android) {
2777
0
                        sub_offset = dissector_try_uint_with_data(hci_vendor_table, bthci_vendor_manufacturer_android, tvb, pinfo, tree, true, bluetooth_data);
2778
0
                    } else {
2779
0
                        sub_offset = dissector_try_uint_with_data(hci_vendor_table, hci_vendor_data->manufacturer, tvb, pinfo, main_tree, true, bluetooth_data);
2780
0
                    }
2781
2782
0
                    if (sub_offset > 0 && sub_offset < tvb_captured_length_remaining(tvb, offset))
2783
0
                        proto_tree_add_expert(tree, pinfo, &ei_parameter_unexpected, tvb, offset + sub_offset, tvb_captured_length_remaining(tvb, sub_offset + offset));
2784
0
                }
2785
0
            }
2786
0
        }
2787
2788
0
        return tvb_captured_length(tvb);
2789
0
    } else {
2790
0
        col_append_fstr(pinfo->cinfo, COL_INFO, " (%s)",
2791
0
                val_to_str_ext(opcode, &bthci_cmd_opcode_vals_ext, "Unknown 0x%04x"));
2792
0
    }
2793
2794
0
    return offset;
2795
0
}
2796
2797
static int
2798
dissect_bthci_evt_page_scan_mode_change(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, bluetooth_data_t *bluetooth_data)
2799
0
{
2800
0
    offset = dissect_bd_addr(hf_bthci_evt_bd_addr, pinfo, tree, tvb, offset, false, bluetooth_data->interface_id, bluetooth_data->adapter_id, NULL);
2801
2802
0
    proto_tree_add_item(tree, hf_bthci_evt_page_scan_mode, tvb, offset, 1, ENC_LITTLE_ENDIAN);
2803
0
    offset += 1;
2804
2805
0
    return offset;
2806
0
}
2807
2808
static int
2809
dissect_bthci_evt_page_scan_repetition_mode_change(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, bluetooth_data_t *bluetooth_data)
2810
0
{
2811
0
    offset = dissect_bd_addr(hf_bthci_evt_bd_addr, pinfo, tree, tvb, offset, false, bluetooth_data->interface_id, bluetooth_data->adapter_id, NULL);
2812
2813
0
    proto_tree_add_item(tree, hf_bthci_evt_page_scan_repetition_mode, tvb, offset, 1, ENC_LITTLE_ENDIAN);
2814
0
    offset += 1;
2815
2816
0
    return offset;
2817
0
}
2818
2819
static int
2820
dissect_bthci_evt_inquire_result_with_rssi(tvbuff_t *tvb, int offset,
2821
        packet_info *pinfo, proto_tree *tree, bluetooth_data_t *bluetooth_data, uint8_t *bd_addr)
2822
39
{
2823
39
    uint8_t num, evt_num_responses;
2824
2825
39
    evt_num_responses = tvb_get_uint8(tvb, offset);
2826
39
    proto_tree_add_item(tree, hf_bthci_evt_num_responses, tvb, offset, 1, ENC_LITTLE_ENDIAN);
2827
39
    offset += 1;
2828
2829
1.35k
    for (num = 0; num < evt_num_responses; num++) {
2830
1.31k
        offset = dissect_bd_addr(hf_bthci_evt_bd_addr, pinfo, tree, tvb, offset, false, bluetooth_data->interface_id, bluetooth_data->adapter_id, (num == 0) ? bd_addr : NULL);
2831
2832
1.31k
        proto_tree_add_item(tree, hf_bthci_evt_page_scan_repetition_mode, tvb, offset, 1, ENC_LITTLE_ENDIAN);
2833
1.31k
        offset += 1;
2834
2835
1.31k
        proto_tree_add_item(tree, hf_bthci_evt_reserved, tvb, offset, 1, ENC_NA);
2836
1.31k
        offset += 1;
2837
2838
1.31k
        call_dissector(btcommon_cod_handle, tvb_new_subset_length(tvb, offset, 3), pinfo, tree);
2839
1.31k
        offset += 3;
2840
2841
1.31k
        proto_tree_add_item(tree, hf_bthci_evt_clock_offset, tvb, offset, 2, ENC_LITTLE_ENDIAN);
2842
1.31k
        offset += 2;
2843
2844
1.31k
        proto_tree_add_item(tree, hf_bthci_evt_rssi, tvb, offset, 1, ENC_LITTLE_ENDIAN);
2845
1.31k
        offset += 1;
2846
2847
1.31k
    }
2848
2849
39
    return offset;
2850
39
}
2851
2852
static int
2853
dissect_bthci_evt_io_capability_request(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, bluetooth_data_t *bluetooth_data)
2854
0
{
2855
0
    offset = dissect_bd_addr(hf_bthci_evt_bd_addr, pinfo, tree, tvb, offset, false, bluetooth_data->interface_id, bluetooth_data->adapter_id, NULL);
2856
2857
0
    return offset;
2858
0
}
2859
2860
static int
2861
dissect_bthci_evt_io_capability_response(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, bluetooth_data_t *bluetooth_data)
2862
0
{
2863
0
    offset = dissect_bd_addr(hf_bthci_evt_bd_addr, pinfo, tree, tvb, offset, false, bluetooth_data->interface_id, bluetooth_data->adapter_id, NULL);
2864
2865
0
    proto_tree_add_item(tree, hf_bthci_evt_io_capability,     tvb, offset, 1, ENC_LITTLE_ENDIAN);
2866
0
    offset += 1;
2867
2868
0
    proto_tree_add_item(tree, hf_bthci_evt_oob_data_present,  tvb, offset, 1, ENC_LITTLE_ENDIAN);
2869
0
    offset += 1;
2870
2871
0
    proto_tree_add_item(tree, hf_bthci_evt_auth_requirements, tvb, offset, 1, ENC_LITTLE_ENDIAN);
2872
0
    offset += 1;
2873
2874
0
    return offset;
2875
0
}
2876
2877
static int
2878
dissect_bthci_evt_user_confirmation_request(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, bluetooth_data_t *bluetooth_data)
2879
0
{
2880
0
    offset = dissect_bd_addr(hf_bthci_evt_bd_addr, pinfo, tree, tvb, offset, false, bluetooth_data->interface_id, bluetooth_data->adapter_id, NULL);
2881
2882
0
    proto_tree_add_item(tree, hf_bthci_evt_numeric_value, tvb, offset, 4, ENC_LITTLE_ENDIAN);
2883
0
    offset += 4;
2884
2885
0
    return offset;
2886
0
}
2887
2888
static int
2889
dissect_bthci_evt_user_passkey_request(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, bluetooth_data_t *bluetooth_data)
2890
0
{
2891
0
    offset = dissect_bd_addr(hf_bthci_evt_bd_addr, pinfo, tree, tvb, offset, false, bluetooth_data->interface_id, bluetooth_data->adapter_id, NULL);
2892
2893
0
    return offset;
2894
0
}
2895
2896
static int
2897
dissect_bthci_evt_remote_oob_data_request(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, bluetooth_data_t *bluetooth_data)
2898
0
{
2899
0
    offset = dissect_bd_addr(hf_bthci_evt_bd_addr, pinfo, tree, tvb, offset, false, bluetooth_data->interface_id, bluetooth_data->adapter_id, NULL);
2900
2901
0
    return offset;
2902
0
}
2903
2904
static int
2905
dissect_bthci_evt_simple_pairing_complete(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, bluetooth_data_t *bluetooth_data)
2906
0
{
2907
0
    proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN);
2908
0
    send_hci_summary_status_tap(tvb_get_uint8(tvb, offset), pinfo, bluetooth_data);
2909
0
    offset += 1;
2910
2911
0
    offset = dissect_bd_addr(hf_bthci_evt_bd_addr, pinfo, tree, tvb, offset, false, bluetooth_data->interface_id, bluetooth_data->adapter_id, NULL);
2912
2913
0
    return offset;
2914
0
}
2915
2916
static int
2917
dissect_bthci_evt_user_passkey_notification(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, bluetooth_data_t *bluetooth_data)
2918
0
{
2919
0
    offset = dissect_bd_addr(hf_bthci_evt_bd_addr, pinfo, tree, tvb, offset, false, bluetooth_data->interface_id, bluetooth_data->adapter_id, NULL);
2920
2921
0
    proto_tree_add_item(tree, hf_bthci_evt_passkey, tvb, offset, 4, ENC_LITTLE_ENDIAN);
2922
0
    offset += 4;
2923
2924
0
    return offset;
2925
0
}
2926
2927
static int
2928
dissect_bthci_evt_keypress_notification(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, bluetooth_data_t *bluetooth_data)
2929
0
{
2930
0
    offset = dissect_bd_addr(hf_bthci_evt_bd_addr, pinfo, tree, tvb, offset, false, bluetooth_data->interface_id, bluetooth_data->adapter_id, NULL);
2931
2932
0
    proto_tree_add_item(tree, hf_bthci_evt_notification_type, tvb, offset, 1, ENC_LITTLE_ENDIAN);
2933
0
    offset += 1;
2934
2935
0
    return offset;
2936
0
}
2937
2938
static int
2939
dissect_bthci_evt_remote_host_sup_feat_notification(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, bluetooth_data_t *bluetooth_data)
2940
0
{
2941
0
    offset = dissect_bd_addr(hf_bthci_evt_bd_addr, pinfo, tree, tvb, offset, false, bluetooth_data->interface_id, bluetooth_data->adapter_id, NULL);
2942
0
    offset = dissect_bthci_evt_lmp_features(tvb, offset, pinfo, tree, 0);
2943
2944
0
    return offset;
2945
0
}
2946
2947
static int
2948
dissect_bthci_evt_cs_capabilities(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree)
2949
0
{
2950
0
    proto_tree_add_item(tree, hf_bthci_evt_num_config, tvb, offset, 1, ENC_NA);
2951
0
    offset += 1;
2952
0
    proto_tree_add_item(tree, hf_bthci_evt_max_consecutive_procedures, tvb, offset, 2, ENC_LITTLE_ENDIAN);
2953
0
    offset += 2;
2954
0
    proto_tree_add_item(tree, hf_bthci_evt_number_antennae, tvb, offset, 1, ENC_NA);
2955
0
    offset += 1;
2956
0
    proto_tree_add_item(tree, hf_bthci_evt_num_antenna_paths, tvb, offset, 1, ENC_NA);
2957
0
    offset += 1;
2958
0
    proto_tree_add_bitmask(tree, tvb, offset, hf_bthci_evt_cs_roles, ett_cs_roles, hfx_bthci_evt_cs_roles, ENC_NA);
2959
0
    offset += 1;
2960
0
    proto_tree_add_bitmask(tree, tvb, offset, hf_bthci_evt_cs_modes_supported, ett_cs_modes, hfx_bthci_evt_cs_modes_supported, ENC_NA);
2961
0
    offset += 1;
2962
0
    proto_tree_add_bitmask(tree, tvb, offset, hf_bthci_evt_rtt_capability, ett_cs_capability, hfx_bthci_evt_rtt_capability, ENC_NA);
2963
0
    offset += 1;
2964
0
    proto_tree_add_item(tree, hf_bthci_evt_rtt_aa_only_n, tvb, offset, 1, ENC_NA);
2965
0
    offset += 1;
2966
0
    proto_tree_add_item(tree, hf_bthci_evt_rtt_sounding_n, tvb, offset, 1, ENC_NA);
2967
0
    offset += 1;
2968
0
    proto_tree_add_item(tree, hf_bthci_evt_rtt_random_n, tvb, offset, 1, ENC_NA);
2969
0
    offset += 1;
2970
0
    proto_tree_add_bitmask(tree, tvb, offset, hf_bthci_evt_nadm_sounding_capability, ett_cs_capability, hfx_bthci_evt_nadm_sounding_capability, ENC_LITTLE_ENDIAN);
2971
0
    offset += 2;
2972
0
    proto_tree_add_bitmask(tree, tvb, offset, hf_bthci_evt_nadm_random_capability, ett_cs_capability, hfx_bthci_evt_nadm_random_capability, ENC_LITTLE_ENDIAN);
2973
0
    offset += 2;
2974
0
    proto_tree_add_bitmask(tree, tvb, offset, hf_bthci_evt_cs_sync_phys_supported, ett_cs_capability, hfx_bthci_evt_cs_sync_phys_supported, ENC_NA);
2975
0
    offset += 1;
2976
0
    proto_tree_add_bitmask(tree, tvb, offset, hf_bthci_evt_cs_subfeatures, ett_cs_capability, hfx_bthci_evt_cs_subfeatures, ENC_LITTLE_ENDIAN);
2977
0
    offset += 2;
2978
0
    proto_tree_add_bitmask(tree, tvb, offset, hf_bthci_evt_tip1_times_supported, ett_cs_times, hfx_bthci_evt_tip_times_supported, ENC_LITTLE_ENDIAN);
2979
0
    offset += 2;
2980
0
    proto_tree_add_bitmask(tree, tvb, offset, hf_bthci_evt_tip2_times_supported, ett_cs_times, hfx_bthci_evt_tip_times_supported, ENC_LITTLE_ENDIAN);
2981
0
    offset += 2;
2982
0
    proto_tree_add_bitmask(tree, tvb, offset, hf_bthci_evt_tfcs_times_supported, ett_cs_times, hfx_bthci_evt_tfcs_times_supported, ENC_LITTLE_ENDIAN);
2983
0
    offset += 2;
2984
0
    proto_tree_add_bitmask(tree, tvb, offset, hf_bthci_evt_tpm_times_supported, ett_cs_times, hfx_bthci_evt_tpm_times_supported, ENC_LITTLE_ENDIAN);
2985
0
    offset += 2;
2986
0
    proto_tree_add_item(tree, hf_bthci_evt_tsw_time_supported, tvb, offset, 1, ENC_NA);
2987
0
    offset += 1;
2988
0
    proto_tree_add_bitmask(tree, tvb, offset, hf_bthci_evt_tx_snr_capability, ett_cs_capability, hfx_bthci_evt_tx_snr_capability, ENC_NA);
2989
0
    offset += 1;
2990
0
    return offset;
2991
0
}
2992
2993
static int
2994
dissect_bthci_evt_cs_mode1_step(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, bool initiator, bool sounding_seq)
2995
0
{
2996
0
    proto_tree_add_item(tree, hf_bthci_evt_nadm_attack_chance, tvb, offset, 1, ENC_NA);
2997
0
    offset += 1;
2998
0
    proto_tree_add_item(tree, hf_bthci_evt_rssi, tvb, offset, 1, ENC_NA);
2999
0
    offset += 1;
3000
0
    if (initiator) {
3001
0
        proto_tree_add_item(tree, hf_bthci_evt_toa_tod_initiator, tvb, offset, 2, ENC_LITTLE_ENDIAN);
3002
0
    } else {
3003
0
        proto_tree_add_item(tree, hf_bthci_evt_tod_toa_reflector, tvb, offset, 2, ENC_LITTLE_ENDIAN);
3004
0
    }
3005
0
    offset += 2;
3006
0
    proto_tree_add_item(tree, hf_bthci_evt_antenna_id, tvb, offset, 1, ENC_NA);
3007
0
    offset += 1;
3008
0
    if (sounding_seq) {
3009
0
        proto_tree *pct_tree;
3010
0
        proto_item *pct_item;
3011
0
        pct_item = proto_tree_add_string_format(tree, hf_bthci_evt_pct1, tvb, offset, 4, "", "PCT1 I/Q Sample");
3012
0
        pct_tree = proto_item_add_subtree(pct_item, ett_cs_pct_sample);
3013
0
        if (tvb_get_uint32(tvb, offset, ENC_LITTLE_ENDIAN) != 0xffffffff) {
3014
0
            proto_tree_add_item(pct_tree, hf_bthci_evt_pct_i_sample, tvb, offset, 3, ENC_LITTLE_ENDIAN);
3015
0
            proto_tree_add_item(pct_tree, hf_bthci_evt_pct_q_sample, tvb, offset, 3, ENC_LITTLE_ENDIAN);
3016
0
        } else {
3017
0
            proto_tree_add_item(pct_tree, hf_bthci_evt_pct_not_available, tvb, offset, 4, ENC_LITTLE_ENDIAN);
3018
0
        }
3019
0
        offset += 4;
3020
3021
0
        pct_item = proto_tree_add_string_format(tree, hf_bthci_evt_pct2, tvb, offset, 4, "", "PCT2 I/Q Sample");
3022
0
        pct_tree = proto_item_add_subtree(pct_item, ett_cs_pct_sample);
3023
0
        if (tvb_get_uint32(tvb, offset, ENC_LITTLE_ENDIAN) != 0xffffffff) {
3024
0
            proto_tree_add_item(pct_tree, hf_bthci_evt_pct_i_sample, tvb, offset, 3, ENC_LITTLE_ENDIAN);
3025
0
            proto_tree_add_item(pct_tree, hf_bthci_evt_pct_q_sample, tvb, offset, 3, ENC_LITTLE_ENDIAN);
3026
0
        } else {
3027
0
            proto_tree_add_item(pct_tree, hf_bthci_evt_pct_not_available, tvb, offset, 4, ENC_LITTLE_ENDIAN);
3028
0
        }
3029
0
        offset += 4;
3030
0
    }
3031
0
    return offset;
3032
0
}
3033
3034
static int
3035
dissect_bthci_evt_cs_mode2_step(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, uint8_t step_data_length)
3036
0
{
3037
0
    proto_tree *tone_tree, *pct_tree;
3038
0
    proto_item *tone_item, *pct_item;
3039
0
    proto_tree_add_item(tree, hf_bthci_evt_antenna_permutation_index, tvb, offset, 1, ENC_NA);
3040
0
    offset += 1;
3041
0
    uint8_t tone_count = (step_data_length - 1) / 4;
3042
0
    while (tone_count--) {
3043
0
        tone_item = proto_tree_add_string_format(tree, hf_bthci_evt_cs_tone, tvb, offset, 4, "", "Tone");
3044
0
        tone_tree = proto_item_add_subtree(tone_item, ett_cs_tone);
3045
0
        pct_item = proto_tree_add_string_format(tone_tree, hf_bthci_evt_tone_pct, tvb, offset, 3, "", "PCT I/Q Sample");
3046
0
        pct_tree = proto_item_add_subtree(pct_item, ett_cs_pct_sample);
3047
0
        proto_tree_add_item(pct_tree, hf_bthci_evt_pct_i_sample, tvb, offset, 3, ENC_LITTLE_ENDIAN);
3048
0
        proto_tree_add_item(pct_tree, hf_bthci_evt_pct_q_sample, tvb, offset, 3, ENC_LITTLE_ENDIAN);
3049
0
        offset += 3;
3050
0
        proto_tree_add_item(tone_tree, hf_bthci_evt_tone_quality, tvb, offset, 1, ENC_NA);
3051
0
        proto_tree_add_item(tone_tree, hf_bthci_evt_tone_extension_presence, tvb, offset, 1, ENC_NA);
3052
0
        offset += 1;
3053
0
    }
3054
0
    return offset;
3055
0
}
3056
3057
static int
3058
dissect_bthci_evt_cs_result_steps(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, uint8_t step_counter, bool initiator, bool sounding_seq)
3059
0
{
3060
0
    uint8_t step_data_length, step_mode;
3061
0
    proto_tree  *step_tree, *pq_tree;
3062
0
    proto_item  *step_item, *pq_item;
3063
3064
0
    step_data_length = tvb_get_uint8(tvb, offset + 2);
3065
0
    step_item = proto_tree_add_string_format(tree, hf_bthci_evt_cs_step, tvb, offset, step_data_length + 3, "", "Step %u, Mode %u, Channel %u",
3066
0
                                             step_counter, tvb_get_uint8(tvb, offset), tvb_get_uint8(tvb, offset + 1));
3067
0
    step_tree = proto_item_add_subtree(step_item, ett_cs_step);
3068
3069
0
    step_mode = tvb_get_uint8(tvb, offset);
3070
0
    proto_tree_add_item(step_tree, hf_bthci_evt_step_mode, tvb, offset, 1, ENC_NA);
3071
0
    offset += 1;
3072
0
    proto_tree_add_item(step_tree, hf_bthci_evt_step_channel, tvb, offset, 1, ENC_NA);
3073
0
    offset += 1;
3074
0
    proto_tree_add_item(step_tree, hf_bthci_evt_step_data_length, tvb, offset, 1, ENC_NA);
3075
0
    offset += 1;
3076
3077
0
    if (step_mode > 3) {
3078
0
        proto_tree_add_item(tree, hf_bthci_evt_data, tvb, offset, step_data_length, ENC_NA);
3079
0
        offset += step_data_length;
3080
0
        return offset;
3081
0
    }
3082
3083
0
    if (step_mode != 2) {
3084
0
        pq_item = proto_tree_add_item(step_tree, hf_bthci_evt_packet_quality, tvb, offset, 1, ENC_NA);
3085
0
        pq_tree = proto_item_add_subtree(pq_item, ett_packet_quality);
3086
0
        proto_tree_add_item(pq_tree, hf_bthci_evt_packet_quality_aa_check, tvb, offset, 1, ENC_NA);
3087
0
        proto_tree_add_item(pq_tree, hf_bthci_evt_packet_quality_bit_errors, tvb, offset, 1, ENC_NA);
3088
0
        proto_item_append_text(step_item, ", AA %s", val_to_str(tvb_get_uint8(tvb, offset) & 0xf, access_address_check_vals, "Unknown 0x%x"));
3089
0
        offset += 1;
3090
0
    }
3091
3092
0
    if (step_mode == 0) {
3093
0
        proto_tree_add_item(step_tree, hf_bthci_evt_rssi, tvb, offset, 1, ENC_NA);
3094
0
        offset += 1;
3095
0
        proto_tree_add_item(step_tree, hf_bthci_evt_antenna_id, tvb, offset, 1, ENC_NA);
3096
0
        offset += 1;
3097
0
        if (step_data_length == 5) {
3098
0
            proto_tree_add_item(step_tree, hf_bthci_evt_measured_freq_offset, tvb, offset, 2, ENC_LITTLE_ENDIAN);
3099
0
            offset += 2;
3100
0
        }
3101
0
    }
3102
0
    else if (step_mode == 1) {
3103
0
        offset = dissect_bthci_evt_cs_mode1_step(tvb, offset, pinfo, step_tree, initiator, sounding_seq);
3104
0
    }
3105
0
    else if (step_mode == 2) {
3106
0
        offset = dissect_bthci_evt_cs_mode2_step(tvb, offset, pinfo, step_tree, step_data_length);
3107
0
    }
3108
0
    else {
3109
0
        int mode1_step_data_offset = offset;
3110
0
        offset = dissect_bthci_evt_cs_mode1_step(tvb, offset, pinfo, step_tree, initiator, sounding_seq);
3111
0
        offset = dissect_bthci_evt_cs_mode2_step(tvb, offset, pinfo, step_tree, step_data_length - (offset - mode1_step_data_offset));
3112
0
    }
3113
0
    return offset;
3114
0
}
3115
3116
static int
3117
dissect_bthci_evt_le_meta(tvbuff_t *tvb, int offset, packet_info *pinfo,
3118
        proto_tree *tree, wmem_list_t *opcode_list, bluetooth_data_t *bluetooth_data)
3119
0
{
3120
0
    proto_item  *item;
3121
0
    uint8_t      subevent_code;
3122
0
    uint16_t     connection_handle;
3123
0
    uint8_t      bd_addr[6];
3124
0
    uint8_t      status;
3125
3126
0
    subevent_code = tvb_get_uint8(tvb, offset);
3127
0
    proto_tree_add_item(tree, hf_bthci_evt_le_meta_subevent, tvb, offset, 1, ENC_LITTLE_ENDIAN);
3128
3129
0
    if (have_tap_listener(bluetooth_hci_summary_tap)) {
3130
0
        bluetooth_hci_summary_tap_t  *tap_hci_summary;
3131
3132
0
        tap_hci_summary = wmem_new(pinfo->pool, bluetooth_hci_summary_tap_t);
3133
3134
0
        tap_hci_summary->interface_id  = bluetooth_data->interface_id;
3135
0
        tap_hci_summary->adapter_id    = bluetooth_data->adapter_id;
3136
3137
0
        tap_hci_summary->type = BLUETOOTH_HCI_SUMMARY_SUBEVENT;
3138
0
        tap_hci_summary->event = 0x3E; /* LE Meta */
3139
0
        tap_hci_summary->subevent = subevent_code;
3140
0
        if (try_val_to_str(subevent_code, evt_le_meta_subevent))
3141
0
            tap_hci_summary->name = val_to_str(subevent_code, evt_le_meta_subevent, "Unknown 0x%04x");
3142
0
        else
3143
0
            tap_hci_summary->name = NULL;
3144
0
        tap_queue_packet(bluetooth_hci_summary_tap, pinfo, tap_hci_summary);
3145
0
    }
3146
3147
0
    col_append_fstr(pinfo->cinfo, COL_INFO, " (%s)", val_to_str(subevent_code, evt_le_meta_subevent, "Unknown 0x%02x"));
3148
3149
0
    offset += 1;
3150
3151
0
    switch(subevent_code) {
3152
0
        case 0x01: /* LE Connection Complete */
3153
0
            proto_tree_add_item(tree, hf_bthci_evt_status,                        tvb, offset, 1, ENC_LITTLE_ENDIAN);
3154
0
            status = tvb_get_uint8(tvb, offset);
3155
0
            send_hci_summary_status_tap(status, pinfo, bluetooth_data);
3156
0
            offset += 1;
3157
3158
0
            proto_tree_add_item(tree, hf_bthci_evt_connection_handle,             tvb, offset, 2, ENC_LITTLE_ENDIAN);
3159
0
            connection_handle = tvb_get_letohs(tvb, offset) & 0x0FFF;
3160
0
            offset += 2;
3161
3162
0
            proto_tree_add_item(tree, hf_bthci_evt_role,                          tvb, offset, 1, ENC_LITTLE_ENDIAN);
3163
0
            offset += 1;
3164
3165
0
            proto_tree_add_item(tree, hf_bthci_evt_le_peer_address_type,          tvb, offset, 1, ENC_LITTLE_ENDIAN);
3166
0
            offset += 1;
3167
3168
0
            offset = dissect_bd_addr(hf_bthci_evt_bd_addr, pinfo, tree, tvb, offset, false, bluetooth_data->interface_id, bluetooth_data->adapter_id, bd_addr);
3169
3170
0
            proto_tree_add_item(tree, hf_bthci_evt_le_con_interval,        tvb, offset, 2, ENC_LITTLE_ENDIAN);
3171
0
            offset += 2;
3172
3173
0
            proto_tree_add_item(tree, hf_bthci_evt_le_con_latency,                tvb, offset, 2, ENC_LITTLE_ENDIAN);
3174
0
            offset += 2;
3175
3176
0
            proto_tree_add_item(tree, hf_bthci_evt_le_supervision_timeout, tvb, offset, 2, ENC_LITTLE_ENDIAN);
3177
0
            offset += 2;
3178
3179
0
            proto_tree_add_item(tree, hf_bthci_evt_le_central_clock_accuracy,     tvb, offset, 1, ENC_LITTLE_ENDIAN);
3180
0
            offset += 1;
3181
3182
0
            if (!pinfo->fd->visited && status == STATUS_SUCCESS) {
3183
0
                wmem_tree_key_t    key[5];
3184
0
                uint32_t           k_interface_id;
3185
0
                uint32_t           k_adapter_id;
3186
0
                uint32_t           k_connection_handle;
3187
0
                uint32_t           k_frame_number;
3188
0
                remote_bdaddr_t   *remote_bdaddr;
3189
0
                chandle_session_t *chandle_session;
3190
3191
0
                k_interface_id = bluetooth_data->interface_id;
3192
0
                k_adapter_id = bluetooth_data->adapter_id;
3193
0
                k_connection_handle = connection_handle;
3194
0
                k_frame_number = pinfo->num;
3195
3196
0
                key[0].length = 1;
3197
0
                key[0].key    = &k_interface_id;
3198
0
                key[1].length = 1;
3199
0
                key[1].key    = &k_adapter_id;
3200
0
                key[2].length = 1;
3201
0
                key[2].key    = &k_connection_handle;
3202
0
                key[3].length = 1;
3203
0
                key[3].key    = &k_frame_number;
3204
0
                key[4].length = 0;
3205
0
                key[4].key    = NULL;
3206
3207
0
                remote_bdaddr = (remote_bdaddr_t *) wmem_new(wmem_file_scope(), remote_bdaddr_t);
3208
0
                remote_bdaddr->interface_id = bluetooth_data->interface_id;
3209
0
                remote_bdaddr->adapter_id = bluetooth_data->adapter_id;
3210
0
                remote_bdaddr->chandle = connection_handle;
3211
0
                memcpy(remote_bdaddr->bd_addr, bd_addr, 6);
3212
3213
0
                wmem_tree_insert32_array(bluetooth_data->chandle_to_bdaddr, key, remote_bdaddr);
3214
3215
0
                chandle_session = (chandle_session_t *) wmem_new(wmem_file_scope(), chandle_session_t);
3216
0
                chandle_session->connect_in_frame = k_frame_number;
3217
0
                chandle_session->disconnect_in_frame = bluetooth_max_disconnect_in_frame;
3218
0
                chandle_session->link_type = BT_LINK_TYPE_LL;
3219
0
                wmem_tree_insert32_array(bluetooth_data->chandle_sessions, key, chandle_session);
3220
0
            }
3221
3222
0
            add_opcode(pinfo->pool, opcode_list, 0x200D, COMMAND_STATUS_NORMAL); /* LE Create Connection */
3223
3224
0
            break;
3225
0
        case 0x02: /* LE Advertising Report */
3226
0
        {
3227
0
            uint8_t i, num_reports, length;
3228
3229
0
            num_reports = tvb_get_uint8(tvb, offset);
3230
0
            proto_tree_add_item(tree, hf_bthci_evt_num_reports,                   tvb, offset, 1, ENC_LITTLE_ENDIAN);
3231
0
            offset += 1;
3232
0
            for (i = 0; i < num_reports; i++) {
3233
0
                proto_tree_add_item(tree, hf_bthci_evt_advts_event_type,          tvb, offset, 1, ENC_LITTLE_ENDIAN);
3234
0
                offset += 1;
3235
0
                proto_tree_add_item(tree, hf_bthci_evt_le_peer_address_type,      tvb, offset, 1, ENC_LITTLE_ENDIAN);
3236
0
                offset += 1;
3237
0
                offset = dissect_bd_addr(hf_bthci_evt_bd_addr, pinfo, tree, tvb, offset, false, bluetooth_data->interface_id, bluetooth_data->adapter_id, bd_addr);
3238
0
                length = tvb_get_uint8(tvb, offset);
3239
0
                proto_tree_add_item(tree, hf_bthci_evt_data_length,               tvb, offset, 1, ENC_LITTLE_ENDIAN);
3240
0
                offset += 1;
3241
3242
0
                if (length > 0) {
3243
0
                    bluetooth_eir_ad_data_t *ad_data;
3244
3245
0
                    ad_data = wmem_new0(pinfo->pool, bluetooth_eir_ad_data_t);
3246
0
                    ad_data->interface_id = bluetooth_data->interface_id;
3247
0
                    ad_data->adapter_id = bluetooth_data->adapter_id;
3248
0
                    ad_data->bd_addr = bd_addr;
3249
3250
0
                    call_dissector_with_data(btcommon_ad_handle, tvb_new_subset_length(tvb, offset, length), pinfo, tree, ad_data);
3251
0
                    save_remote_device_name(tvb, offset, pinfo, length, bd_addr, bluetooth_data);
3252
0
                    offset += length;
3253
0
                }
3254
3255
0
                proto_tree_add_item(tree, hf_bthci_evt_rssi,                      tvb, offset, 1, ENC_LITTLE_ENDIAN);
3256
0
                offset += 1;
3257
0
                }
3258
0
            }
3259
0
            break;
3260
0
        case 0x03: /* LE Connection Update Complete */
3261
0
            proto_tree_add_item(tree, hf_bthci_evt_status,                        tvb, offset, 1, ENC_LITTLE_ENDIAN);
3262
0
            send_hci_summary_status_tap(tvb_get_uint8(tvb, offset), pinfo, bluetooth_data);
3263
0
            offset += 1;
3264
3265
0
            proto_tree_add_item(tree, hf_bthci_evt_connection_handle,             tvb, offset, 2, ENC_LITTLE_ENDIAN);
3266
0
            offset += 2;
3267
0
            proto_tree_add_item(tree, hf_bthci_evt_le_con_interval,        tvb, offset, 2, ENC_LITTLE_ENDIAN);
3268
0
            offset += 2;
3269
0
            proto_tree_add_item(tree, hf_bthci_evt_le_con_latency,                tvb, offset, 2, ENC_LITTLE_ENDIAN);
3270
0
            offset += 2;
3271
0
            proto_tree_add_item(tree, hf_bthci_evt_le_supervision_timeout, tvb, offset, 2, ENC_LITTLE_ENDIAN);
3272
0
            offset += 2;
3273
3274
0
            add_opcode(pinfo->pool, opcode_list, 0x2013, COMMAND_STATUS_NORMAL); /* LE Connection Update */
3275
0
            break;
3276
0
        case 0x04: /* LE Read Remote Features Complete */
3277
0
            proto_tree_add_item(tree, hf_bthci_evt_status,                        tvb, offset, 1, ENC_LITTLE_ENDIAN);
3278
0
            send_hci_summary_status_tap(tvb_get_uint8(tvb, offset), pinfo, bluetooth_data);
3279
0
            offset += 1;
3280
3281
0
            proto_tree_add_item(tree, hf_bthci_evt_connection_handle,             tvb, offset, 2, ENC_LITTLE_ENDIAN);
3282
0
            offset += 2;
3283
3284
0
            proto_tree_add_bitmask(tree, tvb, offset, hf_bthci_evt_le_features, ett_le_features, hfx_bthci_evt_le_features, ENC_LITTLE_ENDIAN);
3285
0
            offset += 8;
3286
3287
0
            add_opcode(pinfo->pool, opcode_list, 0x2016, COMMAND_STATUS_NORMAL); /* LE Read Remote Features */
3288
0
            break;
3289
0
        case 0x05: /* LE Long Term Key Request */
3290
0
            proto_tree_add_item(tree, hf_bthci_evt_connection_handle,             tvb, offset, 2, ENC_LITTLE_ENDIAN);
3291
0
            offset += 2;
3292
0
            proto_tree_add_item(tree, hf_bthci_evt_random_number,                 tvb, offset, 8, ENC_NA);
3293
0
            offset += 8;
3294
0
            proto_tree_add_item(tree, hf_bthci_evt_encrypted_diversifier,         tvb, offset, 2, ENC_LITTLE_ENDIAN);
3295
0
            offset += 2;
3296
0
            break;
3297
0
        case 0x06: /* LE Remote Connection Parameter Request */
3298
0
            proto_tree_add_item(tree, hf_bthci_evt_connection_handle,             tvb, offset, 2, ENC_LITTLE_ENDIAN);
3299
0
            offset += 2;
3300
3301
0
            proto_tree_add_item(tree, hf_bthci_evt_le_min_interval,        tvb, offset, 2, ENC_LITTLE_ENDIAN);
3302
0
            offset += 2;
3303
3304
0
            proto_tree_add_item(tree, hf_bthci_evt_le_max_interval,        tvb, offset, 2, ENC_LITTLE_ENDIAN);
3305
0
            offset += 2;
3306
3307
0
            proto_tree_add_item(tree, hf_bthci_evt_le_con_latency,                tvb, offset, 2, ENC_LITTLE_ENDIAN);
3308
0
            offset += 2;
3309
3310
0
            proto_tree_add_item(tree, hf_bthci_evt_le_supervision_timeout, tvb, offset, 2, ENC_LITTLE_ENDIAN);
3311
0
            offset += 2;
3312
3313
0
            break;
3314
0
        case 0x07: /* LE Data Length Change */
3315
0
            proto_tree_add_item(tree, hf_bthci_evt_connection_handle,             tvb, offset, 2, ENC_LITTLE_ENDIAN);
3316
0
            offset += 2;
3317
3318
0
            proto_tree_add_item(tree, hf_bthci_evt_le_max_tx_octets,              tvb, offset, 2, ENC_LITTLE_ENDIAN);
3319
0
            offset += 2;
3320
3321
0
            proto_tree_add_item(tree, hf_bthci_evt_le_max_tx_time,                tvb, offset, 2, ENC_LITTLE_ENDIAN);
3322
0
            offset += 2;
3323
3324
0
            proto_tree_add_item(tree, hf_bthci_evt_le_max_rx_octets,              tvb, offset, 2, ENC_LITTLE_ENDIAN);
3325
0
            offset += 2;
3326
3327
0
            proto_tree_add_item(tree, hf_bthci_evt_le_max_rx_time,                tvb, offset, 2, ENC_LITTLE_ENDIAN);
3328
0
            offset += 2;
3329
3330
0
            break;
3331
0
        case 0x08: /* LE Read Local P-256 Public Key Complete */
3332
0
            proto_tree_add_item(tree, hf_bthci_evt_status,                        tvb, offset, 1, ENC_LITTLE_ENDIAN);
3333
0
            send_hci_summary_status_tap(tvb_get_uint8(tvb, offset), pinfo, bluetooth_data);
3334
0
            offset += 1;
3335
3336
0
            proto_tree_add_item(tree, hf_bthci_evt_le_local_p_256_public_key,     tvb, offset, 64, ENC_NA);
3337
0
            offset += 64;
3338
3339
0
            add_opcode(pinfo->pool, opcode_list, 0x2025, COMMAND_STATUS_NORMAL); /* LE Read Local P-256 Public Key */
3340
3341
0
            break;
3342
0
        case 0x09: /* LE Generate DHKey Complete */
3343
0
            proto_tree_add_item(tree, hf_bthci_evt_status,                        tvb, offset, 1, ENC_LITTLE_ENDIAN);
3344
0
            send_hci_summary_status_tap(tvb_get_uint8(tvb, offset), pinfo, bluetooth_data);
3345
0
            offset += 1;
3346
3347
0
            proto_tree_add_item(tree, hf_bthci_evt_le_dhkey,                      tvb, offset, 32, ENC_NA);
3348
0
            offset += 32;
3349
3350
0
            add_opcode(pinfo->pool, opcode_list, 0x2026, COMMAND_STATUS_NORMAL); /* LE Generate DHKey */
3351
3352
0
            break;
3353
0
        case 0x0A: /* LE Enhanced Connection Complete [v1] */
3354
0
        case 0x29: /* LE Enhanced Connection Complete [v2] */
3355
0
            proto_tree_add_item(tree, hf_bthci_evt_status,                        tvb, offset, 1, ENC_LITTLE_ENDIAN);
3356
0
            status = tvb_get_uint8(tvb, offset);
3357
0
            send_hci_summary_status_tap(status, pinfo, bluetooth_data);
3358
0
            offset += 1;
3359
3360
0
            proto_tree_add_item(tree, hf_bthci_evt_connection_handle,             tvb, offset, 2, ENC_LITTLE_ENDIAN);
3361
0
            connection_handle = tvb_get_letohs(tvb, offset) & 0x0FFF;
3362
0
            offset += 2;
3363
3364
0
            proto_tree_add_item(tree, hf_bthci_evt_role,                          tvb, offset, 1, ENC_LITTLE_ENDIAN);
3365
0
            offset += 1;
3366
3367
0
            proto_tree_add_item(tree, hf_bthci_evt_le_peer_address_type,          tvb, offset, 1, ENC_LITTLE_ENDIAN);
3368
0
            offset += 1;
3369
3370
0
            offset = dissect_bd_addr(hf_bthci_evt_bd_addr, pinfo, tree, tvb, offset, false, bluetooth_data->interface_id, bluetooth_data->adapter_id, bd_addr);
3371
0
            offset = dissect_bd_addr(hf_bthci_evt_le_local_rpa, pinfo, tree, tvb, offset, false, bluetooth_data->interface_id, bluetooth_data->adapter_id, NULL);
3372
0
            offset = dissect_bd_addr(hf_bthci_evt_le_peer_rpa, pinfo, tree, tvb, offset, false, bluetooth_data->interface_id, bluetooth_data->adapter_id, NULL);
3373
3374
0
            proto_tree_add_item(tree, hf_bthci_evt_le_con_interval,        tvb, offset, 2, ENC_LITTLE_ENDIAN);
3375
0
            offset += 2;
3376
3377
0
            proto_tree_add_item(tree, hf_bthci_evt_le_con_latency,                tvb, offset, 2, ENC_LITTLE_ENDIAN);
3378
0
            offset += 2;
3379
3380
0
            proto_tree_add_item(tree, hf_bthci_evt_le_supervision_timeout, tvb, offset, 2, ENC_LITTLE_ENDIAN);
3381
0
            offset += 2;
3382
3383
0
            proto_tree_add_item(tree, hf_bthci_evt_le_central_clock_accuracy,     tvb, offset, 1, ENC_LITTLE_ENDIAN);
3384
0
            offset += 1;
3385
3386
0
            if (subevent_code == 0x29) {
3387
0
                proto_tree_add_item(tree, hf_bthci_evt_advertising_handle, tvb, offset, 1, ENC_NA);
3388
0
                offset += 1;
3389
0
                proto_tree_add_item(tree, hf_bthci_evt_sync_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
3390
0
                offset += 2;
3391
0
            }
3392
3393
0
            if (!pinfo->fd->visited && status == STATUS_SUCCESS) {
3394
0
                wmem_tree_key_t    key[5];
3395
0
                uint32_t           k_interface_id;
3396
0
                uint32_t           k_adapter_id;
3397
0
                uint32_t           k_connection_handle;
3398
0
                uint32_t           k_frame_number;
3399
0
                remote_bdaddr_t   *remote_bdaddr;
3400
0
                chandle_session_t *chandle_session;
3401
3402
0
                k_interface_id = bluetooth_data->interface_id;
3403
0
                k_adapter_id = bluetooth_data->adapter_id;
3404
0
                k_connection_handle = connection_handle;
3405
0
                k_frame_number = pinfo->num;
3406
3407
0
                key[0].length = 1;
3408
0
                key[0].key    = &k_interface_id;
3409
0
                key[1].length = 1;
3410
0
                key[1].key    = &k_adapter_id;
3411
0
                key[2].length = 1;
3412
0
                key[2].key    = &k_connection_handle;
3413
0
                key[3].length = 1;
3414
0
                key[3].key    = &k_frame_number;
3415
0
                key[4].length = 0;
3416
0
                key[4].key    = NULL;
3417
3418
0
                remote_bdaddr = (remote_bdaddr_t *) wmem_new(wmem_file_scope(), remote_bdaddr_t);
3419
0
                remote_bdaddr->interface_id = bluetooth_data->interface_id;
3420
0
                remote_bdaddr->adapter_id = bluetooth_data->adapter_id;
3421
0
                remote_bdaddr->chandle = connection_handle;
3422
0
                memcpy(remote_bdaddr->bd_addr, bd_addr, 6);
3423
3424
0
                wmem_tree_insert32_array(bluetooth_data->chandle_to_bdaddr, key, remote_bdaddr);
3425
3426
0
                chandle_session = (chandle_session_t *) wmem_new(wmem_file_scope(), chandle_session_t);
3427
0
                chandle_session->connect_in_frame = k_frame_number;
3428
0
                chandle_session->disconnect_in_frame = bluetooth_max_disconnect_in_frame;
3429
0
                chandle_session->link_type = BT_LINK_TYPE_LL;
3430
0
                wmem_tree_insert32_array(bluetooth_data->chandle_sessions, key, chandle_session);
3431
0
            }
3432
3433
0
            add_opcode(pinfo->pool, opcode_list, 0x200D, COMMAND_STATUS_NORMAL); /* LE Create Connection */
3434
3435
0
            break;
3436
0
        case 0x0B: /* LE Direct Advertising Report */
3437
0
            {
3438
0
            uint8_t number_of_reports;
3439
0
            uint8_t report_id = 1;
3440
3441
0
            proto_tree_add_item(tree, hf_bthci_evt_le_number_of_reports, tvb, offset, 1, ENC_NA);
3442
0
            number_of_reports = tvb_get_uint8(tvb, offset);
3443
0
            offset += 1;
3444
3445
0
            while (number_of_reports) {
3446
0
                proto_item *report_item;
3447
0
                proto_tree *report_tree;
3448
3449
0
                report_item = proto_tree_add_none_format(tree, hf_bthci_evt_le_report, tvb, offset, 16, "Item %u",
3450
0
                        report_id);
3451
0
                report_tree = proto_item_add_subtree(report_item, ett_le_report);
3452
3453
0
                proto_tree_add_item(report_tree, hf_bthci_evt_le_event_type, tvb, offset, 1, ENC_NA);
3454
0
                offset += 1;
3455
3456
0
                proto_tree_add_item(report_tree, hf_bthci_evt_le_direct_address_type, tvb, offset, 1, ENC_NA);
3457
0
                offset += 1;
3458
3459
0
                offset = dissect_bd_addr(hf_bthci_evt_le_direct_bd_addr, pinfo, report_tree, tvb, offset, false, bluetooth_data->interface_id, bluetooth_data->adapter_id, NULL);
3460
3461
0
                proto_tree_add_item(report_tree, hf_bthci_evt_le_address_type, tvb, offset, 1, ENC_NA);
3462
0
                offset += 1;
3463
3464
0
                offset = dissect_bd_addr(hf_bthci_evt_bd_addr, pinfo, report_tree, tvb, offset, false, bluetooth_data->interface_id, bluetooth_data->adapter_id, NULL);
3465
3466
0
                proto_tree_add_item(report_tree, hf_bthci_evt_le_rssi, tvb, offset, 1, ENC_NA);
3467
0
                offset += 1;
3468
3469
0
                report_id += 1;
3470
0
                number_of_reports--;
3471
0
            }
3472
3473
0
            }
3474
0
            break;
3475
0
        case 0x0C: /* LE PHY Update Complete */
3476
0
            proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN);
3477
0
            status = tvb_get_uint8(tvb, offset);
3478
0
            send_hci_summary_status_tap(status, pinfo, bluetooth_data);
3479
0
            offset += 1;
3480
3481
0
            proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
3482
0
            offset += 2;
3483
3484
0
            proto_tree_add_item(tree, hf_bthci_evt_le_tx_phy, tvb, offset, 1, ENC_NA);
3485
0
            offset += 1;
3486
3487
0
            proto_tree_add_item(tree, hf_bthci_evt_le_rx_phy, tvb, offset, 1, ENC_NA);
3488
0
            offset += 1;
3489
3490
0
            break;
3491
0
        case 0x0D: /* LE Extended Advertising Report */
3492
0
            {
3493
0
            uint8_t i, num_reports, length;
3494
3495
0
            num_reports = tvb_get_uint8(tvb, offset);
3496
0
            proto_tree_add_item(tree, hf_bthci_evt_num_reports, tvb, offset, 1, ENC_NA);
3497
0
            offset += 1;
3498
0
            for (i = 0; i < num_reports; i++) {
3499
3500
0
                proto_tree_add_bitmask(tree, tvb, offset, hf_bthci_evt_ext_advts_event_type, ett_le_ext_advts_event_type, hfx_bthci_evt_le_ext_advts_evt_type, ENC_LITTLE_ENDIAN);
3501
0
                offset += 2;
3502
0
                proto_tree_add_item(tree, hf_bthci_evt_le_peer_address_type, tvb, offset, 1, ENC_NA);
3503
0
                offset += 1;
3504
0
                offset = dissect_bd_addr(hf_bthci_evt_bd_addr, pinfo, tree, tvb, offset, false, bluetooth_data->interface_id, bluetooth_data->adapter_id, bd_addr);
3505
3506
0
                proto_tree_add_item(tree, hf_bthci_evt_primary_phy, tvb, offset, 1, ENC_NA);
3507
0
                offset += 1;
3508
0
                proto_tree_add_item(tree, hf_bthci_evt_secondary_phy, tvb, offset, 1, ENC_NA);
3509
0
                offset += 1;
3510
0
                item = proto_tree_add_item(tree, hf_bthci_evt_advertising_sid, tvb, offset, 1, ENC_NA);
3511
0
                if (tvb_get_uint8(tvb, offset) == 0xFF)
3512
0
                    proto_item_append_text(item, " (not available)");
3513
0
                offset += 1;
3514
3515
0
                item = proto_tree_add_item(tree, hf_bthci_evt_tx_power, tvb, offset, 1, ENC_NA);
3516
0
                if (tvb_get_uint8(tvb, offset) == 127)
3517
0
                    proto_item_append_text(item, " (not available)");
3518
0
                offset += 1;
3519
3520
0
                item = proto_tree_add_item(tree, hf_bthci_evt_rssi, tvb, offset, 1, ENC_NA);
3521
0
                if (tvb_get_uint8(tvb, offset) == 127)
3522
0
                    proto_item_append_text(item, " (not available)");
3523
0
                offset += 1;
3524
3525
0
                item = proto_tree_add_item(tree, hf_bthci_evt_periodic_advertising_interval, tvb, offset, 2, ENC_LITTLE_ENDIAN);
3526
0
                if (tvb_get_uint16(tvb, offset, ENC_LITTLE_ENDIAN) == 0x0000)
3527
0
                    proto_item_append_text(item, " (no periodic advertising)");
3528
0
                offset += 2;
3529
3530
0
                proto_tree_add_item(tree, hf_bthci_evt_le_direct_address_type, tvb, offset, 1, ENC_NA);
3531
0
                offset += 1;
3532
3533
0
                offset = dissect_bd_addr(hf_bthci_evt_le_direct_bd_addr, pinfo, tree, tvb, offset, false, bluetooth_data->interface_id, bluetooth_data->adapter_id, NULL);
3534
3535
0
                length = tvb_get_uint8(tvb, offset);
3536
0
                proto_tree_add_item(tree, hf_bthci_evt_data_length, tvb, offset, 1, ENC_NA);
3537
0
                offset += 1;
3538
3539
0
                if (length > 0) {
3540
0
                    bluetooth_eir_ad_data_t *ad_data;
3541
3542
0
                    ad_data = wmem_new0(pinfo->pool, bluetooth_eir_ad_data_t);
3543
0
                    ad_data->interface_id = bluetooth_data->interface_id;
3544
0
                    ad_data->adapter_id = bluetooth_data->adapter_id;
3545
0
                    ad_data->bd_addr = bd_addr;
3546
3547
0
                    call_dissector_with_data(btcommon_ad_handle, tvb_new_subset_length(tvb, offset, length), pinfo, tree, ad_data);
3548
0
                    save_remote_device_name(tvb, offset, pinfo, length, bd_addr, bluetooth_data);
3549
0
                    offset += length;
3550
0
                }
3551
0
            }
3552
0
            }
3553
0
            break;
3554
0
        case 0x0E: /* LE Periodic Advertising Sync Established [v1] */
3555
0
        case 0x24: /* LE Periodic Advertising Sync Established [v2] */
3556
0
            proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_NA);
3557
0
            status = tvb_get_uint8(tvb, offset);
3558
0
            send_hci_summary_status_tap(status, pinfo, bluetooth_data);
3559
0
            offset += 1;
3560
0
            proto_tree_add_item(tree, hf_bthci_evt_sync_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
3561
0
            offset += 2;
3562
0
            proto_tree_add_item(tree, hf_bthci_evt_advertising_sid, tvb, offset, 1, ENC_NA);
3563
0
            offset += 1;
3564
0
            proto_tree_add_item(tree, hf_bthci_evt_le_peer_address_type, tvb, offset, 1, ENC_NA);
3565
0
            offset += 1;
3566
0
            offset = dissect_bd_addr(hf_bthci_evt_bd_addr, pinfo, tree, tvb, offset, false, bluetooth_data->interface_id, bluetooth_data->adapter_id, bd_addr);
3567
0
            proto_tree_add_item(tree, hf_bthci_evt_advertiser_phy, tvb, offset, 1, ENC_NA);
3568
0
            offset += 1;
3569
0
            proto_tree_add_item(tree, hf_bthci_evt_periodic_advertising_interval, tvb, offset, 2, ENC_LITTLE_ENDIAN);
3570
0
            offset += 2;
3571
0
            proto_tree_add_item(tree, hf_bthci_evt_advertiser_clock_accuracy, tvb, offset, 1, ENC_NA);
3572
0
            offset += 1;
3573
0
            if (subevent_code == 0x24) {
3574
0
                proto_tree_add_item(tree, hf_bthci_evt_num_subevents, tvb, offset, 1, ENC_NA);
3575
0
                offset+=1;
3576
0
                proto_tree_add_item(tree, hf_bthci_evt_subevent_interval, tvb, offset, 1, ENC_NA);
3577
0
                offset+=1;
3578
0
                proto_tree_add_item(tree, hf_bthci_evt_response_slot_delay, tvb, offset, 1, ENC_NA);
3579
0
                offset+=1;
3580
0
                proto_tree_add_item(tree, hf_bthci_evt_response_slot_spacing, tvb, offset, 1, ENC_NA);
3581
0
                offset+=1;
3582
0
            }
3583
0
            break;
3584
0
        case 0x0F: /* LE Periodic Advertising Report [v1] */
3585
0
        case 0x25: /* LE Periodic Advertising Report [v2] */
3586
0
            {
3587
0
            uint8_t length;
3588
0
            proto_tree_add_item(tree, hf_bthci_evt_sync_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
3589
0
            offset += 2;
3590
0
            item = proto_tree_add_item(tree, hf_bthci_evt_tx_power, tvb, offset, 1, ENC_NA);
3591
0
            if (tvb_get_uint8(tvb, offset) == 127)
3592
0
                    proto_item_append_text(item, " (not available)");
3593
0
            offset += 1;
3594
0
            item = proto_tree_add_item(tree, hf_bthci_evt_rssi, tvb, offset, 1, ENC_NA);
3595
0
            if (tvb_get_uint8(tvb, offset) == 127)
3596
0
                    proto_item_append_text(item, " (not available)");
3597
0
            offset += 1;
3598
0
            proto_tree_add_item(tree, hf_bthci_evt_cte_type, tvb, offset, 1, ENC_NA);
3599
0
            offset += 1;
3600
0
            if (subevent_code == 0x25) {
3601
0
                proto_tree_add_item(tree, hf_bthci_evt_periodic_event_counter, tvb, offset, 2, ENC_LITTLE_ENDIAN);
3602
0
                offset += 2;
3603
0
                proto_tree_add_item(tree, hf_bthci_evt_subevent, tvb, offset, 1, ENC_NA);
3604
0
                offset += 1;
3605
0
            }
3606
0
            item = proto_tree_add_item(tree, hf_bthci_evt_data_status, tvb, offset, 1, ENC_NA);
3607
0
            if (tvb_get_uint8(tvb, offset) == 0xff)
3608
0
                    proto_item_append_text(item, " (Failed to receive)");
3609
0
            offset += 1;
3610
0
            proto_tree_add_item(tree, hf_bthci_evt_data_length, tvb, offset, 1, ENC_NA);
3611
0
            length = tvb_get_uint8(tvb, offset);
3612
0
            offset += 1;
3613
0
            proto_tree_add_item(tree, hf_bthci_evt_data, tvb, offset, length, ENC_NA);
3614
0
            offset += length;
3615
0
            }
3616
0
            break;
3617
0
        case 0x10: /* LE Periodic Advertising Sync Lost */
3618
0
            proto_tree_add_item(tree, hf_bthci_evt_sync_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
3619
0
            offset += 2;
3620
0
            break;
3621
0
        case 0x12: /* LE Advertising Set Terminated */
3622
0
            proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_NA);
3623
0
            status = tvb_get_uint8(tvb, offset);
3624
0
            send_hci_summary_status_tap(status, pinfo, bluetooth_data);
3625
0
            offset += 1;
3626
0
            proto_tree_add_item(tree, hf_bthci_evt_advertising_handle, tvb, offset, 1, ENC_NA);
3627
0
            offset += 1;
3628
0
            proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
3629
0
            offset += 2;
3630
0
            proto_tree_add_item(tree, hf_bthci_evt_num_compl_ext_advertising_events, tvb, offset, 1, ENC_NA);
3631
0
            offset += 1;
3632
0
            break;
3633
0
        case 0x13: /* LE Scan Request Received */
3634
0
            proto_tree_add_item(tree, hf_bthci_evt_advertising_handle, tvb, offset, 1, ENC_NA);
3635
0
            offset += 1;
3636
0
            proto_tree_add_item(tree, hf_bthci_evt_le_address_type, tvb, offset, 1, ENC_NA);
3637
0
            offset += 1;
3638
3639
0
            offset = dissect_bd_addr(hf_bthci_evt_bd_addr, pinfo, tree, tvb, offset, false, bluetooth_data->interface_id, bluetooth_data->adapter_id, NULL);
3640
0
            break;
3641
0
        case 0x14: /* LE Channel Selection Algorithm */
3642
0
            proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
3643
0
            offset += 2;
3644
0
            proto_tree_add_item(tree, hf_bthci_evt_channel_selection_algorithm, tvb, offset, 1, ENC_NA);
3645
0
            offset += 1;
3646
0
            break;
3647
0
        case 0x15: /* LE Connectionless IQ Report */
3648
0
            proto_tree_add_item(tree, hf_bthci_evt_sync_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
3649
0
            offset += 2;
3650
0
            proto_tree_add_item(tree, hf_bthci_evt_channel_index, tvb, offset, 1, ENC_NA);
3651
0
            offset += 1;
3652
0
            item = proto_tree_add_item(tree, hf_bthci_evt_cte_rssi, tvb, offset, 2, ENC_LITTLE_ENDIAN);
3653
0
            proto_item_append_text(item, " (%g dBm)", tvb_get_letohis(tvb, offset)*0.1);
3654
0
            offset += 2;
3655
0
            proto_tree_add_item(tree, hf_bthci_evt_antenna_id, tvb, offset, 1, ENC_NA);
3656
0
            offset += 1;
3657
0
            proto_tree_add_item(tree, hf_bthci_evt_cte_type, tvb, offset, 1, ENC_NA);
3658
0
            offset += 1;
3659
0
            proto_tree_add_item(tree, hf_bthci_evt_slot_durations, tvb, offset, 1, ENC_NA);
3660
0
            offset += 1;
3661
0
            proto_tree_add_item(tree, hf_bthci_evt_packet_status, tvb, offset, 1, ENC_NA);
3662
0
            offset += 1;
3663
0
            proto_tree_add_item(tree, hf_bthci_evt_event_counter, tvb, offset, 2, ENC_LITTLE_ENDIAN);
3664
0
            offset += 2;
3665
0
            offset = dissect_iq_sample_list(tvb, offset, tree);
3666
0
            break;
3667
0
        case 0x16: /* LE Connection IQ Report */
3668
0
            proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
3669
0
            offset += 2;
3670
0
            proto_tree_add_item(tree, hf_bthci_evt_le_rx_phy, tvb, offset, 1, ENC_NA);
3671
0
            offset += 1;
3672
0
            proto_tree_add_item(tree, hf_bthci_evt_channel_index, tvb, offset, 1, ENC_NA);
3673
0
            offset += 1;
3674
0
            item = proto_tree_add_item(tree, hf_bthci_evt_cte_rssi, tvb, offset, 2, ENC_LITTLE_ENDIAN);
3675
0
            proto_item_append_text(item, " (%g dBm)", tvb_get_letohis(tvb, offset)*0.1);
3676
0
            offset += 2;
3677
0
            proto_tree_add_item(tree, hf_bthci_evt_antenna_id, tvb, offset, 1, ENC_NA);
3678
0
            offset += 1;
3679
0
            proto_tree_add_item(tree, hf_bthci_evt_cte_type, tvb, offset, 1, ENC_NA);
3680
0
            offset += 1;
3681
0
            proto_tree_add_item(tree, hf_bthci_evt_slot_durations, tvb, offset, 1, ENC_NA);
3682
0
            offset += 1;
3683
0
            proto_tree_add_item(tree, hf_bthci_evt_packet_status, tvb, offset, 1, ENC_NA);
3684
0
            offset += 1;
3685
0
            proto_tree_add_item(tree, hf_bthci_evt_event_counter, tvb, offset, 2, ENC_LITTLE_ENDIAN);
3686
0
            offset += 2;
3687
0
            offset = dissect_iq_sample_list(tvb, offset, tree);
3688
0
            break;
3689
0
        case 0x17: /* LE CTE Request Failed */
3690
0
        case 0x2E: /* LE CS Security Enable Complete */
3691
0
            proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_NA);
3692
0
            status = tvb_get_uint8(tvb, offset);
3693
0
            send_hci_summary_status_tap(status, pinfo, bluetooth_data);
3694
0
            offset += 1;
3695
0
            proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
3696
0
            offset += 2;
3697
0
            break;
3698
0
        case 0x18: /* LE Periodic Advertising Sync Transfer Received [v1] */
3699
0
        case 0x26: /* LE Periodic Advertising Sync Transfer Received [v2] */
3700
0
            proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_NA);
3701
0
            status = tvb_get_uint8(tvb, offset);
3702
0
            send_hci_summary_status_tap(status, pinfo, bluetooth_data);
3703
0
            offset += 1;
3704
0
            proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
3705
0
            offset += 2;
3706
0
            proto_tree_add_item(tree, hf_bthci_evt_service_data_past, tvb, offset, 2, ENC_LITTLE_ENDIAN);
3707
0
            offset += 2;
3708
0
            proto_tree_add_item(tree, hf_bthci_evt_sync_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
3709
0
            offset += 2;
3710
0
            proto_tree_add_item(tree, hf_bthci_evt_advertising_sid, tvb, offset, 1, ENC_NA);
3711
0
            offset += 1;
3712
0
            proto_tree_add_item(tree, hf_bthci_evt_le_peer_address_type, tvb, offset, 1, ENC_NA);
3713
0
            offset += 1;
3714
0
            offset = dissect_bd_addr(hf_bthci_evt_bd_addr, pinfo, tree, tvb, offset, false, bluetooth_data->interface_id, bluetooth_data->adapter_id, bd_addr);
3715
0
            proto_tree_add_item(tree, hf_bthci_evt_advertiser_phy, tvb, offset, 1, ENC_NA);
3716
0
            offset += 1;
3717
0
            proto_tree_add_item(tree, hf_bthci_evt_periodic_advertising_interval, tvb, offset, 2, ENC_LITTLE_ENDIAN);
3718
0
            offset += 2;
3719
0
            proto_tree_add_item(tree, hf_bthci_evt_advertiser_clock_accuracy, tvb, offset, 1, ENC_NA);
3720
0
            offset += 1;
3721
0
            if (subevent_code == 0x26) {
3722
0
                proto_tree_add_item(tree, hf_bthci_evt_num_subevents, tvb, offset, 1, ENC_NA);
3723
0
                offset+=1;
3724
0
                proto_tree_add_item(tree, hf_bthci_evt_subevent_interval, tvb, offset, 1, ENC_NA);
3725
0
                offset+=1;
3726
0
                proto_tree_add_item(tree, hf_bthci_evt_response_slot_delay, tvb, offset, 1, ENC_NA);
3727
0
                offset+=1;
3728
0
                proto_tree_add_item(tree, hf_bthci_evt_response_slot_spacing, tvb, offset, 1, ENC_NA);
3729
0
                offset+=1;
3730
0
            }
3731
0
            break;
3732
0
        case 0x19: /* LE CIS Established [v1] */
3733
0
        case 0x2A: /* LE CIS Established [v2] */
3734
0
            proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_NA);
3735
0
            status = tvb_get_uint8(tvb, offset);
3736
0
            send_hci_summary_status_tap(status, pinfo, bluetooth_data);
3737
0
            offset += 1;
3738
0
            proto_tree_add_item(tree, hf_bthci_evt_cis_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
3739
0
            connection_handle = tvb_get_letohs(tvb, offset) & 0x0FFF;
3740
0
            offset += 2;
3741
3742
0
            if (!pinfo->fd->visited && status == STATUS_SUCCESS) {
3743
0
                wmem_tree_key_t    key[5];
3744
0
                uint32_t           k_interface_id;
3745
0
                uint32_t           k_adapter_id;
3746
0
                uint32_t           k_connection_handle;
3747
0
                uint32_t           k_frame_number;
3748
0
                chandle_session_t *chandle_session;
3749
3750
0
                k_interface_id = bluetooth_data->interface_id;
3751
0
                k_adapter_id = bluetooth_data->adapter_id;
3752
0
                k_connection_handle = connection_handle;
3753
0
                k_frame_number = pinfo->num;
3754
3755
0
                key[0].length = 1;
3756
0
                key[0].key    = &k_interface_id;
3757
0
                key[1].length = 1;
3758
0
                key[1].key    = &k_adapter_id;
3759
0
                key[2].length = 1;
3760
0
                key[2].key    = &k_connection_handle;
3761
0
                key[3].length = 1;
3762
0
                key[3].key    = &k_frame_number;
3763
0
                key[4].length = 0;
3764
0
                key[4].key    = NULL;
3765
3766
0
                chandle_session = (chandle_session_t *) wmem_new(wmem_file_scope(), chandle_session_t);
3767
0
                chandle_session->connect_in_frame = k_frame_number;
3768
0
                chandle_session->disconnect_in_frame = bluetooth_max_disconnect_in_frame;
3769
0
                chandle_session->link_type = BT_LINK_TYPE_ISO;
3770
0
                wmem_tree_insert32_array(bluetooth_data->chandle_sessions, key, chandle_session);
3771
0
            }
3772
3773
0
            proto_tree_add_item(tree, hf_bthci_evt_cig_sync_delay, tvb, offset, 3, ENC_LITTLE_ENDIAN);
3774
0
            offset += 3;
3775
0
            proto_tree_add_item(tree, hf_bthci_evt_cis_sync_delay, tvb, offset, 3, ENC_LITTLE_ENDIAN);
3776
0
            offset += 3;
3777
0
            proto_tree_add_item(tree, hf_bthci_evt_transport_latency_c_to_p, tvb, offset, 3, ENC_LITTLE_ENDIAN);
3778
0
            offset += 3;
3779
0
            proto_tree_add_item(tree, hf_bthci_evt_transport_latency_p_to_c, tvb, offset, 3, ENC_LITTLE_ENDIAN);
3780
0
            offset += 3;
3781
0
            proto_tree_add_item(tree, hf_bthci_evt_phy_c_to_p, tvb, offset, 1, ENC_NA);
3782
0
            offset += 1;
3783
0
            proto_tree_add_item(tree, hf_bthci_evt_phy_p_to_c, tvb, offset, 1, ENC_NA);
3784
0
            offset += 1;
3785
0
            proto_tree_add_item(tree, hf_bthci_evt_nse, tvb, offset, 1, ENC_NA);
3786
0
            offset += 1;
3787
0
            proto_tree_add_item(tree, hf_bthci_evt_bn_c_to_p, tvb, offset, 1, ENC_NA);
3788
0
            offset += 1;
3789
0
            proto_tree_add_item(tree, hf_bthci_evt_bn_p_to_c, tvb, offset, 1, ENC_NA);
3790
0
            offset += 1;
3791
0
            proto_tree_add_item(tree, hf_bthci_evt_ft_c_to_p, tvb, offset, 1, ENC_NA);
3792
0
            offset += 1;
3793
0
            proto_tree_add_item(tree, hf_bthci_evt_ft_p_to_c, tvb, offset, 1, ENC_NA);
3794
0
            offset += 1;
3795
0
            proto_tree_add_item(tree, hf_bthci_evt_max_pdu_c_to_p, tvb, offset, 2, ENC_LITTLE_ENDIAN);
3796
0
            offset += 2;
3797
0
            proto_tree_add_item(tree, hf_bthci_evt_max_pdu_p_to_c, tvb, offset, 2, ENC_LITTLE_ENDIAN);
3798
0
            offset += 2;
3799
0
            proto_tree_add_item(tree, hf_bthci_evt_iso_interval, tvb, offset, 2, ENC_LITTLE_ENDIAN);
3800
0
            offset += 2;
3801
0
            if (subevent_code == 0x2A) {
3802
0
                proto_tree_add_item(tree, hf_bthci_evt_sub_interval, tvb, offset, 3, ENC_LITTLE_ENDIAN);
3803
0
                offset += 3;
3804
0
                proto_tree_add_item(tree, hf_bthci_evt_max_sdu_c_to_p, tvb, offset, 2, ENC_LITTLE_ENDIAN);
3805
0
                offset += 2;
3806
0
                proto_tree_add_item(tree, hf_bthci_evt_max_sdu_p_to_c, tvb, offset, 2, ENC_LITTLE_ENDIAN);
3807
0
                offset += 2;
3808
0
                proto_tree_add_item(tree, hf_bthci_evt_sdu_interval_c_to_p, tvb, offset, 3, ENC_LITTLE_ENDIAN);
3809
0
                offset += 3;
3810
0
                proto_tree_add_item(tree, hf_bthci_evt_sdu_interval_p_to_c, tvb, offset, 3, ENC_LITTLE_ENDIAN);
3811
0
                offset += 3;
3812
0
                proto_tree_add_item(tree, hf_bthci_evt_framing, tvb, offset, 1, ENC_NA);
3813
0
                offset += 1;
3814
0
            }
3815
0
            break;
3816
0
        case 0x1A: /* LE CIS Request */
3817
0
            {
3818
0
            uint32_t chandle, k_shandle;
3819
0
            proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
3820
0
            chandle = tvb_get_letohs(tvb, offset) & 0xfff;
3821
0
            offset += 2;
3822
0
            proto_tree_add_item(tree, hf_bthci_evt_cis_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
3823
0
            k_shandle = tvb_get_letohs(tvb, offset) & 0xfff;
3824
0
            offset += 2;
3825
0
            proto_tree_add_item(tree, hf_bthci_evt_cig_id, tvb, offset, 1, ENC_NA);
3826
0
            offset += 1;
3827
0
            proto_tree_add_item(tree, hf_bthci_evt_cis_id, tvb, offset, 1, ENC_NA);
3828
0
            offset += 1;
3829
3830
0
            if (!pinfo->fd->visited) {
3831
0
                wmem_tree_key_t     key[5];
3832
0
                uint32_t            interface_id;
3833
0
                uint32_t            adapter_id;
3834
0
                uint32_t            frame_number;
3835
0
                stream_connection_handle_pair_t *stream_connection_handle_pair;
3836
3837
0
                interface_id = bluetooth_data->interface_id;
3838
0
                adapter_id   = bluetooth_data->adapter_id;
3839
0
                frame_number = pinfo->num;
3840
3841
0
                key[0].length = 1;
3842
0
                key[0].key    = &interface_id;
3843
0
                key[1].length = 1;
3844
0
                key[1].key    = &adapter_id;
3845
0
                key[2].length = 1;
3846
0
                key[2].key    = &k_shandle;
3847
0
                key[3].length = 1;
3848
0
                key[3].key    = &frame_number;
3849
0
                key[4].length = 0;
3850
0
                key[4].key    = NULL;
3851
3852
0
                stream_connection_handle_pair = (stream_connection_handle_pair_t *) wmem_new(wmem_file_scope(), stream_connection_handle_pair_t);
3853
0
                stream_connection_handle_pair->chandle = chandle;
3854
0
                stream_connection_handle_pair->change_in_frame = frame_number;
3855
3856
0
                wmem_tree_insert32_array(bluetooth_data->shandle_to_chandle, key, stream_connection_handle_pair);
3857
0
            }
3858
0
            }
3859
0
            break;
3860
0
        case 0x1B: /* LE Create BIG Complete */
3861
0
            {
3862
0
            uint8_t num_bis;
3863
3864
0
            proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_NA);
3865
0
            status = tvb_get_uint8(tvb, offset);
3866
0
            send_hci_summary_status_tap(status, pinfo, bluetooth_data);
3867
0
            offset += 1;
3868
0
            proto_tree_add_item(tree, hf_bthci_evt_big_handle, tvb, offset, 1, ENC_NA);
3869
0
            offset += 1;
3870
0
            proto_tree_add_item(tree, hf_bthci_evt_big_sync_delay, tvb, offset, 3, ENC_LITTLE_ENDIAN);
3871
0
            offset += 3;
3872
0
            proto_tree_add_item(tree, hf_bthci_evt_big_transport_latency, tvb, offset, 3, ENC_LITTLE_ENDIAN);
3873
0
            offset += 3;
3874
0
            proto_tree_add_item(tree, hf_bthci_evt_phy, tvb, offset, 1, ENC_NA);
3875
0
            offset += 1;
3876
0
            proto_tree_add_item(tree, hf_bthci_evt_nse, tvb, offset, 1, ENC_NA);
3877
0
            offset += 1;
3878
0
            proto_tree_add_item(tree, hf_bthci_evt_bn, tvb, offset, 1, ENC_NA);
3879
0
            offset += 1;
3880
0
            proto_tree_add_item(tree, hf_bthci_evt_pto, tvb, offset, 1, ENC_NA);
3881
0
            offset += 1;
3882
0
            proto_tree_add_item(tree, hf_bthci_evt_irc, tvb, offset, 1, ENC_NA);
3883
0
            offset += 1;
3884
0
            proto_tree_add_item(tree, hf_bthci_evt_max_pdu, tvb, offset, 2, ENC_LITTLE_ENDIAN);
3885
0
            offset += 2;
3886
0
            proto_tree_add_item(tree, hf_bthci_evt_iso_interval, tvb, offset, 2, ENC_LITTLE_ENDIAN);
3887
0
            offset += 2;
3888
0
            proto_tree_add_item(tree, hf_bthci_evt_num_bis, tvb, offset, 1, ENC_NA);
3889
0
            num_bis = tvb_get_uint8(tvb, offset);
3890
0
            offset += 1;
3891
0
            while (num_bis) {
3892
0
                proto_tree_add_item(tree, hf_bthci_evt_bis_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
3893
0
                offset += 2;
3894
0
                num_bis -= 1;
3895
0
            }
3896
0
            }
3897
0
            break;
3898
0
        case 0x1C: /* LE Terminate BIG Complete */
3899
0
        case 0x1E: /* LE BIG Sync Lost */
3900
0
            proto_tree_add_item(tree, hf_bthci_evt_big_handle, tvb, offset, 1, ENC_NA);
3901
0
            offset += 1;
3902
0
            proto_tree_add_item(tree, hf_bthci_evt_reason, tvb, offset, 1, ENC_NA);
3903
0
            send_hci_summary_reason_tap(tvb_get_uint8(tvb, offset), pinfo, bluetooth_data);
3904
0
            offset += 1;
3905
0
            break;
3906
0
        case 0x1D: /* LE BIG Sync Established */
3907
0
            {
3908
0
            uint8_t num_bis;
3909
3910
0
            proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_NA);
3911
0
            status = tvb_get_uint8(tvb, offset);
3912
0
            send_hci_summary_status_tap(status, pinfo, bluetooth_data);
3913
0
            offset += 1;
3914
0
            proto_tree_add_item(tree, hf_bthci_evt_big_handle, tvb, offset, 1, ENC_NA);
3915
0
            offset += 1;
3916
0
            proto_tree_add_item(tree, hf_bthci_evt_big_transport_latency, tvb, offset, 3, ENC_LITTLE_ENDIAN);
3917
0
            offset += 3;
3918
0
            proto_tree_add_item(tree, hf_bthci_evt_nse, tvb, offset, 1, ENC_NA);
3919
0
            offset += 1;
3920
0
            proto_tree_add_item(tree, hf_bthci_evt_bn, tvb, offset, 1, ENC_NA);
3921
0
            offset += 1;
3922
0
            proto_tree_add_item(tree, hf_bthci_evt_pto, tvb, offset, 1, ENC_NA);
3923
0
            offset += 1;
3924
0
            proto_tree_add_item(tree, hf_bthci_evt_irc, tvb, offset, 1, ENC_NA);
3925
0
            offset += 1;
3926
0
            proto_tree_add_item(tree, hf_bthci_evt_max_pdu, tvb, offset, 2, ENC_LITTLE_ENDIAN);
3927
0
            offset += 2;
3928
0
            proto_tree_add_item(tree, hf_bthci_evt_iso_interval, tvb, offset, 2, ENC_LITTLE_ENDIAN);
3929
0
            offset += 2;
3930
0
            proto_tree_add_item(tree, hf_bthci_evt_num_bis, tvb, offset, 1, ENC_NA);
3931
0
            num_bis = tvb_get_uint8(tvb, offset);
3932
0
            offset += 1;
3933
0
            while (num_bis) {
3934
0
                proto_tree_add_item(tree, hf_bthci_evt_bis_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
3935
0
                offset += 2;
3936
0
                num_bis -= 1;
3937
0
            }
3938
0
            }
3939
0
            break;
3940
0
        case 0x1F: /* LE Request Peer SCA Complete */
3941
0
            proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_NA);
3942
0
            status = tvb_get_uint8(tvb, offset);
3943
0
            send_hci_summary_status_tap(status, pinfo, bluetooth_data);
3944
0
            offset += 1;
3945
0
            proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
3946
0
            offset += 2;
3947
0
            proto_tree_add_item(tree, hf_bthci_evt_peer_clock_accuracy, tvb, offset, 1, ENC_NA);
3948
0
            offset += 1;
3949
0
            break;
3950
0
        case 0x20: /* LE Path Loss Threshold */
3951
0
            proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
3952
0
            offset += 2;
3953
0
            proto_tree_add_item(tree, hf_bthci_evt_current_path_loss, tvb, offset, 1, ENC_NA);
3954
0
            offset += 1;
3955
0
            proto_tree_add_item(tree, hf_bthci_evt_zone_entered, tvb, offset, 1, ENC_NA);
3956
0
            offset += 1;
3957
0
            break;
3958
0
        case 0x21: /* LE Transmit Power Reporting */
3959
0
            proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_NA);
3960
0
            status = tvb_get_uint8(tvb, offset);
3961
0
            send_hci_summary_status_tap(status, pinfo, bluetooth_data);
3962
0
            offset += 1;
3963
0
            proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
3964
0
            offset += 2;
3965
0
            proto_tree_add_item(tree, hf_bthci_evt_power_report_reason, tvb, offset, 1, ENC_NA);
3966
0
            offset += 1;
3967
0
            proto_tree_add_item(tree, hf_bthci_evt_phy_and_coding, tvb, offset, 1, ENC_NA);
3968
0
            offset += 1;
3969
0
            item = proto_tree_add_item(tree, hf_bthci_evt_transmit_power_level, tvb, offset, 1, ENC_LITTLE_ENDIAN);
3970
0
            if (tvb_get_uint8(tvb, offset) == 0x7f)
3971
0
                proto_item_append_text(item, " (Not Available)");
3972
0
            else if (tvb_get_uint8(tvb, offset) == 0x7e)
3973
0
                proto_item_append_text(item, " (Peer Not Managing Power Level on PHY)");
3974
0
            offset += 1;
3975
0
            proto_tree_add_bitmask(tree, tvb, offset, hf_bthci_evt_transmit_power_level_flags,
3976
0
                                   ett_transmit_power_level_flags, hfx_bthci_evt_transmit_power_level_flags, ENC_NA);
3977
0
            offset += 1;
3978
0
            proto_tree_add_item(tree, hf_bthci_evt_power_level_delta, tvb, offset, 1, ENC_NA);
3979
0
            offset += 1;
3980
0
            break;
3981
0
        case 0x22: /* LE BIGInfo Advertising Report */
3982
0
            proto_tree_add_item(tree, hf_bthci_evt_sync_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
3983
0
            offset += 2;
3984
0
            proto_tree_add_item(tree, hf_bthci_evt_num_bis, tvb, offset, 1, ENC_NA);
3985
0
            offset += 1;
3986
0
            proto_tree_add_item(tree, hf_bthci_evt_nse, tvb, offset, 1, ENC_NA);
3987
0
            offset += 1;
3988
0
            proto_tree_add_item(tree, hf_bthci_evt_iso_interval, tvb, offset, 2, ENC_LITTLE_ENDIAN);
3989
0
            offset += 2;
3990
0
            proto_tree_add_item(tree, hf_bthci_evt_bn, tvb, offset, 1, ENC_NA);
3991
0
            offset += 1;
3992
0
            proto_tree_add_item(tree, hf_bthci_evt_pto, tvb, offset, 1, ENC_NA);
3993
0
            offset += 1;
3994
0
            proto_tree_add_item(tree, hf_bthci_evt_irc, tvb, offset, 1, ENC_NA);
3995
0
            offset += 1;
3996
0
            proto_tree_add_item(tree, hf_bthci_evt_max_pdu, tvb, offset, 2, ENC_LITTLE_ENDIAN);
3997
0
            offset += 2;
3998
0
            proto_tree_add_item(tree, hf_bthci_evt_sdu_interval, tvb, offset, 3, ENC_LITTLE_ENDIAN);
3999
0
            offset += 3;
4000
0
            proto_tree_add_item(tree, hf_bthci_evt_max_sdu, tvb, offset, 2, ENC_LITTLE_ENDIAN);
4001
0
            offset += 2;
4002
0
            proto_tree_add_item(tree, hf_bthci_evt_phy, tvb, offset, 1, ENC_NA);
4003
0
            offset += 1;
4004
0
            proto_tree_add_item(tree, hf_bthci_evt_framing, tvb, offset, 1, ENC_NA);
4005
0
            offset += 1;
4006
0
            proto_tree_add_item(tree, hf_bthci_evt_encryption_mode, tvb, offset, 1, ENC_NA);
4007
0
            offset += 1;
4008
0
            break;
4009
0
        case 0x23: /* LE Subrate Change */
4010
0
            {
4011
0
            uint32_t underlying_events;
4012
0
            proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_NA);
4013
0
            status = tvb_get_uint8(tvb, offset);
4014
0
            send_hci_summary_status_tap(status, pinfo, bluetooth_data);
4015
0
            offset += 1;
4016
0
            proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
4017
0
            offset += 2;
4018
0
            proto_tree_add_item(tree, hf_bthci_evt_subrate_factor, tvb, offset, 2, ENC_LITTLE_ENDIAN);
4019
0
            offset += 2;
4020
0
            item = proto_tree_add_item(tree, hf_bthci_evt_le_con_latency, tvb, offset, 2, ENC_LITTLE_ENDIAN);
4021
0
            underlying_events = (tvb_get_uint16(tvb, offset, ENC_LITTLE_ENDIAN) + 1)*
4022
0
                                                tvb_get_uint16(tvb, offset - 2, ENC_LITTLE_ENDIAN) - 1;
4023
0
            proto_item_append_text(item, ", %u underlying events", underlying_events);
4024
0
            offset += 2;
4025
0
            proto_tree_add_item(tree, hf_bthci_evt_continuation_number, tvb, offset, 2, ENC_LITTLE_ENDIAN);
4026
0
            offset += 2;
4027
0
            proto_tree_add_item(tree, hf_bthci_evt_le_supervision_timeout, tvb, offset, 2, ENC_LITTLE_ENDIAN);
4028
0
            offset += 2;
4029
0
            }
4030
0
            break;
4031
0
        case 0x27: /* LE Periodic Advertising Subevent Data Request */
4032
0
            proto_tree_add_item(tree, hf_bthci_evt_advertising_handle, tvb, offset, 1, ENC_NA);
4033
0
            offset += 1;
4034
0
            proto_tree_add_item(tree, hf_bthci_evt_subevent_start, tvb, offset, 1, ENC_NA);
4035
0
            offset += 1;
4036
0
            proto_tree_add_item(tree, hf_bthci_evt_subevent_count, tvb, offset, 1, ENC_NA);
4037
0
            offset += 1;
4038
0
            break;
4039
0
        case 0x28: /* LE Periodic Advertising Response Report */
4040
0
            {
4041
0
                uint8_t num_reponses, length;
4042
0
                proto_item *report_item;
4043
0
                proto_tree *report_tree;
4044
0
                proto_tree_add_item(tree, hf_bthci_evt_advertising_handle, tvb, offset, 1, ENC_NA);
4045
0
                offset += 1;
4046
0
                proto_tree_add_item(tree, hf_bthci_evt_subevent, tvb, offset, 1, ENC_NA);
4047
0
                offset += 1;
4048
0
                proto_tree_add_item(tree, hf_bthci_evt_subevent_tx_status, tvb, offset, 1, ENC_NA);
4049
0
                offset += 1;
4050
0
                proto_tree_add_item(tree, hf_bthci_evt_num_responses, tvb, offset, 1, ENC_NA);
4051
0
                num_reponses = tvb_get_uint8(tvb, offset);
4052
0
                offset += 1;
4053
0
                for (int i = 0; i < num_reponses; i++) {
4054
0
                    length = 6 + tvb_get_uint8(tvb, offset+5);
4055
0
                    report_item = proto_tree_add_none_format(tree, hf_bthci_evt_subevent_responses, tvb, offset, length,
4056
0
                                                      "Sub-event Response Slot: %u, Data Status: %s",
4057
0
                                                      tvb_get_uint8(tvb, offset+3),
4058
0
                                                      val_to_str(tvb_get_uint8(tvb, offset+4), ext_adv_data_status_vals, "0x%02x"));
4059
0
                    report_tree = proto_item_add_subtree(report_item, ett_adv_subevent_responses);
4060
4061
0
                    proto_tree_add_item(report_tree, hf_bthci_evt_tx_power, tvb, offset, 1, ENC_NA);
4062
0
                    offset += 1;
4063
0
                    proto_tree_add_item(report_tree, hf_bthci_evt_rssi, tvb, offset, 1, ENC_NA);
4064
0
                    offset += 1;
4065
0
                    proto_tree_add_item(report_tree, hf_bthci_evt_cte_type, tvb, offset, 1, ENC_NA);
4066
0
                    offset += 1;
4067
0
                    proto_tree_add_item(report_tree, hf_bthci_evt_response_slot, tvb, offset, 1, ENC_NA);
4068
0
                    offset += 1;
4069
0
                    item = proto_tree_add_item(report_tree, hf_bthci_evt_data_status, tvb, offset, 1, ENC_NA);
4070
0
                    if (tvb_get_uint8(tvb, offset) == 0xff)
4071
0
                        proto_item_append_text(item, " (Failed to receive)");
4072
0
                    offset += 1;
4073
0
                    proto_tree_add_item(report_tree, hf_bthci_evt_data_length, tvb, offset, 1, ENC_NA);
4074
0
                    length = tvb_get_uint8(tvb, offset);
4075
0
                    offset += 1;
4076
0
                    if (length > 0) {
4077
0
                        bluetooth_eir_ad_data_t *ad_data;
4078
4079
0
                        ad_data = wmem_new0(pinfo->pool, bluetooth_eir_ad_data_t);
4080
0
                        ad_data->interface_id = bluetooth_data->interface_id;
4081
0
                        ad_data->adapter_id = bluetooth_data->adapter_id;
4082
0
                        ad_data->bd_addr = NULL;
4083
4084
0
                        call_dissector_with_data(btcommon_ad_handle, tvb_new_subset_length(tvb, offset, length), pinfo, report_tree, ad_data);
4085
0
                        offset += length;
4086
0
                    }
4087
0
                }
4088
0
            }
4089
0
            break;
4090
0
        case 0x2B: /* LE Read All Remote Features Complete */
4091
0
            proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_NA);
4092
0
            status = tvb_get_uint8(tvb, offset);
4093
0
            send_hci_summary_status_tap(status, pinfo, bluetooth_data);
4094
0
            offset += 1;
4095
0
            proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
4096
0
            offset += 2;
4097
0
            proto_tree_add_item(tree, hf_bthci_evt_max_remote_page, tvb, offset, 1, ENC_NA);
4098
0
            offset += 1;
4099
0
            proto_tree_add_item(tree, hf_bthci_evt_max_valid_page, tvb, offset, 1, ENC_NA);
4100
0
            offset += 1;
4101
0
            proto_tree_add_bitmask(tree, tvb, offset, hf_bthci_evt_le_features, ett_le_features,
4102
0
                                   hfx_bthci_evt_le_features, ENC_LITTLE_ENDIAN);
4103
0
            offset += 8;
4104
0
            proto_tree_add_bitmask(tree, tvb, offset, hf_bthci_evt_le_ext_features_1, ett_le_features,
4105
0
                                   hfx_bthci_evt_le_ext_features_1, ENC_LITTLE_ENDIAN);
4106
0
            offset += 8;
4107
0
            proto_tree_add_item(tree, hf_bthci_evt_reserved, tvb, offset, 232, ENC_NA);
4108
0
            offset += 232;
4109
0
            break;
4110
0
        case 0x2C: /* LE CS Read Remote Supported Capabilities Complete */
4111
0
            proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_NA);
4112
0
            status = tvb_get_uint8(tvb, offset);
4113
0
            send_hci_summary_status_tap(status, pinfo, bluetooth_data);
4114
0
            offset += 1;
4115
0
            proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
4116
0
            offset += 2;
4117
0
            offset = dissect_bthci_evt_cs_capabilities(tvb, offset, pinfo, tree);
4118
0
            break;
4119
0
        case 0x2D: /* LE CS Read Remote FAE Table Complete */
4120
0
            proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_NA);
4121
0
            status = tvb_get_uint8(tvb, offset);
4122
0
            send_hci_summary_status_tap(status, pinfo, bluetooth_data);
4123
0
            offset += 1;
4124
0
            proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
4125
0
            offset += 2;
4126
0
            proto_tree_add_item(tree, hf_bthci_evt_remote_fae_table, tvb, offset, 72, ENC_NA);
4127
0
            offset += 72;
4128
0
            break;
4129
0
        case 0x2F: /* LE CS Config Complete */
4130
0
            {
4131
0
                uint32_t con_handle, config_id;
4132
0
                uint8_t action, role, rtt_type;
4133
0
                proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_NA);
4134
0
                status = tvb_get_uint8(tvb, offset);
4135
0
                send_hci_summary_status_tap(status, pinfo, bluetooth_data);
4136
0
                offset += 1;
4137
0
                proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
4138
0
                con_handle = tvb_get_letohs(tvb, offset) & 0x0FFF;
4139
0
                offset += 2;
4140
0
                proto_tree_add_item(tree, hf_bthci_evt_config_id, tvb, offset, 1, ENC_NA);
4141
0
                config_id = tvb_get_uint8(tvb, offset);
4142
0
                offset += 1;
4143
0
                proto_tree_add_item(tree, hf_bthci_evt_cs_action, tvb, offset, 1, ENC_NA);
4144
0
                action = tvb_get_uint8(tvb, offset);
4145
0
                offset += 1;
4146
0
                proto_tree_add_item(tree, hf_bthci_evt_main_mode_type, tvb, offset, 1, ENC_NA);
4147
0
                offset += 1;
4148
0
                proto_tree_add_item(tree, hf_bthci_evt_sub_mode_type, tvb, offset, 1, ENC_NA);
4149
0
                offset += 1;
4150
0
                proto_tree_add_item(tree, hf_bthci_evt_min_main_mode_steps, tvb, offset, 1, ENC_NA);
4151
0
                offset += 1;
4152
0
                proto_tree_add_item(tree, hf_bthci_evt_max_main_mode_steps, tvb, offset, 1, ENC_NA);
4153
0
                offset += 1;
4154
0
                proto_tree_add_item(tree, hf_bthci_evt_main_mode_repetition, tvb, offset, 1, ENC_NA);
4155
0
                offset += 1;
4156
0
                proto_tree_add_item(tree, hf_bthci_evt_mode_0_steps, tvb, offset, 1, ENC_NA);
4157
0
                offset += 1;
4158
0
                proto_tree_add_item(tree, hf_bthci_evt_cs_role, tvb, offset, 1, ENC_NA);
4159
0
                role = tvb_get_uint8(tvb, offset);
4160
0
                offset += 1;
4161
0
                proto_tree_add_item(tree, hf_bthci_evt_rtt_type, tvb, offset, 1, ENC_NA);
4162
0
                rtt_type = tvb_get_uint8(tvb, offset);
4163
0
                offset += 1;
4164
0
                proto_tree_add_item(tree, hf_bthci_evt_cs_sync_phy, tvb, offset, 1, ENC_NA);
4165
0
                offset += 1;
4166
0
                proto_tree_add_item(tree, hf_bthci_evt_channel_map, tvb, offset, 10, ENC_NA);
4167
0
                offset += 10;
4168
0
                proto_tree_add_item(tree, hf_bthci_evt_channel_map_repetition, tvb, offset, 1, ENC_NA);
4169
0
                offset += 1;
4170
0
                proto_tree_add_item(tree, hf_bthci_evt_channel_selection_type, tvb, offset, 1, ENC_NA);
4171
0
                offset += 1;
4172
0
                proto_tree_add_item(tree, hf_bthci_evt_ch3c_shape, tvb, offset, 1, ENC_NA);
4173
0
                offset += 1;
4174
0
                proto_tree_add_item(tree, hf_bthci_evt_ch3c_jump, tvb, offset, 1, ENC_NA);
4175
0
                offset += 1;
4176
0
                proto_tree_add_item(tree, hf_bthci_evt_companion_signal_enable, tvb, offset, 1, ENC_NA);
4177
0
                offset += 1;
4178
0
                proto_tree_add_item(tree, hf_bthci_evt_t_ip1_time, tvb, offset, 1, ENC_NA);
4179
0
                offset += 1;
4180
0
                proto_tree_add_item(tree, hf_bthci_evt_t_ip2_time, tvb, offset, 1, ENC_NA);
4181
0
                offset += 1;
4182
0
                proto_tree_add_item(tree, hf_bthci_evt_t_fcs_time, tvb, offset, 1, ENC_NA);
4183
0
                offset += 1;
4184
0
                proto_tree_add_item(tree, hf_bthci_evt_t_pm_time, tvb, offset, 1, ENC_NA);
4185
0
                offset += 1;
4186
4187
0
                if (!pinfo->fd->visited && action && status == STATUS_SUCCESS) {
4188
                    /* store CS role and RTT type configuration for later dissection of CS results */
4189
0
                    wmem_tree_key_t     key[6];
4190
0
                    uint32_t            interface_id;
4191
0
                    uint32_t            adapter_id;
4192
0
                    uint32_t            frame_number;
4193
0
                    cs_configuration_t *cs_configuration;
4194
4195
0
                    interface_id = bluetooth_data->interface_id;
4196
0
                    adapter_id   = bluetooth_data->adapter_id;
4197
0
                    frame_number = pinfo->num;
4198
4199
0
                    key[0].length = 1;
4200
0
                    key[0].key    = &interface_id;
4201
0
                    key[1].length = 1;
4202
0
                    key[1].key    = &adapter_id;
4203
0
                    key[2].length = 1;
4204
0
                    key[2].key    = &con_handle;
4205
0
                    key[3].length = 1;
4206
0
                    key[3].key    = &config_id;
4207
0
                    key[4].length = 1;
4208
0
                    key[4].key    = &frame_number;
4209
0
                    key[5].length = 0;
4210
0
                    key[5].key    = NULL;
4211
4212
0
                    cs_configuration = (cs_configuration_t *) wmem_new(wmem_file_scope(), cs_configuration_t);
4213
0
                    cs_configuration->cs_role = role;
4214
0
                    cs_configuration->rtt_type = rtt_type;
4215
0
                    wmem_tree_insert32_array(bluetooth_data->cs_configurations, key, cs_configuration);
4216
0
                }
4217
0
            }
4218
0
            break;
4219
0
        case 0x30: /* LE CS Procedure Enable Complete */
4220
0
            proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_NA);
4221
0
            status = tvb_get_uint8(tvb, offset);
4222
0
            send_hci_summary_status_tap(status, pinfo, bluetooth_data);
4223
0
            offset += 1;
4224
0
            proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
4225
0
            offset += 2;
4226
0
            proto_tree_add_item(tree, hf_bthci_evt_config_id, tvb, offset, 1, ENC_NA);
4227
0
            offset += 1;
4228
0
            proto_tree_add_item(tree, hf_bthci_evt_cs_state, tvb, offset, 1, ENC_NA);
4229
0
            offset += 1;
4230
0
            proto_tree_add_item(tree, hf_bthci_evt_tone_antenna_selection, tvb, offset, 1, ENC_NA);
4231
0
            offset += 1;
4232
0
            proto_tree_add_item(tree, hf_bthci_evt_tx_power, tvb, offset, 1, ENC_NA);
4233
0
            offset += 1;
4234
0
            proto_tree_add_item(tree, hf_bthci_evt_cs_subevent_len, tvb, offset, 3, ENC_LITTLE_ENDIAN);
4235
0
            offset += 3;
4236
0
            proto_tree_add_item(tree, hf_bthci_evt_cs_subevents_per_event, tvb, offset, 1, ENC_NA);
4237
0
            offset += 1;
4238
0
            proto_tree_add_item(tree, hf_bthci_evt_cs_subevent_interval, tvb, offset, 2, ENC_LITTLE_ENDIAN);
4239
0
            offset += 2;
4240
0
            proto_tree_add_item(tree, hf_bthci_evt_cs_event_interval, tvb, offset, 2, ENC_LITTLE_ENDIAN);
4241
0
            offset += 2;
4242
0
            proto_tree_add_item(tree, hf_bthci_evt_cs_procedure_interval, tvb, offset, 2, ENC_LITTLE_ENDIAN);
4243
0
            offset += 2;
4244
0
            proto_tree_add_item(tree, hf_bthci_evt_cs_procedure_count, tvb, offset, 2, ENC_LITTLE_ENDIAN);
4245
0
            offset += 2;
4246
0
            proto_tree_add_item(tree, hf_bthci_evt_max_procedure_len, tvb, offset, 2, ENC_LITTLE_ENDIAN);
4247
0
            offset += 2;
4248
0
            break;
4249
0
        case 0x31: /* LE CS Subevent Result */
4250
0
        case 0x32: /* LE CS Subevent Result Continue */
4251
0
            {
4252
0
                uint32_t interface_id, adapter_id, con_handle, config_id;
4253
0
                cs_configuration_t *cs_configuration;
4254
0
                wmem_tree_t *subtree;
4255
0
                wmem_tree_key_t key[5];
4256
0
                uint8_t steps, step_counter;
4257
0
                bool initiator = true, sounding_seq = false;
4258
0
                proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
4259
0
                con_handle = tvb_get_letohs(tvb, offset) & 0x0FFF;
4260
0
                offset += 2;
4261
0
                proto_tree_add_item(tree, hf_bthci_evt_config_id, tvb, offset, 1, ENC_NA);
4262
0
                config_id = tvb_get_uint8(tvb, offset);
4263
0
                offset += 1;
4264
0
                if (subevent_code == 0x31) {
4265
0
                    proto_tree_add_item(tree, hf_bthci_evt_start_acl_conn_event, tvb, offset, 2, ENC_LITTLE_ENDIAN);
4266
0
                    offset += 2;
4267
0
                    proto_tree_add_item(tree, hf_bthci_evt_procedure_counter, tvb, offset, 2, ENC_LITTLE_ENDIAN);
4268
0
                    offset += 2;
4269
0
                    proto_tree_add_item(tree, hf_bthci_evt_freq_compensation, tvb, offset, 2, ENC_LITTLE_ENDIAN);
4270
0
                    offset += 2;
4271
0
                    proto_tree_add_item(tree, hf_bthci_evt_ref_power_level, tvb, offset, 1, ENC_NA);
4272
0
                    offset += 1;
4273
0
                }
4274
0
                proto_tree_add_item(tree, hf_bthci_evt_procedure_done_status, tvb, offset, 1, ENC_NA);
4275
0
                offset += 1;
4276
0
                proto_tree_add_item(tree, hf_bthci_evt_subevent_done_status, tvb, offset, 1, ENC_NA);
4277
0
                offset += 1;
4278
0
                proto_tree_add_bitmask(tree, tvb, offset, hf_bthci_evt_cs_abort_reason, ett_cs_abort_reason, hfx_bthci_evt_cs_abort_reason, ENC_NA);
4279
0
                offset += 1;
4280
0
                proto_tree_add_item(tree, hf_bthci_evt_num_antenna_paths, tvb, offset, 1, ENC_NA);
4281
0
                offset += 1;
4282
0
                proto_tree_add_item(tree, hf_bthci_evt_num_steps_reported, tvb, offset, 1, ENC_NA);
4283
0
                steps = tvb_get_uint8(tvb, offset);
4284
0
                offset += 1;
4285
4286
                /* search CS configurations to find CS role and RTT type needed for dissecting mode-1 step data */
4287
0
                interface_id = bluetooth_data->interface_id;
4288
0
                adapter_id   = bluetooth_data->adapter_id;
4289
0
                key[0].length = 1;
4290
0
                key[0].key    = &interface_id;
4291
0
                key[1].length = 1;
4292
0
                key[1].key    = &adapter_id;
4293
0
                key[2].length = 1;
4294
0
                key[2].key    = &con_handle;
4295
0
                key[3].length = 1;
4296
0
                key[3].key    = &config_id;
4297
0
                key[4].length = 0;
4298
0
                key[4].key    = NULL;
4299
4300
0
                subtree = (wmem_tree_t *) wmem_tree_lookup32_array(bluetooth_data->cs_configurations, key);
4301
0
                cs_configuration = (subtree) ? (cs_configuration_t *) wmem_tree_lookup32_le(subtree, pinfo->num) : NULL;
4302
0
                if (cs_configuration) {
4303
0
                    initiator = cs_configuration->cs_role ? false : true;
4304
0
                    sounding_seq = (cs_configuration->rtt_type && cs_configuration->rtt_type < 3) ? true : false;
4305
0
                }
4306
4307
0
                for (step_counter = 0; step_counter < steps; step_counter++) {
4308
0
                    offset = dissect_bthci_evt_cs_result_steps(tvb, offset, pinfo, tree, step_counter, initiator, sounding_seq);
4309
0
                }
4310
0
            }
4311
0
            break;
4312
0
        case 0x33: /* LE CS Test End */
4313
0
            proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_NA);
4314
0
            status = tvb_get_uint8(tvb, offset);
4315
0
            send_hci_summary_status_tap(status, pinfo, bluetooth_data);
4316
0
            offset += 1;
4317
0
            break;
4318
0
        case 0x34: /* LE Monitored Advertisers Report */
4319
0
            proto_tree_add_item(tree, hf_bthci_evt_le_peer_address_type, tvb, offset, 1, ENC_NA);
4320
0
            offset += 1;
4321
0
            offset = dissect_bd_addr(hf_bthci_evt_bd_addr, pinfo, tree, tvb, offset, FALSE, bluetooth_data->interface_id, bluetooth_data->adapter_id, bd_addr);
4322
0
            proto_tree_add_item(tree, hf_bthci_evt_monitoring_condition, tvb, offset, 1, ENC_NA);
4323
0
            offset += 1;
4324
0
            break;
4325
0
        case 0x35: /* LE Frame Space Update Complete */
4326
0
            proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_NA);
4327
0
            status = tvb_get_uint8(tvb, offset);
4328
0
            send_hci_summary_status_tap(status, pinfo, bluetooth_data);
4329
0
            offset += 1;
4330
0
            proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
4331
0
            offset += 2;
4332
0
            proto_tree_add_item(tree, hf_bthci_evt_initiator, tvb, offset, 1, ENC_NA);
4333
0
            offset += 1;
4334
0
            proto_tree_add_item(tree, hf_bthci_evt_frame_space, tvb, offset, 2, ENC_LITTLE_ENDIAN);
4335
0
            offset += 2;
4336
0
            proto_tree_add_bitmask(tree, tvb, offset, hf_bthci_evt_le_phys, ett_phys, hfx_bthci_evt_le_phys, ENC_NA);
4337
0
            offset += 1;
4338
0
            proto_tree_add_bitmask(tree, tvb, offset, hf_bthci_evt_spacing_types, ett_spacing_types, hfx_bthci_evt_spacing_types, ENC_LITTLE_ENDIAN);
4339
0
            offset += 2;
4340
0
            break;
4341
0
        default:
4342
0
            break;
4343
0
    }
4344
0
    return offset;
4345
0
}
4346
4347
static int
4348
dissect_bthci_evt_physical_link_complete(tvbuff_t *tvb, int offset,
4349
        packet_info *pinfo, proto_tree *tree, bluetooth_data_t *bluetooth_data)
4350
0
{
4351
0
    proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN);
4352
0
    send_hci_summary_status_tap(tvb_get_uint8(tvb, offset), pinfo, bluetooth_data);
4353
0
    offset += 1;
4354
4355
0
    proto_tree_add_item(tree, hf_bthci_evt_physical_link_handle, tvb, offset, 1, ENC_LITTLE_ENDIAN);
4356
0
    offset += 1;
4357
0
    return offset;
4358
0
}
4359
4360
static int
4361
dissect_bthci_evt_channel_select_physical_link_recovery(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree)
4362
0
{
4363
0
    proto_tree_add_item(tree, hf_bthci_evt_physical_link_handle, tvb, offset, 1, ENC_LITTLE_ENDIAN);
4364
0
    offset += 1;
4365
0
    return offset;
4366
0
}
4367
4368
static int
4369
dissect_bthci_evt_disconnect_physical_link_complete(tvbuff_t *tvb, int offset,
4370
        packet_info *pinfo, proto_tree *tree, bluetooth_data_t *bluetooth_data)
4371
0
{
4372
0
    proto_tree_add_item(tree, hf_bthci_evt_status,               tvb, offset, 1, ENC_LITTLE_ENDIAN);
4373
0
    send_hci_summary_status_tap(tvb_get_uint8(tvb, offset), pinfo, bluetooth_data);
4374
0
    offset += 1;
4375
4376
0
    proto_tree_add_item(tree, hf_bthci_evt_physical_link_handle, tvb, offset, 1, ENC_LITTLE_ENDIAN);
4377
0
    offset += 1;
4378
4379
0
    proto_tree_add_item(tree, hf_bthci_evt_reason,               tvb, offset, 1, ENC_LITTLE_ENDIAN);
4380
0
    send_hci_summary_reason_tap(tvb_get_uint8(tvb, offset), pinfo, bluetooth_data);
4381
0
    offset += 1;
4382
4383
0
    return offset;
4384
0
}
4385
4386
static int
4387
dissect_bthci_evt_physical_link_loss_early_warning(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree)
4388
0
{
4389
0
    proto_tree_add_item(tree, hf_bthci_evt_physical_link_handle, tvb, offset, 1, ENC_LITTLE_ENDIAN);
4390
0
    offset += 1;
4391
0
    proto_tree_add_item(tree, hf_bthci_evt_link_loss_reason,     tvb, offset, 1, ENC_LITTLE_ENDIAN);
4392
0
    offset += 1;
4393
0
    return offset;
4394
0
}
4395
4396
static int
4397
dissect_bthci_evt_logical_link_complete(tvbuff_t *tvb, int offset,
4398
        packet_info *pinfo, proto_tree *tree, bluetooth_data_t *bluetooth_data)
4399
0
{
4400
0
    proto_tree_add_item(tree, hf_bthci_evt_status,               tvb, offset, 1, ENC_LITTLE_ENDIAN);
4401
0
    send_hci_summary_status_tap(tvb_get_uint8(tvb, offset), pinfo, bluetooth_data);
4402
0
    offset += 1;
4403
4404
0
    proto_tree_add_item(tree, hf_bthci_evt_logical_link_handle,  tvb, offset, 2, ENC_LITTLE_ENDIAN);
4405
0
    offset += 2;
4406
0
    proto_tree_add_item(tree, hf_bthci_evt_physical_link_handle, tvb, offset, 1, ENC_LITTLE_ENDIAN);
4407
0
    offset += 1;
4408
0
    proto_tree_add_item(tree, hf_bthci_evt_flow_spec_identifier, tvb, offset, 1, ENC_LITTLE_ENDIAN);
4409
0
    offset += 1;
4410
0
    return offset;
4411
0
}
4412
4413
static int
4414
dissect_bthci_evt_disconnect_logical_link_complete(tvbuff_t *tvb, int offset,
4415
        packet_info *pinfo, proto_tree *tree, bluetooth_data_t *bluetooth_data)
4416
0
{
4417
0
    proto_tree_add_item(tree, hf_bthci_evt_status,              tvb, offset, 1, ENC_LITTLE_ENDIAN);
4418
0
    send_hci_summary_status_tap(tvb_get_uint8(tvb, offset), pinfo, bluetooth_data);
4419
0
    offset += 1;
4420
4421
0
    proto_tree_add_item(tree, hf_bthci_evt_logical_link_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
4422
0
    offset += 2;
4423
4424
0
    proto_tree_add_item(tree, hf_bthci_evt_reason,              tvb, offset, 1, ENC_LITTLE_ENDIAN);
4425
0
    send_hci_summary_reason_tap(tvb_get_uint8(tvb, offset), pinfo, bluetooth_data);
4426
0
    offset += 1;
4427
4428
0
    return offset;
4429
0
}
4430
4431
static int
4432
dissect_bthci_evt_flow_spec_modify_complete(tvbuff_t *tvb, int offset,
4433
        packet_info *pinfo, proto_tree *tree, bluetooth_data_t *bluetooth_data)
4434
0
{
4435
0
    proto_tree_add_item(tree, hf_bthci_evt_status,            tvb, offset, 1, ENC_LITTLE_ENDIAN);
4436
0
    send_hci_summary_status_tap(tvb_get_uint8(tvb, offset), pinfo, bluetooth_data);
4437
0
    offset += 1;
4438
4439
0
    proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
4440
0
    offset += 2;
4441
0
    return offset;
4442
0
}
4443
4444
static int
4445
dissect_bthci_evt_number_of_completed_data_blocks(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree)
4446
0
{
4447
0
    uint8_t evt_num_handles;
4448
4449
0
    proto_tree_add_item(tree, hf_bthci_evt_total_num_data_blocks, tvb, offset, 2, ENC_LITTLE_ENDIAN);
4450
0
    offset += 2;
4451
4452
0
    evt_num_handles = tvb_get_uint8(tvb, offset);
4453
0
    proto_tree_add_item(tree, hf_bthci_evt_num_handles, tvb, offset, 1, ENC_LITTLE_ENDIAN);
4454
0
    offset += 1;
4455
4456
0
    while (evt_num_handles--) {
4457
0
        proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
4458
0
        offset += 2;
4459
0
        proto_tree_add_item(tree, hf_bthci_evt_num_compl_packets, tvb, offset, 2, ENC_LITTLE_ENDIAN);
4460
0
        offset += 2;
4461
0
        proto_tree_add_item(tree, hf_bthci_evt_num_compl_blocks,  tvb, offset, 2, ENC_LITTLE_ENDIAN);
4462
0
        offset += 2;
4463
0
    }
4464
0
    return offset;
4465
0
}
4466
4467
static int
4468
dissect_bthci_evt_amp_start_stop_test(tvbuff_t *tvb, int offset,
4469
        packet_info *pinfo, proto_tree *tree, bluetooth_data_t *bluetooth_data)
4470
0
{
4471
0
    proto_tree_add_item(tree, hf_bthci_evt_status,        tvb, offset, 1, ENC_LITTLE_ENDIAN);
4472
0
    send_hci_summary_status_tap(tvb_get_uint8(tvb, offset), pinfo, bluetooth_data);
4473
0
    offset += 1;
4474
4475
0
    proto_tree_add_item(tree, hf_bthci_evt_test_scenario, tvb, offset, 1, ENC_LITTLE_ENDIAN);
4476
0
    offset += 1;
4477
0
    return offset;
4478
0
}
4479
4480
static int
4481
dissect_bthci_evt_amp_receiver_test(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree)
4482
0
{
4483
0
    proto_tree_add_item(tree, hf_bthci_evt_amp_controller_type, tvb, offset, 1, ENC_LITTLE_ENDIAN);
4484
0
    offset += 1;
4485
0
    proto_tree_add_item(tree, hf_bthci_evt_report_reason,       tvb, offset, 1, ENC_LITTLE_ENDIAN);
4486
0
    offset += 1;
4487
0
    proto_tree_add_item(tree, hf_bthci_evt_report_event_type,   tvb, offset, 1, ENC_LITTLE_ENDIAN);
4488
0
    offset += 1;
4489
0
    proto_tree_add_item(tree, hf_bthci_evt_num_frames,          tvb, offset, 2, ENC_LITTLE_ENDIAN);
4490
0
    offset += 2;
4491
0
    proto_tree_add_item(tree, hf_bthci_evt_num_error_frames,    tvb, offset, 2, ENC_LITTLE_ENDIAN);
4492
0
    offset += 2;
4493
0
    proto_tree_add_item(tree, hf_bthci_evt_num_bits,            tvb, offset, 4, ENC_LITTLE_ENDIAN);
4494
0
    offset += 4;
4495
0
    proto_tree_add_item(tree, hf_bthci_evt_num_error_bits,      tvb, offset, 4, ENC_LITTLE_ENDIAN);
4496
0
    offset += 4;
4497
0
    return offset;
4498
0
}
4499
4500
static int
4501
dissect_bthci_evt_short_range_mode_change_complete(tvbuff_t *tvb, int offset,
4502
        packet_info *pinfo, proto_tree *tree, bluetooth_data_t *bluetooth_data)
4503
0
{
4504
0
    proto_tree_add_item(tree, hf_bthci_evt_status,                 tvb, offset, 1, ENC_LITTLE_ENDIAN);
4505
0
    send_hci_summary_status_tap(tvb_get_uint8(tvb, offset), pinfo, bluetooth_data);
4506
0
    offset += 1;
4507
4508
0
    proto_tree_add_item(tree, hf_bthci_evt_physical_link_handle,   tvb, offset, 1, ENC_LITTLE_ENDIAN);
4509
0
    offset += 1;
4510
0
    proto_tree_add_item(tree, hf_bthci_evt_short_range_mode_state, tvb, offset, 1, ENC_LITTLE_ENDIAN);
4511
0
    offset += 1;
4512
0
    return offset;
4513
0
}
4514
4515
static int
4516
dissect_bthci_evt_amp_status_change(tvbuff_t *tvb, int offset,
4517
        packet_info *pinfo, proto_tree *tree, bluetooth_data_t *bluetooth_data)
4518
0
{
4519
0
    proto_tree_add_item(tree, hf_bthci_evt_status,     tvb, offset, 1, ENC_LITTLE_ENDIAN);
4520
0
    send_hci_summary_status_tap(tvb_get_uint8(tvb, offset), pinfo, bluetooth_data);
4521
0
    offset += 1;
4522
4523
0
    proto_tree_add_item(tree, hf_bthci_evt_amp_status, tvb, offset, 1, ENC_LITTLE_ENDIAN);
4524
0
    offset += 1;
4525
0
    return offset;
4526
0
}
4527
4528
static int
4529
dissect_bthci_evt_sam_status_change(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree)
4530
0
{
4531
0
    proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
4532
0
    offset += 2;
4533
4534
0
    proto_tree_add_item(tree, hf_bthci_evt_local_sam_index, tvb, offset, 1, ENC_NA);
4535
0
    offset += 1;
4536
4537
0
    proto_tree_add_item(tree, hf_bthci_evt_local_sam_tx_availability, tvb, offset, 1, ENC_NA);
4538
0
    offset += 1;
4539
4540
0
    proto_tree_add_item(tree, hf_bthci_evt_local_sam_rx_availability, tvb, offset, 1, ENC_NA);
4541
0
    offset += 1;
4542
4543
0
    proto_tree_add_item(tree, hf_bthci_evt_remote_sam_index, tvb, offset, 1, ENC_NA);
4544
0
    offset += 1;
4545
4546
0
    proto_tree_add_item(tree, hf_bthci_evt_remote_sam_tx_availability, tvb, offset, 1, ENC_NA);
4547
0
    offset += 1;
4548
4549
0
    proto_tree_add_item(tree, hf_bthci_evt_remote_sam_rx_availability, tvb, offset, 1, ENC_NA);
4550
0
    offset += 1;
4551
0
    return offset;
4552
0
}
4553
4554
static int
4555
dissect_bthci_evt_command_complete(tvbuff_t *tvb, int offset,
4556
        packet_info *pinfo,  proto_tree *main_tree, proto_tree *tree,
4557
        wmem_list_t *opcode_list, bluetooth_data_t *bluetooth_data, uint32_t *out_opcode)
4558
0
{
4559
0
    proto_item  *ti_opcode;
4560
0
    proto_tree  *opcode_tree;
4561
0
    proto_item  *item;
4562
0
    uint8_t      num8;
4563
0
    unsigned     i;
4564
0
    uint8_t      ogf;
4565
0
    uint32_t     accuracy;
4566
0
    uint8_t      bd_addr[6];
4567
0
    bool         local_addr = false;
4568
0
    int          hfx;
4569
0
    uint8_t      status;
4570
0
    wmem_tree_key_t     key[4];
4571
0
    uint32_t            interface_id;
4572
0
    uint32_t            adapter_id;
4573
0
    uint32_t            frame_number;
4574
0
    uint32_t            opcode;
4575
4576
0
    proto_tree_add_item(tree, hf_bthci_evt_num_command_packets, tvb, offset, 1, ENC_LITTLE_ENDIAN);
4577
0
    offset += 1;
4578
4579
0
    opcode = tvb_get_letohs(tvb, offset);
4580
0
    ogf = opcode >> 10;
4581
0
    if (out_opcode)
4582
0
        *out_opcode = opcode;
4583
4584
0
    if (have_tap_listener(bluetooth_hci_summary_tap)) {
4585
0
        bluetooth_hci_summary_tap_t  *tap_hci_summary;
4586
4587
0
        tap_hci_summary = wmem_new(pinfo->pool, bluetooth_hci_summary_tap_t);
4588
4589
0
        tap_hci_summary->interface_id  = bluetooth_data->interface_id;
4590
0
        tap_hci_summary->adapter_id    = bluetooth_data->adapter_id;
4591
4592
0
        tap_hci_summary->type = BLUETOOTH_HCI_SUMMARY_EVENT_OPCODE;
4593
0
        tap_hci_summary->ogf = ogf;
4594
0
        tap_hci_summary->ocf = opcode & 0x03ff;
4595
0
        tap_hci_summary->event = 0x0e; /* Command Complete */
4596
0
        if (try_val_to_str_ext(opcode, &bthci_cmd_opcode_vals_ext))
4597
0
            tap_hci_summary->name = val_to_str_ext(opcode, &bthci_cmd_opcode_vals_ext, "Unknown 0x%04x");
4598
0
        else
4599
0
            tap_hci_summary->name = NULL;
4600
0
        tap_queue_packet(bluetooth_hci_summary_tap, pinfo, tap_hci_summary);
4601
0
    }
4602
4603
0
    interface_id = bluetooth_data->interface_id;
4604
0
    adapter_id   = bluetooth_data->adapter_id;
4605
0
    frame_number = pinfo->num;
4606
4607
0
    ti_opcode = proto_tree_add_item(tree, hf_bthci_evt_opcode, tvb, offset, 2, ENC_LITTLE_ENDIAN);
4608
0
    opcode_tree = proto_item_add_subtree(ti_opcode, ett_opcode);
4609
0
    proto_tree_add_item(opcode_tree, hf_bthci_evt_ogf, tvb, offset, 2, ENC_LITTLE_ENDIAN);
4610
4611
0
    if (ogf == HCI_OGF_LINK_CONTROL)
4612
0
        hfx = hf_bthci_evt_ocf_link_control;
4613
0
    else if (ogf == HCI_OGF_LINK_POLICY)
4614
0
        hfx = hf_bthci_evt_ocf_link_policy;
4615
0
    else if (ogf == HCI_OGF_HOST_CONTROLLER)
4616
0
        hfx = hf_bthci_evt_ocf_host_controller_and_baseband;
4617
0
    else if (ogf == HCI_OGF_INFORMATIONAL)
4618
0
        hfx = hf_bthci_evt_ocf_informational;
4619
0
    else if (ogf == HCI_OGF_STATUS)
4620
0
        hfx = hf_bthci_evt_ocf_status;
4621
0
    else if (ogf == HCI_OGF_TESTING)
4622
0
        hfx = hf_bthci_evt_ocf_testing;
4623
0
    else if (ogf == HCI_OGF_LOW_ENERGY)
4624
0
        hfx = hf_bthci_evt_ocf_low_energy;
4625
0
    else if (ogf == HCI_OGF_LOGO_TESTING)
4626
0
        hfx = hf_bthci_evt_ocf_logo_testing;
4627
0
    else
4628
0
        hfx = hf_bthci_evt_ocf;
4629
0
    proto_tree_add_item(opcode_tree, hfx, tvb, offset, 2, ENC_LITTLE_ENDIAN);
4630
0
    offset += 2;
4631
4632
0
    if (ogf == HCI_OGF_VENDOR_SPECIFIC) {
4633
0
        col_append_fstr(pinfo->cinfo, COL_INFO, " (Vendor Command 0x%04X [opcode 0x%04X])", opcode & 0x03ff, opcode);
4634
4635
0
        if (!dissector_try_payload_with_data(hci_cmd_vendor_dissector_table, tvb, pinfo, main_tree, true, bluetooth_data)) {
4636
0
            if (bluetooth_data) {
4637
0
                hci_vendor_data_t  *hci_vendor_data;
4638
4639
0
                interface_id = bluetooth_data->interface_id;
4640
0
                adapter_id   = bluetooth_data->adapter_id;
4641
4642
0
                key[0].length = 1;
4643
0
                key[0].key    = &interface_id;
4644
0
                key[1].length = 1;
4645
0
                key[1].key    = &adapter_id;
4646
0
                key[2].length = 0;
4647
0
                key[2].key    = NULL;
4648
4649
0
                hci_vendor_data = (hci_vendor_data_t *) wmem_tree_lookup32_array(bluetooth_data->hci_vendors, key);
4650
0
                if (hci_vendor_data) {
4651
0
                    int sub_offset = 0;
4652
4653
0
                    if (bthci_vendor_android) {
4654
0
                        sub_offset = dissector_try_uint_with_data(hci_vendor_table, bthci_vendor_manufacturer_android, tvb, pinfo, tree, true, bluetooth_data);
4655
0
                    } else {
4656
0
                        sub_offset = dissector_try_uint_with_data(hci_vendor_table, hci_vendor_data->manufacturer, tvb, pinfo, main_tree, true, bluetooth_data);
4657
0
                    }
4658
4659
0
                    if (sub_offset > 0 && sub_offset < tvb_captured_length_remaining(tvb, offset))
4660
0
                        proto_tree_add_expert(tree, pinfo, &ei_parameter_unexpected, tvb, offset + sub_offset, tvb_captured_length_remaining(tvb, sub_offset + offset));
4661
0
                }
4662
0
            }
4663
0
        }
4664
4665
0
        proto_tree_add_item(tree, hf_bthci_evt_ret_params, tvb, offset, tvb_captured_length_remaining(tvb, offset), ENC_NA);
4666
0
        offset = tvb_captured_length(tvb);
4667
0
    } else {
4668
0
        col_append_fstr(pinfo->cinfo, COL_INFO, " (%s)",
4669
0
                val_to_str_ext(opcode, &bthci_cmd_opcode_vals_ext, "Unknown 0x%04x"));
4670
0
    }
4671
4672
0
    if (ogf != HCI_OGF_VENDOR_SPECIFIC) switch(opcode) {
4673
        /* This is a list of Commands that all return just the status */
4674
0
        case 0x0402: /* Inquiry Cancel */
4675
0
        case 0x0403: /* Periodic Inquiry Mode */
4676
0
        case 0x0404: /* Exit Periodic Enquiry Mode */
4677
0
        case 0x080f: /* Write Default Link Policy Settings */
4678
0
        case 0x0c01: /* Set Event Mask */
4679
0
        case 0x0c03: /* Reset */
4680
0
        case 0x0c05: /* Set Event Filter */
4681
0
        case 0x0c0a: /* Write PIN Type */
4682
0
        case 0x0c0b: /* Create Unit Key */
4683
0
        case 0x0c13: /* Change Local Name */
4684
0
        case 0x0c16: /* Write Connection Accept Timeout */
4685
0
        case 0x0c18: /* Write Page Timeout */
4686
0
        case 0x0c1a: /* Write Scan Enable */
4687
0
        case 0x0c1c: /* Write Page Scan Activity */
4688
0
        case 0x0c1e: /* Write Inquiry Scan Activity */
4689
0
        case 0x0c20: /* Write Authentication Enable */
4690
0
        case 0x0c22: /* Write Encryption Mode  */
4691
0
        case 0x0c24: /* Write Class of Device */
4692
0
        case 0x0c26: /* Write Voice Setting */
4693
0
        case 0x0c2a: /* Write Num Broadcast Retransmissions */
4694
0
        case 0x0c2c: /* Write Hold Mode Activity */
4695
0
        case 0x0c2f: /* Write SCO Flow Control Enable */
4696
0
        case 0x0c31: /* Set Host Controller To Host Flow Control */
4697
0
        case 0x0c33: /* Host Buffer Size */
4698
0
        case 0x0c3a: /* Write Current IAC LAP */
4699
0
        case 0x0c3c: /* Write Page Scan Period Mode */
4700
0
        case 0x0c3e: /* Write Page Scan Mode */
4701
0
        case 0x0c3f: /* Set AFH Host Channel Classification */
4702
0
        case 0x0c43: /* Write Inquiry Scan Type */
4703
0
        case 0x0c45: /* Write Inquiry Mode */
4704
0
        case 0x0c47: /* Write Page Scan Type */
4705
0
        case 0x0c49: /* Write AFH Channel Assessment Mode */
4706
0
        case 0x0c52: /* Write Extended Inquiry Response */
4707
0
        case 0x0c56: /* Write Simple Pairing Mode */
4708
0
        case 0x0c59: /* Write Inquiry Tx Power Level */
4709
0
        case 0x0c5b: /* Write Default Erroneous Data Reporting */
4710
0
        case 0x0c62: /* Write Logical Link Accept Timeout */
4711
0
        case 0x0c63: /* Set Event Mask Page 2 */
4712
0
        case 0x0c65: /* Write Location Data */
4713
0
        case 0x0c67: /* Write Flow Control Mode */
4714
0
        case 0x0c6a: /* Write Best Effort Timeout */
4715
0
        case 0x0c6d: /* Write LE Host Supported */
4716
0
        case 0x0c6e: /* Set MWS Channel Parameters */
4717
0
        case 0x0c6f: /* Set External Frame Configuration */
4718
0
        case 0x0c71: /* Set MWS Transport Layer */
4719
0
        case 0x0c72: /* Set MWS Scan Frequency Table */
4720
0
        case 0x0c73: /* Set MWS Pattern Configuration */
4721
0
        case 0x0c7a: /* Write Secure Connections Host Support */
4722
0
        case 0x0c7f: /* Write Extended Page Timeout */
4723
0
        case 0x0c81: /* Write Extended Inquiry Length */
4724
0
        case 0x0c82: /* Set Ecosystem Base Interval */
4725
0
        case 0x0c83: /* Configure Data Path */
4726
0
        case 0x0c84: /* Set Min Encryption Key Size */
4727
0
        case 0x140d: /* Set Triggered Clock Capture */
4728
0
        case 0x1802: /* Write Loopback Mode */
4729
0
        case 0x1803: /* Enable Device Under Test Mode */
4730
0
        case 0x1804: /* Write Simple Pairing Debug Mode */
4731
0
        case 0x1807: /* Enable AMP Receiver Reports */
4732
0
        case 0x1808: /* AMP Test End */
4733
0
        case 0x1809: /* AMP Test */
4734
0
        case 0x2001: /* LE Set Event Mask */
4735
0
        case 0x2005: /* LE Set Random Address */
4736
0
        case 0x2006: /* LE Set Advertising Parameters */
4737
0
        case 0x2008: /* LE Set Advertising Data */
4738
0
        case 0x2009: /* LE Set Scan Response Data */
4739
0
        case 0x200a: /* LE Set Advertise Enable */
4740
0
        case 0x200b: /* LE Set Scan Parameters */
4741
0
        case 0x200c: /* LE Set Scan Enable */
4742
0
        case 0x200e: /* LE Create Connection Cancel */
4743
0
        case 0x2010: /* LE Clear Filter Accept List */
4744
0
        case 0x2011: /* LE Add Device To Filter Accept List */
4745
0
        case 0x2012: /* LE Remove Device From Filter Accept List */
4746
0
        case 0x2014: /* LE Set Host Channel Classification */
4747
0
        case 0x201d: /* LE Receiver Test [v1] */
4748
0
        case 0x201e: /* LE Transmitter Test [v1] */
4749
0
        case 0x2024: /* LE Write Suggested Default Data Length */
4750
0
        case 0x2027: /* LE Add Device to Resolving List */
4751
0
        case 0x2028: /* LE Remove Device From Resolving List */
4752
0
        case 0x2029: /* LE Clear Resolving List */
4753
0
        case 0x202D: /* LE Set Address Resolution Enable */
4754
0
        case 0x202E: /* LE Set Resolvable Private Address Timeout */
4755
0
        case 0x2031: /* LE Set Default PHY */
4756
0
        case 0x2033: /* LE Receiver Test [v2] */
4757
0
        case 0x2034: /* LE Transmitter Test [v2] */
4758
0
        case 0x2035: /* LE Set Advertising Set Random Address */
4759
0
        case 0x2037: /* LE Set Extended Advertising Data */
4760
0
        case 0x2038: /* LE Set Extended Scan Response Data */
4761
0
        case 0x2039: /* LE Set Extended Advertising Enable */
4762
0
        case 0x203C: /* LE Remove Advertising Set */
4763
0
        case 0x203D: /* LE Clear Advertising Sets */
4764
0
        case 0x203E: /* LE Set Periodic Advertising Parameters */
4765
0
        case 0x203F: /* LE Set Periodic Advertising Data */
4766
0
        case 0x2040: /* LE Set Periodic Advertising Enable */
4767
0
        case 0x2041: /* LE Set Extended Scan Parameters */
4768
0
        case 0x2042: /* LE Set Extended Scan Enable */
4769
0
        case 0x2045: /* LE Periodic Advertising Create Sync Cancel */
4770
0
        case 0x2046: /* LE Periodic Advertising Terminate Sync */
4771
0
        case 0x2047: /* LE Add Device To Periodic Advertiser List */
4772
0
        case 0x2048: /* LE Remove Device From Periodic Advertiser List */
4773
0
        case 0x2049: /* LE Clear Periodic Advertiser List */
4774
0
        case 0x204D: /* LE Write RF Path Compensation */
4775
0
        case 0x204E: /* LE Set Privacy Mode */
4776
0
        case 0x204F: /* LE Receiver Test [v3] */
4777
0
        case 0x2050: /* LE Transmitter Test [v3] */
4778
0
        case 0x2051: /* LE Set Connectionless CTE Transmit Parameters */
4779
0
        case 0x2052: /* LE Set Connectionless CTE Transmit Enable */
4780
0
        case 0x2059: /* LE Set Periodic Advertising Receive Enable */
4781
0
        case 0x205D: /* LE Set Default Periodic Advertising Sync Transfer Parameters */
4782
0
        case 0x205F: /* LE Modify Sleep Clock Accuracy */
4783
0
        case 0x2074: /* LE Set Host Feature */
4784
0
        case 0x207B: /* LE Transmitter Test [v4] */
4785
0
        case 0x207C: /* LE Set Data Related Address Changes */
4786
0
        case 0x207D: /* LE Set Default Subrate */
4787
0
        case 0x2080: /* LE Set Decision Data */
4788
0
        case 0x2081: /* LE Set Decision Instructions */
4789
0
        case 0x2092: /* LE CS Channel Classification */
4790
0
        case 0x2095: /* LE CS Test */
4791
0
        case 0x2098: /* LE Add Device To Monitoring Advertisers List */
4792
0
        case 0x2099: /* LE Remove Device From Monitoring Advertisers List */
4793
0
        case 0x209A: /* LE Clear Monitoring Advertisers List */
4794
0
        case 0x209C: /* LE Enable Monitoring Advertisers */
4795
0
            proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN);
4796
0
            send_hci_summary_status_tap(tvb_get_uint8(tvb, offset), pinfo, bluetooth_data);
4797
0
            offset += 1;
4798
0
            break;
4799
4800
        /* This is a list of Commands that all return status and BD_ADDR */
4801
0
        case 0x1009: /* Read BD_ADDR */
4802
0
            local_addr = true;
4803
4804
            /* FALLTHROUGH */
4805
0
        case 0x0408: /* Create Connection Cancel */
4806
0
        case 0x040b: /* Link Key Request Reply */
4807
0
        case 0x040c: /* Link Key Request Negative Reply */
4808
0
        case 0x040d: /* PIN Code Request Reply */
4809
0
        case 0x040e: /* PIN Code Request Negative Reply */
4810
0
        case 0x041a: /* Remote Name Request Cancel */
4811
0
        case 0x042b: /* IO Capability Request Reply */
4812
0
        case 0x042c: /* User Confirmation Request Reply */
4813
0
        case 0x042d: /* User Confirmation Request Negative Reply */
4814
0
        case 0x042e: /* User Passkey Request Reply */
4815
0
        case 0x042f: /* User Passkey Request Negative Reply */
4816
0
        case 0x0430: /* Remote OOB Data Request Reply */
4817
0
        case 0x0433: /* Remote OOB Data Request Negative Reply */
4818
0
        case 0x0434: /* IO Capability Request Negative Reply */
4819
0
        case 0x0440: /* Truncated Page Cancel */
4820
0
        case 0x0445: /* Remote OOB Extended Data Request Reply */
4821
0
        case 0x0c60: /* Send Keypress Notification */
4822
0
        case 0x202B: /* LE Read Peer Resolvable Address */
4823
0
        case 0x202C: /* LE Read Local Resolvable Address */
4824
0
            proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN);
4825
0
            send_hci_summary_status_tap(tvb_get_uint8(tvb, offset), pinfo, bluetooth_data);
4826
0
            offset += 1;
4827
4828
0
            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);
4829
0
            if (!pinfo->fd->visited && local_addr) {
4830
0
                localhost_bdaddr_entry_t   *localhost_bdaddr_entry;
4831
4832
0
                interface_id = bluetooth_data->interface_id;
4833
0
                adapter_id = bluetooth_data->adapter_id;
4834
0
                frame_number = pinfo->num;
4835
4836
0
                key[0].length = 1;
4837
0
                key[0].key    = &interface_id;
4838
0
                key[1].length = 1;
4839
0
                key[1].key    = &adapter_id;
4840
0
                key[2].length = 1;
4841
0
                key[2].key    = &frame_number;
4842
0
                key[3].length = 0;
4843
0
                key[3].key    = NULL;
4844
4845
0
                localhost_bdaddr_entry = (localhost_bdaddr_entry_t *) wmem_new(wmem_file_scope(), localhost_bdaddr_entry_t);
4846
0
                localhost_bdaddr_entry->interface_id = interface_id;
4847
0
                localhost_bdaddr_entry->adapter_id = adapter_id;
4848
0
                memcpy(localhost_bdaddr_entry->bd_addr, bd_addr, 6);
4849
0
                wmem_tree_insert32_array(bluetooth_data->localhost_bdaddr, key, localhost_bdaddr_entry);
4850
0
            }
4851
4852
0
            if (local_addr && have_tap_listener(bluetooth_device_tap)) {
4853
0
                bluetooth_device_tap_t  *tap_device;
4854
4855
0
                tap_device = wmem_new(pinfo->pool, bluetooth_device_tap_t);
4856
0
                if (bluetooth_data) {
4857
0
                    tap_device->interface_id  = bluetooth_data->interface_id;
4858
0
                    tap_device->adapter_id    = bluetooth_data->adapter_id;
4859
0
                } else {
4860
0
                    tap_device->interface_id  = HCI_INTERFACE_DEFAULT;
4861
0
                    tap_device->adapter_id    = HCI_ADAPTER_DEFAULT;
4862
0
                }
4863
0
                memcpy(tap_device->bd_addr, bd_addr, 6);
4864
0
                tap_device->has_bd_addr = true;
4865
0
                tap_device->is_local = true;
4866
0
                tap_device->type = BLUETOOTH_DEVICE_LOCAL_ADAPTER;
4867
0
                tap_queue_packet(bluetooth_device_tap, pinfo, tap_device);
4868
0
            }
4869
4870
0
            break;
4871
4872
        /* This is a list of Commands that all return status and connection_handle */
4873
0
        case 0x080d: /* Write Link Policy Settings */
4874
0
        case 0x0811: /* Sniff Subrating */
4875
0
        case 0x0c08: /* Flush */
4876
0
        case 0x0c28: /* Write Automatic Flush Timeout */
4877
0
        case 0x0c37: /* Write Link Supervision Timeout */
4878
0
        case 0x0c7c: /* Write Authenticated Payload Timeout */
4879
0
        case 0x1402: /* Reset Failed Contact Counter */
4880
0
        case 0x180a: /* Write Secure Connections Test Mode */
4881
0
        case 0x201a: /* LE Long Term Key Request Reply */
4882
0
        case 0x201b: /* LE Long Term Key Request Neg Reply */
4883
0
        case 0x2020: /* LE Remote Connection Parameter Request Reply */
4884
0
        case 0x2021: /* LE Remote Connection Parameter Request Negative Reply */
4885
0
        case 0x2022: /* LE Set Data Length */
4886
0
        case 0x2054: /* LE Set Connection CTE Receive Parameters */
4887
0
        case 0x2055: /* LE Set Connection CTE Transmit Parameters */
4888
0
        case 0x2056: /* LE Connection CTE Request Enable */
4889
0
        case 0x2057: /* LE Connection CTE Response Enable */
4890
0
        case 0x205A: /* LE Periodic Advertising Sync Transfer */
4891
0
        case 0x205B: /* LE Periodic Advertising Set Info Transfer */
4892
0
        case 0x205C: /* LE Set Periodic Advertising Sync Transfer Parameters */
4893
0
        case 0x2078: /* LE Set Path Loss Reporting Parameters */
4894
0
        case 0x2079: /* LE Set Path Loss Reporting Enable */
4895
0
        case 0x207a: /* LE Set Transmit Power Reporting Enable */
4896
0
        case 0x208b: /* LE CS Write Cached Remote Supported Capabilities */
4897
0
        case 0x208d: /* LE CS Set Default Settings */
4898
0
        case 0x208f: /* LE CS Write Cached FAE Table */
4899
0
        case 0x2093: /* LE CS Set Procedure Parameters */
4900
0
            proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN);
4901
0
            send_hci_summary_status_tap(tvb_get_uint8(tvb, offset), pinfo, bluetooth_data);
4902
0
            offset += 1;
4903
4904
0
            proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
4905
0
            offset += 2;
4906
4907
0
            break;
4908
4909
        /* This is a list of Commands that all return status and timeout */
4910
0
        case 0x0c15: /* Read Connection Accept Timeout */
4911
0
            proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN);
4912
0
            send_hci_summary_status_tap(tvb_get_uint8(tvb, offset), pinfo, bluetooth_data);
4913
0
            offset += 1;
4914
4915
0
            proto_tree_add_item(tree, hf_bthci_evt_timeout, tvb, offset, 2, ENC_LITTLE_ENDIAN);
4916
0
            offset += 2;
4917
4918
0
            break;
4919
0
        case 0x0c17: /* Read Page Timeout */
4920
0
            proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN);
4921
0
            status = tvb_get_uint8(tvb, offset);
4922
0
            send_hci_summary_status_tap(status, pinfo, bluetooth_data);
4923
0
            offset += 1;
4924
4925
0
            proto_tree_add_item(tree, hf_bthci_evt_timeout, tvb, offset, 2, ENC_LITTLE_ENDIAN);
4926
0
            offset += 2;
4927
4928
0
            if (status == STATUS_SUCCESS && have_tap_listener(bluetooth_device_tap)) {
4929
0
                bluetooth_device_tap_t  *tap_device;
4930
4931
0
                tap_device = wmem_new(pinfo->pool, bluetooth_device_tap_t);
4932
0
                if (bluetooth_data) {
4933
0
                    tap_device->interface_id  = bluetooth_data->interface_id;
4934
0
                    tap_device->adapter_id    = bluetooth_data->adapter_id;
4935
0
                } else {
4936
0
                    tap_device->interface_id  = HCI_INTERFACE_DEFAULT;
4937
0
                    tap_device->adapter_id    = HCI_ADAPTER_DEFAULT;
4938
0
                }
4939
0
                tap_device->has_bd_addr = false;
4940
0
                tap_device->is_local = true;
4941
0
                tap_device->type = BLUETOOTH_DEVICE_PAGE_TIMEOUT;
4942
0
                tap_device->data.page_timeout = tvb_get_uint16(tvb, offset - 2, ENC_LITTLE_ENDIAN);
4943
0
                tap_queue_packet(bluetooth_device_tap, pinfo, tap_device);
4944
0
            }
4945
4946
0
            break;
4947
4948
        /* This is a list of Commands that all return status, connection handle and timeout */
4949
0
        case 0x0c27: /* Read Automatic Flush Timeout */
4950
0
        case 0x0c36: /* Read Link Supervision Timeout */
4951
0
            proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN);
4952
0
            send_hci_summary_status_tap(tvb_get_uint8(tvb, offset), pinfo, bluetooth_data);
4953
0
            offset += 1;
4954
4955
0
            proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
4956
0
            offset += 2;
4957
4958
0
            proto_tree_add_item(tree, hf_bthci_evt_timeout, tvb, offset, 2, ENC_LITTLE_ENDIAN);
4959
0
            offset += 2;
4960
4961
0
            break;
4962
4963
        /* This is a list of Commands that all return status, interval and window */
4964
0
        case 0x0c1b: /* Read Page Scan Activity */
4965
0
        case 0x0c1d: /* Read Inquiry Scan Activity */
4966
0
            proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN);
4967
0
            send_hci_summary_status_tap(tvb_get_uint8(tvb, offset), pinfo, bluetooth_data);
4968
0
            offset += 1;
4969
4970
0
            proto_tree_add_item(tree, hf_bthci_evt_interval, tvb, offset, 2, ENC_LITTLE_ENDIAN);
4971
0
            offset += 2;
4972
4973
0
            proto_tree_add_item(tree, hf_bthci_evt_window, tvb, offset, 2, ENC_LITTLE_ENDIAN);
4974
0
            offset += 2;
4975
4976
0
            break;
4977
4978
0
        case 0x0420: /* Read LMP Handle */
4979
0
            proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN);
4980
0
            send_hci_summary_status_tap(tvb_get_uint8(tvb, offset), pinfo, bluetooth_data);
4981
0
            offset += 1;
4982
4983
0
            proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
4984
0
            offset += 2;
4985
4986
0
            proto_tree_add_item(tree, hf_bthci_evt_lmp_handle, tvb, offset, 1, ENC_LITTLE_ENDIAN);
4987
0
            offset += 1;
4988
4989
            /* 4 reserved bytes */
4990
0
            offset += 4;
4991
0
            break;
4992
4993
0
        case 0x043b: /* Logical Link Cancel */
4994
0
            proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN);
4995
0
            send_hci_summary_status_tap(tvb_get_uint8(tvb, offset), pinfo, bluetooth_data);
4996
0
            offset += 1;
4997
4998
0
            proto_tree_add_item(tree, hf_bthci_evt_physical_link_handle, tvb, offset, 1, ENC_LITTLE_ENDIAN);
4999
0
            offset += 1;
5000
5001
0
            proto_tree_add_item(tree, hf_bthci_evt_flow_spec_identifier, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5002
0
            offset += 1;
5003
5004
0
            break;
5005
0
        case 0x0809: /* Role Discovery */
5006
0
            proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5007
0
            send_hci_summary_status_tap(tvb_get_uint8(tvb, offset), pinfo, bluetooth_data);
5008
0
            offset += 1;
5009
5010
0
            proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5011
0
            offset += 2;
5012
5013
0
            proto_tree_add_item(tree, hf_bthci_evt_curr_role, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5014
0
            offset += 1;
5015
5016
0
            break;
5017
5018
0
        case 0x080c: /* Read Link Policy Settings */
5019
0
            proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5020
0
            send_hci_summary_status_tap(tvb_get_uint8(tvb, offset), pinfo, bluetooth_data);
5021
0
            offset += 1;
5022
5023
0
            proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5024
0
            offset += 2;
5025
5026
0
            proto_tree_add_item(tree, hf_bthci_evt_link_policy_setting_switch, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5027
0
            proto_tree_add_item(tree, hf_bthci_evt_link_policy_setting_hold  , tvb, offset, 2, ENC_LITTLE_ENDIAN);
5028
0
            proto_tree_add_item(tree, hf_bthci_evt_link_policy_setting_sniff , tvb, offset, 2, ENC_LITTLE_ENDIAN);
5029
0
            proto_tree_add_item(tree, hf_bthci_evt_link_policy_setting_park  , tvb, offset, 2, ENC_LITTLE_ENDIAN);
5030
0
            offset += 2;
5031
5032
0
            break;
5033
5034
0
        case 0x080e: /* Read Default Link Policy Settings */
5035
0
            proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5036
0
            send_hci_summary_status_tap(tvb_get_uint8(tvb, offset), pinfo, bluetooth_data);
5037
0
            offset += 1;
5038
5039
0
            proto_tree_add_item(tree, hf_bthci_evt_link_policy_setting_switch, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5040
0
            proto_tree_add_item(tree, hf_bthci_evt_link_policy_setting_hold  , tvb, offset, 2, ENC_LITTLE_ENDIAN);
5041
0
            proto_tree_add_item(tree, hf_bthci_evt_link_policy_setting_sniff , tvb, offset, 2, ENC_LITTLE_ENDIAN);
5042
0
            proto_tree_add_item(tree, hf_bthci_evt_link_policy_setting_park  , tvb, offset, 2, ENC_LITTLE_ENDIAN);
5043
0
            offset += 2;
5044
5045
0
            break;
5046
5047
0
        case 0x0c09: /* Read PIN Type */
5048
0
            proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5049
0
            send_hci_summary_status_tap(tvb_get_uint8(tvb, offset), pinfo, bluetooth_data);
5050
0
            offset += 1;
5051
5052
0
            proto_tree_add_item(tree, hf_bthci_evt_pin_type, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5053
0
            offset += 1;
5054
5055
0
            break;
5056
5057
0
        case 0x0c0d: /* Read Stored Link Key */
5058
0
            proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5059
0
            send_hci_summary_status_tap(tvb_get_uint8(tvb, offset), pinfo, bluetooth_data);
5060
0
            offset += 1;
5061
5062
0
            proto_tree_add_item(tree, hf_bthci_evt_max_num_keys, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5063
0
            offset += 2;
5064
5065
0
            proto_tree_add_item(tree, hf_bthci_evt_num_keys_read, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5066
0
            offset += 2;
5067
5068
0
            break;
5069
5070
0
        case 0x0c11: /* Write Stored Link Key */
5071
0
            proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5072
0
            send_hci_summary_status_tap(tvb_get_uint8(tvb, offset), pinfo, bluetooth_data);
5073
0
            offset += 1;
5074
5075
0
            proto_tree_add_item(tree, hf_bthci_evt_num_keys_written, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5076
0
            offset += 1;
5077
5078
0
            break;
5079
5080
0
        case 0x0c12: /* Delete Stored Link Key */
5081
0
            proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5082
0
            send_hci_summary_status_tap(tvb_get_uint8(tvb, offset), pinfo, bluetooth_data);
5083
0
            offset += 1;
5084
5085
0
            proto_tree_add_item(tree, hf_bthci_evt_num_keys_deleted, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5086
0
            offset += 2;
5087
5088
0
            break;
5089
5090
0
        case 0x0c14: /* Read Local Name */
5091
0
            proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5092
0
            status = tvb_get_uint8(tvb, offset);
5093
0
            send_hci_summary_status_tap(status, pinfo, bluetooth_data);
5094
0
            offset += 1;
5095
5096
0
            proto_tree_add_item(tree, hf_bthci_evt_device_name, tvb, offset, 248, ENC_UTF_8);
5097
0
            if (status == STATUS_SUCCESS && !pinfo->fd->visited) {
5098
0
                char                    *name;
5099
0
                localhost_name_entry_t  *localhost_name_entry;
5100
5101
0
                name = tvb_get_string_enc(pinfo->pool, tvb, offset, 248, ENC_UTF_8);
5102
5103
0
                key[0].length = 1;
5104
0
                key[0].key    = &interface_id;
5105
0
                key[1].length = 1;
5106
0
                key[1].key    = &adapter_id;
5107
0
                key[2].length = 1;
5108
0
                key[2].key    = &frame_number;
5109
0
                key[3].length = 0;
5110
0
                key[3].key    = NULL;
5111
5112
0
                localhost_name_entry = (localhost_name_entry_t *) wmem_new(wmem_file_scope(), localhost_name_entry_t);
5113
0
                localhost_name_entry->interface_id = interface_id;
5114
0
                localhost_name_entry->adapter_id = adapter_id;
5115
0
                localhost_name_entry->name = wmem_strdup(wmem_file_scope(), name);
5116
5117
0
                wmem_tree_insert32_array(bluetooth_data->localhost_name, key, localhost_name_entry);
5118
0
            }
5119
5120
0
            if (status == STATUS_SUCCESS && have_tap_listener(bluetooth_device_tap)) {
5121
0
                bluetooth_device_tap_t  *tap_device;
5122
5123
0
                tap_device = wmem_new(pinfo->pool, bluetooth_device_tap_t);
5124
0
                if (bluetooth_data) {
5125
0
                    tap_device->interface_id  = bluetooth_data->interface_id;
5126
0
                    tap_device->adapter_id    = bluetooth_data->adapter_id;
5127
0
                } else {
5128
0
                    tap_device->interface_id  = HCI_INTERFACE_DEFAULT;
5129
0
                    tap_device->adapter_id    = HCI_ADAPTER_DEFAULT;
5130
0
                }
5131
0
                tap_device->has_bd_addr = false;
5132
0
                tap_device->is_local = true;
5133
0
                tap_device->type = BLUETOOTH_DEVICE_NAME;
5134
0
                tap_device->data.name = tvb_get_string_enc(pinfo->pool, tvb, offset, 248, ENC_UTF_8);
5135
0
                tap_queue_packet(bluetooth_device_tap, pinfo, tap_device);
5136
0
            }
5137
0
            offset += 248;
5138
5139
0
            break;
5140
5141
0
        case 0x0c19: /* Read Scan Enable */
5142
0
            proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5143
0
            status = tvb_get_uint8(tvb, offset);
5144
0
            send_hci_summary_status_tap(status, pinfo, bluetooth_data);
5145
0
            offset += 1;
5146
5147
0
            proto_tree_add_item(tree, hf_bthci_evt_scan_enable, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5148
0
            offset += 1;
5149
5150
0
            if (status == STATUS_SUCCESS && have_tap_listener(bluetooth_device_tap)) {
5151
0
                bluetooth_device_tap_t  *tap_device;
5152
5153
0
                tap_device = wmem_new(pinfo->pool, bluetooth_device_tap_t);
5154
0
                if (bluetooth_data) {
5155
0
                    tap_device->interface_id  = bluetooth_data->interface_id;
5156
0
                    tap_device->adapter_id    = bluetooth_data->adapter_id;
5157
0
                } else {
5158
0
                    tap_device->interface_id  = HCI_INTERFACE_DEFAULT;
5159
0
                    tap_device->adapter_id    = HCI_ADAPTER_DEFAULT;
5160
0
                }
5161
0
                tap_device->has_bd_addr = false;
5162
0
                tap_device->is_local = true;
5163
0
                tap_device->type = BLUETOOTH_DEVICE_SCAN;
5164
0
                tap_device->data.scan = tvb_get_uint8(tvb, offset - 1);
5165
0
                tap_queue_packet(bluetooth_device_tap, pinfo, tap_device);
5166
0
            }
5167
5168
0
            break;
5169
5170
0
        case 0x0c1f: /* Read Authentication Enable */
5171
0
            proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5172
0
            status = tvb_get_uint8(tvb, offset);
5173
0
            send_hci_summary_status_tap(status, pinfo, bluetooth_data);
5174
0
            offset += 1;
5175
5176
0
            proto_tree_add_item(tree, hf_bthci_evt_authentication_enable, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5177
0
            offset += 1;
5178
5179
0
            if (status == STATUS_SUCCESS && have_tap_listener(bluetooth_device_tap)) {
5180
0
                bluetooth_device_tap_t  *tap_device;
5181
5182
0
                tap_device = wmem_new(pinfo->pool, bluetooth_device_tap_t);
5183
0
                if (bluetooth_data) {
5184
0
                    tap_device->interface_id  = bluetooth_data->interface_id;
5185
0
                    tap_device->adapter_id    = bluetooth_data->adapter_id;
5186
0
                } else {
5187
0
                    tap_device->interface_id  = HCI_INTERFACE_DEFAULT;
5188
0
                    tap_device->adapter_id    = HCI_ADAPTER_DEFAULT;
5189
0
                }
5190
0
                tap_device->has_bd_addr = false;
5191
0
                tap_device->is_local = true;
5192
0
                tap_device->type = BLUETOOTH_DEVICE_AUTHENTICATION;
5193
0
                tap_device->data.class_of_device = tvb_get_uint8(tvb, offset - 1);
5194
0
                tap_queue_packet(bluetooth_device_tap, pinfo, tap_device);
5195
0
            }
5196
5197
0
            break;
5198
0
        case 0x0c21: /* Read Encryption Mode */
5199
0
            proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5200
0
            status = tvb_get_uint8(tvb, offset);
5201
0
            send_hci_summary_status_tap(status, pinfo, bluetooth_data);
5202
0
            offset += 1;
5203
5204
0
            proto_tree_add_item(tree, hf_bthci_evt_encryption_mode, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5205
0
            offset += 1;
5206
5207
0
            if (status == STATUS_SUCCESS && have_tap_listener(bluetooth_device_tap)) {
5208
0
                bluetooth_device_tap_t  *tap_device;
5209
5210
0
                tap_device = wmem_new(pinfo->pool, bluetooth_device_tap_t);
5211
0
                if (bluetooth_data) {
5212
0
                    tap_device->interface_id  = bluetooth_data->interface_id;
5213
0
                    tap_device->adapter_id    = bluetooth_data->adapter_id;
5214
0
                } else {
5215
0
                    tap_device->interface_id  = HCI_INTERFACE_DEFAULT;
5216
0
                    tap_device->adapter_id    = HCI_ADAPTER_DEFAULT;
5217
0
                }
5218
0
                tap_device->has_bd_addr = false;
5219
0
                tap_device->is_local = true;
5220
0
                tap_device->type = BLUETOOTH_DEVICE_ENCRYPTION;
5221
0
                tap_device->data.class_of_device = tvb_get_uint8(tvb, offset - 1);
5222
0
                tap_queue_packet(bluetooth_device_tap, pinfo, tap_device);
5223
0
            }
5224
5225
0
            break;
5226
5227
0
        case 0x0c23: /* Read Class of Device */
5228
0
            proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5229
0
            status = tvb_get_uint8(tvb, offset);
5230
0
            send_hci_summary_status_tap(status, pinfo, bluetooth_data);
5231
0
            offset += 1;
5232
5233
0
            call_dissector(btcommon_cod_handle, tvb_new_subset_length(tvb, offset, 3), pinfo, tree);
5234
0
            offset += 3;
5235
5236
0
            if (status == STATUS_SUCCESS && have_tap_listener(bluetooth_device_tap)) {
5237
0
                bluetooth_device_tap_t  *tap_device;
5238
5239
0
                tap_device = wmem_new(pinfo->pool, bluetooth_device_tap_t);
5240
0
                if (bluetooth_data) {
5241
0
                    tap_device->interface_id  = bluetooth_data->interface_id;
5242
0
                    tap_device->adapter_id    = bluetooth_data->adapter_id;
5243
0
                } else {
5244
0
                    tap_device->interface_id  = HCI_INTERFACE_DEFAULT;
5245
0
                    tap_device->adapter_id    = HCI_ADAPTER_DEFAULT;
5246
0
                }
5247
0
                tap_device->has_bd_addr = false;
5248
0
                tap_device->is_local = true;
5249
0
                tap_device->type = BLUETOOTH_DEVICE_CLASS_OF_DEVICE;
5250
0
                tap_device->data.class_of_device = tvb_get_uint24(tvb, offset - 3, ENC_LITTLE_ENDIAN);
5251
0
                tap_queue_packet(bluetooth_device_tap, pinfo, tap_device);
5252
0
            }
5253
5254
0
            break;
5255
5256
0
        case 0x0c25: /* Read Voice Setting */
5257
0
            proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5258
0
            status = tvb_get_uint8(tvb, offset);
5259
0
            send_hci_summary_status_tap(status, pinfo, bluetooth_data);
5260
0
            offset += 1;
5261
5262
0
            proto_tree_add_item(tree, hf_bthci_evt_input_unused, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5263
0
            proto_tree_add_item(tree, hf_bthci_evt_input_coding, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5264
0
            proto_tree_add_item(tree, hf_bthci_evt_input_data_format, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5265
0
            proto_tree_add_item(tree, hf_bthci_evt_input_sample_size, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5266
0
            proto_tree_add_item(tree, hf_bthci_evt_linear_pcm_bit_pos, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5267
0
            proto_tree_add_item(tree, hf_bthci_evt_air_coding_format, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5268
0
            offset += 2;
5269
5270
0
            if (status == STATUS_SUCCESS && have_tap_listener(bluetooth_device_tap)) {
5271
0
                bluetooth_device_tap_t  *tap_device;
5272
5273
0
                tap_device = wmem_new(pinfo->pool, bluetooth_device_tap_t);
5274
0
                if (bluetooth_data) {
5275
0
                    tap_device->interface_id  = bluetooth_data->interface_id;
5276
0
                    tap_device->adapter_id    = bluetooth_data->adapter_id;
5277
0
                } else {
5278
0
                    tap_device->interface_id  = HCI_INTERFACE_DEFAULT;
5279
0
                    tap_device->adapter_id    = HCI_ADAPTER_DEFAULT;
5280
0
                }
5281
0
                tap_device->has_bd_addr = false;
5282
0
                tap_device->is_local = true;
5283
0
                tap_device->type = BLUETOOTH_DEVICE_VOICE_SETTING;
5284
0
                tap_device->data.voice_setting = tvb_get_uint16(tvb, offset - 2, ENC_LITTLE_ENDIAN);
5285
0
                tap_queue_packet(bluetooth_device_tap, pinfo, tap_device);
5286
0
            }
5287
5288
0
            break;
5289
5290
0
        case 0x0c29: /* Read Num Broadcast Retransmissions */
5291
0
            proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5292
0
            send_hci_summary_status_tap(tvb_get_uint8(tvb, offset), pinfo, bluetooth_data);
5293
0
            offset += 1;
5294
5295
0
            proto_tree_add_item(tree, hf_bthci_evt_num_broadcast_retransm, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5296
0
            offset += 1;
5297
5298
0
            break;
5299
5300
0
        case 0x0c2b: /* Read Hold Mode Activity */
5301
0
            proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5302
0
            send_hci_summary_status_tap(tvb_get_uint8(tvb, offset), pinfo, bluetooth_data);
5303
0
            offset += 1;
5304
5305
0
            proto_tree_add_item(tree, hf_bthci_evt_hold_mode_act_page, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5306
0
            proto_tree_add_item(tree, hf_bthci_evt_hold_mode_act_inquiry, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5307
0
            proto_tree_add_item(tree, hf_bthci_evt_hold_mode_act_periodic, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5308
0
            offset += 1;
5309
5310
0
            break;
5311
5312
0
        case 0x0c2d: /* Read Transmit Power Level */
5313
0
            proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5314
0
            send_hci_summary_status_tap(tvb_get_uint8(tvb, offset), pinfo, bluetooth_data);
5315
0
            offset += 1;
5316
5317
0
            proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5318
0
            offset += 2;
5319
5320
0
            proto_tree_add_item(tree, hf_bthci_evt_transmit_power_level, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5321
0
            offset += 1;
5322
5323
0
            break;
5324
5325
0
        case 0x0c2e: /* Read SCO Flow Control Enable */
5326
0
            proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5327
0
            send_hci_summary_status_tap(tvb_get_uint8(tvb, offset), pinfo, bluetooth_data);
5328
0
            offset += 1;
5329
5330
0
            proto_tree_add_item(tree, hf_bthci_evt_sco_flow_cont_enable, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5331
0
            offset += 1;
5332
5333
0
            break;
5334
5335
5336
0
        case 0x0c38: /* Read Number of Supported IAC */
5337
0
            proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5338
0
            send_hci_summary_status_tap(tvb_get_uint8(tvb, offset), pinfo, bluetooth_data);
5339
0
            offset += 1;
5340
5341
0
            proto_tree_add_item(tree, hf_bthci_evt_num_supp_iac, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5342
0
            offset += 1;
5343
5344
0
            break;
5345
5346
0
        case 0x0c39: /* Read Current IAC LAP */
5347
0
            proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5348
0
            send_hci_summary_status_tap(tvb_get_uint8(tvb, offset), pinfo, bluetooth_data);
5349
0
            offset += 1;
5350
5351
0
            num8 = tvb_get_uint8(tvb, offset);
5352
0
            proto_tree_add_item(tree, hf_bthci_evt_num_curr_iac, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5353
0
            offset += 1;
5354
5355
0
            for (i = 0; i < num8; i++) {
5356
0
                proto_tree_add_item(tree, hf_bthci_evt_iac_lap, tvb, offset, 3, ENC_LITTLE_ENDIAN);
5357
0
                offset += 3;
5358
0
            }
5359
0
            break;
5360
5361
0
        case 0x0c3b: /* Read Page Scan Period Mode */
5362
0
            proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5363
0
            send_hci_summary_status_tap(tvb_get_uint8(tvb, offset), pinfo, bluetooth_data);
5364
0
            offset += 1;
5365
5366
0
            proto_tree_add_item(tree, hf_bthci_evt_page_scan_period_mode, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5367
0
            offset += 1;
5368
5369
0
            break;
5370
5371
0
        case 0x0c3d: /* Read Page Scan Mode */
5372
0
            proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5373
0
            send_hci_summary_status_tap(tvb_get_uint8(tvb, offset), pinfo, bluetooth_data);
5374
0
            offset += 1;
5375
5376
0
            proto_tree_add_item(tree, hf_bthci_evt_page_scan_mode, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5377
0
            offset += 1;
5378
5379
0
            break;
5380
5381
0
        case 0x0c42: /* Read Inquiry Scan Type */
5382
0
        case 0x0c46: /* Read Page Scan Type */
5383
0
            proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5384
0
            send_hci_summary_status_tap(tvb_get_uint8(tvb, offset), pinfo, bluetooth_data);
5385
0
            offset += 1;
5386
5387
0
            proto_tree_add_item(tree, hf_bthci_evt_scan_type, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5388
0
            offset += 1;
5389
0
            break;
5390
5391
0
        case 0x0c44: /* Read Inquiry Mode */
5392
0
            proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5393
0
            status = tvb_get_uint8(tvb, offset);
5394
0
            send_hci_summary_status_tap(status, pinfo, bluetooth_data);
5395
0
            offset += 1;
5396
5397
0
            proto_tree_add_item(tree, hf_bthci_evt_inq_mode, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5398
0
            offset += 1;
5399
5400
0
            if (status == STATUS_SUCCESS && have_tap_listener(bluetooth_device_tap)) {
5401
0
                bluetooth_device_tap_t  *tap_device;
5402
5403
0
                tap_device = wmem_new(pinfo->pool, bluetooth_device_tap_t);
5404
0
                if (bluetooth_data) {
5405
0
                    tap_device->interface_id  = bluetooth_data->interface_id;
5406
0
                    tap_device->adapter_id    = bluetooth_data->adapter_id;
5407
0
                } else {
5408
0
                    tap_device->interface_id  = HCI_INTERFACE_DEFAULT;
5409
0
                    tap_device->adapter_id    = HCI_ADAPTER_DEFAULT;
5410
0
                }
5411
0
                tap_device->has_bd_addr = false;
5412
0
                tap_device->is_local = true;
5413
0
                tap_device->type = BLUETOOTH_DEVICE_INQUIRY_MODE;
5414
0
                tap_device->data.inquiry_mode = tvb_get_uint8(tvb, offset - 1);
5415
0
                tap_queue_packet(bluetooth_device_tap, pinfo, tap_device);
5416
0
            }
5417
0
            break;
5418
5419
0
        case 0x0c48: /* Read AFH Channel Assessment Mode */
5420
0
            proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5421
0
            send_hci_summary_status_tap(tvb_get_uint8(tvb, offset), pinfo, bluetooth_data);
5422
0
            offset += 1;
5423
0
            proto_tree_add_item(tree, hf_bthci_evt_afh_ch_assessment_mode, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5424
0
            offset += 1;
5425
0
            break;
5426
5427
0
        case 0x0c51: /* Read Extended Inquiry Response */
5428
0
            {
5429
0
            bluetooth_eir_ad_data_t *eir_data;
5430
5431
0
            eir_data = wmem_new0(pinfo->pool, bluetooth_eir_ad_data_t);
5432
0
            eir_data->interface_id = bluetooth_data->interface_id;
5433
0
            eir_data->adapter_id = bluetooth_data->adapter_id;
5434
0
            eir_data->bd_addr = NULL;
5435
5436
0
            proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5437
0
            send_hci_summary_status_tap(tvb_get_uint8(tvb, offset), pinfo, bluetooth_data);
5438
0
            offset += 1;
5439
5440
0
            proto_tree_add_item(tree, hf_bthci_evt_fec_required, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5441
0
            offset += 1;
5442
5443
0
            call_dissector_with_data(btcommon_eir_handle, tvb_new_subset_length(tvb, offset, 240), pinfo, tree, eir_data);
5444
0
            offset += 240;
5445
5446
0
            }
5447
0
            break;
5448
5449
0
        case 0x0c55: /* Read Simple Pairing Mode */
5450
0
            proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5451
0
            status = tvb_get_uint8(tvb, offset);
5452
0
            send_hci_summary_status_tap(status, pinfo, bluetooth_data);
5453
0
            offset += 1;
5454
5455
0
            proto_tree_add_item(tree, hf_bthci_evt_simple_pairing_mode, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5456
0
            offset += 1;
5457
5458
0
            if (status == STATUS_SUCCESS && have_tap_listener(bluetooth_device_tap)) {
5459
0
                bluetooth_device_tap_t  *tap_device;
5460
5461
0
                tap_device = wmem_new(pinfo->pool, bluetooth_device_tap_t);
5462
0
                if (bluetooth_data) {
5463
0
                    tap_device->interface_id  = bluetooth_data->interface_id;
5464
0
                    tap_device->adapter_id    = bluetooth_data->adapter_id;
5465
0
                } else {
5466
0
                    tap_device->interface_id  = HCI_INTERFACE_DEFAULT;
5467
0
                    tap_device->adapter_id    = HCI_ADAPTER_DEFAULT;
5468
0
                }
5469
0
                tap_device->has_bd_addr = false;
5470
0
                tap_device->is_local = true;
5471
0
                tap_device->type = BLUETOOTH_DEVICE_SIMPLE_PAIRING_MODE;
5472
0
                tap_device->data.simple_pairing_mode = tvb_get_uint8(tvb, offset - 1);
5473
0
                tap_queue_packet(bluetooth_device_tap, pinfo, tap_device);
5474
0
            }
5475
5476
0
            break;
5477
5478
0
        case 0x0c57: /* Read Local OOB Data */
5479
0
            proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5480
0
            send_hci_summary_status_tap(tvb_get_uint8(tvb, offset), pinfo, bluetooth_data);
5481
0
            offset += 1;
5482
5483
0
            proto_tree_add_item(tree, hf_bthci_evt_hash_c, tvb, offset, 16, ENC_NA);
5484
0
            offset += 16;
5485
0
            proto_tree_add_item(tree, hf_bthci_evt_randomizer_r, tvb, offset, 16, ENC_NA);
5486
0
            offset += 16;
5487
0
            break;
5488
5489
0
        case 0x0c58: /* Read Inquiry Response Tx Power Level */
5490
0
            proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5491
0
            send_hci_summary_status_tap(tvb_get_uint8(tvb, offset), pinfo, bluetooth_data);
5492
0
            offset += 1;
5493
5494
0
            proto_tree_add_item(tree, hf_bthci_evt_power_level_type, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5495
0
            offset += 1;
5496
0
            break;
5497
5498
5499
0
        case 0x0c5a: /* Read Default Erroneous Data Reporting */
5500
0
            proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5501
0
            send_hci_summary_status_tap(tvb_get_uint8(tvb, offset), pinfo, bluetooth_data);
5502
0
            offset += 1;
5503
5504
0
            proto_tree_add_item(tree, hf_bthci_evt_err_data_reporting, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5505
0
            offset += 1;
5506
5507
0
            break;
5508
5509
0
        case 0x0c61: /* Read Logical Link Accept Timeout */
5510
0
            proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5511
0
            send_hci_summary_status_tap(tvb_get_uint8(tvb, offset), pinfo, bluetooth_data);
5512
0
            offset += 1;
5513
0
            proto_tree_add_item(tree, hf_bthci_evt_timeout, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5514
0
            offset += 2;
5515
0
            break;
5516
5517
0
        case 0x0c64: /* Read Location Data */
5518
0
            proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5519
0
            send_hci_summary_status_tap(tvb_get_uint8(tvb, offset), pinfo, bluetooth_data);
5520
0
            offset += 1;
5521
0
            proto_tree_add_item(tree, hf_bthci_evt_location_domain_aware, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5522
0
            offset += 1;
5523
0
            proto_tree_add_item(tree, hf_bthci_evt_location_domain, tvb, offset, 2, ENC_ASCII | ENC_NA);
5524
0
            offset += 2;
5525
0
            proto_tree_add_item(tree, hf_bthci_evt_location_domain_options, tvb, offset, 1, ENC_ASCII | ENC_NA);
5526
0
            offset += 1;
5527
0
            proto_tree_add_item(tree, hf_bthci_evt_location_options, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5528
0
            offset += 1;
5529
0
            break;
5530
5531
0
        case 0x0c66: /* Read Flow Control Mode */
5532
0
            proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5533
0
            send_hci_summary_status_tap(tvb_get_uint8(tvb, offset), pinfo, bluetooth_data);
5534
0
            offset += 1;
5535
0
            proto_tree_add_item(tree, hf_bthci_evt_flow_control_mode, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5536
0
            offset += 1;
5537
0
            break;
5538
5539
0
        case 0x0c68: /* Read Enhanced Tx Power Level */
5540
0
            proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5541
0
            send_hci_summary_status_tap(tvb_get_uint8(tvb, offset), pinfo, bluetooth_data);
5542
0
            offset += 1;
5543
0
            proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5544
0
            offset += 2;
5545
0
            proto_tree_add_item(tree, hf_bthci_evt_transmit_power_level_gfsk, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5546
0
            offset += 1;
5547
0
            proto_tree_add_item(tree, hf_bthci_evt_transmit_power_level_dqpsk, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5548
0
            offset += 1;
5549
0
            proto_tree_add_item(tree, hf_bthci_evt_transmit_power_level_8dpsk, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5550
0
            offset += 1;
5551
0
            break;
5552
5553
0
        case 0x0c69: /* Read Best Effort Timeout */
5554
0
            proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5555
0
            send_hci_summary_status_tap(tvb_get_uint8(tvb, offset), pinfo, bluetooth_data);
5556
0
            offset += 1;
5557
0
            proto_tree_add_item(tree, hf_bthci_evt_flush_to_us, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5558
0
            offset += 4;
5559
0
            break;
5560
5561
0
        case 0x0c6c: /* Read LE Host Supported */
5562
0
            proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5563
0
            status = tvb_get_uint8(tvb, offset);
5564
0
            send_hci_summary_status_tap(status, pinfo, bluetooth_data);
5565
0
            offset += 1;
5566
0
            proto_tree_add_item(tree, hf_bthci_evt_le_supported_host, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5567
0
            offset += 1;
5568
0
            proto_tree_add_item(tree, hf_bthci_evt_le_simultaneous_host, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5569
0
            offset += 1;
5570
0
            break;
5571
5572
0
        case 0x0c74: /* Set Reserved LT_ADDR */
5573
0
        case 0x0c75: /* Delete Reserved LT_ADDR */
5574
0
        case 0x0c76: /*  Set Connectionless Peripheral Broadcast Data */
5575
0
            proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5576
0
            status = tvb_get_uint8(tvb, offset);
5577
0
            send_hci_summary_status_tap(status, pinfo, bluetooth_data);
5578
0
            offset += 1;
5579
5580
0
            proto_tree_add_item(tree, hf_bthci_evt_lt_addr, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5581
0
            offset += 1;
5582
5583
0
            break;
5584
5585
0
        case 0x1001: /* Read Local Version Information */ {
5586
0
            proto_item  *hci_revision_item;
5587
0
            proto_item  *manufacturer_item;
5588
0
            proto_item  *lmp_subversion_item;
5589
5590
0
            proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5591
0
            status = tvb_get_uint8(tvb, offset);
5592
0
            send_hci_summary_status_tap(status, pinfo, bluetooth_data);
5593
0
            offset += 1;
5594
5595
0
            proto_tree_add_item(tree, hf_bthci_bthci_evt_hci_version, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5596
0
            offset += 1;
5597
5598
0
            hci_revision_item = proto_tree_add_item(tree, hf_bthci_evt_hci_revision, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5599
0
            offset += 2;
5600
5601
0
            proto_tree_add_item(tree, hf_bthci_evt_vers_nr, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5602
0
            offset += 1;
5603
5604
0
            manufacturer_item = proto_tree_add_item(tree, hf_bthci_evt_comp_id, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5605
0
            offset += 2;
5606
5607
0
            lmp_subversion_item = proto_tree_add_item(tree, hf_bthci_evt_sub_vers_nr, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5608
0
            offset += 2;
5609
5610
0
            if (status == STATUS_SUCCESS) {
5611
0
                hci_vendor_data_t  *hci_vendor_data;
5612
0
                uint16_t            hci_revision;
5613
0
                uint16_t            manufacturer;
5614
0
                uint16_t            lmp_subversion;
5615
5616
0
                key[0].length = 1;
5617
0
                key[0].key    = &interface_id;
5618
0
                key[1].length = 1;
5619
0
                key[1].key    = &adapter_id;
5620
0
                key[2].length = 0;
5621
0
                key[2].key    = NULL;
5622
5623
0
                hci_vendor_data = (hci_vendor_data_t *) wmem_tree_lookup32_array(bluetooth_data->hci_vendors, key);
5624
0
                hci_revision   = tvb_get_letohs(tvb, offset - 7);
5625
0
                manufacturer   = tvb_get_letohs(tvb, offset - 4);
5626
0
                lmp_subversion = tvb_get_letohs(tvb, offset - 2);
5627
5628
0
                if (have_tap_listener(bluetooth_device_tap)) {
5629
0
                    bluetooth_device_tap_t  *tap_device;
5630
0
                    uint8_t                  hci_version;
5631
0
                    uint8_t                  lmp_version;
5632
5633
0
                    hci_version = tvb_get_uint8(tvb, offset - 8);
5634
0
                    lmp_version = tvb_get_uint8(tvb, offset - 5);
5635
5636
0
                    tap_device = wmem_new(pinfo->pool, bluetooth_device_tap_t);
5637
0
                    tap_device->type = BLUETOOTH_DEVICE_LOCAL_VERSION;
5638
0
                    tap_device->interface_id  = interface_id;
5639
0
                    tap_device->adapter_id    = adapter_id;
5640
0
                    tap_device->has_bd_addr = false;
5641
0
                    tap_device->is_local = true;
5642
0
                    tap_device->data.local_version.hci_version     = hci_version;
5643
0
                    tap_device->data.local_version.hci_revision    = hci_revision;
5644
0
                    tap_device->data.local_version.lmp_version     = lmp_version;
5645
0
                    tap_device->data.local_version.lmp_subversion  = lmp_subversion;
5646
0
                    tap_device->data.local_version.manufacturer    = manufacturer;
5647
0
                    tap_queue_packet(bluetooth_device_tap, pinfo, tap_device);
5648
0
                }
5649
5650
0
                if (hci_vendor_data) {
5651
0
                    proto_tree  *sub_tree;
5652
0
                    proto_item  *sub_item;
5653
5654
0
                    if (manufacturer != hci_vendor_data->manufacturer) {
5655
0
                        expert_add_info(pinfo, manufacturer_item, &ei_manufacturer_data_changed);
5656
0
                        sub_tree = proto_item_add_subtree(manufacturer_item, ett_expert);
5657
0
                        sub_item = proto_tree_add_uint(sub_tree, hf_changed_in_frame, tvb, 0, 0, hci_vendor_data->change_in_frame);
5658
0
                        proto_item_set_generated(sub_item);
5659
0
                    }
5660
5661
0
                    if (hci_revision != hci_vendor_data->hci_revision) {
5662
0
                        expert_add_info(pinfo, hci_revision_item, &ei_hci_revision_changed);
5663
0
                        sub_tree = proto_item_add_subtree(hci_revision_item, ett_expert);
5664
0
                        sub_item = proto_tree_add_uint(sub_tree, hf_changed_in_frame, tvb, 0, 0, hci_vendor_data->change_in_frame);
5665
0
                        proto_item_set_generated(sub_item);
5666
0
                    }
5667
5668
0
                    if (lmp_subversion != hci_vendor_data->lmp_subversion) {
5669
0
                        expert_add_info(pinfo, lmp_subversion_item, &ei_lmp_subversion_changed);
5670
0
                        sub_tree = proto_item_add_subtree(lmp_subversion_item, ett_expert);
5671
0
                        sub_item = proto_tree_add_uint(sub_tree, hf_changed_in_frame, tvb, 0, 0, hci_vendor_data->change_in_frame);
5672
0
                        proto_item_set_generated(sub_item);
5673
0
                    }
5674
0
                }
5675
5676
0
                if (!pinfo->fd->visited) {
5677
5678
0
                    hci_vendor_data_t  *new_hci_vendor_data;
5679
5680
0
                    new_hci_vendor_data = wmem_new(wmem_file_scope(), hci_vendor_data_t);
5681
0
                    new_hci_vendor_data->hci_revision = hci_revision;
5682
0
                    new_hci_vendor_data->manufacturer = manufacturer;
5683
0
                    new_hci_vendor_data->lmp_subversion = lmp_subversion;
5684
0
                    new_hci_vendor_data->change_in_frame = pinfo->num;
5685
5686
0
                    if (hci_vendor_data && hci_vendor_data->change_in_frame < pinfo->num)
5687
0
                        new_hci_vendor_data->previous = hci_vendor_data;
5688
0
                    else
5689
0
                        new_hci_vendor_data->previous = NULL;
5690
5691
0
                    wmem_tree_insert32_array(bluetooth_data->hci_vendors, key, new_hci_vendor_data);
5692
0
                }
5693
0
            }}
5694
5695
0
            break;
5696
5697
0
        case 0x1002: /* Read Local Supported Commands */
5698
0
            proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_NA);
5699
0
            status = tvb_get_uint8(tvb, offset);
5700
0
            send_hci_summary_status_tap(status, pinfo, bluetooth_data);
5701
0
            offset += 1;
5702
5703
0
            proto_tree_add_item(tree, hf_bthci_evt_local_supported_cmds, tvb, offset, 64, ENC_NA);
5704
0
            offset += 64;
5705
5706
0
            break;
5707
5708
0
        case 0x1003: /* Read Local Supported Features */
5709
0
            proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_NA);
5710
0
            status = tvb_get_uint8(tvb, offset);
5711
0
            send_hci_summary_status_tap(status, pinfo, bluetooth_data);
5712
0
            offset += 1;
5713
5714
0
            offset = dissect_bthci_evt_lmp_features(tvb, offset, pinfo, tree, 0);
5715
5716
0
            break;
5717
5718
0
        case 0x1004: /* Read Local Extended Features */
5719
0
            {
5720
0
                uint8_t page_number;
5721
5722
0
                proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_NA);
5723
0
                status = tvb_get_uint8(tvb, offset);
5724
0
                send_hci_summary_status_tap(status, pinfo, bluetooth_data);
5725
0
                offset += 1;
5726
5727
0
                page_number = tvb_get_uint8(tvb, offset);
5728
0
                proto_tree_add_item(tree, hf_bthci_evt_page_number, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5729
0
                offset += 1;
5730
5731
0
                proto_tree_add_item(tree, hf_bthci_evt_max_page_number, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5732
0
                offset += 1;
5733
5734
0
                offset = dissect_bthci_evt_lmp_features(tvb, offset, pinfo, tree, page_number);
5735
0
            }
5736
5737
0
            break;
5738
5739
0
        case 0x1005: /* Read Buffer Size */
5740
0
            proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5741
0
            status = tvb_get_uint8(tvb, offset);
5742
0
            send_hci_summary_status_tap(status, pinfo, bluetooth_data);
5743
0
            offset += 1;
5744
5745
0
            proto_tree_add_item(tree, hf_bthci_evt_host_data_packet_length_acl, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5746
0
            offset += 2;
5747
5748
0
            proto_tree_add_item(tree, hf_bthci_evt_host_data_packet_length_sco, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5749
0
            offset += 1;
5750
5751
0
            proto_tree_add_item(tree, hf_bthci_evt_host_total_num_acl_data_packets, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5752
0
            offset += 2;
5753
5754
0
            proto_tree_add_item(tree, hf_bthci_evt_host_total_num_sco_data_packets, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5755
0
            offset += 2;
5756
5757
0
            if (status == STATUS_SUCCESS && have_tap_listener(bluetooth_device_tap)) {
5758
0
                bluetooth_device_tap_t  *tap_device;
5759
5760
0
                tap_device = wmem_new(pinfo->pool, bluetooth_device_tap_t);
5761
0
                if (bluetooth_data) {
5762
0
                    tap_device->interface_id  = bluetooth_data->interface_id;
5763
0
                    tap_device->adapter_id    = bluetooth_data->adapter_id;
5764
0
                } else {
5765
0
                    tap_device->interface_id  = HCI_INTERFACE_DEFAULT;
5766
0
                    tap_device->adapter_id    = HCI_ADAPTER_DEFAULT;
5767
0
                }
5768
0
                tap_device->has_bd_addr = false;
5769
0
                tap_device->is_local = true;
5770
0
                tap_device->type = BLUETOOTH_DEVICE_MTUS;
5771
0
                tap_device->data.mtus.acl_mtu     = tvb_get_uint16(tvb, offset - 7, ENC_LITTLE_ENDIAN);
5772
0
                tap_device->data.mtus.sco_mtu     = tvb_get_uint8(tvb,  offset - 5);
5773
0
                tap_device->data.mtus.acl_packets = tvb_get_uint16(tvb, offset - 4, ENC_LITTLE_ENDIAN);
5774
0
                tap_device->data.mtus.sco_packets = tvb_get_uint16(tvb, offset - 2, ENC_LITTLE_ENDIAN);
5775
0
                tap_queue_packet(bluetooth_device_tap, pinfo, tap_device);
5776
0
            }
5777
5778
0
            break;
5779
5780
0
        case 0x100a: /* Read Data Block Size */
5781
0
            proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_NA);
5782
0
            status = tvb_get_uint8(tvb, offset);
5783
0
            send_hci_summary_status_tap(status, pinfo, bluetooth_data);
5784
0
            offset += 1;
5785
0
            proto_tree_add_item(tree, hf_bthci_evt_max_acl_data_packet_length, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5786
0
            offset += 2;
5787
0
            proto_tree_add_item(tree, hf_bthci_evt_data_block_length, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5788
0
            offset += 2;
5789
0
            proto_tree_add_item(tree, hf_bthci_evt_total_num_data_blocks, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5790
0
            offset += 2;
5791
5792
0
            break;
5793
0
        case 0x100b: /* Read Local Supported Codecs */
5794
0
            {
5795
0
            uint8_t      count;
5796
0
            uint8_t      i_count;
5797
0
            proto_tree  *sub_tree;
5798
0
            proto_item  *sub_item;
5799
5800
0
            proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_NA);
5801
0
            status = tvb_get_uint8(tvb, offset);
5802
0
            send_hci_summary_status_tap(status, pinfo, bluetooth_data);
5803
0
            offset += 1;
5804
5805
0
            proto_tree_add_item(tree, hf_bthci_evt_number_of_supported_codecs, tvb, offset, 1, ENC_NA);
5806
0
            count = tvb_get_uint8(tvb, offset);
5807
0
            offset += 1;
5808
5809
0
            sub_item = proto_tree_add_item(tree, hf_bthci_evt_codecs, tvb, offset, count, ENC_NA);
5810
0
            sub_tree = proto_item_add_subtree(sub_item, ett_codecs);
5811
5812
0
            for (i_count = 0; i_count < count; i_count+= 1) {
5813
0
                proto_tree_add_item(sub_tree, hf_bthci_evt_codec_id, tvb, offset, 1, ENC_NA);
5814
0
                offset += 1;
5815
0
            }
5816
5817
0
            proto_tree_add_item(tree, hf_bthci_evt_number_of_supported_vendor_codecs, tvb, offset, 1, ENC_NA);
5818
0
            count = tvb_get_uint8(tvb, offset);
5819
0
            offset += 1;
5820
5821
0
            sub_item = proto_tree_add_item(tree, hf_bthci_evt_vendor_codecs, tvb, offset, count, ENC_NA);
5822
0
            sub_tree = proto_item_add_subtree(sub_item, ett_codecs);
5823
5824
0
            for (i_count = 0; i_count < count; i_count+= 1) {
5825
0
                proto_tree  *codec_tree;
5826
0
                proto_item  *codec_item;
5827
5828
0
                codec_item = proto_tree_add_string_format(sub_tree, hf_bthci_evt_vendor_codecs_item, tvb, offset, 4, "", "Item %u", i_count + 1);
5829
0
                codec_tree = proto_item_add_subtree(codec_item, ett_codecs);
5830
5831
0
                proto_tree_add_item(codec_tree, hf_bthci_evt_comp_id, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5832
0
                offset += 2;
5833
5834
0
                proto_tree_add_item(codec_tree, hf_bthci_evt_vendor_codec_id, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5835
0
                offset += 2;
5836
0
            }
5837
5838
0
            }
5839
0
            break;
5840
5841
0
        case 0x100c: /* Read Local Simple Pairing Options */
5842
0
            proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_NA);
5843
0
            status = tvb_get_uint8(tvb, offset);
5844
0
            send_hci_summary_status_tap(status, pinfo, bluetooth_data);
5845
0
            offset += 1;
5846
0
            proto_tree_add_bitmask(tree, tvb, offset, hf_bthci_evt_simple_pairing_options, ett_simple_pairing_options, hfx_bthci_evt_simple_pairing_options, ENC_NA);
5847
0
            offset += 1;
5848
0
            proto_tree_add_item(tree, hf_bthci_evt_max_encryption_key_size, tvb, offset, 1, ENC_NA);
5849
0
            offset += 1;
5850
0
            break;
5851
5852
0
        case 0x1007: /* Read Country Code */
5853
0
            proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5854
0
            send_hci_summary_status_tap(tvb_get_uint8(tvb, offset), pinfo, bluetooth_data);
5855
0
            offset += 1;
5856
5857
0
            proto_tree_add_item(tree, hf_bthci_evt_country_code, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5858
0
            offset += 1;
5859
5860
0
            break;
5861
5862
0
        case 0x1401: /* Read Failed Contact Counter */
5863
0
            proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5864
0
            send_hci_summary_status_tap(tvb_get_uint8(tvb, offset), pinfo, bluetooth_data);
5865
0
            offset += 1;
5866
5867
0
            proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5868
0
            offset += 2;
5869
5870
0
            proto_tree_add_item(tree, hf_bthci_evt_failed_contact_counter, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5871
0
            offset += 2;
5872
5873
0
            break;
5874
5875
0
        case 0x1403: /* Get Link Quality */
5876
0
            proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5877
0
            send_hci_summary_status_tap(tvb_get_uint8(tvb, offset), pinfo, bluetooth_data);
5878
0
            offset += 1;
5879
5880
0
            proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5881
0
            offset += 2;
5882
5883
0
            proto_tree_add_item(tree, hf_bthci_evt_link_quality, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5884
0
            offset += 1;
5885
5886
0
            break;
5887
5888
0
        case 0x1405: /* Read RSSI */
5889
0
            proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5890
0
            send_hci_summary_status_tap(tvb_get_uint8(tvb, offset), pinfo, bluetooth_data);
5891
0
            offset += 1;
5892
5893
0
            proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5894
0
            offset += 2;
5895
5896
0
            proto_tree_add_item(tree, hf_bthci_evt_rssi, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5897
0
            offset += 1;
5898
5899
0
            break;
5900
5901
0
        case 0x1406: /* Read AFH Channel Map */
5902
0
            proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5903
0
            send_hci_summary_status_tap(tvb_get_uint8(tvb, offset), pinfo, bluetooth_data);
5904
0
            offset += 1;
5905
5906
0
            proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5907
0
            offset += 2;
5908
5909
0
            proto_tree_add_item(tree, hf_bthci_evt_afh_mode, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5910
0
            offset += 1;
5911
5912
0
            proto_tree_add_item(tree, hf_bthci_evt_afh_channel_map, tvb, offset, 10, ENC_NA);
5913
0
            offset += 10;
5914
5915
0
            break;
5916
5917
0
        case 0x1407: /* Read Clock */
5918
0
            proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5919
0
            send_hci_summary_status_tap(tvb_get_uint8(tvb, offset), pinfo, bluetooth_data);
5920
0
            offset += 1;
5921
5922
0
            proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5923
0
            offset += 2;
5924
5925
0
            proto_tree_add_item(tree, hf_bthci_evt_clock, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5926
0
            offset += 4;
5927
5928
0
            accuracy = tvb_get_letohl(tvb, offset);
5929
0
            item = proto_tree_add_item(tree, hf_bthci_evt_clock_accuracy, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5930
0
            proto_item_append_text(item, " %g msec", accuracy*0.3125);
5931
0
            offset += 2;
5932
0
            break;
5933
5934
0
        case 0x1408: /* Read Encryption Key Size */
5935
0
            proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5936
0
            send_hci_summary_status_tap(tvb_get_uint8(tvb, offset), pinfo, bluetooth_data);
5937
0
            offset += 1;
5938
0
            proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5939
0
            offset += 2;
5940
0
            proto_tree_add_item(tree, hf_bthci_evt_enc_key_size, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5941
0
            offset += 1;
5942
0
            break;
5943
5944
0
        case 0x1409: /* Read Local AMP Info */
5945
0
            proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5946
0
            status = tvb_get_uint8(tvb, offset);
5947
0
            send_hci_summary_status_tap(status, pinfo, bluetooth_data);
5948
0
            offset += 1;
5949
5950
0
            proto_tree_add_item(tree, hf_bthci_evt_amp_status, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5951
0
            offset += 1;
5952
0
            proto_tree_add_item(tree, hf_bthci_evt_total_bandwidth, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5953
0
            offset += 4;
5954
0
            proto_tree_add_item(tree, hf_bthci_evt_max_guaranteed_bandwidth, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5955
0
            offset += 4;
5956
0
            proto_tree_add_item(tree, hf_bthci_evt_min_latency, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5957
0
            offset += 4;
5958
0
            proto_tree_add_item(tree, hf_bthci_evt_max_pdu_size, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5959
0
            offset += 4;
5960
0
            proto_tree_add_item(tree, hf_bthci_evt_amp_controller_type, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5961
0
            offset += 1;
5962
0
            proto_tree_add_item(tree, hf_bthci_evt_pal_capabilities_00, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5963
0
            offset += 2;
5964
0
            proto_tree_add_item(tree, hf_bthci_evt_max_amp_assoc_length, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5965
0
            offset += 2;
5966
0
            proto_tree_add_item(tree, hf_bthci_evt_max_flush_to_us, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5967
0
            offset += 4;
5968
0
            proto_tree_add_item(tree, hf_bthci_evt_best_effort_flush_to_us, tvb, offset, 4, ENC_LITTLE_ENDIAN);
5969
0
            offset += 4;
5970
0
            break;
5971
5972
0
        case 0x140a: /* Read Local AMP Assoc */
5973
0
            proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5974
0
            send_hci_summary_status_tap(tvb_get_uint8(tvb, offset), pinfo, bluetooth_data);
5975
0
            offset += 1;
5976
0
            proto_tree_add_item(tree, hf_bthci_evt_physical_link_handle, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5977
0
            offset += 1;
5978
0
            proto_tree_add_item(tree, hf_bthci_evt_amp_remaining_assoc_length, tvb, offset, 2, ENC_LITTLE_ENDIAN);
5979
0
            offset += 2;
5980
0
            proto_tree_add_item(tree, hf_bthci_evt_amp_assoc_fragment, tvb, offset, -1, ENC_NA);
5981
0
            offset += tvb_reported_length_remaining(tvb, offset);
5982
0
            break;
5983
5984
0
        case 0x140b: /* Write Remote AMP Assoc */
5985
0
            proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5986
0
            send_hci_summary_status_tap(tvb_get_uint8(tvb, offset), pinfo, bluetooth_data);
5987
0
            offset += 1;
5988
0
            proto_tree_add_item(tree, hf_bthci_evt_physical_link_handle, tvb, offset, 1, ENC_LITTLE_ENDIAN);
5989
0
            offset += 1;
5990
0
            break;
5991
5992
0
        case 0x140C: /* Get MWS Transport Layer Configuration */ {
5993
0
            uint8_t      transports;
5994
0
            uint8_t      i_transport;
5995
0
            uint16_t     baud_rates = 0;
5996
0
            uint16_t     i_baud_rate;
5997
0
            int32_t      baud_rate_to;
5998
0
            proto_item  *sub_item;
5999
0
            proto_tree  *sub_tree;
6000
0
            proto_item  *sub2_item;
6001
0
            proto_tree  *sub2_tree;
6002
0
            int          offset_baud_rates;
6003
6004
0
            proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_NA);
6005
0
            status = tvb_get_uint8(tvb, offset);
6006
0
            send_hci_summary_status_tap(status, pinfo, bluetooth_data);
6007
0
            offset += 1;
6008
6009
0
            proto_tree_add_item(tree, hf_bthci_evt_mws_number_of_transports, tvb, offset, 1, ENC_NA);
6010
0
            transports = tvb_get_uint8(tvb, offset);
6011
0
            offset += 1;
6012
6013
0
            sub_item = proto_tree_add_item(tree, hf_bthci_evt_mws_transport_layers, tvb, offset, transports * 2, ENC_NA);
6014
0
            sub_tree = proto_item_add_subtree(sub_item, ett_mws_transport_layers);
6015
6016
0
            offset_baud_rates = offset = 1;
6017
6018
0
            for (i_transport = 0; i_transport < transports; i_transport += 1) {
6019
0
                sub2_item = proto_tree_add_item(sub_tree, hf_bthci_evt_mws_transport_layers_item, tvb, offset, transports * 2, ENC_NA);
6020
0
                sub2_tree = proto_item_add_subtree(sub2_item, ett_mws_transport_layers_item);
6021
0
                proto_item_append_text(sub2_item, " #%u", i_transport + 1);
6022
6023
0
                proto_tree_add_item(sub2_tree, hf_bthci_evt_mws_transport_layer, tvb, offset, 1, ENC_NA);
6024
0
                offset += 1;
6025
6026
0
                proto_tree_add_item(sub2_tree, hf_bthci_evt_mws_number_of_baud_rates, tvb, offset, 1, ENC_NA);
6027
0
                baud_rates += tvb_get_uint8(tvb, offset);
6028
0
                offset += 1;
6029
0
            }
6030
6031
0
            sub_item = proto_tree_add_item(tree, hf_bthci_evt_mws_to_mws_baud_rates, tvb, offset, baud_rates * 4, ENC_NA);
6032
0
            sub_tree = proto_item_add_subtree(sub_item, ett_mws_to_mws_baud_rates);
6033
6034
0
            baud_rate_to = -1;
6035
0
            i_transport = 1;
6036
0
            sub2_tree = sub_tree;
6037
0
            for (i_baud_rate = 0; i_baud_rate < baud_rates; i_baud_rate += 1) {
6038
0
                if (baud_rate_to == -1 || baud_rate_to == i_baud_rate) {
6039
0
                    baud_rate_to = tvb_get_uint8(tvb, offset_baud_rates + (i_transport - 1) * 2);
6040
0
                    sub2_item = proto_tree_add_item(sub_tree, hf_bthci_evt_mws_to_mws_baud_rates_tranport_item, tvb, offset, (baud_rate_to -  i_baud_rate) * 4, ENC_NA);
6041
0
                    proto_item_append_text(sub2_item, " #%u", i_transport);
6042
0
                    sub2_tree = proto_item_add_subtree(sub2_item, ett_mws_to_mws_baud_rates_transport_item);
6043
0
                    i_transport += 1;
6044
0
                }
6045
6046
0
                proto_tree_add_item(sub2_tree, hf_bthci_evt_mws_to_mws_baud_rate, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6047
0
                offset += 4;
6048
0
            }
6049
6050
0
            sub_item = proto_tree_add_item(tree, hf_bthci_evt_mws_from_mws_baud_rates, tvb, offset, baud_rates * 4, ENC_NA);
6051
0
            sub_tree = proto_item_add_subtree(sub_item, ett_mws_from_mws_baud_rates);
6052
6053
0
            baud_rate_to = -1;
6054
0
            i_transport = 1;
6055
0
            sub2_tree = sub_tree;
6056
0
            for (i_baud_rate = 0; i_baud_rate < baud_rates; i_baud_rate += 1) {
6057
0
                if (baud_rate_to == -1 || baud_rate_to == i_baud_rate) {
6058
0
                    baud_rate_to = tvb_get_uint8(tvb, offset_baud_rates + (i_transport - 1) * 2);
6059
0
                    sub2_item = proto_tree_add_item(sub_tree, hf_bthci_evt_mws_from_mws_baud_rates_tranport_item, tvb, offset, (baud_rate_to -  i_baud_rate) * 4, ENC_NA);
6060
0
                    proto_item_append_text(sub2_item, " #%u", i_transport);
6061
0
                    sub2_tree = proto_item_add_subtree(sub2_item, ett_mws_from_mws_baud_rates_transport_item);
6062
0
                    i_transport += 1;
6063
0
                }
6064
6065
0
                proto_tree_add_item(sub2_tree, hf_bthci_evt_mws_from_mws_baud_rate, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6066
0
                offset += 4;
6067
0
            }
6068
0
            break; }
6069
6070
0
        case 0x1801: /* Read Loopback Mode */
6071
0
            proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN);
6072
0
            status = tvb_get_uint8(tvb, offset);
6073
0
            send_hci_summary_status_tap(status, pinfo, bluetooth_data);
6074
0
            offset += 1;
6075
0
            proto_tree_add_item(tree, hf_bthci_evt_loopback_mode, tvb, offset, 1, ENC_LITTLE_ENDIAN);
6076
0
            offset += 1;
6077
0
            break;
6078
6079
0
        case 0x2002: /* LE Read Buffer Size [v1] */
6080
0
        case 0x2060: /* LE Read Buffer Size [v2] */
6081
0
            proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_NA);
6082
0
            status = tvb_get_uint8(tvb, offset);
6083
0
            send_hci_summary_status_tap(status, pinfo, bluetooth_data);
6084
0
            offset += 1;
6085
6086
0
            if (status == STATUS_SUCCESS && have_tap_listener(bluetooth_device_tap)) {
6087
0
                bluetooth_device_tap_t  *tap_device;
6088
6089
0
                tap_device = wmem_new(pinfo->pool, bluetooth_device_tap_t);
6090
0
                if (bluetooth_data) {
6091
0
                    tap_device->interface_id  = bluetooth_data->interface_id;
6092
0
                    tap_device->adapter_id    = bluetooth_data->adapter_id;
6093
0
                } else {
6094
0
                    tap_device->interface_id  = HCI_INTERFACE_DEFAULT;
6095
0
                    tap_device->adapter_id    = HCI_ADAPTER_DEFAULT;
6096
0
                }
6097
0
                tap_device->has_bd_addr = false;
6098
0
                tap_device->is_local = true;
6099
0
                tap_device->type = BLUETOOTH_DEVICE_LE_MTU;
6100
0
                tap_device->data.le_mtus.acl_mtu     = tvb_get_uint16(tvb, offset, ENC_LITTLE_ENDIAN);
6101
0
                tap_device->data.le_mtus.acl_packets = tvb_get_uint8(tvb,  offset + 2);
6102
0
                if (opcode == 0x2060) { /* LE Read Buffer Size [v2] */
6103
0
                    tap_device->data.le_mtus.iso_mtu     = tvb_get_uint16(tvb, offset + 3, ENC_LITTLE_ENDIAN);
6104
0
                    tap_device->data.le_mtus.iso_packets = tvb_get_uint8(tvb,  offset + 5);
6105
0
                }
6106
0
                tap_queue_packet(bluetooth_device_tap, pinfo, tap_device);
6107
0
            }
6108
6109
0
            item = proto_tree_add_item(tree, hf_bthci_evt_le_acl_data_pkt_len, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6110
0
            if ( (tvb_get_letohs(tvb, offset) == 0) && (tvb_get_uint8(tvb, offset+2) == 0) )
6111
0
                proto_item_append_text(item, " (buffers shared between BR/EDR and LE) ");
6112
0
            offset += 2;
6113
6114
0
            proto_tree_add_item(tree, hf_bthci_evt_total_num_le_acl_data_pkts, tvb, offset, 1, ENC_NA);
6115
0
            offset += 1;
6116
6117
0
            if (opcode == 0x2060) { /* LE Read Buffer Size [v2] */
6118
0
                proto_tree_add_item(tree, hf_bthci_evt_iso_data_pkt_len, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6119
0
                offset += 2;
6120
0
                proto_tree_add_item(tree, hf_bthci_evt_total_num_iso_data_pkts, tvb, offset, 1, ENC_NA);
6121
0
                offset += 1;
6122
0
            }
6123
6124
0
            break;
6125
6126
0
        case 0x2003: /* LE Read Local Supported Features */
6127
0
            proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN);
6128
0
            send_hci_summary_status_tap(tvb_get_uint8(tvb, offset), pinfo, bluetooth_data);
6129
0
            offset += 1;
6130
6131
0
            proto_tree_add_bitmask(tree, tvb, offset, hf_bthci_evt_le_features, ett_le_features, hfx_bthci_evt_le_features, ENC_LITTLE_ENDIAN);
6132
0
            offset += 8;
6133
6134
0
            break;
6135
0
        case 0x2007: /* LE Read Advertising Channel Tx Power */
6136
0
        {
6137
0
            proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN);
6138
0
            send_hci_summary_status_tap(tvb_get_uint8(tvb, offset), pinfo, bluetooth_data);
6139
0
            offset += 1;
6140
0
            proto_tree_add_item(tree, hf_bthci_evt_transmit_power_level, tvb, offset, 1, ENC_LITTLE_ENDIAN);
6141
0
            offset += 1;
6142
0
            break;
6143
0
        }
6144
6145
0
        case 0x200f: /* LE Read Filter Accept List Size */
6146
0
        {
6147
0
            proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN);
6148
0
            send_hci_summary_status_tap(tvb_get_uint8(tvb, offset), pinfo, bluetooth_data);
6149
0
            offset += 1;
6150
0
            proto_tree_add_item(tree, hf_bthci_evt_filter_accept_list_size, tvb, offset, 1, ENC_LITTLE_ENDIAN);
6151
0
            offset += 1;
6152
0
            break;
6153
0
        }
6154
6155
0
        case 0x2015: /* LE Read Channel Map */
6156
0
        {
6157
0
            proto_tree  *sub_tree;
6158
0
            proto_item  *sub_item;
6159
6160
0
            proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN);
6161
0
            send_hci_summary_status_tap(tvb_get_uint8(tvb, offset), pinfo, bluetooth_data);
6162
0
            offset += 1;
6163
0
            proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6164
0
            offset += 2;
6165
6166
0
            sub_item = proto_tree_add_item(tree, hf_bthci_evt_le_channel_map, tvb, offset, 5, ENC_NA);
6167
0
            sub_tree = proto_item_add_subtree(sub_item, ett_le_channel_map);
6168
6169
0
            call_dissector(btcommon_le_channel_map_handle, tvb_new_subset_length(tvb, offset, 5), pinfo, sub_tree);
6170
0
            offset += 5;
6171
0
            break;
6172
0
        }
6173
6174
0
        case 0x2017: /* LE Encrypt */
6175
0
        {
6176
0
            proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN);
6177
0
            send_hci_summary_status_tap(tvb_get_uint8(tvb, offset), pinfo, bluetooth_data);
6178
0
            offset += 1;
6179
0
            proto_tree_add_item(tree, hf_bthci_evt_encrypted_data, tvb, offset, 16, ENC_NA);
6180
0
            offset += 16;
6181
0
            break;
6182
0
        }
6183
6184
0
        case 0x2018: /* LE Rand */
6185
0
        {
6186
0
            proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN);
6187
0
            send_hci_summary_status_tap(tvb_get_uint8(tvb, offset), pinfo, bluetooth_data);
6188
0
            offset += 1;
6189
0
            proto_tree_add_item(tree, hf_bthci_evt_random_number, tvb, offset, 8, ENC_NA);
6190
0
            offset += 8;
6191
0
            break;
6192
0
        }
6193
6194
0
        case 0x201c: /* LE Read Supported States */
6195
0
        {
6196
0
            proto_item *ti_le_states;
6197
0
            proto_item *ti_le_states_subtree;
6198
6199
0
            proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN);
6200
0
            send_hci_summary_status_tap(tvb_get_uint8(tvb, offset), pinfo, bluetooth_data);
6201
0
            offset += 1;
6202
6203
0
            ti_le_states = proto_tree_add_item(tree, hf_bthci_evt_le_states, tvb, offset, 8, ENC_NA);
6204
0
            ti_le_states_subtree = proto_item_add_subtree(ti_le_states, ett_le_state_subtree);
6205
6206
0
            proto_tree_add_item(ti_le_states_subtree,hf_bthci_evt_le_states_00, tvb, offset, 1, ENC_LITTLE_ENDIAN);
6207
0
            proto_tree_add_item(ti_le_states_subtree,hf_bthci_evt_le_states_01, tvb, offset, 1, ENC_LITTLE_ENDIAN);
6208
0
            proto_tree_add_item(ti_le_states_subtree,hf_bthci_evt_le_states_02, tvb, offset, 1, ENC_LITTLE_ENDIAN);
6209
0
            proto_tree_add_item(ti_le_states_subtree,hf_bthci_evt_le_states_03, tvb, offset, 1, ENC_LITTLE_ENDIAN);
6210
0
            proto_tree_add_item(ti_le_states_subtree,hf_bthci_evt_le_states_04, tvb, offset, 1, ENC_LITTLE_ENDIAN);
6211
0
            proto_tree_add_item(ti_le_states_subtree,hf_bthci_evt_le_states_05, tvb, offset, 1, ENC_LITTLE_ENDIAN);
6212
0
            proto_tree_add_item(ti_le_states_subtree,hf_bthci_evt_le_states_06, tvb, offset, 1, ENC_LITTLE_ENDIAN);
6213
0
            proto_tree_add_item(ti_le_states_subtree,hf_bthci_evt_le_states_07, tvb, offset, 1, ENC_LITTLE_ENDIAN);
6214
0
            offset += 1;
6215
0
            proto_tree_add_item(ti_le_states_subtree,hf_bthci_evt_le_states_10, tvb, offset, 1, ENC_LITTLE_ENDIAN);
6216
0
            proto_tree_add_item(ti_le_states_subtree,hf_bthci_evt_le_states_11, tvb, offset, 1, ENC_LITTLE_ENDIAN);
6217
0
            proto_tree_add_item(ti_le_states_subtree,hf_bthci_evt_le_states_12, tvb, offset, 1, ENC_LITTLE_ENDIAN);
6218
0
            proto_tree_add_item(ti_le_states_subtree,hf_bthci_evt_le_states_13, tvb, offset, 1, ENC_LITTLE_ENDIAN);
6219
0
            proto_tree_add_item(ti_le_states_subtree,hf_bthci_evt_le_states_14, tvb, offset, 1, ENC_LITTLE_ENDIAN);
6220
0
            proto_tree_add_item(ti_le_states_subtree,hf_bthci_evt_le_states_15, tvb, offset, 1, ENC_LITTLE_ENDIAN);
6221
0
            proto_tree_add_item(ti_le_states_subtree,hf_bthci_evt_le_states_16, tvb, offset, 1, ENC_LITTLE_ENDIAN);
6222
0
            proto_tree_add_item(ti_le_states_subtree,hf_bthci_evt_le_states_17, tvb, offset, 1, ENC_LITTLE_ENDIAN);
6223
0
            offset += 1;
6224
0
            proto_tree_add_item(ti_le_states_subtree,hf_bthci_evt_le_states_20, tvb, offset, 1, ENC_LITTLE_ENDIAN);
6225
0
            proto_tree_add_item(ti_le_states_subtree,hf_bthci_evt_le_states_21, tvb, offset, 1, ENC_LITTLE_ENDIAN);
6226
0
            proto_tree_add_item(ti_le_states_subtree,hf_bthci_evt_le_states_22, tvb, offset, 1, ENC_LITTLE_ENDIAN);
6227
0
            proto_tree_add_item(ti_le_states_subtree,hf_bthci_evt_le_states_23, tvb, offset, 1, ENC_LITTLE_ENDIAN);
6228
0
            proto_tree_add_item(ti_le_states_subtree,hf_bthci_evt_le_states_24, tvb, offset, 1, ENC_LITTLE_ENDIAN);
6229
0
            proto_tree_add_item(ti_le_states_subtree,hf_bthci_evt_le_states_25, tvb, offset, 1, ENC_LITTLE_ENDIAN);
6230
0
            proto_tree_add_item(ti_le_states_subtree,hf_bthci_evt_le_states_26, tvb, offset, 1, ENC_LITTLE_ENDIAN);
6231
0
            proto_tree_add_item(ti_le_states_subtree,hf_bthci_evt_le_states_27, tvb, offset, 1, ENC_LITTLE_ENDIAN);
6232
0
            offset += 1;
6233
0
            proto_tree_add_item(ti_le_states_subtree,hf_bthci_evt_le_states_30, tvb, offset, 1, ENC_LITTLE_ENDIAN);
6234
0
            proto_tree_add_item(ti_le_states_subtree,hf_bthci_evt_le_states_31, tvb, offset, 1, ENC_LITTLE_ENDIAN);
6235
0
            proto_tree_add_item(ti_le_states_subtree,hf_bthci_evt_le_states_32, tvb, offset, 1, ENC_LITTLE_ENDIAN);
6236
0
            proto_tree_add_item(ti_le_states_subtree,hf_bthci_evt_le_states_33, tvb, offset, 1, ENC_LITTLE_ENDIAN);
6237
0
            proto_tree_add_item(ti_le_states_subtree,hf_bthci_evt_le_states_34, tvb, offset, 1, ENC_LITTLE_ENDIAN);
6238
0
            offset += 5;
6239
0
            break;
6240
0
        }
6241
6242
0
        case 0x201f: /* LE Test End */
6243
0
        {
6244
0
            proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN);
6245
0
            send_hci_summary_status_tap(tvb_get_uint8(tvb, offset), pinfo, bluetooth_data);
6246
0
            offset += 1;
6247
0
            proto_tree_add_item(tree, hf_bthci_evt_le_num_packets, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6248
0
            offset += 2;
6249
0
            break;
6250
0
        }
6251
6252
0
        case 0x2030: /* LE Read PHY */
6253
0
        {
6254
0
            proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN);
6255
0
            send_hci_summary_status_tap(tvb_get_uint8(tvb, offset), pinfo, bluetooth_data);
6256
0
            offset += 1;
6257
0
            proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6258
0
            offset += 2;
6259
0
            proto_tree_add_item(tree, hf_bthci_evt_le_tx_phy, tvb, offset, 1, ENC_NA);
6260
0
            offset += 1;
6261
0
            proto_tree_add_item(tree, hf_bthci_evt_le_rx_phy, tvb, offset, 1, ENC_NA);
6262
0
            offset += 1;
6263
0
            break;
6264
0
        }
6265
6266
0
        case 0x2036: /* LE Set Extended Advertising Parameters [v1] */
6267
0
        case 0x207F: /* LE Set Extended Advertising Parameters [v2] */
6268
0
        {
6269
0
            proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN);
6270
0
            send_hci_summary_status_tap(tvb_get_uint8(tvb, offset), pinfo, bluetooth_data);
6271
0
            offset += 1;
6272
0
            proto_tree_add_item(tree, hf_bthci_evt_selected_tx_power, tvb, offset, 1, ENC_LITTLE_ENDIAN);
6273
0
            offset += 1;
6274
0
            break;
6275
0
        }
6276
6277
0
        case 0x203A: /* LE Read Maximum Advertising Data Length */
6278
0
        {
6279
0
            proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN);
6280
0
            send_hci_summary_status_tap(tvb_get_uint8(tvb, offset), pinfo, bluetooth_data);
6281
0
            offset += 1;
6282
0
            proto_tree_add_item(tree, hf_bthci_evt_max_adv_data_length, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6283
0
            offset += 2;
6284
0
            break;
6285
0
        }
6286
6287
0
        case 0x203B: /* LE Read Number of Supported Advertising Sets */
6288
0
        {
6289
0
            proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN);
6290
0
            send_hci_summary_status_tap(tvb_get_uint8(tvb, offset), pinfo, bluetooth_data);
6291
0
            offset += 1;
6292
0
            proto_tree_add_item(tree, hf_bthci_evt_num_supported_adv_sets, tvb, offset, 1, ENC_LITTLE_ENDIAN);
6293
0
            offset += 1;
6294
0
            break;
6295
0
        }
6296
6297
0
        case 0x2053: /* LE Set Connectionless IQ Sampling Enable */
6298
0
        {
6299
0
            proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_NA);
6300
0
            send_hci_summary_status_tap(tvb_get_uint8(tvb, offset), pinfo, bluetooth_data);
6301
0
            offset += 1;
6302
0
            proto_tree_add_item(tree, hf_bthci_evt_sync_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6303
0
            offset += 2;
6304
0
            break;
6305
0
        }
6306
6307
0
        case 0x0441: /* Set Connectionless Peripheral Broadcast */
6308
0
            proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_NA);
6309
0
            send_hci_summary_status_tap(tvb_get_uint8(tvb, offset), pinfo, bluetooth_data);
6310
0
            offset += 1;
6311
6312
0
            proto_tree_add_item(tree, hf_bthci_evt_lt_addr, tvb, offset, 1, ENC_NA);
6313
0
            offset += 1;
6314
6315
0
            proto_tree_add_item(tree, hf_bthci_evt_connectionless_peripheral_broadcast_interval, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6316
0
            offset += 2;
6317
6318
0
            break;
6319
0
        case 0x0442: /* Set Connectionless Peripheral Broadcast Receive */
6320
0
            proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_NA);
6321
0
            send_hci_summary_status_tap(tvb_get_uint8(tvb, offset), pinfo, bluetooth_data);
6322
0
            offset += 1;
6323
6324
0
            offset = dissect_bd_addr(hf_bthci_evt_bd_addr, pinfo, tree, tvb, offset, false, bluetooth_data->interface_id, bluetooth_data->adapter_id, NULL);
6325
6326
0
            proto_tree_add_item(tree, hf_bthci_evt_lt_addr, tvb, offset, 1, ENC_NA);
6327
0
            offset += 1;
6328
6329
0
            break;
6330
0
        case 0x0C70: /* Set MWS Signaling */
6331
0
            proto_tree_add_item(tree, hf_bthci_evt_mws_bt_rx_priority_assert_offset, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6332
0
            offset += 2;
6333
6334
0
            proto_tree_add_item(tree, hf_bthci_evt_mws_bt_rx_priority_assert_jitter, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6335
0
            offset += 2;
6336
6337
0
            proto_tree_add_item(tree, hf_bthci_evt_mws_bt_rx_priority_deassert_offset, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6338
0
            offset += 2;
6339
6340
0
            proto_tree_add_item(tree, hf_bthci_evt_mws_bt_rx_priority_deassert_jitter, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6341
0
            offset += 2;
6342
6343
6344
0
            proto_tree_add_item(tree, hf_bthci_evt_mws_802_rx_priority_assert_offset, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6345
0
            offset += 2;
6346
6347
0
            proto_tree_add_item(tree, hf_bthci_evt_mws_802_rx_priority_assert_jitter, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6348
0
            offset += 2;
6349
6350
0
            proto_tree_add_item(tree, hf_bthci_evt_mws_802_rx_priority_deassert_offset, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6351
0
            offset += 2;
6352
6353
0
            proto_tree_add_item(tree, hf_bthci_evt_mws_802_rx_priority_deassert_jitter, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6354
0
            offset += 2;
6355
6356
6357
0
            proto_tree_add_item(tree, hf_bthci_evt_mws_bt_tx_priority_assert_offset, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6358
0
            offset += 2;
6359
6360
0
            proto_tree_add_item(tree, hf_bthci_evt_mws_bt_tx_priority_assert_jitter, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6361
0
            offset += 2;
6362
6363
0
            proto_tree_add_item(tree, hf_bthci_evt_mws_bt_tx_priority_deassert_offset, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6364
0
            offset += 2;
6365
6366
0
            proto_tree_add_item(tree, hf_bthci_evt_mws_bt_tx_priority_deassert_jitter, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6367
0
            offset += 2;
6368
6369
6370
0
            proto_tree_add_item(tree, hf_bthci_evt_mws_802_tx_priority_assert_offset, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6371
0
            offset += 2;
6372
6373
0
            proto_tree_add_item(tree, hf_bthci_evt_mws_802_tx_priority_assert_jitter, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6374
0
            offset += 2;
6375
6376
0
            proto_tree_add_item(tree, hf_bthci_evt_mws_802_tx_priority_deassert_offset, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6377
0
            offset += 2;
6378
6379
0
            proto_tree_add_item(tree, hf_bthci_evt_mws_802_tx_priority_deassert_jitter, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6380
0
            offset += 2;
6381
6382
0
            break;
6383
0
        case 0x0C77: /* Read Synchronization Train Parameters */
6384
0
            proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_NA);
6385
0
            send_hci_summary_status_tap(tvb_get_uint8(tvb, offset), pinfo, bluetooth_data);
6386
0
            offset += 1;
6387
6388
0
            proto_tree_add_item(tree, hf_bthci_evt_sync_train_interval, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6389
0
            offset += 2;
6390
6391
0
            proto_tree_add_item(tree, hf_bthci_evt_sync_train_to, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6392
0
            offset += 4;
6393
6394
0
            proto_tree_add_item(tree, hf_bthci_evt_service_data, tvb, offset, 1, ENC_LITTLE_ENDIAN);
6395
0
            offset += 1;
6396
6397
0
            break;
6398
0
        case 0x0C78: /* Write Synchronization Train Parameters */
6399
0
            proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_NA);
6400
0
            send_hci_summary_status_tap(tvb_get_uint8(tvb, offset), pinfo, bluetooth_data);
6401
0
            offset += 1;
6402
6403
0
            proto_tree_add_item(tree, hf_bthci_evt_sync_train_interval, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6404
0
            offset += 2;
6405
6406
0
            break;
6407
0
        case 0x0C79: /* Read Secure Connections Host Support */
6408
0
            proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_NA);
6409
0
            send_hci_summary_status_tap(tvb_get_uint8(tvb, offset), pinfo, bluetooth_data);
6410
0
            offset += 1;
6411
6412
0
            proto_tree_add_item(tree, hf_bthci_evt_secure_connection_host_support, tvb, offset, 1, ENC_LITTLE_ENDIAN);
6413
0
            offset += 1;
6414
6415
0
            break;
6416
0
        case 0x0C7B: /* Read Authenticated Payload Timeout */
6417
0
            proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_NA);
6418
0
            send_hci_summary_status_tap(tvb_get_uint8(tvb, offset), pinfo, bluetooth_data);
6419
0
            offset += 1;
6420
6421
0
            proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6422
0
            offset += 2;
6423
6424
0
            proto_tree_add_item(tree, hf_bthci_evt_authenticated_payload_timeout, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6425
0
            offset += 2;
6426
6427
0
            break;
6428
0
        case 0x0C7D: /* Read Local OOB Extended Data */
6429
0
            proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_NA);
6430
0
            send_hci_summary_status_tap(tvb_get_uint8(tvb, offset), pinfo, bluetooth_data);
6431
0
            offset += 1;
6432
6433
0
            proto_tree_add_item(tree, hf_bthci_evt_c192, tvb, offset, 16, ENC_NA);
6434
0
            offset += 16;
6435
6436
0
            proto_tree_add_item(tree, hf_bthci_evt_r192, tvb, offset, 16, ENC_NA);
6437
0
            offset += 16;
6438
6439
0
            proto_tree_add_item(tree, hf_bthci_evt_c256, tvb, offset, 16, ENC_NA);
6440
0
            offset += 16;
6441
6442
0
            proto_tree_add_item(tree, hf_bthci_evt_r256, tvb, offset, 16, ENC_NA);
6443
0
            offset += 16;
6444
6445
0
            break;
6446
0
        case 0x0C7E: /* Read Extended Page Timeout */
6447
0
            proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_NA);
6448
0
            send_hci_summary_status_tap(tvb_get_uint8(tvb, offset), pinfo, bluetooth_data);
6449
0
            offset += 1;
6450
6451
0
            proto_tree_add_item(tree, hf_bthci_evt_timeout, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6452
6453
0
            break;
6454
0
        case 0x0C80: /* Read Extended Inquiry Length */
6455
0
            proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_NA);
6456
0
            send_hci_summary_status_tap(tvb_get_uint8(tvb, offset), pinfo, bluetooth_data);
6457
0
            offset += 1;
6458
6459
0
            proto_tree_add_item(tree, hf_bthci_evt_extended_inquiry_length, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6460
6461
0
            break;
6462
0
        case 0x2023: /* LE Read Suggested Default Data Length */
6463
0
            proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_NA);
6464
0
            send_hci_summary_status_tap(tvb_get_uint8(tvb, offset), pinfo, bluetooth_data);
6465
0
            offset += 1;
6466
6467
0
            proto_tree_add_item(tree, hf_bthci_evt_suggested_max_tx_octets, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6468
0
            offset += 2;
6469
6470
0
            proto_tree_add_item(tree, hf_bthci_evt_suggested_max_tx_time, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6471
0
            offset += 2;
6472
6473
0
            break;
6474
0
        case 0x202A: /* LE Read Resolving List Size */
6475
0
            proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_NA);
6476
0
            send_hci_summary_status_tap(tvb_get_uint8(tvb, offset), pinfo, bluetooth_data);
6477
0
            offset += 1;
6478
6479
0
            proto_tree_add_item(tree, hf_bthci_evt_resolving_list_size, tvb, offset, 1, ENC_NA);
6480
0
            offset += 1;
6481
6482
0
            break;
6483
0
        case 0x202F: /* LE Read Maximum Data Length */
6484
0
            proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_NA);
6485
0
            send_hci_summary_status_tap(tvb_get_uint8(tvb, offset), pinfo, bluetooth_data);
6486
0
            offset += 1;
6487
6488
0
            proto_tree_add_item(tree, hf_bthci_evt_suggested_max_tx_octets, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6489
0
            offset += 2;
6490
6491
0
            proto_tree_add_item(tree, hf_bthci_evt_suggested_max_tx_time, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6492
0
            offset += 2;
6493
6494
0
            proto_tree_add_item(tree, hf_bthci_evt_suggested_max_rx_octets, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6495
0
            offset += 2;
6496
6497
0
            proto_tree_add_item(tree, hf_bthci_evt_suggested_max_rx_time, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6498
0
            offset += 2;
6499
6500
0
            break;
6501
6502
0
        case 0x204A: /* LE Read Periodic Advertiser List Size */
6503
0
            proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_NA);
6504
0
            send_hci_summary_status_tap(tvb_get_uint8(tvb, offset), pinfo, bluetooth_data);
6505
0
            offset += 1;
6506
6507
0
            proto_tree_add_item(tree, hf_bthci_evt_periodic_adv_list_size, tvb, offset, 1, ENC_NA);
6508
0
            offset += 1;
6509
6510
0
            break;
6511
0
        case 0x204B: /* LE Read Transmit Power */
6512
0
            proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_NA);
6513
0
            send_hci_summary_status_tap(tvb_get_uint8(tvb, offset), pinfo, bluetooth_data);
6514
0
            offset += 1;
6515
6516
0
            proto_tree_add_item(tree, hf_bthci_evt_min_tx_power, tvb, offset, 1, ENC_NA);
6517
0
            offset += 1;
6518
6519
0
            proto_tree_add_item(tree, hf_bthci_evt_max_tx_power, tvb, offset, 1, ENC_NA);
6520
0
            offset += 1;
6521
6522
0
            break;
6523
0
        case 0x204C: /* LE Read RF Path Compensation */
6524
0
            proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_NA);
6525
0
            send_hci_summary_status_tap(tvb_get_uint8(tvb, offset), pinfo, bluetooth_data);
6526
0
            offset += 1;
6527
6528
0
            item = proto_tree_add_item(tree, hf_bthci_evt_rf_tx_path_compensation, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6529
0
            proto_item_append_text(item, " (%g dB)", tvb_get_letohis(tvb, offset)*0.1);
6530
0
            offset += 2;
6531
6532
0
            item = proto_tree_add_item(tree, hf_bthci_evt_rf_rx_path_compensation, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6533
0
            proto_item_append_text(item, " (%g dB)", tvb_get_letohis(tvb, offset)*0.1);
6534
0
            offset += 2;
6535
6536
0
            break;
6537
0
        case 0x2058: /* LE Read Antenna Information */
6538
0
            proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_NA);
6539
0
            send_hci_summary_status_tap(tvb_get_uint8(tvb, offset), pinfo, bluetooth_data);
6540
0
            offset += 1;
6541
0
            proto_tree_add_bitmask(tree, tvb, offset, hf_bthci_evt_supported_switching_sample_rates,
6542
0
                                   ett_supported_switching_sample_rates, hfx_bthci_evt_supported_switching_sample_rates, ENC_NA);
6543
0
            offset += 1;
6544
0
            proto_tree_add_item(tree, hf_bthci_evt_number_antennae, tvb, offset, 1, ENC_NA);
6545
0
            offset += 1;
6546
0
            proto_tree_add_item(tree, hf_bthci_evt_max_length_antenna_switching_pattern, tvb, offset, 1, ENC_NA);
6547
0
            offset += 1;
6548
0
            proto_tree_add_item(tree, hf_bthci_evt_max_cte_length, tvb, offset, 1, ENC_NA);
6549
0
            offset += 1;
6550
0
            break;
6551
6552
0
        case 0x2061: /* LE Read ISO Tx Sync */
6553
0
            proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_NA);
6554
0
            send_hci_summary_status_tap(tvb_get_uint8(tvb, offset), pinfo, bluetooth_data);
6555
0
            offset += 1;
6556
0
            proto_tree_add_item(tree, hf_bthci_evt_cis_bis_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6557
0
            offset += 2;
6558
0
            proto_tree_add_item(tree, hf_bthci_evt_sdu_packet_seq_num, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6559
0
            offset += 2;
6560
0
            proto_tree_add_item(tree, hf_bthci_evt_sdu_packet_timestamp, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6561
0
            offset += 4;
6562
0
            proto_tree_add_item(tree, hf_bthci_evt_sdu_packet_offset, tvb, offset, 3, ENC_LITTLE_ENDIAN);
6563
0
            offset += 3;
6564
0
            break;
6565
6566
0
        case 0x2062: /* LE Set CIG Parameters */
6567
0
        case 0x2063: /* LE Set CIG Parameters Test */
6568
0
            {
6569
0
            uint8_t cis_count;
6570
0
            proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_NA);
6571
0
            send_hci_summary_status_tap(tvb_get_uint8(tvb, offset), pinfo, bluetooth_data);
6572
0
            offset += 1;
6573
0
            proto_tree_add_item(tree, hf_bthci_evt_cig_id, tvb, offset, 1, ENC_NA);
6574
0
            offset += 1;
6575
0
            proto_tree_add_item(tree, hf_bthci_evt_cis_count, tvb, offset, 1, ENC_NA);
6576
0
            cis_count = tvb_get_uint8(tvb, offset);
6577
0
            offset += 1;
6578
0
            for (i = 0; i < cis_count; i++) {
6579
0
                proto_tree_add_item(tree, hf_bthci_evt_cis_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6580
0
                offset += 2;
6581
0
            }
6582
0
            }
6583
0
            break;
6584
6585
0
        case 0x2065: /* LE Remove CIG */
6586
0
            proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_NA);
6587
0
            send_hci_summary_status_tap(tvb_get_uint8(tvb, offset), pinfo, bluetooth_data);
6588
0
            offset += 1;
6589
0
            proto_tree_add_item(tree, hf_bthci_evt_cig_id, tvb, offset, 1, ENC_NA);
6590
0
            offset += 1;
6591
0
            break;
6592
6593
0
        case 0x2067: /* LE Reject CIS Request */
6594
0
            proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_NA);
6595
0
            send_hci_summary_status_tap(tvb_get_uint8(tvb, offset), pinfo, bluetooth_data);
6596
0
            offset += 1;
6597
0
            proto_tree_add_item(tree, hf_bthci_evt_cis_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6598
0
            offset += 2;
6599
0
            break;
6600
6601
0
        case 0x206C: /* LE BIG Terminate Sync */
6602
0
            proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_NA);
6603
0
            send_hci_summary_status_tap(tvb_get_uint8(tvb, offset), pinfo, bluetooth_data);
6604
0
            offset += 1;
6605
0
            proto_tree_add_item(tree, hf_bthci_evt_big_handle, tvb, offset, 1, ENC_NA);
6606
0
            offset += 1;
6607
0
            break;
6608
6609
0
        case 0x206E: /* LE Setup ISO Data Path */
6610
0
        case 0x206F: /* LE Remove ISO Data Path */
6611
0
        case 0x2070: /* LE ISO Transmit Test */
6612
0
        case 0x2071: /* LE ISO Receive Test */
6613
0
            proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_NA);
6614
0
            send_hci_summary_status_tap(tvb_get_uint8(tvb, offset), pinfo, bluetooth_data);
6615
0
            offset += 1;
6616
0
            proto_tree_add_item(tree, hf_bthci_evt_cis_bis_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6617
0
            offset += 2;
6618
0
            break;
6619
6620
0
        case 0x2072: /* LE ISO Read Test Counters */
6621
0
        case 0x2073: /* LE ISO Test End */
6622
0
            proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_NA);
6623
0
            send_hci_summary_status_tap(tvb_get_uint8(tvb, offset), pinfo, bluetooth_data);
6624
0
            offset += 1;
6625
0
            proto_tree_add_item(tree, hf_bthci_evt_cis_bis_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6626
0
            offset += 2;
6627
0
            proto_tree_add_item(tree, hf_bthci_evt_received_packet_counter, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6628
0
            offset += 4;
6629
0
            proto_tree_add_item(tree, hf_bthci_evt_missed_packet_counter, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6630
0
            offset += 4;
6631
0
            proto_tree_add_item(tree, hf_bthci_evt_failed_packet_counter, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6632
0
            offset += 4;
6633
0
            break;
6634
6635
0
        case 0x2075: /* LE Read ISO Link Quality */
6636
0
            proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_NA);
6637
0
            send_hci_summary_status_tap(tvb_get_uint8(tvb, offset), pinfo, bluetooth_data);
6638
0
            offset += 1;
6639
0
            proto_tree_add_item(tree, hf_bthci_evt_cis_bis_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6640
0
            offset += 2;
6641
0
            proto_tree_add_item(tree, hf_bthci_evt_pkt_count_tx_unacked, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6642
0
            offset += 4;
6643
0
            proto_tree_add_item(tree, hf_bthci_evt_pkt_count_tx_flushed, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6644
0
            offset += 4;
6645
0
            proto_tree_add_item(tree, hf_bthci_evt_pkt_count_tx_last_subevent, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6646
0
            offset += 4;
6647
0
            proto_tree_add_item(tree, hf_bthci_evt_pkt_count_tx_retransmitted, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6648
0
            offset += 4;
6649
0
            proto_tree_add_item(tree, hf_bthci_evt_pkt_count_rx_crc_error, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6650
0
            offset += 4;
6651
0
            proto_tree_add_item(tree, hf_bthci_evt_pkt_count_rx_unreceived, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6652
0
            offset += 4;
6653
0
            proto_tree_add_item(tree, hf_bthci_evt_pkt_count_rx_duplicate, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6654
0
            offset += 4;
6655
0
            break;
6656
6657
0
        case 0x2076: /* LE Enhanced Read Transmit Power Level */
6658
0
            proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_NA);
6659
0
            send_hci_summary_status_tap(tvb_get_uint8(tvb, offset), pinfo, bluetooth_data);
6660
0
            offset += 1;
6661
0
            proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6662
0
            offset += 2;
6663
0
            proto_tree_add_item(tree, hf_bthci_evt_phy_and_coding, tvb, offset, 1, ENC_NA);
6664
0
            offset += 1;
6665
0
            proto_tree_add_item(tree, hf_bthci_evt_transmit_power_level, tvb, offset, 1, ENC_NA);
6666
0
            offset += 1;
6667
0
            proto_tree_add_item(tree, hf_bthci_evt_max_transmit_power_level, tvb, offset, 1, ENC_NA);
6668
0
            offset += 1;
6669
0
            break;
6670
6671
0
        case 0x2082: /* LE Set Periodic Advertising Subevent */
6672
0
        case 0x2086: /* LE Set Periodic Advertising Parameters */
6673
0
            proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_NA);
6674
0
            send_hci_summary_status_tap(tvb_get_uint8(tvb, offset), pinfo, bluetooth_data);
6675
0
            offset += 1;
6676
0
            proto_tree_add_item(tree, hf_bthci_evt_advertising_handle, tvb, offset, 1, ENC_NA);
6677
0
            offset += 1;
6678
0
            break;
6679
6680
0
        case 0x2083: /* LE Set Periodic Advertising Response Data */
6681
0
        case 0x2084: /* LE Set Periodic Advertising Sync Subevent */
6682
0
            proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_NA);
6683
0
            send_hci_summary_status_tap(tvb_get_uint8(tvb, offset), pinfo, bluetooth_data);
6684
0
            offset += 1;
6685
0
            proto_tree_add_item(tree, hf_bthci_evt_sync_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6686
0
            offset += 2;
6687
0
            break;
6688
6689
0
        case 0x2087: /* LE Read All Local Supported Features */
6690
0
            proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_NA);
6691
0
            send_hci_summary_status_tap(tvb_get_uint8(tvb, offset), pinfo, bluetooth_data);
6692
0
            offset += 1;
6693
0
            proto_tree_add_item(tree, hf_bthci_evt_max_page_number, tvb, offset, 1, ENC_NA);
6694
0
            offset += 1;
6695
0
            proto_tree_add_bitmask(tree, tvb, offset, hf_bthci_evt_le_features, ett_le_features,
6696
0
                                   hfx_bthci_evt_le_features, ENC_LITTLE_ENDIAN);
6697
0
            offset += 8;
6698
0
            proto_tree_add_bitmask(tree, tvb, offset, hf_bthci_evt_le_ext_features_1, ett_le_features,
6699
0
                                   hfx_bthci_evt_le_ext_features_1, ENC_LITTLE_ENDIAN);
6700
0
            offset += 8;
6701
0
            proto_tree_add_item(tree, hf_bthci_evt_reserved, tvb, offset, 232, ENC_NA);
6702
0
            offset += 232;
6703
0
            break;
6704
6705
0
        case 0x2089: /* LE CS Read Local Supported Capabilities */
6706
0
            proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_NA);
6707
0
            send_hci_summary_status_tap(tvb_get_uint8(tvb, offset), pinfo, bluetooth_data);
6708
0
            offset += 1;
6709
0
            offset = dissect_bthci_evt_cs_capabilities(tvb, offset, pinfo, tree);
6710
0
            break;
6711
6712
0
        case 0x209B: /* LE Read Monitored Advertisers List Size */
6713
0
            proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_NA);
6714
0
            send_hci_summary_status_tap(tvb_get_uint8(tvb, offset), pinfo, bluetooth_data);
6715
0
            offset += 1;
6716
0
            proto_tree_add_item(tree, hf_bthci_evt_monitoring_adv_list_size, tvb, offset, 1, ENC_NA);
6717
0
            offset += 1;
6718
0
            break;
6719
6720
0
        case 0x0401: /* Inquiry */
6721
0
        case 0x0405: /* Create Connection */
6722
0
        case 0x0406: /* Disconnect */
6723
0
        case 0x0407: /* Add SCO Connection */
6724
0
        case 0x0409: /* Accept Connection Request */
6725
0
        case 0x040A: /* Reject Connection Request */
6726
0
        case 0x040F: /* Change Connection Packet Type */
6727
0
        case 0x0411: /* Authentication Requested */
6728
0
        case 0x0413: /* Set Connection Encryption */
6729
0
        case 0x0415: /* Change Connection Link Key */
6730
0
        case 0x0417: /* Link Key Selection */
6731
0
        case 0x0419: /* Remote Name Request */
6732
0
        case 0x041B: /* Read Remote Supported Features */
6733
0
        case 0x041C: /* Read Remote Extended Features */
6734
0
        case 0x041D: /* Read Remote Version Information */
6735
0
        case 0x041F: /* Read Clock Offset */
6736
0
        case 0x0428: /* Setup Synchronous Connection */
6737
0
        case 0x0429: /* Accept Synchronous Connection Request */
6738
0
        case 0x042A: /* Reject Synchronous Connection Request */
6739
0
        case 0x0435: /* Create Physical Link */
6740
0
        case 0x0436: /* Accept Physical Link */
6741
0
        case 0x0437: /* Disconnect Physical Link */
6742
0
        case 0x0438: /* Create Logical Link */
6743
0
        case 0x0439: /* Accept Logical Link */
6744
0
        case 0x043A: /* Disconnect Logical Link */
6745
0
        case 0x043C: /* Flow Spec Modify */
6746
0
        case 0x043D: /* Enhanced Setup Synchronous Connection */
6747
0
        case 0x043E: /* Enhanced Accept Synchronous Connection Request */
6748
0
        case 0x043F: /* Truncated Page */
6749
0
        case 0x0443: /* Start Synchronization Train */
6750
0
        case 0x0444: /* Receive Synchronization Train */
6751
0
        case 0x0801: /* Hold Mode */
6752
0
        case 0x0803: /* Sniff Mode */
6753
0
        case 0x0804: /* Exit Sniff Mode */
6754
0
        case 0x0805: /* Park State */
6755
0
        case 0x0806: /* Exit Park State */
6756
0
        case 0x0807: /* QoS Setup*/
6757
0
        case 0x080B: /* Switch Role*/
6758
0
        case 0x0810: /* Flow Specification */
6759
0
        case 0x0C53: /* Refresh Encryption Key */
6760
0
        case 0x0C5F: /* Enhanced Flush */
6761
0
        case 0x0C6B: /* Short Range Mode */
6762
0
        case 0x200D: /* LE Create Connection */
6763
0
        case 0x2013: /* LE Connection Update */
6764
0
        case 0x2016: /* LE Read Remote Features */
6765
0
        case 0x2019: /* LE Start Encryption */
6766
0
        case 0x2025: /* LE Read Local P-256 Public Key */
6767
0
        case 0x2026: /* LE Generate DHKey [v1] */
6768
0
        case 0x2043: /* LE Extended Create Connection [v1] */
6769
0
        case 0x2044: /* LE Periodic Advertising Create Sync */
6770
0
        case 0x205E: /* LE Generate DHKey [v2] */
6771
0
        case 0x2064: /* LE Create CIS */
6772
0
        case 0x2066: /* LE Accept CIS Request */
6773
0
        case 0x2068: /* LE Create BIG */
6774
0
        case 0x2069: /* LE Create BIG Test */
6775
0
        case 0x206A: /* LE Terminate BIG */
6776
0
        case 0x206B: /* LE BIG Create Sync */
6777
0
        case 0x206D: /* LE Request Peer SCA */
6778
0
        case 0x2077: /* LE Read Remote Transmit Power Level */
6779
0
        case 0x207E: /* LE Subrate Request */
6780
0
        case 0x2085: /* LE Extended Create Connection [v2] */
6781
0
            proto_tree_add_expert(tree, pinfo, &ei_event_unexpected_event, tvb, offset, tvb_captured_length_remaining(tvb, offset));
6782
0
            offset += tvb_reported_length_remaining(tvb, offset);
6783
6784
0
            break;
6785
6786
0
        case 0x0C35: /* Host Number Of Completed Packets */
6787
0
            if (tvb_captured_length_remaining(tvb, offset) > 0) {
6788
0
                proto_tree_add_expert(tree, pinfo, &ei_event_unexpected_parameter, tvb, offset, tvb_captured_length_remaining(tvb, offset));
6789
0
                offset += tvb_reported_length_remaining(tvb, offset);
6790
0
            }
6791
6792
0
            break;
6793
6794
0
        default:
6795
0
            proto_tree_add_expert(tree, pinfo, &ei_event_unknown_command, tvb, offset, tvb_captured_length_remaining(tvb, offset));
6796
0
            offset += tvb_reported_length_remaining(tvb, offset);
6797
6798
0
            break;
6799
0
    }
6800
6801
0
    add_opcode(pinfo->pool, opcode_list, opcode, COMMAND_STATUS_NORMAL);
6802
6803
0
    return offset;
6804
0
}
6805
6806
static int
6807
dissect_bthci_evt_qos_setup_complete(tvbuff_t *tvb, int offset,
6808
        packet_info *pinfo, proto_tree *tree, bluetooth_data_t *bluetooth_data)
6809
0
{
6810
0
    proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN);
6811
0
    send_hci_summary_status_tap(tvb_get_uint8(tvb, offset), pinfo, bluetooth_data);
6812
0
    offset += 1;
6813
6814
0
    proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6815
0
    offset += 2;
6816
6817
0
    proto_tree_add_item(tree, hf_bthci_evt_flags, tvb, offset, 1, ENC_LITTLE_ENDIAN);
6818
0
    offset += 1;
6819
6820
0
    proto_tree_add_item(tree, hf_bthci_evt_service_type, tvb, offset, 1, ENC_LITTLE_ENDIAN);
6821
0
    offset += 1;
6822
6823
0
    proto_tree_add_item(tree, hf_bthci_evt_token_rate, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6824
0
    offset += 4;
6825
6826
0
    proto_tree_add_item(tree, hf_bthci_evt_peak_bandwidth, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6827
0
    offset += 4;
6828
6829
0
    proto_tree_add_item(tree, hf_bthci_evt_latency, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6830
0
    offset += 4;
6831
6832
6833
0
    proto_tree_add_item(tree, hf_bthci_evt_delay_variation, tvb, offset, 4, ENC_LITTLE_ENDIAN);
6834
0
    offset += 4;
6835
6836
0
    return offset;
6837
0
}
6838
6839
static int
6840
dissect_bthci_evt_change_conn_link_key_complete(tvbuff_t *tvb, int offset,
6841
        packet_info *pinfo, proto_tree *tree, bluetooth_data_t *bluetooth_data)
6842
0
{
6843
0
    proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN);
6844
0
    send_hci_summary_status_tap(tvb_get_uint8(tvb, offset), pinfo, bluetooth_data);
6845
0
    offset += 1;
6846
6847
0
    proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6848
0
    offset += 2;
6849
6850
0
    return offset;
6851
0
}
6852
6853
static int
6854
dissect_bthci_evt_link_key_type_changed(tvbuff_t *tvb, int offset,
6855
        packet_info *pinfo, proto_tree *tree, bluetooth_data_t *bluetooth_data)
6856
0
{
6857
0
    proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN);
6858
0
    send_hci_summary_status_tap(tvb_get_uint8(tvb, offset), pinfo, bluetooth_data);
6859
0
    offset += 1;
6860
6861
0
    proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6862
0
    offset += 2;
6863
6864
0
    proto_tree_add_item(tree, hf_bthci_evt_key_flag, tvb, offset, 1, ENC_LITTLE_ENDIAN);
6865
0
    offset += 1;
6866
6867
0
    return offset;
6868
0
}
6869
6870
static int
6871
dissect_bthci_evt_encryption_change(tvbuff_t *tvb, int offset,
6872
        packet_info *pinfo, proto_tree *tree, bluetooth_data_t *bluetooth_data, bool v2)
6873
0
{
6874
0
    proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN);
6875
0
    send_hci_summary_status_tap(tvb_get_uint8(tvb, offset), pinfo, bluetooth_data);
6876
0
    offset += 1;
6877
6878
0
    proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6879
0
    offset += 2;
6880
6881
0
    proto_tree_add_item(tree, hf_bthci_evt_encryption_enable, tvb, offset, 1, ENC_LITTLE_ENDIAN);
6882
0
    offset += 1;
6883
6884
0
    if (v2) {
6885
0
        proto_tree_add_item(tree, hf_bthci_evt_enc_key_size, tvb, offset, 1, ENC_LITTLE_ENDIAN);
6886
0
        offset += 1;
6887
0
    }
6888
6889
0
    return offset;
6890
0
}
6891
6892
static int
6893
dissect_bthci_evt_read_remote_ext_features_complete(tvbuff_t *tvb, int offset,
6894
        packet_info *pinfo, proto_tree *tree, bluetooth_data_t *bluetooth_data)
6895
0
{
6896
0
    uint8_t page_number;
6897
6898
0
    proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN);
6899
0
    send_hci_summary_status_tap(tvb_get_uint8(tvb, offset), pinfo, bluetooth_data);
6900
0
    offset += 1;
6901
6902
0
    proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6903
0
    offset += 2;
6904
6905
0
    page_number = tvb_get_uint8(tvb, offset);
6906
0
    proto_tree_add_item(tree, hf_bthci_evt_page_number, tvb, offset, 1, ENC_LITTLE_ENDIAN);
6907
0
    offset += 1;
6908
6909
0
    proto_tree_add_item(tree, hf_bthci_evt_max_page_number, tvb, offset, 1, ENC_LITTLE_ENDIAN);
6910
0
    offset += 1;
6911
6912
0
    offset = dissect_bthci_evt_lmp_features(tvb, offset, pinfo, tree, page_number);
6913
6914
0
    return offset;
6915
0
}
6916
6917
static int
6918
dissect_bthci_evt_sync_connection_complete(tvbuff_t *tvb, int offset,
6919
        packet_info *pinfo, proto_tree *tree, bluetooth_data_t *bluetooth_data)
6920
0
{
6921
0
    uint32_t    connection_handle;
6922
0
    uint8_t     bd_addr[6];
6923
0
    uint8_t     status;
6924
0
    wmem_tree_key_t     key[5];
6925
0
    uint32_t            interface_id;
6926
0
    uint32_t            adapter_id;
6927
0
    uint32_t            frame_number;
6928
0
    wmem_tree_t        *subtree;
6929
6930
0
    proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN);
6931
0
    status = tvb_get_uint8(tvb, offset);
6932
0
    send_hci_summary_status_tap(status, pinfo, bluetooth_data);
6933
0
    offset += 1;
6934
6935
0
    proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6936
0
    connection_handle = tvb_get_letohs(tvb, offset) & 0x0FFF;
6937
0
    offset += 2;
6938
6939
0
    offset = dissect_bd_addr(hf_bthci_evt_bd_addr, pinfo, tree, tvb, offset, false, bluetooth_data->interface_id, bluetooth_data->adapter_id, bd_addr);
6940
6941
0
    proto_tree_add_item(tree, hf_bthci_evt_sync_link_type, tvb, offset, 1, ENC_LITTLE_ENDIAN);
6942
0
    offset += 1;
6943
6944
0
    proto_tree_add_item(tree, hf_bthci_evt_sync_tx_interval, tvb, offset, 1, ENC_LITTLE_ENDIAN);
6945
0
    offset += 1;
6946
6947
0
    proto_tree_add_item(tree, hf_bthci_evt_sync_rtx_window, tvb, offset, 1, ENC_LITTLE_ENDIAN);
6948
0
    offset += 1;
6949
6950
0
    proto_tree_add_item(tree, hf_bthci_evt_sync_rx_packet_length, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6951
0
    offset += 2;
6952
6953
0
    proto_tree_add_item(tree, hf_bthci_evt_sync_tx_packet_length, tvb, offset, 2, ENC_LITTLE_ENDIAN);
6954
0
    offset += 2;
6955
6956
0
    proto_tree_add_item(tree, hf_bthci_evt_air_mode, tvb, offset, 1, ENC_LITTLE_ENDIAN);
6957
0
    offset += 1;
6958
6959
0
    interface_id = bluetooth_data->interface_id;
6960
0
    adapter_id = bluetooth_data->adapter_id;
6961
0
    frame_number = pinfo->num;
6962
6963
0
    if (!pinfo->fd->visited && status == STATUS_SUCCESS) {
6964
0
        remote_bdaddr_t            *remote_bdaddr;
6965
0
        chandle_session_t          *chandle_session;
6966
0
        bthci_sco_stream_number_t  *sco_stream_number;
6967
0
        uint32_t                    stream_number;
6968
6969
        /* chandle to bdaddr */
6970
0
        key[0].length = 1;
6971
0
        key[0].key    = &interface_id;
6972
0
        key[1].length = 1;
6973
0
        key[1].key    = &adapter_id;
6974
0
        key[2].length = 1;
6975
0
        key[2].key    = &connection_handle;
6976
0
        key[3].length = 1;
6977
0
        key[3].key    = &frame_number;
6978
0
        key[4].length = 0;
6979
0
        key[4].key    = NULL;
6980
6981
0
        remote_bdaddr = (remote_bdaddr_t *) wmem_new(wmem_file_scope(), remote_bdaddr_t);
6982
0
        remote_bdaddr->interface_id = bluetooth_data->interface_id;
6983
0
        remote_bdaddr->adapter_id = bluetooth_data->adapter_id;
6984
0
        remote_bdaddr->chandle = connection_handle;
6985
0
        memcpy(remote_bdaddr->bd_addr, bd_addr, 6);
6986
6987
0
        wmem_tree_insert32_array(bluetooth_data->chandle_to_bdaddr, key, remote_bdaddr);
6988
6989
        /* chandle session */
6990
0
        chandle_session = (chandle_session_t *) wmem_new(wmem_file_scope(), chandle_session_t);
6991
0
        chandle_session->connect_in_frame = frame_number;
6992
0
        chandle_session->disconnect_in_frame = bluetooth_max_disconnect_in_frame;
6993
0
        chandle_session->link_type = BT_LINK_TYPE_SCO;
6994
0
        wmem_tree_insert32_array(bluetooth_data->chandle_sessions, key, chandle_session);
6995
6996
        /* stream number */
6997
0
        key[2].length = 0;
6998
0
        key[2].key    = NULL;
6999
7000
0
        subtree = (wmem_tree_t *) wmem_tree_lookup32_array(bthci_sco_stream_numbers, key);
7001
0
        sco_stream_number = (subtree) ? (bthci_sco_stream_number_t *) wmem_tree_lookup32_le(subtree, pinfo->num) : NULL;
7002
0
        if (!sco_stream_number) {
7003
0
            stream_number = 1;
7004
0
        } else {
7005
0
            stream_number = sco_stream_number->stream_number + 1;
7006
0
        }
7007
7008
0
        key[2].length = 1;
7009
0
        key[2].key    = &frame_number;
7010
0
        key[3].length = 0;
7011
0
        key[3].key    = NULL;
7012
7013
0
        sco_stream_number = (bthci_sco_stream_number_t *) wmem_new(wmem_file_scope(), bthci_sco_stream_number_t);
7014
0
        sco_stream_number->stream_number = stream_number;
7015
0
        wmem_tree_insert32_array(bthci_sco_stream_numbers, key, sco_stream_number);
7016
0
    }
7017
7018
0
    return offset;
7019
0
}
7020
7021
static int
7022
dissect_bthci_evt_sync_connection_changed(tvbuff_t *tvb, int offset,
7023
        packet_info *pinfo, proto_tree *tree, bluetooth_data_t *bluetooth_data)
7024
1
{
7025
1
    proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN);
7026
1
    send_hci_summary_status_tap(tvb_get_uint8(tvb, offset), pinfo, bluetooth_data);
7027
1
    offset += 1;
7028
7029
1
    proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
7030
1
    offset += 2;
7031
7032
1
    proto_tree_add_item(tree, hf_bthci_evt_sync_tx_interval, tvb, offset, 1, ENC_LITTLE_ENDIAN);
7033
1
    offset += 1;
7034
7035
1
    proto_tree_add_item(tree, hf_bthci_evt_sync_rtx_window, tvb, offset, 1, ENC_LITTLE_ENDIAN);
7036
1
    offset += 1;
7037
7038
1
    proto_tree_add_item(tree, hf_bthci_evt_sync_rx_packet_length, tvb, offset, 2, ENC_LITTLE_ENDIAN);
7039
1
    offset += 2;
7040
7041
1
    proto_tree_add_item(tree, hf_bthci_evt_sync_tx_packet_length, tvb, offset, 2, ENC_LITTLE_ENDIAN);
7042
1
    offset += 2;
7043
7044
1
    return offset;
7045
1
}
7046
7047
static int
7048
dissect_bthci_evt_sniff_subrating(tvbuff_t *tvb, int offset, packet_info *pinfo,
7049
        proto_tree *tree, bluetooth_data_t *bluetooth_data)
7050
1
{
7051
1
    proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN);
7052
1
    send_hci_summary_status_tap(tvb_get_uint8(tvb, offset), pinfo, bluetooth_data);
7053
1
    offset += 1;
7054
7055
1
    proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
7056
1
    offset += 2;
7057
7058
1
    proto_tree_add_item(tree, hf_bthci_evt_max_tx_latency, tvb, offset, 2, ENC_LITTLE_ENDIAN);
7059
1
    offset += 2;
7060
7061
1
    proto_tree_add_item(tree, hf_bthci_evt_max_rx_latency, tvb, offset, 2, ENC_LITTLE_ENDIAN);
7062
1
    offset += 2;
7063
7064
1
    proto_tree_add_item(tree, hf_bthci_evt_min_remote_timeout, tvb, offset, 2, ENC_LITTLE_ENDIAN);
7065
1
    offset += 2;
7066
7067
1
    proto_tree_add_item(tree, hf_bthci_evt_min_local_timeout, tvb, offset, 2, ENC_LITTLE_ENDIAN);
7068
1
    offset += 2;
7069
7070
1
    return offset;
7071
1
}
7072
7073
static int
7074
dissect_bthci_evt_flow_specification_complete(tvbuff_t *tvb, int offset,
7075
        packet_info *pinfo, proto_tree *tree, bluetooth_data_t *bluetooth_data)
7076
0
{
7077
0
    proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN);
7078
0
    send_hci_summary_status_tap(tvb_get_uint8(tvb, offset), pinfo, bluetooth_data);
7079
0
    offset += 1;
7080
7081
0
    proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
7082
0
    offset += 2;
7083
7084
0
    proto_tree_add_item(tree, hf_bthci_evt_flags, tvb, offset, 1, ENC_LITTLE_ENDIAN);
7085
0
    offset += 1;
7086
7087
0
    proto_tree_add_item(tree, hf_bthci_evt_flow_direction, tvb, offset, 1, ENC_LITTLE_ENDIAN);
7088
0
    offset += 1;
7089
7090
0
    proto_tree_add_item(tree, hf_bthci_evt_service_type, tvb, offset, 1, ENC_LITTLE_ENDIAN);
7091
0
    offset += 1;
7092
7093
0
    proto_tree_add_item(tree, hf_bthci_evt_token_rate, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7094
0
    offset += 4;
7095
7096
0
    proto_tree_add_item(tree, hf_bthci_evt_token_bucket_size, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7097
0
    offset += 4;
7098
7099
0
    proto_tree_add_item(tree, hf_bthci_evt_peak_bandwidth, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7100
0
    offset += 4;
7101
7102
0
    proto_tree_add_item(tree, hf_bthci_evt_latency, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7103
0
    offset += 4;
7104
7105
0
    return offset;
7106
0
}
7107
7108
static int
7109
dissect_bthci_evt_enhanced_flush_complete(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree)
7110
0
{
7111
0
    proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
7112
0
    offset += 2;
7113
7114
0
    return offset;
7115
0
}
7116
7117
static int
7118
dissect_bthci_evt_encryption_key_refresh_complete(tvbuff_t *tvb, int offset,
7119
        packet_info *pinfo, proto_tree *tree, bluetooth_data_t *bluetooth_data)
7120
0
{
7121
0
    proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN);
7122
0
    send_hci_summary_status_tap(tvb_get_uint8(tvb, offset), pinfo, bluetooth_data);
7123
0
    offset += 1;
7124
7125
0
    proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
7126
0
    offset += 2;
7127
7128
0
    return offset;
7129
0
}
7130
7131
static int
7132
dissect_bthci_evt_link_supervision_timeout_changed(tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree)
7133
0
{
7134
0
    proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
7135
0
    offset += 2;
7136
7137
0
    proto_tree_add_item(tree, hf_bthci_evt_link_supervision_timeout, tvb, offset, 2, ENC_LITTLE_ENDIAN);
7138
0
    offset += 2;
7139
7140
0
    return offset;
7141
0
}
7142
7143
static int
7144
dissect_bthci_evt_inquire_result(tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree, bluetooth_data_t *bluetooth_data)
7145
6
{
7146
6
    uint8_t num, evt_num_responses;
7147
7148
6
    evt_num_responses = tvb_get_uint8(tvb, offset);
7149
6
    proto_tree_add_item(tree, hf_bthci_evt_num_responses, tvb, offset, 1, ENC_LITTLE_ENDIAN);
7150
6
    offset += 1;
7151
7152
71
    for (num = 0; num < evt_num_responses; num++) {
7153
65
        offset = dissect_bd_addr(hf_bthci_evt_bd_addr, pinfo, tree, tvb, offset, false, bluetooth_data->interface_id, bluetooth_data->adapter_id, NULL);
7154
7155
65
        proto_tree_add_item(tree, hf_bthci_evt_page_scan_repetition_mode, tvb, offset, 1, ENC_LITTLE_ENDIAN);
7156
65
        offset += 1;
7157
7158
65
        proto_tree_add_item(tree, hf_bthci_evt_page_scan_period_mode, tvb, offset, 1, ENC_LITTLE_ENDIAN);
7159
65
        offset += 1;
7160
7161
65
        proto_tree_add_item(tree, hf_bthci_evt_page_scan_mode, tvb, offset, 1, ENC_LITTLE_ENDIAN);
7162
65
        offset += 1;
7163
7164
65
        call_dissector(btcommon_cod_handle, tvb_new_subset_length(tvb, offset, 3), pinfo, tree);
7165
65
        offset += 3;
7166
7167
65
        proto_tree_add_item(tree, hf_bthci_evt_clock_offset, tvb, offset, 2, ENC_LITTLE_ENDIAN);
7168
65
        offset += 2;
7169
65
    }
7170
7171
6
    return offset;
7172
6
}
7173
7174
7175
/* Code to actually dissect the packets */
7176
static int
7177
dissect_bthci_evt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data)
7178
48
{
7179
48
    proto_item          *ti;
7180
48
    proto_tree          *bthci_evt_tree;
7181
48
    uint8_t              param_length, evt_code;
7182
48
    uint8_t              bd_addr[6];
7183
48
    int                  offset = 0;
7184
48
    int                  previous_offset = 0;
7185
48
    bluetooth_data_t    *bluetooth_data;
7186
48
    wmem_list_t         *opcode_list;
7187
48
    wmem_list_frame_t   *opcode_list_frame;
7188
48
    bthci_cmd_data_t    *lastest_bthci_cmd_data = NULL;
7189
48
    opcode_list_data_t  *opcode_list_data = NULL;
7190
48
    uint32_t             opcode = UINT32_MAX;
7191
7192
    /* Reject the packet if data is NULL */
7193
48
    if (data == NULL)
7194
0
        return 0;
7195
48
    bluetooth_data = (bluetooth_data_t *) data;
7196
7197
48
    opcode_list = wmem_list_new(pinfo->pool);
7198
7199
48
    ti = proto_tree_add_item(tree, proto_bthci_evt, tvb, offset, -1, ENC_NA);
7200
48
    bthci_evt_tree = proto_item_add_subtree(ti, ett_bthci_evt);
7201
7202
48
    switch (pinfo->p2p_dir) {
7203
0
        case P2P_DIR_SENT:
7204
0
            col_set_str(pinfo->cinfo, COL_INFO, "Sent ");
7205
0
            break;
7206
0
        case P2P_DIR_RECV:
7207
0
            col_set_str(pinfo->cinfo, COL_INFO, "Rcvd ");
7208
0
            break;
7209
48
        default:
7210
48
            col_set_str(pinfo->cinfo, COL_INFO, "UnknownDirection ");
7211
48
            break;
7212
48
    }
7213
7214
48
    set_address(&pinfo->src, AT_STRINGZ,     11, "controller");
7215
48
    set_address(&pinfo->dst, AT_STRINGZ,      5, "host");
7216
48
    set_address(&pinfo->net_src, AT_STRINGZ, 11, "controller");
7217
48
    set_address(&pinfo->net_dst, AT_STRINGZ,  5, "host");
7218
48
    set_address(&pinfo->dl_src,  AT_STRINGZ, 11, "controller");
7219
48
    set_address(&pinfo->dl_dst,  AT_STRINGZ,  5, "host");
7220
48
    if (!pinfo->fd->visited) {
7221
48
        address *addr;
7222
7223
48
        addr = (address *) wmem_memdup(wmem_file_scope(), &pinfo->dl_src, sizeof(address));
7224
48
        addr->data =  wmem_memdup(wmem_file_scope(), pinfo->dl_src.data, pinfo->dl_src.len);
7225
48
        p_add_proto_data(wmem_file_scope(), pinfo, proto_bluetooth, BLUETOOTH_DATA_SRC, addr);
7226
7227
48
        addr = (address *) wmem_memdup(wmem_file_scope(), &pinfo->dl_dst, sizeof(address));
7228
48
        addr->data =  wmem_memdup(wmem_file_scope(), pinfo->dl_dst.data, pinfo->dl_dst.len);
7229
48
        p_add_proto_data(wmem_file_scope(), pinfo, proto_bluetooth, BLUETOOTH_DATA_DST, addr);
7230
48
    }
7231
7232
48
    evt_code = tvb_get_uint8(tvb, offset);
7233
48
    proto_tree_add_item(bthci_evt_tree, hf_bthci_evt_code, tvb, offset, 1, ENC_LITTLE_ENDIAN);
7234
48
    proto_item_append_text(bthci_evt_tree, " - %s", val_to_str_ext(evt_code, &bthci_evt_evt_code_vals_ext,  "Unknown 0x%02x"));
7235
48
    offset += 1;
7236
7237
48
    if (have_tap_listener(bluetooth_hci_summary_tap)) {
7238
0
        bluetooth_hci_summary_tap_t  *tap_hci_summary;
7239
7240
0
        tap_hci_summary = wmem_new(pinfo->pool, bluetooth_hci_summary_tap_t);
7241
7242
0
        tap_hci_summary->interface_id  = bluetooth_data->interface_id;
7243
0
        tap_hci_summary->adapter_id    = bluetooth_data->adapter_id;
7244
7245
0
        tap_hci_summary->type = BLUETOOTH_HCI_SUMMARY_EVENT;
7246
0
        tap_hci_summary->event = evt_code;
7247
0
        if (try_val_to_str_ext(evt_code, &bthci_evt_evt_code_vals_ext))
7248
0
            tap_hci_summary->name = val_to_str_ext(evt_code, &bthci_evt_evt_code_vals_ext, "Unknown 0x%04x");
7249
0
        else
7250
0
            tap_hci_summary->name = NULL;
7251
0
        tap_queue_packet(bluetooth_hci_summary_tap, pinfo, tap_hci_summary);
7252
0
    }
7253
7254
48
    param_length = tvb_get_uint8(tvb, offset);
7255
48
    proto_tree_add_item(bthci_evt_tree, hf_bthci_evt_param_length, tvb, offset, 1, ENC_LITTLE_ENDIAN);
7256
48
    offset += 1;
7257
7258
7259
48
    col_set_str(pinfo->cinfo, COL_PROTOCOL, "HCI_EVT");
7260
7261
48
    col_append_str(pinfo->cinfo, COL_INFO, val_to_str_ext(evt_code, &bthci_evt_evt_code_vals_ext, "Unknown 0x%02x"));
7262
7263
48
    if (param_length > 0) {
7264
48
        switch(evt_code) {
7265
0
        case 0x01: /* Inquiry Complete */
7266
0
            offset = dissect_bthci_evt_inquire_complete(tvb, offset, pinfo, bthci_evt_tree, bluetooth_data);
7267
0
            add_opcode(pinfo->pool, opcode_list, 0x0401, COMMAND_STATUS_NORMAL); /* Inquiry */
7268
0
            add_opcode(pinfo->pool, opcode_list, 0x0403, COMMAND_STATUS_NORMAL); /* Periodic Inquiry Mode */
7269
0
            break;
7270
7271
6
        case 0x02: /* Inquiry result event  */
7272
6
            offset = dissect_bthci_evt_inquire_result(tvb, offset, pinfo, bthci_evt_tree, bluetooth_data);
7273
6
            break;
7274
7275
0
        case 0x03: /* Connection Complete */
7276
0
            offset = dissect_bthci_evt_connect_complete(tvb, offset, pinfo, bthci_evt_tree, bluetooth_data);
7277
0
            add_opcode(pinfo->pool, opcode_list, 0x0405, COMMAND_STATUS_NORMAL); /* Create Connection */
7278
0
            add_opcode(pinfo->pool, opcode_list, 0x0409, COMMAND_STATUS_NORMAL); /* Accept Connection Request */
7279
0
            add_opcode(pinfo->pool, opcode_list, 0x040A, COMMAND_STATUS_NORMAL); /* Reject Connection Request */
7280
0
            add_opcode(pinfo->pool, opcode_list, 0x043E, COMMAND_STATUS_NORMAL); /* Enhanced Accept Synchronous Connection Request */
7281
0
            break;
7282
7283
1
        case 0x04: /* Connection Request */
7284
1
            offset = dissect_bthci_evt_connect_request(tvb, offset, pinfo, bthci_evt_tree, bluetooth_data);
7285
1
            break;
7286
7287
0
        case 0x05: /* Disconnection Complete */
7288
0
            offset = dissect_bthci_evt_disconnect_complete(tvb, offset, pinfo, bthci_evt_tree, bluetooth_data);
7289
0
            add_opcode(pinfo->pool, opcode_list, 0x0406, COMMAND_STATUS_NORMAL); /* Disconnection Connection */
7290
0
            break;
7291
7292
0
        case 0x06: /* Authentication Complete */
7293
0
            offset = dissect_bthci_evt_auth_complete(tvb, offset, pinfo, bthci_evt_tree, bluetooth_data);
7294
0
            add_opcode(pinfo->pool, opcode_list, 0x0411, COMMAND_STATUS_NORMAL); /* Authentication Requested */
7295
0
            break;
7296
7297
0
        case 0x07: /* Remote Name Request Complete */
7298
0
            offset = dissect_bthci_evt_remote_name_req_complete(tvb, offset, pinfo, bthci_evt_tree, bluetooth_data);
7299
0
            add_opcode(pinfo->pool, opcode_list, 0x0419, COMMAND_STATUS_NORMAL); /* Remote Name Request */
7300
0
            break;
7301
7302
0
        case 0x08: /* Encryption Change [v1] */
7303
0
        case 0x59: /* Encryption Change [v2] */
7304
0
            offset = dissect_bthci_evt_encryption_change(tvb, offset, pinfo, bthci_evt_tree, bluetooth_data, evt_code == 0x59);
7305
0
            add_opcode(pinfo->pool, opcode_list, 0x0413, COMMAND_STATUS_NORMAL); /* Encryption Requested */
7306
0
            add_opcode(pinfo->pool, opcode_list, 0x2019, COMMAND_STATUS_NORMAL); /* LE Start Encryption */
7307
0
            break;
7308
7309
0
        case 0x09: /* Change Connection Link Key Complete */
7310
0
            offset = dissect_bthci_evt_change_conn_link_key_complete(tvb, offset, pinfo, bthci_evt_tree, bluetooth_data);
7311
0
            break;
7312
7313
0
        case 0x0a: /* Link Key Type Changed */
7314
0
            offset = dissect_bthci_evt_link_key_type_changed(tvb, offset, pinfo, bthci_evt_tree, bluetooth_data);
7315
0
            break;
7316
7317
0
        case 0x0b: /* Read Remote Support Features Complete */
7318
0
            offset = dissect_bthci_evt_read_remote_support_features_complete(tvb, offset, pinfo, bthci_evt_tree, bluetooth_data);
7319
0
            add_opcode(pinfo->pool, opcode_list, 0x41B, COMMAND_STATUS_NORMAL); /* Read Remote Supported Features */
7320
0
            break;
7321
7322
0
        case 0x0c: /* Read Remote Version Information Complete */
7323
0
            offset = dissect_bthci_evt_read_remote_version_information_complete(tvb, offset, pinfo, bluetooth_data, bthci_evt_tree);
7324
0
            add_opcode(pinfo->pool, opcode_list, 0x41D, COMMAND_STATUS_NORMAL); /* Read Remote Version Information */
7325
0
            break;
7326
7327
0
        case 0x0d: /* QoS Setup Complete */
7328
0
            offset = dissect_bthci_evt_qos_setup_complete(tvb, offset, pinfo, bthci_evt_tree, bluetooth_data);
7329
0
            break;
7330
7331
0
        case 0x0e: /* Command Complete */
7332
0
            offset = dissect_bthci_evt_command_complete(tvb, offset, pinfo, tree, bthci_evt_tree, opcode_list, bluetooth_data, &opcode);
7333
0
            break;
7334
7335
0
        case 0x0f: /* Command Status */
7336
0
            offset = dissect_bthci_evt_command_status(tvb, offset, pinfo, tree, bthci_evt_tree, opcode_list, bluetooth_data);
7337
0
            break;
7338
7339
0
        case 0x10: /* Hardware Error */
7340
0
            offset = dissect_bthci_evt_hardware_error(tvb, offset, pinfo, bthci_evt_tree, bluetooth_data);
7341
0
            break;
7342
7343
0
        case 0x11: /* Flush Occurred */
7344
0
            offset = dissect_bthci_evt_flush_occurred(tvb, offset, pinfo, bthci_evt_tree);
7345
0
            break;
7346
7347
0
        case 0x12: /* Role Change */
7348
0
            offset = dissect_bthci_evt_role_change(tvb, offset, pinfo, bthci_evt_tree, bluetooth_data);
7349
0
            add_opcode(pinfo->pool, opcode_list, 0x080B, COMMAND_STATUS_NORMAL); /* Switch Role */
7350
0
            break;
7351
7352
0
        case 0x13: /* Number Of Completed Packets */
7353
0
            offset = dissect_bthci_evt_number_of_completed_packets(tvb, offset, pinfo, bthci_evt_tree);
7354
0
            break;
7355
7356
0
        case 0x14: /* Mode Change */
7357
0
            offset = dissect_bthci_evt_mode_change(tvb, offset, pinfo, bthci_evt_tree, bluetooth_data);
7358
0
            add_opcode(pinfo->pool, opcode_list, 0x0803, COMMAND_STATUS_NORMAL); /* Sniff Mode */
7359
0
            add_opcode(pinfo->pool, opcode_list, 0x0804, COMMAND_STATUS_NORMAL); /* Exit Sniff Mode */
7360
0
            break;
7361
7362
0
        case 0x15: /* Return Link Keys */
7363
0
            offset = dissect_bthci_evt_return_link_keys(tvb, offset, pinfo, bthci_evt_tree, bluetooth_data);
7364
0
            break;
7365
7366
0
        case 0x16: /* PIN Code Request */
7367
0
            offset = dissect_bthci_evt_pin_code_request(tvb, offset, pinfo, bthci_evt_tree, bluetooth_data);
7368
0
            break;
7369
7370
0
        case 0x17: /* Link Key Request */
7371
0
            offset = dissect_bthci_evt_link_key_request(tvb, offset, pinfo, bthci_evt_tree, bluetooth_data);
7372
0
            break;
7373
7374
0
        case 0x18: /* Link Key Notification */
7375
0
            offset = dissect_bthci_evt_link_key_notification(tvb, offset, pinfo, bthci_evt_tree, bluetooth_data);
7376
0
            break;
7377
7378
0
        case 0x19: /* Loopback Command */
7379
0
            offset = dissect_bthci_evt_loopback_command(tvb, offset, pinfo, bthci_evt_tree, bluetooth_data);
7380
0
            break;
7381
7382
0
        case 0x1a: /* Data Buffer Overflow */
7383
0
            offset = dissect_bthci_evt_data_buffer_overflow(tvb, offset, pinfo, bthci_evt_tree);
7384
0
            break;
7385
7386
0
        case 0x1b: /* Max Slots Change */
7387
0
            offset = dissect_bthci_evt_max_slots_change(tvb, offset, pinfo, bthci_evt_tree);
7388
0
            break;
7389
7390
0
        case 0x1c: /* Read Clock Offset Complete */
7391
0
            offset = dissect_bthci_evt_read_clock_offset_complete(tvb, offset, pinfo, bthci_evt_tree, bluetooth_data);
7392
0
            add_opcode(pinfo->pool, opcode_list, 0x041F, COMMAND_STATUS_NORMAL); /* Read Clock Offset */
7393
0
            break;
7394
7395
0
        case 0x1d: /* Connection Packet Type Changed */
7396
0
            offset = dissect_bthci_evt_conn_packet_type_changed(tvb, offset, pinfo, bthci_evt_tree, bluetooth_data);
7397
0
            add_opcode(pinfo->pool, opcode_list, 0x040F, COMMAND_STATUS_NORMAL); /* Change Connection Packet Type */
7398
0
            break;
7399
7400
0
        case 0x1e: /* QoS Violation */
7401
0
            offset = dissect_bthci_evt_qos_violation(tvb, offset, pinfo, bthci_evt_tree);
7402
0
            break;
7403
7404
0
        case 0x1f: /* Page Scan Mode Change */
7405
0
            offset = dissect_bthci_evt_page_scan_mode_change(tvb, offset, pinfo, bthci_evt_tree, bluetooth_data);
7406
0
            break;
7407
7408
0
        case 0x20: /* Page Scan Repetition Mode Change */
7409
0
            offset = dissect_bthci_evt_page_scan_repetition_mode_change(tvb, offset, pinfo, bthci_evt_tree, bluetooth_data);
7410
0
            break;
7411
7412
0
        case 0x21: /* Flow Specification Complete */
7413
0
            offset = dissect_bthci_evt_flow_specification_complete(tvb, offset, pinfo, bthci_evt_tree, bluetooth_data);
7414
0
            break;
7415
7416
0
        case 0x22: /* Inquiry Result with RSSI */
7417
0
            offset = dissect_bthci_evt_inquire_result_with_rssi(tvb, offset, pinfo, bthci_evt_tree, bluetooth_data, NULL);
7418
0
            break;
7419
7420
0
        case 0x23: /* Read Remote Extended Features Complete */
7421
0
            offset = dissect_bthci_evt_read_remote_ext_features_complete(tvb, offset, pinfo, bthci_evt_tree, bluetooth_data);
7422
0
            add_opcode(pinfo->pool, opcode_list, 0x41C, COMMAND_STATUS_NORMAL); /* Read Remote Supported Features */
7423
0
            break;
7424
7425
0
        case 0x2c: /* Synchronous Connection Complete */
7426
0
            offset = dissect_bthci_evt_sync_connection_complete(tvb, offset, pinfo, bthci_evt_tree, bluetooth_data);
7427
0
            add_opcode(pinfo->pool, opcode_list, 0x0429, COMMAND_STATUS_NORMAL); /* Accept Synchronous Connection Request */
7428
0
            add_opcode(pinfo->pool, opcode_list, 0x0428, COMMAND_STATUS_NORMAL); /* Setup Synchronous Connection */
7429
0
            add_opcode(pinfo->pool, opcode_list, 0x043D, COMMAND_STATUS_NORMAL); /* Enhanced Setup Synchronous Connection */
7430
0
            add_opcode(pinfo->pool, opcode_list, 0x043E, COMMAND_STATUS_NORMAL); /* Enhanced Accept Synchronous Connection Request */
7431
0
            break;
7432
7433
1
        case 0x2d: /* Synchronous Connection Changed */
7434
1
            offset = dissect_bthci_evt_sync_connection_changed(tvb, offset, pinfo, bthci_evt_tree, bluetooth_data);
7435
1
            add_opcode(pinfo->pool, opcode_list, 0x043D, COMMAND_STATUS_NORMAL); /* Enhanced Setup Synchronous Connection */
7436
1
            break;
7437
7438
1
        case 0x2e: /* Sniff Subrating */
7439
1
            offset = dissect_bthci_evt_sniff_subrating(tvb, offset, pinfo, bthci_evt_tree, bluetooth_data);
7440
1
            break;
7441
7442
39
        case 0x2f: /* Extended Inquiry Result */
7443
39
            {
7444
39
            bluetooth_eir_ad_data_t *eir_data;
7445
7446
39
            previous_offset = offset;
7447
39
            offset = dissect_bthci_evt_inquire_result_with_rssi(tvb, offset, pinfo, bthci_evt_tree, bluetooth_data, bd_addr);
7448
7449
39
            eir_data = wmem_new0(pinfo->pool, bluetooth_eir_ad_data_t);
7450
39
            eir_data->interface_id = bluetooth_data->interface_id;
7451
39
            eir_data->adapter_id = bluetooth_data->adapter_id;
7452
39
            eir_data->bd_addr = bd_addr;
7453
7454
7455
39
            call_dissector_with_data(btcommon_eir_handle, tvb_new_subset_length(tvb, offset, 240), pinfo, bthci_evt_tree, eir_data);
7456
39
            save_remote_device_name(tvb, offset, pinfo, 240, (offset - previous_offset <= 1) ? NULL : bd_addr, bluetooth_data);
7457
39
            offset += 240;
7458
39
            }
7459
7460
39
            break;
7461
7462
0
        case 0x30: /* Encryption Key Refresh Complete */
7463
0
            offset = dissect_bthci_evt_encryption_key_refresh_complete(tvb, offset, pinfo, bthci_evt_tree, bluetooth_data);
7464
0
            add_opcode(pinfo->pool, opcode_list, 0x2019, COMMAND_STATUS_NORMAL); /* LE Start Encryption */
7465
0
            break;
7466
7467
0
        case 0x31: /* IO Capability Request */
7468
0
            offset = dissect_bthci_evt_io_capability_request(tvb, offset, pinfo, bthci_evt_tree, bluetooth_data);
7469
0
            break;
7470
7471
0
        case 0x32: /* IO Capability Response */
7472
0
            offset = dissect_bthci_evt_io_capability_response(tvb, offset, pinfo, bthci_evt_tree, bluetooth_data);
7473
0
            break;
7474
7475
0
        case 0x33: /* User Confirmation Request */
7476
0
            offset = dissect_bthci_evt_user_confirmation_request(tvb, offset, pinfo, bthci_evt_tree, bluetooth_data);
7477
0
            break;
7478
7479
0
        case 0x34: /* User Passkey Request */
7480
0
            offset = dissect_bthci_evt_user_passkey_request(tvb, offset, pinfo, bthci_evt_tree, bluetooth_data);
7481
0
            break;
7482
7483
0
        case 0x35: /* Remote OOB Data Request */
7484
0
            offset = dissect_bthci_evt_remote_oob_data_request(tvb, offset, pinfo, bthci_evt_tree, bluetooth_data);
7485
0
            break;
7486
7487
0
        case 0x36: /* Simple Pairing Complete */
7488
0
            offset = dissect_bthci_evt_simple_pairing_complete(tvb, offset, pinfo, bthci_evt_tree, bluetooth_data);
7489
0
            break;
7490
7491
0
        case 0x38: /* Link Supervision Timeout Changed */
7492
0
            offset = dissect_bthci_evt_link_supervision_timeout_changed(tvb, offset, pinfo, bthci_evt_tree);
7493
0
            break;
7494
7495
0
        case 0x39: /* Enhanced Flush Complete */
7496
0
            offset = dissect_bthci_evt_enhanced_flush_complete(tvb, offset, pinfo, bthci_evt_tree);
7497
0
            break;
7498
7499
0
        case 0x3b: /* Enhanced Flush Complete */
7500
0
            offset = dissect_bthci_evt_user_passkey_notification(tvb, offset, pinfo, bthci_evt_tree, bluetooth_data);
7501
0
            break;
7502
7503
0
        case 0x3c: /* Enhanced Flush Complete */
7504
0
            offset = dissect_bthci_evt_keypress_notification(tvb, offset, pinfo, bthci_evt_tree, bluetooth_data);
7505
0
            break;
7506
7507
0
        case 0x3d: /* Remote Host Supported Features Notification */
7508
0
            offset = dissect_bthci_evt_remote_host_sup_feat_notification(tvb, offset, pinfo, bthci_evt_tree, bluetooth_data);
7509
0
            break;
7510
7511
0
        case 0x3e: /* LE Meta */
7512
0
            offset = dissect_bthci_evt_le_meta(tvb, offset, pinfo, bthci_evt_tree, opcode_list, bluetooth_data);
7513
0
            break;
7514
7515
0
        case 0x40: /* Physical Link Complete */
7516
0
            offset = dissect_bthci_evt_physical_link_complete(tvb, offset, pinfo, bthci_evt_tree, bluetooth_data);
7517
0
            break;
7518
7519
0
        case 0x41: /* Channel Selected */
7520
0
        case 0x44: /* Physical Link Recovery */
7521
0
            offset = dissect_bthci_evt_channel_select_physical_link_recovery(tvb, offset, pinfo, bthci_evt_tree);
7522
0
            break;
7523
7524
0
        case 0x42: /* Disconnect Physical Link Complete */
7525
0
            offset = dissect_bthci_evt_disconnect_physical_link_complete(tvb, offset, pinfo, bthci_evt_tree, bluetooth_data);
7526
0
            break;
7527
7528
0
        case 0x43: /* Physical Link Loss Early Warning */
7529
0
            offset = dissect_bthci_evt_physical_link_loss_early_warning(tvb, offset, pinfo, bthci_evt_tree);
7530
0
            break;
7531
7532
0
        case 0x45: /* Logical Link Complete */
7533
0
            offset = dissect_bthci_evt_logical_link_complete(tvb, offset, pinfo, bthci_evt_tree, bluetooth_data);
7534
0
            break;
7535
7536
0
        case 0x46: /* Disconnect Logical Link Complete */
7537
0
            offset = dissect_bthci_evt_disconnect_logical_link_complete(tvb, offset, pinfo, bthci_evt_tree, bluetooth_data);
7538
0
            break;
7539
7540
0
        case 0x47: /* Flow Spec Modify Complete */
7541
0
            offset = dissect_bthci_evt_flow_spec_modify_complete(tvb, offset, pinfo, bthci_evt_tree, bluetooth_data);
7542
0
            break;
7543
7544
0
        case 0x48: /* Number Of Completed Data Blocks */
7545
0
            offset = dissect_bthci_evt_number_of_completed_data_blocks(tvb, offset, pinfo, bthci_evt_tree);
7546
0
            break;
7547
7548
0
        case 0x49: /* AMP Start Test */
7549
0
            offset = dissect_bthci_evt_amp_start_stop_test(tvb, offset, pinfo, bthci_evt_tree, bluetooth_data);
7550
0
            add_opcode(pinfo->pool, opcode_list, 0x1809, COMMAND_STATUS_NORMAL); /* AMP Test */
7551
0
            break;
7552
7553
0
        case 0x4a: /* AMP Test End */
7554
0
            offset = dissect_bthci_evt_amp_start_stop_test(tvb, offset, pinfo, bthci_evt_tree, bluetooth_data);
7555
0
            add_opcode(pinfo->pool, opcode_list, 0x1808, COMMAND_STATUS_NORMAL); /* AMP Test End */
7556
0
            break;
7557
7558
0
        case 0x4b: /* AMP Receiver Test */
7559
0
            offset = dissect_bthci_evt_amp_receiver_test(tvb, offset, pinfo, bthci_evt_tree);
7560
0
            break;
7561
7562
0
        case 0x4c: /* Short Range Mode Change Complete */
7563
0
            offset = dissect_bthci_evt_short_range_mode_change_complete(tvb, offset, pinfo, bthci_evt_tree, bluetooth_data);
7564
0
            break;
7565
7566
0
        case 0x4d: /* AMP Status Change */
7567
0
            offset = dissect_bthci_evt_amp_status_change(tvb, offset, pinfo, bthci_evt_tree, bluetooth_data);
7568
0
            break;
7569
7570
0
        case 0x4e: /* Triggered Clock Capture */
7571
0
            proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
7572
0
            offset += 2;
7573
7574
0
            proto_tree_add_item(tree, hf_bthci_evt_which_clock, tvb, offset, 1, ENC_LITTLE_ENDIAN);
7575
0
            offset += 1;
7576
7577
0
            proto_tree_add_item(tree, hf_bthci_evt_clock, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7578
0
            offset += 4;
7579
7580
0
            proto_tree_add_item(tree, hf_bthci_evt_slot_offset, tvb, offset, 2, ENC_LITTLE_ENDIAN);
7581
0
            offset += 2;
7582
7583
0
            break;
7584
0
        case 0x4f: /* Synchronization Train Complete */
7585
0
            proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN);
7586
0
            send_hci_summary_status_tap(tvb_get_uint8(tvb, offset), pinfo, bluetooth_data);
7587
0
            offset += 1;
7588
7589
0
            break;
7590
0
        case 0x50: /* Synchronization Train Received */
7591
0
            proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN);
7592
0
            send_hci_summary_status_tap(tvb_get_uint8(tvb, offset), pinfo, bluetooth_data);
7593
0
            offset += 1;
7594
7595
0
            offset = dissect_bd_addr(hf_bthci_evt_bd_addr, pinfo, tree, tvb, offset, false, bluetooth_data->interface_id, bluetooth_data->adapter_id, NULL);
7596
7597
0
            proto_tree_add_item(tree, hf_bthci_evt_clock_offset_32, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7598
0
            offset += 4;
7599
7600
0
            proto_tree_add_item(tree, hf_bthci_evt_afh_channel_map, tvb, offset, 10, ENC_NA);
7601
0
            offset += 10;
7602
7603
0
            proto_tree_add_item(tree, hf_bthci_evt_lt_addr, tvb, offset, 1, ENC_LITTLE_ENDIAN);
7604
0
            offset += 1;
7605
7606
0
            proto_tree_add_item(tree, hf_bthci_evt_next_broadcast_instant, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7607
0
            offset += 4;
7608
7609
0
            proto_tree_add_item(tree, hf_bthci_evt_connectionless_peripheral_broadcast_interval, tvb, offset, 2, ENC_LITTLE_ENDIAN);
7610
0
            offset += 2;
7611
7612
0
            proto_tree_add_item(tree, hf_bthci_evt_service_data, tvb, offset, 1, ENC_LITTLE_ENDIAN);
7613
0
            offset += 1;
7614
7615
0
            break;
7616
0
        case 0x51: /* Connectionless Peripheral Broadcast Receive */
7617
0
            {
7618
0
            uint8_t length;
7619
7620
0
            offset = dissect_bd_addr(hf_bthci_evt_bd_addr, pinfo, tree, tvb, offset, false, bluetooth_data->interface_id, bluetooth_data->adapter_id, NULL);
7621
7622
0
            proto_tree_add_item(tree, hf_bthci_evt_lt_addr, tvb, offset, 1, ENC_LITTLE_ENDIAN);
7623
0
            offset += 1;
7624
7625
0
            proto_tree_add_item(tree, hf_bthci_evt_clock, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7626
0
            offset += 4;
7627
7628
0
            proto_tree_add_item(tree, hf_bthci_evt_clock_offset_32, tvb, offset, 4, ENC_LITTLE_ENDIAN);
7629
0
            offset += 4;
7630
7631
0
            proto_tree_add_item(tree, hf_bthci_evt_receive_status, tvb, offset, 1, ENC_LITTLE_ENDIAN);
7632
0
            offset += 1;
7633
7634
0
            proto_tree_add_item(tree, hf_bthci_evt_fragment, tvb, offset, 1, ENC_LITTLE_ENDIAN);
7635
0
            offset += 1;
7636
7637
0
            proto_tree_add_item(tree, hf_bthci_evt_data_length, tvb, offset, 1, ENC_LITTLE_ENDIAN);
7638
0
            length = tvb_get_uint8(tvb, offset);
7639
0
            offset += 1;
7640
7641
0
            proto_tree_add_item(tree, hf_bthci_evt_data, tvb, offset, length, ENC_NA);
7642
0
            offset += 1;
7643
7644
0
            }
7645
0
            break;
7646
0
        case 0x52: /* Connectionless Peripheral Broadcast Timeout */
7647
0
            offset = dissect_bd_addr(hf_bthci_evt_bd_addr, pinfo, tree, tvb, offset, false, bluetooth_data->interface_id, bluetooth_data->adapter_id, NULL);
7648
7649
0
            proto_tree_add_item(tree, hf_bthci_evt_lt_addr, tvb, offset, 1, ENC_LITTLE_ENDIAN);
7650
0
            offset += 1;
7651
7652
0
            break;
7653
0
        case 0x53: /* Truncated Page Complete */
7654
0
            proto_tree_add_item(tree, hf_bthci_evt_status, tvb, offset, 1, ENC_LITTLE_ENDIAN);
7655
0
            send_hci_summary_status_tap(tvb_get_uint8(tvb, offset), pinfo, bluetooth_data);
7656
0
            offset += 1;
7657
7658
0
            offset = dissect_bd_addr(hf_bthci_evt_bd_addr, pinfo, tree, tvb, offset, false, bluetooth_data->interface_id, bluetooth_data->adapter_id, NULL);
7659
7660
0
            break;
7661
0
        case 0x54: /* Peripheral Page Response Timeout */
7662
            /* NOTE: no parameters */
7663
0
            break;
7664
0
        case 0x55: /* Connectionless Peripheral Broadcast Channel Map Change */
7665
0
            proto_tree_add_item(tree, hf_bthci_evt_afh_channel_map, tvb, offset, 10, ENC_NA);
7666
0
            offset += 10;
7667
7668
0
            break;
7669
0
        case 0x56: /* Inquiry Response Notification */
7670
0
            proto_tree_add_item(tree, hf_bthci_evt_iac_lap, tvb, offset, 3, ENC_LITTLE_ENDIAN);
7671
0
            offset += 3;
7672
7673
0
            proto_tree_add_item(tree, hf_bthci_evt_rssi, tvb, offset, 1, ENC_LITTLE_ENDIAN);
7674
0
            offset += 1;
7675
7676
0
            break;
7677
0
        case 0x57: /* Authenticated Payload Timeout Expired */
7678
0
            proto_tree_add_item(tree, hf_bthci_evt_connection_handle, tvb, offset, 2, ENC_LITTLE_ENDIAN);
7679
0
            offset += 2;
7680
7681
0
            break;
7682
0
        case 0x58: /* SAM Status Change */
7683
0
            offset = dissect_bthci_evt_sam_status_change(tvb, offset, pinfo, bthci_evt_tree);
7684
0
            break;
7685
7686
0
        case 0xff: /* Vendor-Specific */
7687
0
        {
7688
0
            tvbuff_t *vendor_payload_tvb;
7689
0
            vendor_payload_tvb = tvb_new_subset_remaining(tvb, 2); // Bytes after length byte.
7690
7691
0
            if (!dissector_try_payload_with_data(hci_evt_vendor_dissector_table, vendor_payload_tvb, pinfo, tree, true, bluetooth_data)) {
7692
0
                if (bluetooth_data) {
7693
0
                    hci_vendor_data_t  *hci_vendor_data;
7694
0
                    wmem_tree_key_t     key[3];
7695
0
                    uint32_t            interface_id;
7696
0
                    uint32_t            adapter_id;
7697
7698
0
                    interface_id = bluetooth_data->interface_id;
7699
0
                    adapter_id   = bluetooth_data->adapter_id;
7700
7701
0
                    key[0].length = 1;
7702
0
                    key[0].key    = &interface_id;
7703
0
                    key[1].length = 1;
7704
0
                    key[1].key    = &adapter_id;
7705
0
                    key[2].length = 0;
7706
0
                    key[2].key    = NULL;
7707
7708
0
                    hci_vendor_data = (hci_vendor_data_t *) wmem_tree_lookup32_array(bluetooth_data->hci_vendors, key);
7709
0
                    if (hci_vendor_data) {
7710
0
                        int sub_offset = 0;
7711
7712
0
                        if (bthci_vendor_android) {
7713
0
                            sub_offset = dissector_try_uint_with_data(hci_vendor_table, bthci_vendor_manufacturer_android, tvb, pinfo, tree, true, bluetooth_data);
7714
0
                        } else {
7715
0
                            sub_offset = dissector_try_uint_with_data(hci_vendor_table, hci_vendor_data->manufacturer, tvb, pinfo, tree, true, bluetooth_data);
7716
0
                        }
7717
7718
0
                        if (sub_offset > 0 && sub_offset < tvb_captured_length_remaining(tvb, offset))
7719
0
                            proto_tree_add_expert(bthci_evt_tree, pinfo, &ei_parameter_unexpected, tvb, offset + sub_offset, tvb_captured_length_remaining(tvb, sub_offset + offset));
7720
0
                    }
7721
0
                }
7722
0
            }
7723
7724
0
            proto_tree_add_expert(bthci_evt_tree, pinfo, &ei_event_undecoded, tvb, offset, tvb_captured_length_remaining(tvb, offset));
7725
7726
0
            return tvb_captured_length(tvb);
7727
0
        }
7728
0
        default:
7729
0
            proto_tree_add_expert(bthci_evt_tree, pinfo, &ei_event_unknown_event, tvb, offset, tvb_captured_length_remaining(tvb, offset));
7730
0
            offset += tvb_reported_length_remaining(tvb, offset);
7731
0
            break;
7732
48
        }
7733
48
    }
7734
7735
10
    opcode_list_frame = wmem_list_head(opcode_list);
7736
7737
11
    while (opcode_list_frame) {
7738
1
        wmem_tree_key_t      key[4];
7739
1
        uint32_t             interface_id;
7740
1
        uint32_t             adapter_id;
7741
1
        uint32_t             frame_number;
7742
1
        bthci_cmd_data_t     *bthci_cmd_data;
7743
1
        wmem_tree_t          *subtree;
7744
1
        int                   i_frame_number;
7745
7746
1
        interface_id = bluetooth_data->interface_id;
7747
1
        adapter_id   = bluetooth_data->adapter_id;
7748
1
        frame_number = pinfo->num;
7749
7750
1
        opcode_list_data = (opcode_list_data_t *) wmem_list_frame_data(opcode_list_frame);
7751
1
        opcode = opcode_list_data->opcode;
7752
7753
1
        key[0].length = 1;
7754
1
        key[0].key    = &interface_id;
7755
1
        key[1].length = 1;
7756
1
        key[1].key    = &adapter_id;
7757
1
        key[2].length = 1;
7758
1
        key[2].key    = &opcode;
7759
1
        key[3].length = 0;
7760
1
        key[3].key    = NULL;
7761
7762
1
        subtree = (wmem_tree_t *) wmem_tree_lookup32_array(bthci_cmds, key);
7763
7764
1
        i_frame_number = frame_number;
7765
7766
1
        do {
7767
1
            bthci_cmd_data = (subtree) ? (bthci_cmd_data_t *) wmem_tree_lookup32_le(subtree, i_frame_number) : NULL;
7768
1
            if (bthci_cmd_data && bthci_cmd_data->command_in_frame < frame_number && (
7769
0
                        (opcode_list_data->command_status == COMMAND_STATUS_NORMAL &&
7770
0
                    (bthci_cmd_data->response_in_frame == frame_number ||
7771
0
                    bthci_cmd_data->response_in_frame == bluetooth_max_disconnect_in_frame)) ||
7772
0
                        (opcode_list_data->command_status == COMMAND_STATUS_PENDING &&
7773
0
                    (bthci_cmd_data->pending_in_frame == frame_number ||
7774
0
                    ((bthci_cmd_data->response_in_frame == bluetooth_max_disconnect_in_frame ||
7775
0
                    bthci_cmd_data->response_in_frame > frame_number) &&
7776
0
                    bthci_cmd_data->pending_in_frame == bluetooth_max_disconnect_in_frame))) ||
7777
0
                        (opcode_list_data->command_status == COMMAND_STATUS_RESULT &&
7778
0
                    (bthci_cmd_data->response_in_frame == frame_number ||
7779
0
                    ((bthci_cmd_data->response_in_frame == bluetooth_max_disconnect_in_frame &&
7780
0
                    bthci_cmd_data->pending_in_frame == bluetooth_max_disconnect_in_frame))))
7781
0
                    )) {
7782
0
                lastest_bthci_cmd_data = bthci_cmd_data;
7783
0
                if (((opcode_list_data->command_status == COMMAND_STATUS_RESULT ||
7784
0
                        opcode_list_data->command_status == COMMAND_STATUS_NORMAL) &&
7785
0
                        bthci_cmd_data->response_in_frame == frame_number) ||
7786
0
                        (opcode_list_data->command_status == COMMAND_STATUS_PENDING &&
7787
0
                        bthci_cmd_data->pending_in_frame == frame_number)) {
7788
0
                    opcode_list_frame = NULL;
7789
0
                    break;
7790
0
                }
7791
0
            }
7792
7793
1
            if (bthci_cmd_data && bthci_cmd_data->command_in_frame < frame_number) {
7794
0
                i_frame_number = bthci_cmd_data->command_in_frame - 1;
7795
0
                if (i_frame_number < 1)
7796
0
                    bthci_cmd_data = NULL;
7797
1
            } else {
7798
1
                bthci_cmd_data = NULL;
7799
1
            }
7800
1
        } while (bthci_cmd_data);
7801
7802
1
        if (opcode_list_frame)
7803
1
            opcode_list_frame = wmem_list_frame_next(opcode_list_frame);
7804
1
    }
7805
7806
10
    if (lastest_bthci_cmd_data) {
7807
0
        proto_item  *sub_item;
7808
0
        uint32_t     frame_number;
7809
0
        nstime_t     delta;
7810
7811
0
        frame_number = pinfo->num;
7812
7813
0
        if (evt_code == 0x0e /* Command Complete */ && opcode != UINT32_MAX && opcode >> 10 != HCI_OGF_VENDOR_SPECIFIC) {
7814
0
            bluetooth_device_tap_t  *tap_device;
7815
0
            uint8_t status;
7816
7817
0
            status = tvb_get_uint8(tvb, 5);
7818
7819
0
            if (status == STATUS_SUCCESS && have_tap_listener(bluetooth_device_tap)) switch(opcode) {
7820
0
            case 0x0c03: /* Reset */
7821
7822
0
                tap_device = wmem_new(pinfo->pool, bluetooth_device_tap_t);
7823
0
                if (bluetooth_data) {
7824
0
                    tap_device->interface_id  = bluetooth_data->interface_id;
7825
0
                    tap_device->adapter_id    = bluetooth_data->adapter_id;
7826
0
                } else {
7827
0
                    tap_device->interface_id  = HCI_INTERFACE_DEFAULT;
7828
0
                    tap_device->adapter_id    = HCI_ADAPTER_DEFAULT;
7829
0
                }
7830
0
                tap_device->has_bd_addr = false;
7831
0
                tap_device->is_local = true;
7832
0
                tap_device->type = BLUETOOTH_DEVICE_RESET;
7833
0
                tap_queue_packet(bluetooth_device_tap, pinfo, tap_device);
7834
7835
0
                break;
7836
0
            case 0x0c13: /* Change Local Name */
7837
7838
0
                tap_device = wmem_new(pinfo->pool, bluetooth_device_tap_t);
7839
0
                if (bluetooth_data) {
7840
0
                    tap_device->interface_id  = bluetooth_data->interface_id;
7841
0
                    tap_device->adapter_id    = bluetooth_data->adapter_id;
7842
0
                } else {
7843
0
                    tap_device->interface_id  = HCI_INTERFACE_DEFAULT;
7844
0
                    tap_device->adapter_id    = HCI_ADAPTER_DEFAULT;
7845
0
                }
7846
7847
0
                tap_device->has_bd_addr = false;
7848
0
                tap_device->is_local = true;
7849
0
                tap_device->type = BLUETOOTH_DEVICE_NAME;
7850
0
                tap_device->data.name = lastest_bthci_cmd_data->data.name;
7851
0
                tap_queue_packet(bluetooth_device_tap, pinfo, tap_device);
7852
7853
0
                if (!pinfo->fd->visited) {
7854
0
                    localhost_name_entry_t  *localhost_name_entry;
7855
0
                    wmem_tree_key_t      key[4];
7856
0
                    uint32_t             interface_id;
7857
0
                    uint32_t             adapter_id;
7858
7859
0
                    interface_id = bluetooth_data->interface_id;
7860
0
                    adapter_id   = bluetooth_data->adapter_id;
7861
7862
0
                    key[0].length = 1;
7863
0
                    key[0].key    = &interface_id;
7864
0
                    key[1].length = 1;
7865
0
                    key[1].key    = &adapter_id;
7866
0
                    key[2].length = 1;
7867
0
                    key[2].key    = &frame_number;
7868
0
                    key[3].length = 0;
7869
0
                    key[3].key    = NULL;
7870
7871
0
                    localhost_name_entry = (localhost_name_entry_t *) wmem_new(wmem_file_scope(), localhost_name_entry_t);
7872
0
                    localhost_name_entry->interface_id = interface_id;
7873
0
                    localhost_name_entry->adapter_id = adapter_id;
7874
0
                    localhost_name_entry->name = lastest_bthci_cmd_data->data.name;
7875
7876
0
                    wmem_tree_insert32_array(bluetooth_data->localhost_name, key, localhost_name_entry);
7877
0
                }
7878
0
                break;
7879
0
            case 0x0c18: /* Write Page Timeout */
7880
7881
0
                tap_device = wmem_new(pinfo->pool, bluetooth_device_tap_t);
7882
0
                if (bluetooth_data) {
7883
0
                    tap_device->interface_id  = bluetooth_data->interface_id;
7884
0
                    tap_device->adapter_id    = bluetooth_data->adapter_id;
7885
0
                } else {
7886
0
                    tap_device->interface_id  = HCI_INTERFACE_DEFAULT;
7887
0
                    tap_device->adapter_id    = HCI_ADAPTER_DEFAULT;
7888
0
                }
7889
0
                tap_device->has_bd_addr = false;
7890
0
                tap_device->is_local = true;
7891
0
                tap_device->type = BLUETOOTH_DEVICE_PAGE_TIMEOUT;
7892
0
                tap_device->data.page_timeout = lastest_bthci_cmd_data->data.page_timeout;
7893
0
                tap_queue_packet(bluetooth_device_tap, pinfo, tap_device);
7894
7895
0
                break;
7896
0
            case 0x0c1a: /* Write Scan Enable */
7897
7898
0
                tap_device = wmem_new(pinfo->pool, bluetooth_device_tap_t);
7899
0
                if (bluetooth_data) {
7900
0
                    tap_device->interface_id  = bluetooth_data->interface_id;
7901
0
                    tap_device->adapter_id    = bluetooth_data->adapter_id;
7902
0
                } else {
7903
0
                    tap_device->interface_id  = HCI_INTERFACE_DEFAULT;
7904
0
                    tap_device->adapter_id    = HCI_ADAPTER_DEFAULT;
7905
0
                }
7906
0
                tap_device->has_bd_addr = false;
7907
0
                tap_device->is_local = true;
7908
0
                tap_device->type = BLUETOOTH_DEVICE_SCAN;
7909
0
                tap_device->data.scan = lastest_bthci_cmd_data->data.scan;
7910
0
                tap_queue_packet(bluetooth_device_tap, pinfo, tap_device);
7911
7912
0
                break;
7913
0
            case 0x0c20: /* Write Authentication Enable */
7914
7915
0
                tap_device = wmem_new(pinfo->pool, bluetooth_device_tap_t);
7916
0
                if (bluetooth_data) {
7917
0
                    tap_device->interface_id  = bluetooth_data->interface_id;
7918
0
                    tap_device->adapter_id    = bluetooth_data->adapter_id;
7919
0
                } else {
7920
0
                    tap_device->interface_id  = HCI_INTERFACE_DEFAULT;
7921
0
                    tap_device->adapter_id    = HCI_ADAPTER_DEFAULT;
7922
0
                }
7923
0
                tap_device->has_bd_addr = false;
7924
0
                tap_device->is_local = true;
7925
0
                tap_device->type = BLUETOOTH_DEVICE_AUTHENTICATION;
7926
0
                tap_device->data.authentication = lastest_bthci_cmd_data->data.authentication;
7927
0
                tap_queue_packet(bluetooth_device_tap, pinfo, tap_device);
7928
7929
0
                break;
7930
0
            case 0x0c22: /* Write Encryption Mode */
7931
7932
0
                tap_device = wmem_new(pinfo->pool, bluetooth_device_tap_t);
7933
0
                if (bluetooth_data) {
7934
0
                    tap_device->interface_id  = bluetooth_data->interface_id;
7935
0
                    tap_device->adapter_id    = bluetooth_data->adapter_id;
7936
0
                } else {
7937
0
                    tap_device->interface_id  = HCI_INTERFACE_DEFAULT;
7938
0
                    tap_device->adapter_id    = HCI_ADAPTER_DEFAULT;
7939
0
                }
7940
0
                tap_device->has_bd_addr = false;
7941
0
                tap_device->is_local = true;
7942
0
                tap_device->type = BLUETOOTH_DEVICE_ENCRYPTION;
7943
0
                tap_device->data.encryption = lastest_bthci_cmd_data->data.encryption;
7944
0
                tap_queue_packet(bluetooth_device_tap, pinfo, tap_device);
7945
7946
0
                break;
7947
0
            case 0x0c24: /* Write Class Of Device */
7948
7949
0
                tap_device = wmem_new(pinfo->pool, bluetooth_device_tap_t);
7950
0
                if (bluetooth_data) {
7951
0
                    tap_device->interface_id  = bluetooth_data->interface_id;
7952
0
                    tap_device->adapter_id    = bluetooth_data->adapter_id;
7953
0
                } else {
7954
0
                    tap_device->interface_id  = HCI_INTERFACE_DEFAULT;
7955
0
                    tap_device->adapter_id    = HCI_ADAPTER_DEFAULT;
7956
0
                }
7957
0
                tap_device->has_bd_addr = false;
7958
0
                tap_device->is_local = true;
7959
0
                tap_device->type = BLUETOOTH_DEVICE_CLASS_OF_DEVICE;
7960
0
                tap_device->data.class_of_device = lastest_bthci_cmd_data->data.class_of_device;
7961
0
                tap_queue_packet(bluetooth_device_tap, pinfo, tap_device);
7962
7963
0
                break;
7964
0
            case 0x0c26: /* Write Voice Setting */
7965
7966
0
                tap_device = wmem_new(pinfo->pool, bluetooth_device_tap_t);
7967
0
                if (bluetooth_data) {
7968
0
                    tap_device->interface_id  = bluetooth_data->interface_id;
7969
0
                    tap_device->adapter_id    = bluetooth_data->adapter_id;
7970
0
                } else {
7971
0
                    tap_device->interface_id  = HCI_INTERFACE_DEFAULT;
7972
0
                    tap_device->adapter_id    = HCI_ADAPTER_DEFAULT;
7973
0
                }
7974
0
                tap_device->has_bd_addr = false;
7975
0
                tap_device->is_local = true;
7976
0
                tap_device->type = BLUETOOTH_DEVICE_VOICE_SETTING;
7977
0
                tap_device->data.voice_setting = lastest_bthci_cmd_data->data.voice_setting;
7978
0
                tap_queue_packet(bluetooth_device_tap, pinfo, tap_device);
7979
7980
0
                break;
7981
0
            case 0x0c33: /* Host Buffer Size */
7982
7983
0
                tap_device = wmem_new(pinfo->pool, bluetooth_device_tap_t);
7984
0
                if (bluetooth_data) {
7985
0
                    tap_device->interface_id  = bluetooth_data->interface_id;
7986
0
                    tap_device->adapter_id    = bluetooth_data->adapter_id;
7987
0
                } else {
7988
0
                    tap_device->interface_id  = HCI_INTERFACE_DEFAULT;
7989
0
                    tap_device->adapter_id    = HCI_ADAPTER_DEFAULT;
7990
0
                }
7991
0
                tap_device->has_bd_addr = false;
7992
0
                tap_device->is_local = true;
7993
0
                tap_device->type = BLUETOOTH_DEVICE_MTUS;
7994
0
                tap_device->data.mtus.acl_mtu     = lastest_bthci_cmd_data->data.mtus.acl_mtu;
7995
0
                tap_device->data.mtus.sco_mtu     = lastest_bthci_cmd_data->data.mtus.sco_mtu;
7996
0
                tap_device->data.mtus.acl_packets = lastest_bthci_cmd_data->data.mtus.acl_packets;
7997
0
                tap_device->data.mtus.sco_packets = lastest_bthci_cmd_data->data.mtus.sco_packets;
7998
0
                tap_queue_packet(bluetooth_device_tap, pinfo, tap_device);
7999
8000
0
                break;
8001
0
            case 0x0c45: /* Write Inquiry Mode */
8002
8003
0
                tap_device = wmem_new(pinfo->pool, bluetooth_device_tap_t);
8004
0
                if (bluetooth_data) {
8005
0
                    tap_device->interface_id  = bluetooth_data->interface_id;
8006
0
                    tap_device->adapter_id    = bluetooth_data->adapter_id;
8007
0
                } else {
8008
0
                    tap_device->interface_id  = HCI_INTERFACE_DEFAULT;
8009
0
                    tap_device->adapter_id    = HCI_ADAPTER_DEFAULT;
8010
0
                }
8011
0
                tap_device->has_bd_addr = false;
8012
0
                tap_device->is_local = true;
8013
0
                tap_device->type = BLUETOOTH_DEVICE_INQUIRY_MODE;
8014
0
                tap_device->data.inquiry_mode = lastest_bthci_cmd_data->data.inquiry_mode;
8015
0
                tap_queue_packet(bluetooth_device_tap, pinfo, tap_device);
8016
8017
0
                break;
8018
0
            case 0x0c56: /* Write Simple Pairing */
8019
8020
0
                tap_device = wmem_new(pinfo->pool, bluetooth_device_tap_t);
8021
0
                if (bluetooth_data) {
8022
0
                    tap_device->interface_id  = bluetooth_data->interface_id;
8023
0
                    tap_device->adapter_id    = bluetooth_data->adapter_id;
8024
0
                } else {
8025
0
                    tap_device->interface_id  = HCI_INTERFACE_DEFAULT;
8026
0
                    tap_device->adapter_id    = HCI_ADAPTER_DEFAULT;
8027
0
                }
8028
0
                tap_device->has_bd_addr = false;
8029
0
                tap_device->is_local = true;
8030
0
                tap_device->type = BLUETOOTH_DEVICE_SIMPLE_PAIRING_MODE;
8031
0
                tap_device->data.simple_pairing_mode = lastest_bthci_cmd_data->data.simple_pairing_mode;
8032
0
                tap_queue_packet(bluetooth_device_tap, pinfo, tap_device);
8033
8034
0
                break;
8035
0
            }
8036
0
        }
8037
8038
0
        if (!pinfo->fd->visited && opcode_list_data->command_status == COMMAND_STATUS_PENDING &&
8039
0
                lastest_bthci_cmd_data->pending_in_frame == bluetooth_max_disconnect_in_frame) {
8040
0
            lastest_bthci_cmd_data->pending_in_frame = frame_number;
8041
0
            lastest_bthci_cmd_data->pending_abs_ts = pinfo->abs_ts;
8042
0
        }
8043
8044
0
        if (!pinfo->fd->visited && opcode_list_data->command_status == COMMAND_STATUS_NORMAL &&
8045
0
                lastest_bthci_cmd_data->response_in_frame == bluetooth_max_disconnect_in_frame) {
8046
0
            lastest_bthci_cmd_data->response_in_frame = frame_number;
8047
0
            lastest_bthci_cmd_data->response_abs_ts = pinfo->abs_ts;
8048
0
        }
8049
8050
0
        if (!pinfo->fd->visited && opcode_list_data->command_status == COMMAND_STATUS_RESULT &&
8051
0
                lastest_bthci_cmd_data->response_in_frame == bluetooth_max_disconnect_in_frame &&
8052
0
                lastest_bthci_cmd_data->pending_in_frame == bluetooth_max_disconnect_in_frame) {
8053
0
            lastest_bthci_cmd_data->response_in_frame = frame_number;
8054
0
            lastest_bthci_cmd_data->response_abs_ts = pinfo->abs_ts;
8055
0
        }
8056
8057
0
        if (lastest_bthci_cmd_data->pending_in_frame == frame_number) {
8058
0
            sub_item = proto_tree_add_uint(bthci_evt_tree, hf_command_in_frame, tvb, 0, 0, lastest_bthci_cmd_data->command_in_frame);
8059
0
            proto_item_set_generated(sub_item);
8060
8061
0
            if (lastest_bthci_cmd_data->response_in_frame < bluetooth_max_disconnect_in_frame) {
8062
0
                sub_item = proto_tree_add_uint(bthci_evt_tree, hf_response_in_frame, tvb, 0, 0, lastest_bthci_cmd_data->response_in_frame);
8063
0
                proto_item_set_generated(sub_item);
8064
0
            }
8065
8066
0
            nstime_delta(&delta, &lastest_bthci_cmd_data->pending_abs_ts, &lastest_bthci_cmd_data->command_abs_ts);
8067
0
            sub_item = proto_tree_add_double(bthci_evt_tree, hf_command_pending_time_delta, tvb, 0, 0, nstime_to_msec(&delta));
8068
0
            proto_item_set_generated(sub_item);
8069
8070
0
            if (lastest_bthci_cmd_data->response_in_frame < bluetooth_max_disconnect_in_frame) {
8071
0
                nstime_delta(&delta, &lastest_bthci_cmd_data->response_abs_ts, &lastest_bthci_cmd_data->pending_abs_ts);
8072
0
                sub_item = proto_tree_add_double(bthci_evt_tree, hf_pending_response_time_delta, tvb, 0, 0, nstime_to_msec(&delta));
8073
0
                proto_item_set_generated(sub_item);
8074
0
            }
8075
0
        }
8076
8077
0
        if (lastest_bthci_cmd_data->response_in_frame == frame_number) {
8078
0
            sub_item = proto_tree_add_uint(bthci_evt_tree, hf_command_in_frame, tvb, 0, 0, lastest_bthci_cmd_data->command_in_frame);
8079
0
            proto_item_set_generated(sub_item);
8080
8081
0
            if (lastest_bthci_cmd_data->pending_in_frame < bluetooth_max_disconnect_in_frame) {
8082
0
                sub_item = proto_tree_add_uint(bthci_evt_tree, hf_pending_in_frame, tvb, 0, 0, lastest_bthci_cmd_data->pending_in_frame);
8083
0
                proto_item_set_generated(sub_item);
8084
8085
0
                nstime_delta(&delta, &lastest_bthci_cmd_data->response_abs_ts, &lastest_bthci_cmd_data->pending_abs_ts);
8086
0
                sub_item = proto_tree_add_double(bthci_evt_tree, hf_pending_response_time_delta, tvb, 0, 0, nstime_to_msec(&delta));
8087
0
                proto_item_set_generated(sub_item);
8088
0
            }
8089
8090
0
            nstime_delta(&delta, &lastest_bthci_cmd_data->response_abs_ts, &lastest_bthci_cmd_data->command_abs_ts);
8091
0
            sub_item = proto_tree_add_double(bthci_evt_tree, hf_command_response_time_delta, tvb, 0, 0, nstime_to_msec(&delta));
8092
0
            proto_item_set_generated(sub_item);
8093
0
        }
8094
0
    }
8095
8096
10
    return offset;
8097
10
}
8098
8099
8100
/* Register the protocol with Wireshark */
8101
8102
void
8103
proto_register_bthci_evt(void)
8104
14
{
8105
14
    module_t         *module;
8106
14
    expert_module_t  *expert_bthci_evt;
8107
8108
    /* Setup list of header fields  See Section 1.6.1 for details*/
8109
14
    static hf_register_info hf[] = {
8110
14
        { &hf_bthci_evt_code,
8111
14
          { "Event Code",            "bthci_evt.code",
8112
14
            FT_UINT8, BASE_HEX | BASE_EXT_STRING, &bthci_evt_evt_code_vals_ext, 0x0,
8113
14
            NULL, HFILL }
8114
14
        },
8115
14
        { &hf_bthci_evt_param_length,
8116
14
          { "Parameter Total Length", "bthci_evt.param_length",
8117
14
            FT_UINT8, BASE_DEC, NULL, 0x0,
8118
14
            NULL, HFILL }
8119
14
        },
8120
14
        { &hf_bthci_evt_num_command_packets,
8121
14
          { "Number of Allowed Command Packets", "bthci_evt.num_command_packets",
8122
14
            FT_UINT8, BASE_DEC, NULL, 0x0,
8123
14
            NULL, HFILL }
8124
14
        },
8125
14
        { &hf_bthci_evt_num_handles,
8126
14
          { "Number of Connection Handles", "bthci_evt.num_handles",
8127
14
            FT_UINT8, BASE_DEC, NULL, 0x0,
8128
14
            "Number of Connection Handles and Num_HCI_Data_Packets parameter pairs", HFILL }
8129
14
        },
8130
14
        { &hf_bthci_evt_connection_handle,
8131
14
          { "Connection Handle",            "bthci_evt.connection_handle",
8132
14
            FT_UINT16, BASE_HEX, NULL, 0x0,
8133
14
            NULL, HFILL }
8134
14
        },
8135
8136
14
        { &hf_bthci_evt_num_compl_packets,
8137
14
          { "Number of Completed Packets", "bthci_evt.num_compl_packets",
8138
14
            FT_UINT16, BASE_DEC, NULL, 0x0,
8139
14
            "The number of HCI Data Packets that have been completed", HFILL }
8140
14
        },
8141
8142
14
        { &hf_bthci_evt_opcode,
8143
14
          { "Command Opcode",               "bthci_evt.opcode",
8144
14
            FT_UINT16, BASE_HEX|BASE_EXT_STRING, &bthci_cmd_opcode_vals_ext, 0x0,
8145
14
            "HCI Command Opcode", HFILL }
8146
14
        },
8147
14
        { &hf_bthci_evt_ogf,
8148
14
          { "Opcode Group Field",           "bthci_evt.opcode.ogf",
8149
14
            FT_UINT16, BASE_HEX|BASE_EXT_STRING, &bthci_cmd_ogf_vals_ext, 0xfc00,
8150
14
            NULL, HFILL }
8151
14
        },
8152
14
        { &hf_bthci_evt_ocf_link_control,
8153
14
          { "Opcode Command Field",           "bthci_evt.opcode.ocf",
8154
14
            FT_UINT16, BASE_HEX | BASE_EXT_STRING, &bthci_cmd_ocf_link_control_vals_ext, 0x03ff,
8155
14
            NULL, HFILL }
8156
14
        },
8157
14
        { &hf_bthci_evt_ocf_link_policy,
8158
14
          { "Opcode Command Field",           "bthci_evt.opcode.ocf",
8159
14
            FT_UINT16, BASE_HEX | BASE_EXT_STRING, &bthci_cmd_ocf_link_policy_vals_ext, 0x03ff,
8160
14
            NULL, HFILL }
8161
14
        },
8162
14
        { &hf_bthci_evt_ocf_host_controller_and_baseband,
8163
14
          { "Opcode Command Field",           "bthci_evt.opcode.ocf",
8164
14
            FT_UINT16, BASE_HEX | BASE_EXT_STRING, &bthci_cmd_ocf_host_controller_and_baseband_vals_ext, 0x03ff,
8165
14
            NULL, HFILL }
8166
14
        },
8167
14
        { &hf_bthci_evt_ocf_informational,
8168
14
          { "Opcode Command Field",           "bthci_evt.opcode.ocf",
8169
14
            FT_UINT16, BASE_HEX | BASE_EXT_STRING, &bthci_cmd_ocf_informational_vals_ext, 0x03ff,
8170
14
            NULL, HFILL }
8171
14
        },
8172
14
        { &hf_bthci_evt_ocf_status,
8173
14
          { "Opcode Command Field",           "bthci_evt.opcode.ocf",
8174
14
            FT_UINT16, BASE_HEX | BASE_EXT_STRING, &bthci_cmd_ocf_status_vals_ext, 0x03ff,
8175
14
            NULL, HFILL }
8176
14
        },
8177
14
        { &hf_bthci_evt_ocf_testing,
8178
14
          { "Opcode Command Field",           "bthci_evt.opcode.ocf",
8179
14
            FT_UINT16, BASE_HEX | BASE_EXT_STRING, &bthci_cmd_ocf_testing_vals_ext, 0x03ff,
8180
14
            NULL, HFILL }
8181
14
        },
8182
14
        { &hf_bthci_evt_ocf_low_energy,
8183
14
          { "Opcode Command Field",           "bthci_evt.opcode.ocf",
8184
14
            FT_UINT16, BASE_HEX | BASE_EXT_STRING, &bthci_cmd_ocf_low_energy_vals_ext, 0x03ff,
8185
14
            NULL, HFILL }
8186
14
        },
8187
14
        { &hf_bthci_evt_ocf_logo_testing,
8188
14
          { "Opcode Command Field",           "bthci_evt.opcode.ocf",
8189
14
            FT_UINT16, BASE_HEX, NULL, 0x03ff,
8190
14
            NULL, HFILL }
8191
14
        },
8192
14
        { &hf_bthci_evt_ocf,
8193
14
          { "Opcode Command Field",           "bthci_evt.opcode.ocf",
8194
14
            FT_UINT16, BASE_HEX, NULL, 0x03ff,
8195
14
            NULL, HFILL }
8196
14
        },
8197
14
        { &hf_bthci_evt_ret_params,
8198
14
          { "Return Parameter",       "bthci_evt.ret_params",
8199
14
            FT_NONE, BASE_NONE, NULL, 0x0,
8200
14
            NULL, HFILL }
8201
14
        },
8202
14
        { &hf_bthci_evt_status,
8203
14
          { "Status",           "bthci_evt.status",
8204
14
            FT_UINT8, BASE_HEX|BASE_EXT_STRING, &bthci_cmd_status_vals_ext, 0x0,
8205
14
            NULL, HFILL }
8206
14
        },
8207
14
        { &hf_bthci_evt_status_pending,
8208
14
          { "Status", "bthci_evt.status",
8209
14
            FT_UINT8, BASE_HEX, VALS(bthci_cmd_status_pending_vals), 0x0,
8210
14
            NULL, HFILL }
8211
14
        },
8212
14
        { &hf_bthci_evt_bd_addr,
8213
14
          { "BD_ADDR",          "bthci_evt.bd_addr",
8214
14
            FT_ETHER, BASE_NONE, NULL, 0x0,
8215
14
            "Bluetooth Device Address", HFILL}
8216
14
        },
8217
14
        { &hf_bthci_evt_link_type,
8218
14
          { "Link Type", "bthci_evt.link_type",
8219
14
            FT_UINT8, BASE_HEX, VALS(evt_link_types), 0x0,
8220
14
            NULL, HFILL }
8221
14
        },
8222
14
        { &hf_bthci_evt_encryption_mode,
8223
14
          { "Encryption Mode",  "bthci_evt.encryption_mode",
8224
14
            FT_UINT8, BASE_HEX, VALS(evt_encryption_modes), 0x0,
8225
14
            NULL, HFILL }
8226
14
        },
8227
14
        { &hf_bthci_evt_reason,
8228
14
          { "Reason",           "bthci_evt.reason",
8229
14
            FT_UINT8, BASE_HEX|BASE_EXT_STRING, &bthci_cmd_status_vals_ext, 0x0,
8230
14
            NULL, HFILL }
8231
14
        },
8232
14
        { &hf_bthci_evt_remote_name,
8233
14
          { "Remote Name",           "bthci_evt.remote_name",
8234
14
            FT_STRINGZ, BASE_NONE, NULL, 0x0,
8235
14
            "Userfriendly descriptive name for the remote device", HFILL }
8236
14
        },
8237
14
        { &hf_bthci_evt_encryption_enable,
8238
14
          { "Encryption Enable",        "bthci_evt.encryption_enable",
8239
14
            FT_UINT8, BASE_HEX, VALS(evt_encryption_enable), 0x0,
8240
14
            NULL, HFILL }
8241
14
        },
8242
14
        { &hf_bthci_evt_key_flag,
8243
14
          { "Key Flag",        "bthci_evt.key_flag",
8244
14
            FT_UINT8, BASE_HEX, VALS(evt_key_flag), 0x0,
8245
14
            NULL, HFILL }
8246
14
        },
8247
14
        { &hf_bthci_evt_vers_nr,
8248
14
          { "LMP Version",        "bthci_evt.lmp_vers_nr",
8249
14
            FT_UINT8, BASE_HEX, VALS(bthci_evt_lmp_version), 0x0,
8250
14
            "Version of the Current LMP", HFILL }
8251
14
        },
8252
14
        { &hf_bthci_bthci_evt_hci_version,
8253
14
          { "HCI Version",        "bthci_evt.hci_vers_nr",
8254
14
            FT_UINT8, BASE_HEX, VALS(bthci_evt_hci_version), 0x0,
8255
14
            "Version of the Current HCI", HFILL }
8256
14
        },
8257
14
        { &hf_bthci_evt_hci_revision,
8258
14
          { "HCI Revision",        "bthci_evt.hci_vers_nr",
8259
14
            FT_UINT16, BASE_DEC, NULL, 0x0,
8260
14
            "Revision of the Current HCI", HFILL }
8261
14
        },
8262
14
        { &hf_bthci_evt_comp_id,
8263
14
          { "Manufacturer Name",        "bthci_evt.comp_id",
8264
14
            FT_UINT16, BASE_HEX | BASE_EXT_STRING, &bluetooth_company_id_vals_ext, 0x0,
8265
14
            "Manufacturer Name of Bluetooth Hardware", HFILL }
8266
14
        },
8267
14
        { &hf_bthci_evt_sub_vers_nr,
8268
14
          { "LMP Subversion",        "bthci_evt.lmp_sub_vers_nr",
8269
14
            FT_UINT16, BASE_DEC, NULL, 0x0,
8270
14
            "Subversion of the Current LMP", HFILL }
8271
14
        },
8272
14
        { &hf_bthci_evt_flags,
8273
14
          { "Flags",        "bthci_evt.flags",
8274
14
            FT_UINT8, BASE_HEX, NULL, 0x0,
8275
14
            NULL, HFILL }
8276
14
        },
8277
14
        { &hf_bthci_evt_service_type,
8278
14
          { "Service Type",        "bthci_evt.service_type",
8279
14
            FT_UINT8, BASE_HEX, VALS(evt_service_types), 0x0,
8280
14
            NULL, HFILL }
8281
14
        },
8282
14
        { &hf_bthci_evt_token_rate,
8283
14
          { "Available Token Rate",        "bthci_evt.token_rate",
8284
14
            FT_UINT32, BASE_DEC, NULL, 0x0,
8285
14
            "Available Token Rate, in bytes per second", HFILL }
8286
14
        },
8287
14
        { &hf_bthci_evt_peak_bandwidth,
8288
14
          { "Available Peak Bandwidth",        "bthci_evt.peak_bandwidth",
8289
14
            FT_UINT32, BASE_DEC, NULL, 0x0,
8290
14
            "Available Peak Bandwidth, in bytes per second", HFILL }
8291
14
        },
8292
14
        { &hf_bthci_evt_latency,
8293
14
          { "Available Latency",        "bthci_evt.latency",
8294
14
            FT_UINT32, BASE_DEC, NULL, 0x0,
8295
14
            "Available Latency, in microseconds", HFILL }
8296
14
        },
8297
14
        { &hf_bthci_evt_delay_variation,
8298
14
          { "Available Delay Variation",        "bthci_evt.delay_variation",
8299
14
            FT_UINT32, BASE_DEC, NULL, 0x0,
8300
14
            "Available Delay Variation, in microseconds", HFILL }
8301
14
        },
8302
14
        { &hf_bthci_evt_hardware_code,
8303
14
          { "Hardware Code",        "bthci_evt.hardware_code",
8304
14
            FT_UINT8, BASE_HEX, NULL, 0x0,
8305
14
            "Hardware Code (implementation specific)", HFILL }
8306
14
        },
8307
14
        { &hf_bthci_evt_role,
8308
14
          { "Role",        "bthci_evt.role",
8309
14
            FT_UINT8, BASE_HEX, VALS(evt_role_vals), 0x0,
8310
14
            NULL, HFILL }
8311
14
        },
8312
14
        { &hf_bthci_evt_curr_mode,
8313
14
          { "Current Mode",        "bthci_evt.current_mode",
8314
14
            FT_UINT8, BASE_HEX, VALS(evt_modes), 0x0,
8315
14
            NULL, HFILL }
8316
14
        },
8317
14
        { &hf_bthci_evt_interval,
8318
14
          { "Interval",        "bthci_evt.interval",
8319
14
            FT_UINT16, BASE_CUSTOM, CF_FUNC(bluetooth_unit_0p625_ms), 0x0,
8320
14
            "Interval - Number of Baseband slots", HFILL }
8321
14
        },
8322
14
        { &hf_bthci_evt_link_key,
8323
14
          { "Link Key",        "bthci_evt.link_key",
8324
14
            FT_BYTES, BASE_NONE, NULL, 0x0,
8325
14
            "Link Key for the associated BD_ADDR", HFILL }
8326
14
        },
8327
14
        { &hf_bthci_evt_key_type,
8328
14
          { "Key Type",        "bthci_evt.key_type",
8329
14
            FT_UINT8, BASE_HEX, VALS(evt_key_types), 0x0,
8330
14
            NULL, HFILL }
8331
14
        },
8332
14
        { &hf_bthci_evt_max_slots,
8333
14
          { "Maximum Number of Slots",        "bthci_evt.max_slots",
8334
14
            FT_UINT8, BASE_DEC, NULL, 0x0,
8335
14
            "Maximum Number of slots allowed for baseband packets", HFILL }
8336
14
        },
8337
14
        { &hf_bthci_evt_clock_offset,
8338
14
          { "Clock Offset",        "bthci_evt.clock_offset",
8339
14
            FT_UINT16, BASE_HEX, NULL, 0x7FFF,
8340
14
            "Bit 2-16 of the Clock Offset between CLKNPeripheral-CLK", HFILL }
8341
14
        },
8342
14
        { &hf_bthci_evt_page_scan_mode,
8343
14
          { "Page Scan Mode",        "bthci_evt.page_scan_mode",
8344
14
            FT_UINT8, BASE_HEX, VALS(bthci_cmd_page_scan_modes), 0x0,
8345
14
            NULL, HFILL }
8346
14
        },
8347
14
        { &hf_bthci_evt_page_scan_repetition_mode,
8348
14
          { "Page Scan Repetition Mode",        "bthci_evt.page_scan_repetition_mode",
8349
14
            FT_UINT8, BASE_HEX, VALS(bthci_cmd_page_scan_repetition_modes), 0x0,
8350
14
            NULL, HFILL }
8351
14
        },
8352
14
        { &hf_bthci_evt_reserved,
8353
14
          { "Reserved",        "bthci_evt.reserved",
8354
14
            FT_NONE, BASE_NONE, NULL, 0x0,
8355
14
            NULL, HFILL }
8356
14
        },
8357
14
        { &hf_bthci_evt_page_scan_period_mode,
8358
14
          { "Page Scan Period Mode",        "bthci_evt.page_scan_period_mode",
8359
14
            FT_UINT8, BASE_HEX, VALS(bthci_cmd_page_scan_period_modes), 0x0,
8360
14
            NULL, HFILL }
8361
14
        },
8362
14
        { &hf_packet_type_acl,
8363
14
          { "Packet Type for ACL",               "bthci_evt.packet_type",
8364
14
            FT_UINT16, BASE_HEX, NULL, 0,
8365
14
            NULL, HFILL }
8366
14
        },
8367
14
        { &hf_packet_type_acl_dh5,
8368
14
          { "DH5 may be used",                   "bthci_evt.packet_type.dh5",
8369
14
            FT_BOOLEAN, 16, NULL, 0x8000,
8370
14
            NULL, HFILL }
8371
14
        },
8372
14
        { &hf_packet_type_acl_dm5,
8373
14
          { "DM5 may be used",                   "bthci_evt.packet_type.dm5",
8374
14
            FT_BOOLEAN, 16, NULL, 0x4000,
8375
14
            NULL, HFILL }
8376
14
        },
8377
14
        { &hf_packet_type_acl_3dh5,
8378
14
          { "3-DH5 shall NOT be used",           "bthci_evt.packet_type.3dh5",
8379
14
            FT_BOOLEAN, 16, NULL, 0x2000,
8380
14
            NULL, HFILL }
8381
14
        },
8382
14
        { &hf_packet_type_acl_2dh5,
8383
14
          { "2-DH5 shall NOT be used",           "bthci_evt.packet_type.2dh5",
8384
14
            FT_BOOLEAN, 16, NULL, 0x1000,
8385
14
            NULL, HFILL }
8386
14
        },
8387
14
        { &hf_packet_type_acl_dh3,
8388
14
          { "DH3 may be used",                   "bthci_evt.packet_type.dh3",
8389
14
            FT_BOOLEAN, 16, NULL, 0x0800,
8390
14
            NULL, HFILL }
8391
14
        },
8392
14
        { &hf_packet_type_acl_dm3,
8393
14
          { "DM3 may be used",                   "bthci_evt.packet_type.dm3",
8394
14
            FT_BOOLEAN, 16, NULL, 0x0400,
8395
14
            NULL, HFILL }
8396
14
        },
8397
14
        { &hf_packet_type_acl_3dh3,
8398
14
          { "3-DH3 shall NOT be used",           "bthci_evt.packet_type.3dh3",
8399
14
            FT_BOOLEAN, 16, NULL, 0x0200,
8400
14
            NULL, HFILL }
8401
14
        },
8402
14
        { &hf_packet_type_acl_2dh3,
8403
14
          { "2-DH3 shall NOT be used",           "bthci_evt.packet_type.2dh3",
8404
14
            FT_BOOLEAN, 16, NULL, 0x0100,
8405
14
            NULL, HFILL }
8406
14
        },
8407
14
        { &hf_packet_type_acl_reserved_5_7,
8408
14
          { "Reserved",                          "bthci_evt.packet_type.reserved_5_7",
8409
14
            FT_UINT16, BASE_HEX, NULL, 0x00E0,
8410
14
            NULL, HFILL }
8411
14
        },
8412
14
        { &hf_packet_type_acl_dh1,
8413
14
          { "DH1 may be used",                   "bthci_evt.packet_type.dh1",
8414
14
            FT_BOOLEAN, 16, NULL, 0x0010,
8415
14
            NULL, HFILL }
8416
14
        },
8417
14
        { &hf_packet_type_acl_dm1,
8418
14
          { "DM1 may be used",                   "bthci_evt.packet_type.dm1",
8419
14
            FT_BOOLEAN, 16, NULL, 0x0008,
8420
14
            NULL, HFILL }
8421
14
        },
8422
14
        { &hf_packet_type_acl_3dh1,
8423
14
          { "3-DH1 shall NOT be used",           "bthci_evt.packet_type.3dh1",
8424
14
            FT_BOOLEAN, 16, NULL, 0x0004,
8425
14
            NULL, HFILL }
8426
14
        },
8427
14
        { &hf_packet_type_acl_2dh1,
8428
14
          { "2-DH1 shall NOT be used",           "bthci_evt.packet_type.2dh1",
8429
14
            FT_BOOLEAN, 16, NULL, 0x0002,
8430
14
            NULL, HFILL }
8431
14
        },
8432
14
        { &hf_packet_type_acl_reserved_0,
8433
14
          { "Reserved",                          "bthci_evt.packet_type.reserved_0",
8434
14
            FT_BOOLEAN, 16, NULL, 0x0001,
8435
14
            NULL, HFILL }
8436
14
        },
8437
14
        { &hf_packet_type_sco,
8438
14
          { "Packet Type for SCO",               "bthci_evt.packet_type",
8439
14
            FT_UINT16, BASE_HEX, NULL, 0,
8440
14
            NULL, HFILL }
8441
14
        },
8442
14
        { &hf_packet_type_sco_reserved_15_8,
8443
14
          { "Reserved",                          "bthci_evt.packet_type.reserved_15_8",
8444
14
            FT_UINT16, BASE_HEX, NULL, 0xFF00,
8445
14
            NULL, HFILL }
8446
14
        },
8447
14
        { &hf_packet_type_sco_hv3,
8448
14
          { "HV3",                               "bthci_evt.packet_type.hv3",
8449
14
            FT_BOOLEAN, 16, NULL, 0x0080,
8450
14
            NULL, HFILL }
8451
14
        },
8452
14
        { &hf_packet_type_sco_hv2,
8453
14
          { "HV2",                               "bthci_evt.packet_type.hv2",
8454
14
            FT_BOOLEAN, 16, NULL, 0x0040,
8455
14
            NULL, HFILL }
8456
14
        },
8457
14
        { &hf_packet_type_sco_hv1,
8458
14
          { "HV1",                               "bthci_evt.packet_type.hv1",
8459
14
            FT_BOOLEAN, 16, NULL, 0x0020,
8460
14
            NULL, HFILL }
8461
14
        },
8462
14
        { &hf_packet_type_sco_reserved_4_0,
8463
14
          { "Reserved",                          "bthci_evt.packet_type.reserved_4_0",
8464
14
            FT_UINT16, BASE_HEX, NULL, 0x001F,
8465
14
            NULL, HFILL }
8466
14
        },
8467
14
        { &hf_lmp_features,
8468
14
          { "LMP Features",        "bthci_evt.lmp_features",
8469
14
            FT_NONE, BASE_NONE, NULL, 0x00,
8470
14
            NULL, HFILL }
8471
14
        },
8472
14
        { &hf_lmp_feature_3slot_packets,
8473
14
          { "3-slot packets",                         "bthci_evt.lmp_features.3slot_packets",
8474
14
            FT_BOOLEAN, 8, NULL, 0x01,
8475
14
            NULL, HFILL }
8476
14
        },
8477
14
        { &hf_lmp_feature_5slot_packets,
8478
14
          { "5-slot packets",                         "bthci_evt.lmp_features.5slot_packets",
8479
14
            FT_BOOLEAN, 8, NULL, 0x02,
8480
14
            NULL, HFILL }
8481
14
        },
8482
14
        { &hf_lmp_feature_encryption,
8483
14
          { "Encryption",                             "bthci_evt.lmp_features.encryption",
8484
14
            FT_BOOLEAN, 8, NULL, 0x04,
8485
14
            NULL, HFILL }
8486
14
        },
8487
14
        { &hf_lmp_feature_slot_offset,
8488
14
          { "Slot Offset",                            "bthci_evt.lmp_features.slot_offset",
8489
14
            FT_BOOLEAN, 8, NULL, 0x08,
8490
14
            NULL, HFILL }
8491
14
        },
8492
14
        { &hf_lmp_feature_timing_accuracy,
8493
14
          { "Timing Accuracy",                        "bthci_evt.lmp_features.timing_accuracy",
8494
14
            FT_BOOLEAN, 8, NULL, 0x10,
8495
14
            NULL, HFILL }
8496
14
        },
8497
14
        { &hf_lmp_feature_role_switch,
8498
14
          { "Role Switch",                            "bthci_evt.lmp_features.role_switch",
8499
14
            FT_BOOLEAN, 8, NULL, 0x20,
8500
14
            NULL, HFILL }
8501
14
        },
8502
14
        { &hf_lmp_feature_hold_mode,
8503
14
          { "Hold Mode",                              "bthci_evt.lmp_features.hold_mode",
8504
14
            FT_BOOLEAN, 8, NULL, 0x40,
8505
14
            NULL, HFILL }
8506
14
        },
8507
14
        { &hf_lmp_feature_sniff_mode,
8508
14
          { "Sniff Mode",                             "bthci_evt.lmp_features.sniff_mode",
8509
14
            FT_BOOLEAN, 8, NULL, 0x80,
8510
14
            NULL, HFILL }
8511
14
        },
8512
14
        { &hf_lmp_feature_park_state,
8513
14
          { "Park Mode",                              "bthci_evt.lmp_features.park_state",
8514
14
            FT_BOOLEAN, 8, NULL, 0x01,
8515
14
            NULL, HFILL }
8516
14
        },
8517
14
        { &hf_lmp_feature_power_control_requests,
8518
14
          { "Power Control Requests",                 "bthci_evt.lmp_features.power_control_requests",
8519
14
            FT_BOOLEAN, 8, NULL, 0x02,
8520
14
            NULL, HFILL }
8521
14
        },
8522
14
        { &hf_lmp_feature_channel_quality_driven_data_rate,
8523
14
          { "Channel Quality Driven Data Rate",       "bthci_evt.lmp_features.channel_quality_driven_data_rate",
8524
14
            FT_BOOLEAN, 8, NULL, 0x04,
8525
14
            NULL, HFILL }
8526
14
        },
8527
14
        { &hf_lmp_feature_sco_link,
8528
14
          { "SCO Link",                               "bthci_evt.lmp_features.sco_link",
8529
14
            FT_BOOLEAN, 8, NULL, 0x08,
8530
14
            NULL, HFILL }
8531
14
        },
8532
14
        { &hf_lmp_feature_hv2_packets,
8533
14
          { "HV2 packets",                            "bthci_evt.lmp_features.hv2_packets",
8534
14
            FT_BOOLEAN, 8, NULL, 0x10,
8535
14
            NULL, HFILL }
8536
14
        },
8537
14
        { &hf_lmp_feature_hv3_packets,
8538
14
          { "HV3 packets",                            "bthci_evt.lmp_features.hv3_packets",
8539
14
            FT_BOOLEAN, 8, NULL, 0x20,
8540
14
            NULL, HFILL }
8541
14
        },
8542
14
        { &hf_lmp_feature_u_law_log_synchronous_data,
8543
14
          { "u-law Log Synchronous Data",             "bthci_evt.lmp_features.u_law_log_synchronous_data",
8544
14
            FT_BOOLEAN, 8, NULL, 0x40,
8545
14
            NULL, HFILL }
8546
14
        },
8547
14
        { &hf_lmp_feature_a_law_log_synchronous_data,
8548
14
          { "A-law Log Synchronous Data",             "bthci_evt.lmp_features.a_law_log_synchronous_data",
8549
14
            FT_BOOLEAN, 8, NULL, 0x80,
8550
14
            NULL, HFILL }
8551
14
        },
8552
14
        { &hf_lmp_feature_cvsd_synchronous_data,
8553
14
          { "CVSD Synchronous Data",                  "bthci_evt.lmp_features.cvsd_synchronous_data",
8554
14
            FT_BOOLEAN, 8, NULL, 0x01,
8555
14
            NULL, HFILL }
8556
14
        },
8557
14
        { &hf_lmp_feature_paging_parameter_negotiation,
8558
14
          { "Paging Parameter Negotiation",           "bthci_evt.lmp_features.paging_parameter_negotiation",
8559
14
            FT_BOOLEAN, 8, NULL, 0x02,
8560
14
            NULL, HFILL }
8561
14
        },
8562
14
        { &hf_lmp_feature_power_control,
8563
14
          { "Power Control",                          "bthci_evt.lmp_features.power_control",
8564
14
            FT_BOOLEAN, 8, NULL, 0x04,
8565
14
            NULL, HFILL }
8566
14
        },
8567
14
        { &hf_lmp_feature_transparent_synchronous_data,
8568
14
          { "Transparent Synchronous Data",           "bthci_evt.lmp_features.transparent_synchronous_data",
8569
14
            FT_BOOLEAN, 8, NULL, 0x08,
8570
14
            NULL, HFILL }
8571
14
        },
8572
14
        { &hf_lmp_feature_flow_control_lag,
8573
14
          { "Flow Control Lag",                       "bthci_evt.lmp_features.flow_control_lag",
8574
14
            FT_UINT8, BASE_DEC, NULL, 0x70,
8575
14
            NULL, HFILL }
8576
14
        },
8577
14
        { &hf_lmp_feature_broadcast_encryption,
8578
14
          { "Broadband Encryption",                   "bthci_evt.lmp_features.broadcast_encryption",
8579
14
            FT_BOOLEAN, 8, NULL, 0x80,
8580
14
            NULL, HFILL }
8581
14
        },
8582
14
        { &hf_lmp_feature_reserved_24,
8583
14
          { "Reserved",                               "bthci_evt.lmp_features.reserved.24",
8584
14
            FT_BOOLEAN, 8, NULL, 0x01,
8585
14
            NULL, HFILL }
8586
14
        },
8587
14
        { &hf_lmp_feature_edr_acl_2mbps_mode,
8588
14
          { "EDR ACL 2 Mbps Mode",                    "bthci_evt.lmp_features.edr_acl_2mbps_mode",
8589
14
            FT_BOOLEAN, 8, NULL, 0x02,
8590
14
            NULL, HFILL }
8591
14
        },
8592
14
        { &hf_lmp_feature_edr_acl_3mbps_mode,
8593
14
          { "EDR ACL 3 Mbps Mode",                    "bthci_evt.lmp_features.edr_acl_3mbps_mode",
8594
14
            FT_BOOLEAN, 8, NULL, 0x04,
8595
14
            NULL, HFILL }
8596
14
        },
8597
14
        { &hf_lmp_feature_enhanced_inquiry_scan,
8598
14
          { "Enhanced Inquiry Scan",                  "bthci_evt.lmp_features.enhanced_inquiry_scan",
8599
14
            FT_BOOLEAN, 8, NULL, 0x08,
8600
14
            NULL, HFILL }
8601
14
        },
8602
14
        { &hf_lmp_feature_interlaced_inquiry_scan,
8603
14
          { "Interlaced Inquiry Scan",                "bthci_evt.lmp_features.interlaced_inquiry_scan",
8604
14
            FT_BOOLEAN, 8, NULL, 0x10,
8605
14
            NULL, HFILL }
8606
14
        },
8607
14
        { &hf_lmp_feature_interlaced_page_scan,
8608
14
          { "Interlaced Page Scan",                   "bthci_evt.lmp_features.interlaced_page_scan",
8609
14
            FT_BOOLEAN, 8, NULL, 0x20,
8610
14
            NULL, HFILL }
8611
14
        },
8612
14
        { &hf_lmp_feature_rssi_with_inquiry_results,
8613
14
          { "RSSI with Inquiry Results",              "bthci_evt.lmp_features.rssi_with_inquiry_results",
8614
14
            FT_BOOLEAN, 8, NULL, 0x40,
8615
14
            NULL, HFILL }
8616
14
        },
8617
14
        { &hf_lmp_feature_ev3_packets,
8618
14
          { "EV3 Packets",                            "bthci_evt.lmp_features.ev3_packets",
8619
14
            FT_BOOLEAN, 8, NULL, 0x80,
8620
14
            NULL, HFILL }
8621
14
        },
8622
14
        { &hf_lmp_feature_ev4_packets,
8623
14
          { "EV4 Packets",                            "bthci_evt.lmp_features.ev4_packets",
8624
14
            FT_BOOLEAN, 8, NULL, 0x01,
8625
14
            NULL, HFILL }
8626
14
        },
8627
14
        { &hf_lmp_feature_ev5_packets,
8628
14
          { "EV5 Packets",                            "bthci_evt.lmp_features.ev5_packets",
8629
14
            FT_BOOLEAN, 8, NULL, 0x02,
8630
14
            NULL, HFILL }
8631
14
        },
8632
14
        { &hf_lmp_feature_reserved_34,
8633
14
          { "Reserved",                               "bthci_evt.lmp_features.reserved.34",
8634
14
            FT_BOOLEAN, 8, NULL, 0x04,
8635
14
            NULL, HFILL }
8636
14
        },
8637
14
        { &hf_lmp_feature_afh_capable_peripheral,
8638
14
          { "AFH Capable Peripheral",                 "bthci_evt.lmp_features.afh_capable_peripheral",
8639
14
            FT_BOOLEAN, 8, NULL, 0x08,
8640
14
            NULL, HFILL }
8641
14
        },
8642
14
        { &hf_lmp_feature_afh_classification_peripheral,
8643
14
          { "AFH Classification Peripheral",          "bthci_evt.lmp_features.afh_classification_peripheral",
8644
14
            FT_BOOLEAN, 8, NULL, 0x10,
8645
14
            NULL, HFILL }
8646
14
        },
8647
14
        { &hf_lmp_feature_br_edr_not_supported,
8648
14
          { "BR/EDR Not Supported",                   "bthci_evt.lmp_features.br_edr_not_supported",
8649
14
            FT_BOOLEAN, 8, NULL, 0x20,
8650
14
            NULL, HFILL }
8651
14
        },
8652
14
        { &hf_lmp_feature_le_supported_controller,
8653
14
          { "LE Supported Controller",                "bthci_evt.lmp_features.le_supported_controller",
8654
14
            FT_BOOLEAN, 8, NULL, 0x40,
8655
14
            NULL, HFILL }
8656
14
        },
8657
14
        { &hf_lmp_feature_3slot_edr_acl_packets,
8658
14
          { "3-slot EDR ACL packets",                 "bthci_evt.lmp_features.3slot_edr_acl_packets",
8659
14
            FT_BOOLEAN, 8, NULL, 0x80,
8660
14
            NULL, HFILL }
8661
14
        },
8662
14
        { &hf_lmp_feature_5slot_edr_acl_packets,
8663
14
          { "5-slot EDR ACL packets",                 "bthci_evt.lmp_features.5slot_edr_acl_packets",
8664
14
            FT_BOOLEAN, 8, NULL, 0x01,
8665
14
            NULL, HFILL }
8666
14
        },
8667
14
        { &hf_lmp_feature_sniff_subrating,
8668
14
          { "Sniff Subrating",                        "bthci_evt.lmp_features.sniff_subrating",
8669
14
            FT_BOOLEAN, 8, NULL, 0x02,
8670
14
            NULL, HFILL }
8671
14
        },
8672
14
        { &hf_lmp_feature_pause_encryption,
8673
14
          { "Pause Encryption",                       "bthci_evt.lmp_features.pause_encryption",
8674
14
            FT_BOOLEAN, 8, NULL, 0x04,
8675
14
            NULL, HFILL }
8676
14
        },
8677
14
        { &hf_lmp_feature_afh_capable_central,
8678
14
          { "AFH Capable Central",                    "bthci_evt.lmp_features.afh_capable_central",
8679
14
            FT_BOOLEAN, 8, NULL, 0x08,
8680
14
            NULL, HFILL }
8681
14
        },
8682
14
        { &hf_lmp_feature_afh_classification_central,
8683
14
          { "AFH Classification Central",             "bthci_evt.lmp_features.afh_classification_central",
8684
14
            FT_BOOLEAN, 8, NULL, 0x10,
8685
14
            NULL, HFILL }
8686
14
        },
8687
14
        { &hf_lmp_feature_edr_esco_2mbps_mode,
8688
14
          { "EDR eSCO 2 Mbps Mode",                   "bthci_evt.lmp_features.edr_esco_2mbps_mode",
8689
14
            FT_BOOLEAN, 8, NULL, 0x20,
8690
14
            NULL, HFILL }
8691
14
        },
8692
14
        { &hf_lmp_feature_edr_esco_3mbps_mode,
8693
14
          { "EDR eSCO 3 Mbps Mode",                   "bthci_evt.lmp_features.edr_esco_3mbps_mode",
8694
14
            FT_BOOLEAN, 8, NULL, 0x40,
8695
14
            NULL, HFILL }
8696
14
        },
8697
14
        { &hf_lmp_feature_3slot_edr_esco_packets,
8698
14
          { "3-slot EDR eSCO Packets",                "bthci_evt.lmp_features.3slot_edr_esco_packets",
8699
14
            FT_BOOLEAN, 8, NULL, 0x80,
8700
14
            NULL, HFILL }
8701
14
        },
8702
14
        { &hf_lmp_feature_extended_inquiry_response,
8703
14
          { "Extended Inquiry Response",              "bthci_evt.lmp_features.extended_inquiry_response",
8704
14
            FT_BOOLEAN, 8, NULL, 0x01,
8705
14
            NULL, HFILL }
8706
14
        },
8707
14
        { &hf_lmp_feature_simultaneous_le_and_br_edr_controller,
8708
14
          {"Simultaneous LE and BR/EDR to Same Device Capable Controller", "bthci_evt.lmp_features.simultaneous_le_and_br_edr.controller",
8709
14
           FT_BOOLEAN, 8, NULL, 0x02,
8710
14
           NULL, HFILL}
8711
14
        },
8712
14
        { &hf_lmp_feature_reserved_50,
8713
14
          { "Reserved",                               "bthci_evt.lmp_features.reserved.50",
8714
14
            FT_BOOLEAN, 8, NULL, 0x04,
8715
14
            NULL, HFILL }
8716
14
        },
8717
14
        { &hf_lmp_feature_secure_simple_pairing,
8718
14
          { "Secure Simple Pairing",                  "bthci_evt.lmp_features.secure_simple_pairing",
8719
14
            FT_BOOLEAN, 8, NULL, 0x08,
8720
14
            NULL, HFILL }
8721
14
        },
8722
14
        { &hf_lmp_feature_encapsulated_pdu,
8723
14
          { "Encapsulated PDU",                       "bthci_evt.lmp_features.encapsulated_pdu",
8724
14
            FT_BOOLEAN, 8, NULL, 0x10,
8725
14
            NULL, HFILL }
8726
14
        },
8727
14
        { &hf_lmp_feature_erroneous_data_reporting,
8728
14
          { "Erroneous Data Reporting",               "bthci_evt.lmp_features.erroneous_data_reporting",
8729
14
            FT_BOOLEAN, 8, NULL, 0x20,
8730
14
            NULL, HFILL }
8731
14
        },
8732
14
        { &hf_lmp_feature_non_flushable_packet_boundary_flag,
8733
14
          { "Non-flushable Packet Boundary Flag",     "bthci_evt.lmp_features.non_flushable_packet_boundary_flag",
8734
14
            FT_BOOLEAN, 8, NULL, 0x40,
8735
14
            NULL, HFILL }
8736
14
        },
8737
14
        { &hf_lmp_feature_reserved_55,
8738
14
          { "Reserved",                               "bthci_evt.lmp_features.reserved.55",
8739
14
            FT_BOOLEAN, 8, NULL, 0x80,
8740
14
            NULL, HFILL }
8741
14
        },
8742
14
        { &hf_lmp_feature_link_supervision_timeout_changed_event,
8743
14
          { "Link Supervision Timeout Changed Event", "bthci_evt.lmp_features.supervision_timeout_changed_event",
8744
14
            FT_BOOLEAN, 8, NULL, 0x01,
8745
14
            NULL, HFILL }
8746
14
        },
8747
14
        { &hf_lmp_feature_inquiry_tx_power_level,
8748
14
          { "Inquiry TX Power Level",                 "bthci_evt.lmp_features.inquiry_tx_power_level",
8749
14
            FT_BOOLEAN, 8, NULL, 0x02,
8750
14
            NULL, HFILL }
8751
14
        },
8752
14
        { &hf_lmp_feature_enhanced_power_control,
8753
14
          { "Enhanced Power Control",                 "bthci_evt.lmp_features.enhanced_power_control",
8754
14
            FT_BOOLEAN, 8, NULL, 0x04,
8755
14
            NULL, HFILL }
8756
14
        },
8757
14
        { &hf_lmp_feature_reserved_59_62,
8758
14
          { "Reserved",                               "bthci_evt.lmp_features.reserved.59_62",
8759
14
            FT_BOOLEAN, 8, NULL, 0x78,
8760
14
            NULL, HFILL }
8761
14
        },
8762
14
        { &hf_lmp_feature_extended_features,
8763
14
          { "Extended Features",                      "bthci_evt.lmp_features.extended_features",
8764
14
            FT_BOOLEAN, 8, NULL, 0x80,
8765
14
            NULL, HFILL }
8766
14
        },
8767
14
        { &hf_lmp_feature_secure_simple_pairing_host,
8768
14
          {"Secure Simple Pairing Host",              "bthci_evt.lmp_features.secure_simple_pairing_host",
8769
14
           FT_BOOLEAN, 8, NULL, 0x01,
8770
14
           NULL, HFILL}
8771
14
        },
8772
14
        { &hf_lmp_feature_le_supported_host,
8773
14
          {"LE Supported Host",                            "bthci_evt.lmp_features.le_supported.host",
8774
14
           FT_BOOLEAN, 8, NULL, 0x02,
8775
14
           NULL, HFILL}
8776
14
        },
8777
14
        { &hf_lmp_feature_simultaneous_le_and_br_edr_host,
8778
14
          {"Simultaneous LE and BR/EDR to Same Device Capable Host", "bthci_evt.lmp_features.simultaneous_le_and_br_edr.host",
8779
14
           FT_BOOLEAN, 8, NULL, 0x04,
8780
14
           NULL, HFILL}
8781
14
        },
8782
14
        { &hf_lmp_feature_secure_connections_host,
8783
14
          {"Secure Connections Host", "bthci_evt.lmp_features.secure_connections_host",
8784
14
           FT_BOOLEAN, 8, NULL, 0x08,
8785
14
           NULL, HFILL}
8786
14
        },
8787
14
        { &hf_lmp_feature_reserved_68_71,
8788
14
          {"Reserved",                                "bthci_evt.lmp_features.reserved.68_71",
8789
14
           FT_UINT8, BASE_HEX, NULL, 0xF0,
8790
14
           NULL, HFILL}
8791
14
        },
8792
14
        { &hf_lmp_feature_cpb_central_operation,
8793
14
          {"Connectionless Peripheral Broadcast Central Operation", "bthci_evt.lmp_features.cpb_central_operation",
8794
14
           FT_BOOLEAN, 8, NULL, 0x01,
8795
14
           NULL, HFILL}
8796
14
        },
8797
14
        { &hf_lmp_feature_cpb_peripheral_operation,
8798
14
          {"Connectionless Peripheral Broadcast Peripheral Operation", "bthci_evt.lmp_features.cpb_peripheral_operation",
8799
14
           FT_BOOLEAN, 8, NULL, 0x02,
8800
14
           NULL, HFILL}
8801
14
        },
8802
14
        { &hf_lmp_feature_synchronization_train,
8803
14
          {"Synchronization Train",             "bthci_evt.lmp_features.synchronization_train",
8804
14
           FT_BOOLEAN, 8, NULL, 0x04,
8805
14
           NULL, HFILL}
8806
14
        },
8807
14
        { &hf_lmp_feature_synchronization_scan,
8808
14
          {"Synchronization Scan",              "bthci_evt.lmp_features.synchronization_scan",
8809
14
           FT_BOOLEAN, 8, NULL, 0x08,
8810
14
           NULL, HFILL}
8811
14
        },
8812
14
        { &hf_lmp_feature_inquiry_response_notification_event,
8813
14
          {"Inquiry Response Notification Event", "bthci_evt.lmp_features.inquiry_response_notification_event",
8814
14
           FT_BOOLEAN, 8, NULL, 0x10,
8815
14
           NULL, HFILL}
8816
14
        },
8817
14
        { &hf_lmp_feature_generalized_interlaced_scan,
8818
14
          {"Generalized Interlaced Scan",       "bthci_evt.lmp_features.generalized_interlaced_scan",
8819
14
           FT_BOOLEAN, 8, NULL, 0x20,
8820
14
           NULL, HFILL}
8821
14
        },
8822
14
        { &hf_lmp_feature_coarse_clock_adjustment,
8823
14
          {"Coarse Clock Adjustment",           "bthci_evt.lmp_features.coarse_clock_adjustment",
8824
14
           FT_BOOLEAN, 8, NULL, 0x40,
8825
14
           NULL, HFILL}
8826
14
        },
8827
14
        { &hf_lmp_feature_reserved_135,
8828
14
          {"Reserved",                          "bthci_evt.lmp_features.reserved_135",
8829
14
           FT_BOOLEAN, 8, NULL, 0x80,
8830
14
           NULL, HFILL}
8831
14
        },
8832
14
        { &hf_lmp_feature_secure_connections_controller,
8833
14
          {"Secure Connections Controller",     "bthci_evt.lmp_features.secure_connections_controller",
8834
14
           FT_BOOLEAN, 8, NULL, 0x01,
8835
14
           NULL, HFILL}
8836
14
        },
8837
14
        { &hf_lmp_feature_ping,
8838
14
          {"Ping",                              "bthci_evt.lmp_features.ping",
8839
14
           FT_BOOLEAN, 8, NULL, 0x02,
8840
14
           NULL, HFILL}
8841
14
        },
8842
14
        { &hf_lmp_feature_reserved_138,
8843
14
          {"Reserved",                          "bthci_evt.lmp_features.reserved_138",
8844
14
           FT_BOOLEAN, 8, NULL, 0x04,
8845
14
           NULL, HFILL}
8846
14
        },
8847
14
        { &hf_lmp_feature_train_nudging,
8848
14
          {"Train Nudging",                     "bthci_evt.lmp_features.train_nudging",
8849
14
           FT_BOOLEAN, 8, NULL, 0x08,
8850
14
           NULL, HFILL}
8851
14
        },
8852
14
        { &hf_lmp_feature_slot_availability_mask,
8853
14
          {"Slot Availability Mask",            "bthci_evt.lmp_features.slot_availability_mask",
8854
14
           FT_BOOLEAN, 8, NULL, 0x10,
8855
14
           NULL, HFILL}
8856
14
        },
8857
14
        { &hf_lmp_feature_reserved,
8858
14
          {"Reserved",                          "bthci_evt.lmp_features.reserved",
8859
14
           FT_BYTES, BASE_NONE, NULL, 0x0,
8860
14
           NULL, HFILL}
8861
14
        },
8862
14
        { &hf_bthci_evt_num_keys,
8863
14
          { "Number of Link Keys",        "bthci_evt.num_keys",
8864
14
            FT_UINT8, BASE_DEC, NULL, 0x0,
8865
14
            "Number of Link Keys contained", HFILL }
8866
14
        },
8867
14
        { &hf_bthci_evt_num_keys_read,
8868
14
          { "Number of Link Keys Read",        "bthci_evt.num_keys_read",
8869
14
            FT_UINT16, BASE_DEC, NULL, 0x0,
8870
14
            NULL, HFILL }
8871
14
        },
8872
14
        { &hf_bthci_evt_num_keys_deleted,
8873
14
          { "Number of Link Keys Deleted",        "bthci_evt.num_keys_deleted",
8874
14
            FT_UINT16, BASE_DEC, NULL, 0x0,
8875
14
            NULL, HFILL }
8876
14
        },
8877
14
        { &hf_bthci_evt_num_keys_written,
8878
14
          { "Number of Link Keys Written",        "bthci_evt.num_keys_written",
8879
14
            FT_UINT8, BASE_DEC, NULL, 0x0,
8880
14
            NULL, HFILL }
8881
14
        },
8882
14
        { &hf_bthci_evt_max_num_keys,
8883
14
          { "Max Num Keys",        "bthci_evt.max_num_keys",
8884
14
            FT_UINT16, BASE_DEC, NULL, 0x0,
8885
14
            "Total Number of Link Keys that the Host Controller can store", HFILL }
8886
14
        },
8887
14
        { &hf_bthci_evt_num_responses,
8888
14
          { "Number of responses",        "bthci_evt.num_responses",
8889
14
            FT_UINT8, BASE_DEC, NULL, 0x0,
8890
14
            NULL, HFILL }
8891
14
        },
8892
14
        { &hf_bthci_evt_link_policy_setting_switch,
8893
14
          { "Enable Role Switch", "bthci_evt.link_policy_switch",
8894
14
            FT_BOOLEAN, 16, NULL, 0x0001,
8895
14
            NULL, HFILL }
8896
14
        },
8897
14
        { &hf_bthci_evt_link_policy_setting_hold,
8898
14
          { "Enable Hold Mode", "bthci_evt.link_policy_hold",
8899
14
            FT_BOOLEAN, 16, NULL, 0x0002,
8900
14
            NULL, HFILL }
8901
14
        },
8902
14
        { &hf_bthci_evt_link_policy_setting_sniff,
8903
14
          { "Enable Sniff Mode", "bthci_evt.link_policy_sniff",
8904
14
            FT_BOOLEAN, 16, NULL, 0x0004,
8905
14
            NULL, HFILL }
8906
14
        },
8907
14
        { &hf_bthci_evt_link_policy_setting_park,
8908
14
          { "Enable Park Mode", "bthci_evt.link_policy_park",
8909
14
            FT_BOOLEAN, 16, NULL, 0x0008,
8910
14
            NULL, HFILL }
8911
14
        },
8912
14
        { &hf_bthci_evt_curr_role,
8913
14
          { "Current Role", "bthci_evt.curr_role",
8914
14
            FT_UINT8, BASE_HEX, VALS(evt_role_vals_handle), 0x0,
8915
14
            "Current role for this connection handle", HFILL }
8916
14
        },
8917
14
        { &hf_bthci_evt_pin_type,
8918
14
          { "PIN Type", "bthci_evt.pin_type",
8919
14
            FT_UINT8, BASE_HEX, VALS(evt_pin_types), 0x0,
8920
14
            "PIN Types", HFILL }
8921
14
        },
8922
14
        { &hf_bthci_evt_device_name,
8923
14
          { "Device Name",           "bthci_evt.device_name",
8924
14
            FT_STRINGZ, BASE_NONE, NULL, 0x0,
8925
14
            "Userfriendly descriptive name for the device", HFILL }
8926
14
        },
8927
14
        { &hf_bthci_evt_timeout,
8928
14
          { "Timeout",        "bthci_evt.timeout",
8929
14
            FT_UINT16, BASE_CUSTOM, CF_FUNC(bluetooth_unit_0p625_ms), 0x0,
8930
14
            "Number of Baseband slots for timeout.", HFILL }
8931
14
        },
8932
14
        { &hf_bthci_evt_scan_enable,
8933
14
          { "Scan", "bthci_evt.scan_enable",
8934
14
            FT_UINT8, BASE_HEX, VALS(bthci_cmd_scan_enable_values), 0x0,
8935
14
            "Scan Enable", HFILL }
8936
14
        },
8937
14
        { &hf_bthci_evt_authentication_enable,
8938
14
          { "Authentication", "bthci_evt.auth_enable",
8939
14
            FT_UINT8, BASE_HEX, VALS(evt_auth_enable_values), 0x0,
8940
14
            "Authentication Enable", HFILL }
8941
14
        },
8942
14
        { &hf_bthci_evt_sco_flow_cont_enable,
8943
14
          { "SCO Flow Control", "bthci_evt.sco_flow_cont_enable",
8944
14
            FT_UINT8, BASE_HEX, VALS(evt_enable_values), 0x0,
8945
14
            "SCO Flow Control Enable", HFILL }
8946
14
        },
8947
14
        { &hf_bthci_evt_window,
8948
14
          { "Window", "bthci_evt.window",
8949
14
            FT_UINT16, BASE_DEC, NULL, 0x0,
8950
14
            NULL, HFILL }
8951
14
        },
8952
14
        { &hf_bthci_evt_input_unused,
8953
14
          { "Unused bits", "bthci_evt.voice.unused",
8954
14
            FT_UINT16, BASE_HEX, NULL, 0xfc00,
8955
14
            NULL, HFILL }
8956
14
        },
8957
14
        { &hf_bthci_evt_input_coding,
8958
14
          { "Input Coding", "bthci_evt.voice.input_coding",
8959
14
            FT_UINT16, BASE_DEC | BASE_EXT_STRING, &bthci_cmd_input_coding_vals_ext, 0x0300,
8960
14
            NULL, HFILL }
8961
14
        },
8962
14
        { &hf_bthci_evt_input_data_format,
8963
14
          { "Input Data Format", "bthci_evt.voice.input_data_format",
8964
14
            FT_UINT16, BASE_DEC | BASE_EXT_STRING, &bthci_cmd_input_data_format_vals_ext, 0x00c0,
8965
14
            NULL, HFILL }
8966
14
        },
8967
14
        { &hf_bthci_evt_input_sample_size,
8968
14
          { "Input Sample Size", "bthci_evt.voice.input_sample_size",
8969
14
            FT_UINT16, BASE_DEC | BASE_EXT_STRING, &bthci_cmd_input_sample_size_vals_ext, 0x0020,
8970
14
            NULL, HFILL }
8971
14
        },
8972
14
        { &hf_bthci_evt_linear_pcm_bit_pos,
8973
14
          { "Linear PCM Bit Position", "bthci_evt.voice.linear_pcm_bit_pos",
8974
14
            FT_UINT16, BASE_DEC, NULL, 0x001c,
8975
14
            "# bit pos. that MSB of sample is away from starting at MSB", HFILL }
8976
14
        },
8977
14
        { &hf_bthci_evt_air_coding_format,
8978
14
          { "Air Coding Format", "bthci_evt.voice.air_coding_format",
8979
14
            FT_UINT16, BASE_DEC | BASE_EXT_STRING, &bthci_cmd_air_coding_format_vals_ext, 0x0003,
8980
14
            NULL, HFILL }
8981
14
        },
8982
14
        { &hf_bthci_evt_num_broadcast_retransm,
8983
14
          { "Num Broadcast Retran", "bthci_evt.num_broad_retran",
8984
14
            FT_UINT8, BASE_DEC, NULL, 0x0,
8985
14
            "Number of Broadcast Retransmissions", HFILL }
8986
14
        },
8987
14
        { &hf_bthci_evt_hold_mode_act_page,
8988
14
          { "Suspend Page Scan", "bthci_evt.hold_mode_page",
8989
14
            FT_BOOLEAN, 8, NULL, 0x1,
8990
14
            "Device can enter low power state", HFILL }
8991
14
        },
8992
14
        { &hf_bthci_evt_hold_mode_act_inquiry,
8993
14
          { "Suspend Inquiry Scan", "bthci_evt.hold_mode_inquiry",
8994
14
            FT_BOOLEAN, 8, NULL, 0x2,
8995
14
            "Device can enter low power state", HFILL }
8996
14
        },
8997
14
        { &hf_bthci_evt_hold_mode_act_periodic,
8998
14
          { "Suspend Periodic Inquiries", "bthci_evt.hold_mode_periodic",
8999
14
            FT_BOOLEAN, 8, NULL, 0x4,
9000
14
            "Device can enter low power state", HFILL }
9001
14
        },
9002
14
        { &hf_bthci_evt_transmit_power_level,
9003
14
          { "Transmit Power Level", "bthci_evt.transmit_power_level",
9004
14
            FT_INT8, BASE_DEC|BASE_UNIT_STRING, UNS(&units_dbm), 0x0,
9005
14
            NULL, HFILL }
9006
14
        },
9007
14
        { &hf_bthci_evt_max_transmit_power_level,
9008
14
          { "Maximum Transmit Power Level", "bthci_evt.max_transmit_power_level",
9009
14
            FT_INT8, BASE_DEC|BASE_UNIT_STRING, UNS(&units_dbm), 0x0,
9010
14
            NULL, HFILL }
9011
14
        },
9012
14
        { &hf_bthci_evt_num_supp_iac,
9013
14
          {"Num Support IAC", "bthci_evt.num_supp_iac",
9014
14
           FT_UINT8, BASE_DEC, NULL, 0x0,
9015
14
           "Num of supported IAC the device can simultaneously listen", HFILL }
9016
14
        },
9017
14
        { &hf_bthci_evt_num_curr_iac,
9018
14
          {"Num Current IAC", "bthci_evt.num_curr_iac",
9019
14
           FT_UINT8, BASE_DEC, NULL, 0x0,
9020
14
           "Num of IACs currently in use to simultaneously listen", HFILL }
9021
14
        },
9022
14
        { &hf_bthci_evt_iac_lap,
9023
14
          { "IAC LAP", "bthci_evt.iac_lap",
9024
14
            FT_UINT24, BASE_HEX, NULL, 0x0,
9025
14
            "LAP(s)used to create IAC", HFILL }
9026
14
        },
9027
14
        { &hf_bthci_evt_loopback_mode,
9028
14
          {"Loopback Mode", "bthci_evt.loopback_mode",
9029
14
           FT_UINT8, BASE_HEX, VALS(evt_loopback_modes), 0x0,
9030
14
           NULL, HFILL }
9031
14
        },
9032
14
        { &hf_bthci_evt_country_code,
9033
14
          {"Country Code", "bthci_evt.country_code",
9034
14
           FT_UINT8, BASE_HEX, VALS(evt_country_code_values), 0x0,
9035
14
           NULL, HFILL }
9036
14
        },
9037
14
        { &hf_bthci_evt_failed_contact_counter,
9038
14
          {"Failed Contact Counter", "bthci_evt.failed_contact_counter",
9039
14
           FT_UINT16, BASE_DEC, NULL, 0x0,
9040
14
           NULL, HFILL }
9041
14
        },
9042
14
        { &hf_bthci_evt_link_quality,
9043
14
          {"Link Quality", "bthci_evt.link_quality",
9044
14
           FT_UINT8, BASE_DEC, NULL, 0x0,
9045
14
           "Link Quality (0x00 - 0xFF Higher Value = Better Link)", HFILL }
9046
14
        },
9047
14
        { &hf_bthci_evt_rssi,
9048
14
          { "RSSI", "bthci_evt.rssi",
9049
14
            FT_INT8, BASE_DEC|BASE_UNIT_STRING, UNS(&units_dbm), 0x0,
9050
14
            NULL, HFILL }
9051
14
        },
9052
14
        { &hf_bthci_evt_host_data_packet_length_acl,
9053
14
          {"Host ACL Data Packet Length (bytes)", "bthci_evt.max_data_length_acl",
9054
14
           FT_UINT16, BASE_DEC, NULL, 0x0,
9055
14
           "Max Host ACL Data Packet length of data portion host is able to accept", HFILL }
9056
14
        },
9057
14
        { &hf_bthci_evt_host_data_packet_length_sco,
9058
14
          {"Host SCO Data Packet Length (bytes)", "bthci_evt.max_data_length_sco",
9059
14
           FT_UINT8, BASE_DEC, NULL, 0x0,
9060
14
           "Max Host SCO Data Packet length of data portion host is able to accept", HFILL }
9061
14
        },
9062
14
        { &hf_bthci_evt_host_total_num_acl_data_packets,
9063
14
          {"Host Total Num ACL Data Packets", "bthci_evt.max_data_num_acl",
9064
14
           FT_UINT16, BASE_DEC, NULL, 0x0,
9065
14
           "Total Number of HCI ACL Data Packets that can be stored in the data buffers of the Host", HFILL }
9066
14
        },
9067
14
        { &hf_bthci_evt_host_total_num_sco_data_packets,
9068
14
          {"Host Total Num SCO Data Packets", "bthci_evt.max_data_num_sco",
9069
14
           FT_UINT16, BASE_DEC, NULL, 0x0,
9070
14
           "Total Number of HCI SCO Data Packets that can be stored in the data buffers of the Host", HFILL }
9071
14
        },
9072
14
        { &hf_bthci_evt_page_number,
9073
14
          {"Page Number", "bthci_evt.page_number",
9074
14
           FT_UINT8, BASE_DEC, NULL, 0x0,
9075
14
           NULL, HFILL}
9076
14
        },
9077
14
        { &hf_bthci_evt_max_page_number,
9078
14
          {"Max Page Number", "bthci_evt.max_page_number",
9079
14
           FT_UINT8, BASE_DEC, NULL, 0x0,
9080
14
           NULL, HFILL}
9081
14
        },
9082
14
        { &hf_bthci_evt_local_supported_cmds,
9083
14
          { "Local Supported Commands",        "bthci_evt.local_supported_cmds",
9084
14
            FT_BYTES, BASE_NONE, NULL, 0x0,
9085
14
            NULL, HFILL }
9086
14
        },
9087
14
        { &hf_bthci_evt_fec_required,
9088
14
          {"FEC Required", "bthci_evt.fec_required",
9089
14
           FT_BOOLEAN, BASE_NONE, NULL, 0x0,
9090
14
           NULL, HFILL}
9091
14
        },
9092
14
        { &hf_bthci_evt_err_data_reporting,
9093
14
          {"Erroneous Data Reporting", "bthci_evt.err_data_reporting",
9094
14
           FT_UINT8, BASE_DEC, VALS(evt_enable_values), 0x0,
9095
14
           NULL, HFILL}
9096
14
        },
9097
14
        { &hf_bthci_evt_scan_type,
9098
14
          {"Scan Type", "bthci_evt.inq_scan_type",
9099
14
           FT_UINT8, BASE_DEC, VALS(evt_scan_types), 0x0,
9100
14
           NULL, HFILL}
9101
14
        },
9102
14
        { &hf_bthci_evt_inq_mode,
9103
14
          {"Inquiry Mode", "bthci_evt.inq_mode",
9104
14
           FT_UINT8, BASE_DEC, VALS(bthci_cmd_inq_modes), 0x0,
9105
14
           NULL, HFILL}
9106
14
        },
9107
14
        { &hf_bthci_evt_power_level_type,
9108
14
          {"Type", "bthci_evt.power_level_type",
9109
14
           FT_UINT8, BASE_HEX, VALS(evt_power_level_types), 0x0,
9110
14
           NULL, HFILL}
9111
14
        },
9112
14
        { &hf_bthci_evt_sync_link_type,
9113
14
          {"Link Type", "bthci_evt.sync_link_type",
9114
14
           FT_UINT8, BASE_HEX, VALS(evt_sync_link_types), 0x0,
9115
14
           NULL, HFILL}
9116
14
        },
9117
14
        { &hf_bthci_evt_sync_tx_interval,
9118
14
          {"Transmit Interval", "bthci_evt.sync_tx_interval",
9119
14
           FT_UINT8, BASE_CUSTOM, CF_FUNC(bluetooth_unit_0p625_ms), 0x0,
9120
14
           NULL, HFILL}
9121
14
        },
9122
14
        { &hf_bthci_evt_le_local_p_256_public_key,
9123
14
          { "Local-256_Public_Key", "bthci_evt.le_local_p_256_public_key",
9124
14
            FT_BYTES, BASE_NONE, NULL, 0x0,
9125
14
            NULL, HFILL }
9126
14
        },
9127
14
        { &hf_bthci_evt_le_dhkey,
9128
14
          { "DHKey", "bthci_evt.dhkey",
9129
14
            FT_BYTES, BASE_NONE, NULL, 0x0,
9130
14
            NULL, HFILL }
9131
14
        },
9132
14
        { &hf_bthci_evt_sync_rtx_window,
9133
14
          {"Retransmit Window", "bthci_evt.sync_rtx_window",
9134
14
           FT_UINT8, BASE_CUSTOM, CF_FUNC(bluetooth_unit_0p625_ms), 0x0,
9135
14
           NULL, HFILL}
9136
14
        },
9137
14
        { &hf_bthci_evt_sync_rx_packet_length,
9138
14
          {"Rx Packet Length", "bthci_evt.sync_rx_pkt_len",
9139
14
           FT_UINT16, BASE_DEC, NULL, 0x0,
9140
14
           NULL, HFILL}
9141
14
        },
9142
14
        { &hf_bthci_evt_sync_tx_packet_length,
9143
14
          {"Tx Packet Length", "bthci_evt.sync_tx_pkt_len",
9144
14
           FT_UINT16, BASE_DEC, NULL, 0x0,
9145
14
           NULL, HFILL}
9146
14
        },
9147
14
        { &hf_bthci_evt_air_mode,
9148
14
          {"Air Mode", "bthci_evt.air_mode",
9149
14
           FT_UINT8, BASE_DEC, VALS(evt_air_mode_vals), 0x0,
9150
14
           NULL, HFILL}
9151
14
        },
9152
14
        { &hf_bthci_evt_max_tx_latency,
9153
14
          {"Max. Tx Latency", "bthci_evt.max_tx_latency",
9154
14
           FT_UINT16, BASE_CUSTOM, CF_FUNC(bluetooth_unit_0p625_ms), 0x0,
9155
14
           NULL, HFILL}
9156
14
        },
9157
14
        { &hf_bthci_evt_max_rx_latency,
9158
14
          {"Max. Rx Latency", "bthci_evt.max_rx_latency",
9159
14
           FT_UINT16, BASE_CUSTOM, CF_FUNC(bluetooth_unit_0p625_ms), 0x0,
9160
14
           NULL, HFILL}
9161
14
        },
9162
14
        { &hf_bthci_evt_min_remote_timeout,
9163
14
          {"Min. Remote Timeout", "bthci_evt.min_remote_timeout",
9164
14
           FT_UINT16, BASE_CUSTOM, CF_FUNC(bluetooth_unit_0p625_ms), 0x0,
9165
14
           NULL, HFILL}
9166
14
        },
9167
14
        { &hf_bthci_evt_min_local_timeout,
9168
14
          {"Min. Local Timeout", "bthci_evt.min_local_timeout",
9169
14
           FT_UINT16, BASE_CUSTOM, CF_FUNC(bluetooth_unit_0p625_ms), 0x0,
9170
14
           NULL, HFILL}
9171
14
        },
9172
14
        { &hf_bthci_evt_link_supervision_timeout,
9173
14
          {"Link Supervision Timeout", "bthci_evt.link_supervision_timeout",
9174
14
           FT_UINT16, BASE_CUSTOM, CF_FUNC(bluetooth_unit_0p625_ms), 0x0,
9175
14
           NULL, HFILL}
9176
14
        },
9177
14
        { &hf_bthci_evt_token_bucket_size,
9178
14
          { "Token Bucket Size",        "bthci_evt.token_bucket_size",
9179
14
            FT_UINT32, BASE_DEC, NULL, 0x0,
9180
14
            "Token Bucket Size (bytes)", HFILL }
9181
14
        },
9182
14
        { &hf_bthci_evt_flow_direction,
9183
14
          {"Flow Direction", "bthci_evt.flow_direction",
9184
14
           FT_UINT8, BASE_DEC, VALS(evt_flow_direction_values), 0x0,
9185
14
           NULL, HFILL}
9186
14
        },
9187
14
        { &hf_bthci_evt_afh_ch_assessment_mode,
9188
14
          {"AFH Channel Assessment Mode", "bthci_evt.afh_ch_assessment_mode",
9189
14
           FT_UINT8, BASE_DEC, VALS(evt_enable_values), 0x0,
9190
14
           NULL, HFILL}
9191
14
        },
9192
14
        { &hf_bthci_evt_lmp_handle,
9193
14
          { "LMP Handle",             "bthci_evt.lmp_handle",
9194
14
            FT_UINT16, BASE_HEX, NULL, 0x0,
9195
14
            NULL, HFILL }
9196
14
        },
9197
14
        { &hf_bthci_evt_clock,
9198
14
          { "Clock",        "bthci_evt.clock",
9199
14
            FT_UINT32, BASE_HEX, NULL, 0x0,
9200
14
            NULL, HFILL }
9201
14
        },
9202
14
        { &hf_bthci_evt_clock_accuracy,
9203
14
          { "Clock",        "bthci_evt.clock_accuracy",
9204
14
            FT_UINT16, BASE_HEX, NULL, 0x0,
9205
14
            NULL, HFILL }
9206
14
        },
9207
14
        { &hf_bthci_evt_afh_mode,
9208
14
          {"AFH Mode", "bthci_evt.afh_mode",
9209
14
           FT_UINT8, BASE_DEC, VALS(evt_enable_values), 0x0,
9210
14
           NULL, HFILL}
9211
14
        },
9212
/* TODO: More detailed dissection */
9213
14
        { &hf_bthci_evt_afh_channel_map,
9214
14
          {"AFH Channel Map", "bthci_evt.afh_channel_map",
9215
14
           FT_BYTES, BASE_NONE, NULL, 0x0,
9216
14
           NULL, HFILL}
9217
14
        },
9218
14
        { &hf_bthci_evt_simple_pairing_mode,
9219
14
          {"Simple Pairing Mode", "bthci_evt.simple_pairing_mode",
9220
14
           FT_UINT8, BASE_DEC, VALS(evt_enable_values), 0x0,
9221
14
           NULL, HFILL}
9222
14
        },
9223
14
        { &hf_bthci_evt_hash_c,
9224
14
          {"Hash C", "bthci_evt.hash_c",
9225
14
           FT_BYTES, BASE_NONE, NULL, 0x0,
9226
14
           NULL, HFILL}
9227
14
        },
9228
14
        { &hf_bthci_evt_randomizer_r,
9229
14
          {"Randomizer R", "bthci_evt.randomizer_r",
9230
14
           FT_BYTES, BASE_NONE, NULL, 0x0,
9231
14
           NULL, HFILL}
9232
14
        },
9233
14
        { &hf_bthci_evt_io_capability,
9234
14
          {"IO Capability", "bthci_evt.io_capability",
9235
14
           FT_UINT8, BASE_HEX, VALS(bthci_cmd_io_capability_vals), 0x0,
9236
14
           NULL, HFILL}
9237
14
        },
9238
14
        { &hf_bthci_evt_oob_data_present,
9239
14
          {"OOB Data Present", "bthci_evt.oob_data_present",
9240
14
           FT_UINT8, BASE_DEC, VALS(bthci_cmd_oob_data_present_vals), 0x0,
9241
14
           NULL, HFILL}
9242
14
        },
9243
14
        { &hf_bthci_evt_auth_requirements,
9244
14
          {"Authentication Requirements", "bthci_evt.auth_requirements",
9245
14
           FT_UINT8, BASE_DEC|BASE_EXT_STRING, &bthci_cmd_auth_req_vals_ext, 0x0,
9246
14
           NULL, HFILL}
9247
14
        },
9248
14
        { &hf_bthci_evt_numeric_value,
9249
14
          {"Numeric Value", "bthci_evt.numeric_value",
9250
14
           FT_UINT32, BASE_DEC, NULL, 0x0,
9251
14
           NULL, HFILL}
9252
14
        },
9253
14
        { &hf_bthci_evt_passkey,
9254
14
          {"Passkey", "bthci_evt.passkey",
9255
14
           FT_UINT32, BASE_DEC, NULL, 0x0,
9256
14
           NULL, HFILL}
9257
14
        },
9258
14
        { &hf_bthci_evt_notification_type,
9259
14
          {"Notification Type", "bthci_evt.notification_type",
9260
14
           FT_UINT8, BASE_DEC, VALS(bthci_cmd_notification_types), 0x0,
9261
14
           NULL, HFILL}
9262
14
        },
9263
14
        { &hf_bthci_evt_data_length,
9264
14
          { "Data Length",           "bthci_evt.data_length",
9265
14
            FT_UINT8, BASE_DEC, NULL, 0x0,
9266
14
            NULL, HFILL }
9267
14
        },
9268
14
        { &hf_bthci_evt_location_domain_aware,
9269
14
          { "Location Domain Aware", "bthci_evt.location_domain_aware",
9270
14
            FT_BOOLEAN, BASE_NONE, NULL, 0x0,
9271
14
            NULL, HFILL }
9272
14
        },
9273
14
        { &hf_bthci_evt_location_domain,
9274
14
          { "Location Domain", "bthci_evt.location_domain",
9275
14
            FT_STRING, BASE_NONE, NULL, 0x0,
9276
14
            "ISO 3166-1 Country Code", HFILL }
9277
14
        },
9278
14
        { &hf_bthci_evt_location_domain_options,
9279
14
          { "Location Domain Options", "bthci_evt.location_domain_options",
9280
14
            FT_STRING, BASE_NONE, NULL, 0x0,
9281
14
            NULL, HFILL }
9282
14
        },
9283
14
        { &hf_bthci_evt_location_options,
9284
14
          { "Location Options", "bthci_evt.location_options",
9285
14
            FT_UINT8, BASE_HEX, NULL, 0x0,
9286
14
            NULL, HFILL }
9287
14
        },
9288
14
        { &hf_bthci_evt_flow_control_mode,
9289
14
          { "Flow Control Mode", "bthci_evt.flow_control_mode",
9290
14
            FT_UINT8, BASE_HEX, VALS(evt_flow_ctrl_mode), 0x0,
9291
14
            NULL, HFILL }
9292
14
        },
9293
14
        { &hf_bthci_evt_physical_link_handle,
9294
14
          { "Physical Link Handle", "bthci_evt.physical_link_handle",
9295
14
            FT_UINT8, BASE_HEX, NULL, 0x0,
9296
14
            NULL, HFILL }
9297
14
        },
9298
14
        { &hf_bthci_evt_flow_spec_identifier,
9299
14
          { "Flow Spec Identifier", "bthci_evt.flow_spec_id",
9300
14
            FT_UINT8, BASE_HEX, NULL, 0x0,
9301
14
            NULL, HFILL }
9302
14
        },
9303
14
        { &hf_bthci_evt_logical_link_handle,
9304
14
          { "Logical Link Handle", "bthci_evt.logical_link_handle",
9305
14
            FT_UINT16, BASE_HEX, NULL, 0x0,
9306
14
            NULL, HFILL}
9307
14
        },
9308
14
        { &hf_bthci_evt_max_acl_data_packet_length,
9309
14
          { "Max. ACL Data Packet Length", "bthci_evt.max_acl_data_packet_length",
9310
14
            FT_UINT16, BASE_HEX, NULL, 0x0,
9311
14
            NULL, HFILL}
9312
14
        },
9313
14
        { &hf_bthci_evt_data_block_length,
9314
14
          { "Max. Data Block Length", "bthci_evt.data_block_length",
9315
14
            FT_UINT16, BASE_HEX, NULL, 0x0,
9316
14
            NULL, HFILL}
9317
14
        },
9318
14
        { &hf_bthci_evt_total_num_data_blocks,
9319
14
          { "Total Number of Data Blocks", "bthci_evt.total_num_data_blocks",
9320
14
            FT_UINT16, BASE_HEX, NULL, 0x0,
9321
14
            NULL, HFILL}
9322
14
        },
9323
14
        { &hf_bthci_evt_enc_key_size,
9324
14
          { "Encryption Key Size", "bthci_evt.enc_key_size",
9325
14
            FT_INT8, BASE_DEC, NULL, 0x0,
9326
14
            NULL, HFILL }
9327
14
        },
9328
14
        { &hf_bthci_evt_amp_remaining_assoc_length,
9329
14
          { "AMP Remaining Assoc Length", "bthci_evt.amp_remaining_assoc_length",
9330
14
            FT_UINT16, BASE_DEC, 0x0, 0x0,
9331
14
            NULL, HFILL }
9332
14
        },
9333
14
        { &hf_bthci_evt_amp_assoc_fragment,
9334
14
          { "AMP Assoc Fragment", "bthci_evt.amp_assoc_fragment",
9335
14
            FT_BYTES, BASE_NONE, 0x0, 0x0,
9336
14
            NULL, HFILL }
9337
14
        },
9338
14
        { &hf_bthci_evt_amp_status,
9339
14
          { "AMP Status", "bthci_evt.amp_status",
9340
14
            FT_UINT8, BASE_HEX, VALS(evt_amp_status), 0x0,
9341
14
            NULL, HFILL }
9342
14
        },
9343
14
        { &hf_bthci_evt_total_bandwidth,
9344
14
          { "Total Bandwidth (kbps)", "bthci_evt.total_bandwidth",
9345
14
            FT_UINT32, BASE_DEC, 0x0, 0x0,
9346
14
            NULL, HFILL }
9347
14
        },
9348
14
        { &hf_bthci_evt_max_guaranteed_bandwidth,
9349
14
          { "Max Guaranteed Bandwidth (kbps)", "bthci_evt.max_guaranteed_bandwidth",
9350
14
            FT_UINT32, BASE_DEC, 0x0, 0x0,
9351
14
            NULL, HFILL }
9352
14
        },
9353
14
        { &hf_bthci_evt_min_latency,
9354
14
          { "Min Latency (us)", "bthci_evt.min_latency",
9355
14
            FT_UINT32, BASE_DEC, 0x0, 0x0,
9356
14
            NULL, HFILL }
9357
14
        },
9358
14
        { &hf_bthci_evt_max_pdu_size,
9359
14
          { "Max PDU Size", "bthci_evt.max_pdu_size",
9360
14
            FT_UINT32, BASE_DEC, 0x0, 0x0,
9361
14
            NULL, HFILL }
9362
14
        },
9363
14
        { &hf_bthci_evt_amp_controller_type,
9364
14
          { "Controller Type", "bthci_evt.controller_type",
9365
14
            FT_UINT8, BASE_HEX, VALS(bthci_evt_controller_types), 0x0,
9366
14
            NULL, HFILL }
9367
14
        },
9368
14
        { &hf_bthci_evt_pal_capabilities_00,
9369
14
          { "Guaranteed Service",        "bthci_evt.pal_capabilities",
9370
14
            FT_BOOLEAN, 16, NULL, 0x0001,
9371
14
            NULL, HFILL }
9372
14
        },
9373
14
        { &hf_bthci_evt_max_amp_assoc_length,
9374
14
          { "Max AMP Assoc Length", "bthci_evt.max_amp_assoc_length",
9375
14
            FT_UINT32, BASE_DEC, 0x0, 0x0,
9376
14
            NULL, HFILL }
9377
14
        },
9378
14
        { &hf_bthci_evt_max_flush_to_us,
9379
14
          { "Max Flush Timeout (us)", "bthci_evt.max_flush_to",
9380
14
            FT_UINT32, BASE_DEC, 0x0, 0x0,
9381
14
            NULL, HFILL }
9382
14
        },
9383
14
        { &hf_bthci_evt_best_effort_flush_to_us,
9384
14
          { "Best Effort Flush Timeout (us)", "bthci_evt.best_effort_flush_to",
9385
14
            FT_UINT32, BASE_DEC, 0x0, 0x0,
9386
14
            NULL, HFILL }
9387
14
        },
9388
14
        { &hf_bthci_evt_link_loss_reason,
9389
14
          { "Reason", "bthci_evt.link_loss_reason",
9390
14
            FT_UINT8, BASE_HEX, VALS(evt_link_loss_reasons), 0x0,
9391
14
            NULL, HFILL }
9392
14
        },
9393
14
        { &hf_bthci_evt_num_compl_blocks,
9394
14
          { "Number Of Completed Blocks", "bthci_evt.num_compl_blocks",
9395
14
            FT_UINT16, BASE_DEC, NULL, 0x0,
9396
14
            NULL, HFILL }
9397
14
        },
9398
14
        { &hf_bthci_evt_test_scenario,
9399
14
          { "Test Scenario", "bthci_evt.test_scenario",
9400
14
            FT_UINT8, BASE_HEX, NULL, 0x0,
9401
14
            NULL, HFILL }
9402
14
        },
9403
14
        { &hf_bthci_evt_report_reason,
9404
14
          { "Reason", "bthci_evt.report_reason",
9405
14
            FT_UINT8, BASE_HEX, VALS(evt_report_reasons), 0x0,
9406
14
            NULL, HFILL }
9407
14
        },
9408
14
        { &hf_bthci_evt_report_event_type,
9409
14
          { "Report Event Type", "bthci_evt.report_event_type",
9410
14
            FT_UINT8, BASE_HEX, VALS(evt_report_event_types), 0x0,
9411
14
            NULL, HFILL }
9412
14
        },
9413
14
        { &hf_bthci_evt_num_frames,
9414
14
          { "Number Of Frames", "bthci_evt.num_frames",
9415
14
            FT_UINT16, BASE_DEC, NULL, 0x0,
9416
14
            NULL, HFILL }
9417
14
        },
9418
14
        { &hf_bthci_evt_num_error_frames,
9419
14
          { "Number Of Error Frames", "bthci_evt.num_error_frames",
9420
14
            FT_UINT16, BASE_DEC, NULL, 0x0,
9421
14
            NULL, HFILL }
9422
14
        },
9423
14
        { &hf_bthci_evt_num_bits,
9424
14
          { "Number Of Bits", "bthci_evt.num_bits",
9425
14
            FT_UINT32, BASE_DEC, NULL, 0x0,
9426
14
            NULL, HFILL }
9427
14
        },
9428
14
        { &hf_bthci_evt_num_error_bits,
9429
14
          { "Number Of Error Bits", "bthci_evt.num_error_bits",
9430
14
            FT_UINT32, BASE_DEC, NULL, 0x0,
9431
14
            NULL, HFILL }
9432
14
        },
9433
14
        { &hf_bthci_evt_short_range_mode_state,
9434
14
          { "Short Range Mode State",        "bthci_evt.short_range_mode_state",
9435
14
            FT_BOOLEAN, BASE_NONE, NULL, 0x0,
9436
14
            NULL, HFILL }
9437
14
        },
9438
14
        { &hf_bthci_evt_transmit_power_level_gfsk,
9439
14
          { "Transmit Power Level GFSK (dBm)", "bthci_evt.transmit_power_level_gfsk",
9440
14
            FT_INT8, BASE_DEC, NULL, 0x0,
9441
14
            NULL, HFILL }
9442
14
        },
9443
14
        { &hf_bthci_evt_transmit_power_level_dqpsk,
9444
14
          { "Transmit Power Level DQPSK (dBm)", "bthci_evt.transmit_power_level_dqpsk",
9445
14
            FT_INT8, BASE_DEC, NULL, 0x0,
9446
14
            NULL, HFILL }
9447
14
        },
9448
14
        { &hf_bthci_evt_transmit_power_level_8dpsk,
9449
14
          { "Transmit Power Level 8DPSK (dBm)", "bthci_evt.transmit_power_level_8dpsk",
9450
14
            FT_INT8, BASE_DEC, NULL, 0x0,
9451
14
            NULL, HFILL }
9452
14
        },
9453
14
        { &hf_bthci_evt_flush_to_us,
9454
14
          { "Flush Timeout (us)",  "bthci_evt.flushto",
9455
14
            FT_UINT32, BASE_DEC, NULL, 0x0,
9456
14
            NULL, HFILL }
9457
14
        },
9458
14
        { &hf_bthci_evt_le_supported_host,
9459
14
          { "LE Supported Host", "bthci_evt.le_supported_host",
9460
14
            FT_BOOLEAN, BASE_NONE, NULL, 0x0,
9461
14
            NULL, HFILL }
9462
14
        },
9463
14
        { &hf_bthci_evt_le_simultaneous_host,
9464
14
          { "Simultaneous LE Host", "bthci_evt.le_simultaneous_host",
9465
14
            FT_BOOLEAN, BASE_NONE, NULL, 0x0,
9466
14
            "Support for both LE and BR/EDR to same device", HFILL }
9467
14
        },
9468
14
        { &hf_bthci_evt_le_acl_data_pkt_len,
9469
14
          { "LE ACL Data Packet Length", "bthci_evt.le_acl_data_pkt_len",
9470
14
            FT_UINT16, BASE_DEC, NULL, 0x0,
9471
14
            NULL, HFILL }
9472
14
        },
9473
14
        { &hf_bthci_evt_total_num_le_acl_data_pkts,
9474
14
          { "Total Number LE ACL Data Packets", "bthci_evt.le_total_num_acl_data_pkts",
9475
14
            FT_UINT8, BASE_DEC, NULL, 0x0,
9476
14
            NULL, HFILL }
9477
14
        },
9478
14
        { &hf_bthci_evt_iso_data_pkt_len,
9479
14
          { "ISO Data Packet Length", "bthci_evt.iso_data_pkt_len",
9480
14
            FT_UINT16, BASE_DEC, NULL, 0x0,
9481
14
            NULL, HFILL }
9482
14
        },
9483
14
        { &hf_bthci_evt_total_num_iso_data_pkts,
9484
14
          { "Total Number ISO Data Packets", "bthci_evt.total_num_iso_data_pkts",
9485
14
            FT_UINT8, BASE_DEC, NULL, 0x0,
9486
14
            NULL, HFILL }
9487
14
        },
9488
14
        { &hf_bthci_evt_filter_accept_list_size,
9489
14
          { "Filter Accept List Size",        "bthci_evt.le_filter_accept_list_size",
9490
14
            FT_UINT8, BASE_DEC, NULL, 0x0,
9491
14
            "Max. total filter accept list entries storable in controller", HFILL }
9492
14
        },
9493
14
        { &hf_bthci_evt_le_channel_map,
9494
14
          { "Channel Map", "bthci_evt.le_channel_map",
9495
14
            FT_BYTES, BASE_NONE, NULL, 0x0,
9496
14
            NULL, HFILL }
9497
14
        },
9498
14
        { &hf_bthci_evt_encrypted_data,
9499
14
          { "Plaintext",        "bthci_evt.le_encrypted_data",
9500
14
            FT_BYTES, BASE_NONE, NULL, 0x0,
9501
14
            NULL, HFILL }
9502
14
        },
9503
14
        { &hf_bthci_evt_random_number,
9504
14
          { "Random Number",        "bthci_evt.le_random_number",
9505
14
            FT_BYTES, BASE_NONE, NULL, 0x0,
9506
14
            NULL, HFILL }
9507
14
        },
9508
14
        { &hf_bthci_evt_le_num_packets,
9509
14
          { "Number of Packets",        "bthci_evt.le_num_packets",
9510
14
            FT_UINT16, BASE_DEC, NULL, 0x0,
9511
14
            NULL, HFILL }
9512
14
        },
9513
14
        { &hf_bthci_evt_le_meta_subevent,
9514
14
          { "Sub Event",        "bthci_evt.le_meta_subevent",
9515
14
            FT_UINT8, BASE_HEX, VALS(evt_le_meta_subevent), 0x00,
9516
14
            NULL, HFILL }
9517
14
        },
9518
14
        { &hf_bthci_evt_le_peer_address_type,
9519
14
          { "Peer Address Type", "bthci_evt.le_peer_address_type",
9520
14
            FT_UINT8, BASE_HEX, VALS(bthci_cmd_address_types_vals), 0x0,
9521
14
            NULL, HFILL }
9522
14
        },
9523
14
        { &hf_bthci_evt_le_local_rpa,
9524
14
          { "Local Resolvable Private Address",          "bthci_evt.le_local_rpa",
9525
14
            FT_ETHER, BASE_NONE, NULL, 0x0,
9526
14
            NULL, HFILL}
9527
14
        },
9528
14
        { &hf_bthci_evt_le_peer_rpa,
9529
14
          { "Peer Resolvable Private Address",          "bthci_evt.le_peer_rpa",
9530
14
            FT_ETHER, BASE_NONE, NULL, 0x0,
9531
14
            NULL, HFILL}
9532
14
        },
9533
14
        { &hf_bthci_evt_le_con_interval,
9534
14
          { "Connection Interval", "bthci_evt.le_con_interval",
9535
14
            FT_UINT16, BASE_CUSTOM, CF_FUNC(bluetooth_unit_1p25_ms), 0x0,
9536
14
            NULL, HFILL }
9537
14
        },
9538
14
        { &hf_bthci_evt_le_min_interval,
9539
14
          { "Min Connection Interval", "bthci_evt.le_min_interval",
9540
14
            FT_UINT16, BASE_CUSTOM, CF_FUNC(bluetooth_unit_1p25_ms), 0x0,
9541
14
            NULL, HFILL }
9542
14
        },
9543
14
        { &hf_bthci_evt_le_max_interval,
9544
14
          { "Max Connection Interval", "bthci_evt.le_max_interval",
9545
14
            FT_UINT16, BASE_CUSTOM, CF_FUNC(bluetooth_unit_1p25_ms), 0x0,
9546
14
            NULL, HFILL }
9547
14
        },
9548
14
        { &hf_bthci_evt_le_con_latency,
9549
14
          { "Connection Latency", "bthci_evt.le_con_latency",
9550
14
            FT_UINT16, BASE_DEC|BASE_UNIT_STRING, UNS(&units_number_events), 0x0,
9551
14
            NULL, HFILL }
9552
14
        },
9553
14
        { &hf_bthci_evt_le_supervision_timeout,
9554
14
          { "Supervision Timeout", "bthci_evt.le_supv_timeout",
9555
14
            FT_UINT16, BASE_CUSTOM, CF_FUNC(bluetooth_unit_0p01_sec), 0x0,
9556
14
            NULL, HFILL }
9557
14
        },
9558
14
        { &hf_bthci_evt_le_max_tx_octets,
9559
14
          { "Max TX Octets", "bthci_evt.max_tx_octets",
9560
14
            FT_UINT16, BASE_DEC, NULL, 0x0,
9561
14
            NULL, HFILL }
9562
14
        },
9563
14
        { &hf_bthci_evt_le_max_tx_time,
9564
14
          { "Max TX Time", "bthci_evt.max_tx_time",
9565
14
            FT_UINT16, BASE_DEC|BASE_UNIT_STRING, UNS(&units_microseconds), 0x0,
9566
14
            NULL, HFILL }
9567
14
        },
9568
14
        { &hf_bthci_evt_le_max_rx_octets,
9569
14
          { "Max RX Octets", "bthci_evt.max_rx_octets",
9570
14
            FT_UINT16, BASE_DEC, NULL, 0x0,
9571
14
            NULL, HFILL }
9572
14
        },
9573
14
        { &hf_bthci_evt_le_max_rx_time,
9574
14
          { "Max RX Time", "bthci_evt.max_rx_time",
9575
14
            FT_UINT16, BASE_DEC|BASE_UNIT_STRING, UNS(&units_microseconds), 0x0,
9576
14
            NULL, HFILL }
9577
14
        },
9578
14
        { &hf_bthci_evt_encrypted_diversifier,
9579
14
          { "Encrypted Diversifier", "bthci_evt.le_encrypted_diversifier",
9580
14
            FT_UINT16, BASE_HEX, NULL, 0x0,
9581
14
            NULL, HFILL }
9582
14
        },
9583
14
        { &hf_bthci_evt_le_central_clock_accuracy,
9584
14
          { "Central Clock Accuracy", "bthci_evt.le_central_clock_accuracy",
9585
14
            FT_UINT8, BASE_HEX|BASE_EXT_STRING, &bthci_cmd_clock_accuray_vals_ext, 0x0,
9586
14
            NULL, HFILL }
9587
14
        },
9588
14
        { &hf_bthci_evt_num_reports,
9589
14
          { "Num Reports", "bthci_evt.le_num_reports",
9590
14
            FT_UINT8, BASE_DEC, NULL, 0x0,
9591
14
            NULL, HFILL }
9592
14
        },
9593
14
        { &hf_bthci_evt_advts_event_type,
9594
14
          { "Event Type", "bthci_evt.le_advts_event_type",
9595
14
            FT_UINT8, BASE_HEX, VALS(evt_le_advertising_evt_types), 0x0,
9596
14
            NULL, HFILL }
9597
14
        },
9598
14
        { &hf_bthci_evt_ext_advts_event_type,
9599
14
          { "Event Type", "bthci_evt.le_ext_advts_event_type",
9600
14
            FT_UINT16, BASE_HEX, NULL, 0x0,
9601
14
            NULL, HFILL }
9602
14
        },
9603
14
        { &hf_bthci_evt_le_states,
9604
14
          { "Supported LE States", "bthci_evt.le_states",
9605
14
            FT_NONE, BASE_NONE, NULL, 0x00,
9606
14
            NULL, HFILL }
9607
14
        },
9608
14
        { &hf_bthci_evt_le_states_00,
9609
14
          { "Non-connectable Advertising State", "bthci_evt.le_states_00",
9610
14
            FT_BOOLEAN, 8, NULL, 0x01,
9611
14
            NULL, HFILL }
9612
14
        },
9613
14
        { &hf_bthci_evt_le_states_01,
9614
14
          { "Scannable Advertising State", "bthci_evt.le_states_01",
9615
14
            FT_BOOLEAN, 8, NULL, 0x02,
9616
14
            NULL, HFILL }
9617
14
        },
9618
14
        { &hf_bthci_evt_le_states_02,
9619
14
          { "Connectable Advertising State", "bthci_evt.le_states_02",
9620
14
            FT_BOOLEAN, 8, NULL, 0x04,
9621
14
            NULL, HFILL }
9622
14
        },
9623
14
        { &hf_bthci_evt_le_states_03,
9624
14
          { "Directed Advertising State", "bthci_evt.le_states_03",
9625
14
            FT_BOOLEAN, 8, NULL, 0x08,
9626
14
            NULL, HFILL }
9627
14
        },
9628
14
        { &hf_bthci_evt_le_states_04,
9629
14
          { "Passive Scanning State", "bthci_evt.le_states_04",
9630
14
            FT_BOOLEAN, 8, NULL, 0x10,
9631
14
            NULL, HFILL }
9632
14
        },
9633
14
        { &hf_bthci_evt_le_states_05,
9634
14
          { "Active Scanning State", "bthci_evt.le_states_05",
9635
14
            FT_BOOLEAN, 8, NULL, 0x20,
9636
14
            NULL, HFILL }
9637
14
        },
9638
14
        { &hf_bthci_evt_le_states_06,
9639
14
          { "Initiating State. Connection State in Central Role", "bthci_evt.le_states_06",
9640
14
            FT_BOOLEAN, 8, NULL, 0x40,
9641
14
            NULL, HFILL }
9642
14
        },
9643
14
        { &hf_bthci_evt_le_states_07,
9644
14
          { "Connection State in Peripheral Role", "bthci_evt.le_states_07",
9645
14
            FT_BOOLEAN, 8, NULL, 0x80,
9646
14
            NULL, HFILL }
9647
14
        },
9648
14
        { &hf_bthci_evt_le_states_10,
9649
14
          { "Non-connectable Advertising State and Passive Scanning State combination", "bthci_evt.le_states_10",
9650
14
            FT_BOOLEAN, 8, NULL, 0x01,
9651
14
            NULL, HFILL }
9652
14
        },
9653
14
        { &hf_bthci_evt_le_states_11,
9654
14
          { "Scannable Advertising State and Passive Scanning State combination", "bthci_evt.le_states_11",
9655
14
            FT_BOOLEAN, 8, NULL, 0x02,
9656
14
            NULL, HFILL }
9657
14
        },
9658
14
        { &hf_bthci_evt_le_states_12,
9659
14
          { "Connectable Advertising State and Passive Scanning State combination", "bthci_evt.le_states_12",
9660
14
            FT_BOOLEAN, 8, NULL, 0x04,
9661
14
            NULL, HFILL }
9662
14
        },
9663
14
        { &hf_bthci_evt_le_states_13,
9664
14
          { "Directed Advertising State and Passive Scanning State combination", "bthci_evt.le_states_13",
9665
14
            FT_BOOLEAN, 8, NULL, 0x08,
9666
14
            NULL, HFILL }
9667
14
        },
9668
14
        { &hf_bthci_evt_le_states_14,
9669
14
          { "Non-connectable Advertising State and Active Scanning State combination", "bthci_evt.le_states_14",
9670
14
            FT_BOOLEAN, 8, NULL, 0x10,
9671
14
            NULL, HFILL }
9672
14
        },
9673
14
        { &hf_bthci_evt_le_states_15,
9674
14
          { "Scannable Advertising State and Active Scanning State combination", "bthci_evt.le_states_15",
9675
14
            FT_BOOLEAN, 8, NULL, 0x20,
9676
14
            NULL, HFILL }
9677
14
        },
9678
14
        { &hf_bthci_evt_le_states_16,
9679
14
          { "Connectable Advertising State and Active Scanning State combination", "bthci_evt.le_states_16",
9680
14
            FT_BOOLEAN, 8, NULL, 0x40,
9681
14
            NULL, HFILL }
9682
14
        },
9683
14
        { &hf_bthci_evt_le_states_17,
9684
14
          { "Directed Advertising State and Active Scanning State combination", "bthci_evt.le_states_17",
9685
14
            FT_BOOLEAN, 8, NULL, 0x80,
9686
14
            NULL, HFILL }
9687
14
        },
9688
14
        { &hf_bthci_evt_le_states_20,
9689
14
          { "Non-connectable Advertising State and Initiating State combination", "bthci_evt.le_states_20",
9690
14
            FT_BOOLEAN, 8, NULL, 0x01,
9691
14
            NULL, HFILL }
9692
14
        },
9693
14
        { &hf_bthci_evt_le_states_21,
9694
14
          { "Scannable Advertising State and Initiating State combination", "bthci_evt.le_states_21",
9695
14
            FT_BOOLEAN, 8, NULL, 0x02,
9696
14
            NULL, HFILL }
9697
14
        },
9698
14
        { &hf_bthci_evt_le_states_22,
9699
14
          { "Non-connectable Advertising State and Central Role combination", "bthci_evt.le_states_22",
9700
14
            FT_BOOLEAN, 8, NULL, 0x04,
9701
14
            NULL, HFILL }
9702
14
        },
9703
14
        { &hf_bthci_evt_le_states_23,
9704
14
          { "Scannable Advertising State and Central Role combination", "bthci_evt.le_states_23",
9705
14
            FT_BOOLEAN, 8, NULL, 0x08,
9706
14
            NULL, HFILL }
9707
14
        },
9708
14
        { &hf_bthci_evt_le_states_24,
9709
14
          { "Non-connectable Advertising State and Peripheral Role combination", "bthci_evt.le_states_24",
9710
14
            FT_BOOLEAN, 8, NULL, 0x10,
9711
14
            NULL, HFILL }
9712
14
        },
9713
14
        { &hf_bthci_evt_le_states_25,
9714
14
          { "Scannable Advertising State and Peripheral Role combination", "bthci_evt.le_states_25",
9715
14
            FT_BOOLEAN, 8, NULL, 0x20,
9716
14
            NULL, HFILL }
9717
14
        },
9718
14
        { &hf_bthci_evt_le_states_26,
9719
14
          { "Passive Scanning State and Initiating State combination", "bthci_evt.le_states_26",
9720
14
            FT_BOOLEAN, 8, NULL, 0x40,
9721
14
            NULL, HFILL }
9722
14
        },
9723
14
        { &hf_bthci_evt_le_states_27,
9724
14
          { "Active Scanning State and Initiating State combination", "bthci_evt.le_states_27",
9725
14
            FT_BOOLEAN, 8, NULL, 0x80,
9726
14
            NULL, HFILL }
9727
14
        },
9728
14
        { &hf_bthci_evt_le_states_30,
9729
14
          { "Passive Scanning State and Central Role combination", "bthci_evt.le_states_30",
9730
14
            FT_BOOLEAN, 8, NULL, 0x01,
9731
14
            NULL, HFILL }
9732
14
        },
9733
14
        { &hf_bthci_evt_le_states_31,
9734
14
          { "Active Scanning State and Central Role combination", "bthci_evt.le_states_31",
9735
14
            FT_BOOLEAN, 8, NULL, 0x02,
9736
14
            NULL, HFILL }
9737
14
        },
9738
14
        { &hf_bthci_evt_le_states_32,
9739
14
          { "Passive Scanning state and Peripheral Role combination", "bthci_evt.le_states_32",
9740
14
            FT_BOOLEAN, 8, NULL, 0x04,
9741
14
            NULL, HFILL }
9742
14
        },
9743
14
        { &hf_bthci_evt_le_states_33,
9744
14
          { "Active Scanning state and Peripheral Role combination", "bthci_evt.le_states_33",
9745
14
            FT_BOOLEAN, 8, NULL, 0x08,
9746
14
            NULL, HFILL }
9747
14
        },
9748
14
        { &hf_bthci_evt_le_states_34,
9749
14
          { "Initiating State and Central Role combination. Central Role and Central Role combination", "bthci_evt.le_states_34",
9750
14
            FT_BOOLEAN, 8, NULL, 0x10,
9751
14
            NULL, HFILL }
9752
14
        },
9753
14
        { &hf_changed_in_frame,
9754
14
            { "Change in Frame",                              "bthci_evt.change_in_frame",
9755
14
            FT_FRAMENUM, BASE_NONE, NULL, 0x0,
9756
14
            NULL, HFILL }
9757
14
        },
9758
14
        { &hf_command_in_frame,
9759
14
            { "Command in frame",                "bthci_evt.command_in_frame",
9760
14
            FT_FRAMENUM, BASE_NONE, FRAMENUM_TYPE(FT_FRAMENUM_REQUEST), 0x0,
9761
14
            NULL, HFILL }
9762
14
        },
9763
14
        { &hf_pending_in_frame,
9764
14
            { "Pending in frame",                "bthci_evt.pending_in_frame",
9765
14
            FT_FRAMENUM, BASE_NONE, FRAMENUM_TYPE(FT_FRAMENUM_RESPONSE), 0x0,
9766
14
            NULL, HFILL }
9767
14
        },
9768
14
        { &hf_response_in_frame,
9769
14
            { "Response in frame",               "bthci_evt.response_in_frame",
9770
14
            FT_FRAMENUM, BASE_NONE, FRAMENUM_TYPE(FT_FRAMENUM_RESPONSE), 0x0,
9771
14
            NULL, HFILL }
9772
14
        },
9773
14
        { &hf_command_response_time_delta,
9774
14
            { "Command-Response Delta",          "bthci_evt.command_response_delta",
9775
14
            FT_DOUBLE, BASE_NONE|BASE_UNIT_STRING, UNS(&units_milliseconds), 0x00,
9776
14
            NULL, HFILL }
9777
14
        },
9778
14
        { &hf_command_pending_time_delta,
9779
14
            { "Command-Pending Delta",          "bthci_evt.command_pending_delta",
9780
14
            FT_DOUBLE, BASE_NONE|BASE_UNIT_STRING, UNS(&units_milliseconds), 0x00,
9781
14
            NULL, HFILL }
9782
14
        },
9783
14
        { &hf_pending_response_time_delta,
9784
14
            { "Pending-Response Delta",          "bthci_evt.pending_response_delta",
9785
14
            FT_DOUBLE, BASE_NONE|BASE_UNIT_STRING, UNS(&units_milliseconds), 0x00,
9786
14
            NULL, HFILL }
9787
14
        },
9788
14
        { &hf_bthci_evt_le_features,
9789
14
          { "Supported LE Features",                       "bthci_evt.le_features",
9790
14
            FT_UINT64, BASE_HEX, NULL, 0x00,
9791
14
            NULL, HFILL }
9792
14
        },
9793
14
        { &hf_bthci_evt_le_features_encryption,
9794
14
          { "Encryption",                               "bthci_evt.le_features.encryption",
9795
14
            FT_BOOLEAN, 64, NULL, 0x0000000000000001,
9796
14
            NULL, HFILL }
9797
14
        },
9798
14
        { &hf_bthci_evt_le_features_connection_parameters_request_procedure,
9799
14
          { "Connection Parameters Request Procedure",     "bthci_evt.le_features.connection_parameters_request_procedure",
9800
14
            FT_BOOLEAN, 64, NULL, 0x0000000000000002,
9801
14
            NULL, HFILL }
9802
14
        },
9803
14
        { &hf_bthci_evt_le_features_extended_reject_indication,
9804
14
          { "Extended Reject Indication",                  "bthci_evt.le_features.extended_reject_indication",
9805
14
            FT_BOOLEAN, 64, NULL, 0x0000000000000004,
9806
14
            NULL, HFILL }
9807
14
        },
9808
14
        { &hf_bthci_evt_le_features_peripheral_initiated_features_exchange,
9809
14
          { "Peripheral-Initiated Features Exchange",           "bthci_evt.le_features.peripheral_initiated_features_exchange",
9810
14
            FT_BOOLEAN, 64, NULL, 0x0000000000000008,
9811
14
            NULL, HFILL }
9812
14
        },
9813
14
        { &hf_bthci_evt_le_features_ping,
9814
14
          { "Ping",                                        "bthci_evt.le_features.ping",
9815
14
            FT_BOOLEAN, 64, NULL, 0x0000000000000010,
9816
14
            NULL, HFILL }
9817
14
        },
9818
14
        { &hf_bthci_evt_le_features_data_packet_length_extension,
9819
14
          { "Data Packet Length Extension",                "bthci_evt.le_features.data_packet_length_extension",
9820
14
            FT_BOOLEAN, 64, NULL, 0x0000000000000020,
9821
14
            NULL, HFILL }
9822
14
        },
9823
14
        { &hf_bthci_evt_le_features_ll_privacy,
9824
14
          { "LL Privacy",                                  "bthci_evt.le_features.ll_privacy",
9825
14
            FT_BOOLEAN, 64, NULL, 0x0000000000000040,
9826
14
            NULL, HFILL }
9827
14
        },
9828
14
        { &hf_bthci_evt_le_features_extended_scanner_filter_policies,
9829
14
          { "Extended Scanner Filter Policies",            "bthci_evt.le_features.extended_scanner_filter_policies",
9830
14
            FT_BOOLEAN, 64, NULL, 0x0000000000000080,
9831
14
            NULL, HFILL }
9832
14
        },
9833
14
        { &hf_bthci_evt_le_features_2m_phy,
9834
14
          { "LE 2M PHY",            "bthci_evt.le_features.2m_phy",
9835
14
            FT_BOOLEAN, 64, NULL, 0x0000000000000100,
9836
14
            NULL, HFILL }
9837
14
        },
9838
14
        { &hf_bthci_evt_le_features_stable_modulation_index_tx,
9839
14
          { "Stable Modulation Index - Tx",            "bthci_evt.le_features.stable_modulation_index_tx",
9840
14
            FT_BOOLEAN, 64, NULL, 0x0000000000000200,
9841
14
            NULL, HFILL }
9842
14
        },
9843
14
        { &hf_bthci_evt_le_features_stable_modulation_index_rx,
9844
14
          { "Stable Modulation Index - Rx",            "bthci_evt.le_features.stable_modulation_index_rx",
9845
14
            FT_BOOLEAN, 64, NULL, 0x0000000000000400,
9846
14
            NULL, HFILL }
9847
14
        },
9848
14
        { &hf_bthci_evt_le_features_coded_phy,
9849
14
          { "Coded PHY",            "bthci_evt.le_features.coded_phy",
9850
14
            FT_BOOLEAN, 64, NULL, 0x0000000000000800,
9851
14
            NULL, HFILL }
9852
14
        },
9853
14
        { &hf_bthci_evt_le_features_extended_advertising,
9854
14
          { "Extended Advertising",           "bthci_evt.le_features.extended_advertising",
9855
14
            FT_BOOLEAN, 64, NULL, 0x0000000000001000,
9856
14
            NULL, HFILL }
9857
14
        },
9858
14
        { &hf_bthci_evt_le_features_periodic_advertising,
9859
14
          { "Periodic Advertising",           "bthci_evt.le_features.periodic_advertising",
9860
14
            FT_BOOLEAN, 64, NULL, 0x0000000000002000,
9861
14
            NULL, HFILL }
9862
14
        },
9863
14
        { &hf_bthci_evt_le_features_channel_selection_algorithm_2,
9864
14
          { "Channel Selection Algorithm #2",    "bthci_evt.le_features.channel_selection_algorithm_2",
9865
14
            FT_BOOLEAN, 64, NULL, 0x0000000000004000,
9866
14
            NULL, HFILL }
9867
14
        },
9868
14
        { &hf_bthci_evt_le_features_power_class_1,
9869
14
          { "Power Class 1",                     "bthci_evt.le_features.power_class_1",
9870
14
            FT_BOOLEAN, 64, NULL, 0x0000000000008000,
9871
14
            NULL, HFILL }
9872
14
        },
9873
14
        { &hf_bthci_evt_le_features_minimum_number_of_used_channels_procedure,
9874
14
          { "Minimum Number of Used Channels Procedure", "bthci_evt.le_features.minimum_number_of_used_channels_procedure",
9875
14
            FT_BOOLEAN, 64, NULL, 0x0000000000010000,
9876
14
            NULL, HFILL }
9877
14
        },
9878
14
        { &hf_bthci_evt_le_features_connection_cte_request,
9879
14
          { "Connection CTE Request", "bthci_evt.le_features.connection_cte_request",
9880
14
            FT_BOOLEAN, 64, NULL, 0x0000000000020000,
9881
14
            NULL, HFILL }
9882
14
        },
9883
14
        { &hf_bthci_evt_le_features_connection_cte_response,
9884
14
          { "Connection CTE Response", "bthci_evt.le_features.connection_cte_response",
9885
14
            FT_BOOLEAN, 64, NULL, 0x0000000000040000,
9886
14
            NULL, HFILL }
9887
14
        },
9888
14
        { &hf_bthci_evt_le_features_connectionless_cte_tx,
9889
14
          { "Connectionless CTE Tx", "bthci_evt.le_features.connectionless_cte_tx",
9890
14
            FT_BOOLEAN, 64, NULL, 0x0000000000080000,
9891
14
            NULL, HFILL }
9892
14
        },
9893
14
        { &hf_bthci_evt_le_features_connectionless_cte_rx,
9894
14
          { "Connectionless CTE Rx", "bthci_evt.le_features.connectionless_cte_rx",
9895
14
            FT_BOOLEAN, 64, NULL, 0x0000000000100000,
9896
14
            NULL, HFILL }
9897
14
        },
9898
14
        { &hf_bthci_evt_le_features_antenna_switching_during_cte_tx_aod,
9899
14
          { "Antenna Switching During CTE Tx (AoD)", "bthci_evt.le_features.antenna_switching_during_cte_tx_aod",
9900
14
            FT_BOOLEAN, 64, NULL, 0x0000000000200000,
9901
14
            NULL, HFILL }
9902
14
        },
9903
14
        { &hf_bthci_evt_le_features_antenna_switching_during_cte_rx_aoa,
9904
14
          { "Antenna Switching During CTE Rx (AoA)", "bthci_evt.le_features.antenna_switching_during_cte_rx_aoa",
9905
14
            FT_BOOLEAN, 64, NULL, 0x0000000000400000,
9906
14
            NULL, HFILL }
9907
14
        },
9908
14
        { &hf_bthci_evt_le_features_receiving_cte,
9909
14
          { "Receiving CTE", "bthci_evt.le_features.receiving_cte",
9910
14
            FT_BOOLEAN, 64, NULL, 0x0000000000800000,
9911
14
            NULL, HFILL }
9912
14
        },
9913
14
        { &hf_bthci_evt_le_features_periodic_advertising_sync_transfer_sender,
9914
14
          { "Periodic Advertising Sync Transfer - Sender", "bthci_evt.le_features.periodic_advertising_sync_transfer_sender",
9915
14
            FT_BOOLEAN, 64, NULL, 0x0000000001000000,
9916
14
            NULL, HFILL }
9917
14
        },
9918
14
        { &hf_bthci_evt_le_features_periodic_advertising_sync_transfer_receiver,
9919
14
          { "Periodic Advertising Sync Transfer - Receiver", "bthci_evt.le_features.periodic_advertising_sync_transfer_receiver",
9920
14
            FT_BOOLEAN, 64, NULL, 0x0000000002000000,
9921
14
            NULL, HFILL }
9922
14
        },
9923
14
        { &hf_bthci_evt_le_features_sleep_clock_accuracy_updates,
9924
14
          { "Sleep Clock Accuracy Updates", "bthci_evt.le_features.sleep_clock_accuracy_updates",
9925
14
            FT_BOOLEAN, 64, NULL, 0x0000000004000000,
9926
14
            NULL, HFILL }
9927
14
        },
9928
14
        { &hf_bthci_evt_le_features_remote_public_key_validation,
9929
14
          { "Remote Public Key Validation", "bthci_evt.le_features.remote_public_key_validation",
9930
14
            FT_BOOLEAN, 64, NULL, 0x0000000008000000,
9931
14
            NULL, HFILL }
9932
14
        },
9933
14
        { &hf_bthci_evt_le_features_cis_central,
9934
14
          { "Connected Isochronous Stream - Central", "bthci_evt.le_features.cis_central",
9935
14
            FT_BOOLEAN, 64, NULL, 0x0000000010000000,
9936
14
            NULL, HFILL }
9937
14
        },
9938
14
        { &hf_bthci_evt_le_features_cis_peripheral,
9939
14
          { "Connected Isochronous Stream - Peripheral", "bthci_evt.le_features.cis_peripheral",
9940
14
            FT_BOOLEAN, 64, NULL, 0x0000000020000000,
9941
14
            NULL, HFILL }
9942
14
        },
9943
14
        { &hf_bthci_evt_le_features_isochronous_broadcaster,
9944
14
          { "Isochronous Broadcaster", "bthci_evt.le_features.isochronous_broadcaster",
9945
14
            FT_BOOLEAN, 64, NULL, 0x0000000040000000,
9946
14
            NULL, HFILL }
9947
14
        },
9948
14
        { &hf_bthci_evt_le_features_synchronized_receiver,
9949
14
          { "Synchronized Receiver", "bthci_evt.le_features.synchronized_receiver",
9950
14
            FT_BOOLEAN, 64, NULL, 0x0000000080000000,
9951
14
            NULL, HFILL }
9952
14
        },
9953
14
        { &hf_bthci_evt_le_features_isochronous_channels_host_support,
9954
14
          { "Isochronous Channels (Host_support)", "bthci_evt.le_features.isochronous_channels_host_support",
9955
14
            FT_BOOLEAN, 64, NULL, 0x0000000100000000,
9956
14
            NULL, HFILL }
9957
14
        },
9958
14
        { &hf_bthci_evt_le_features_power_control_request,
9959
14
          { "Power Control Request", "bthci_evt.le_features.power_control_request",
9960
14
            FT_BOOLEAN, 64, NULL, 0x0000000200000000,
9961
14
            NULL, HFILL }
9962
14
        },
9963
14
        { &hf_bthci_evt_le_features_power_change_indication,
9964
14
          { "Power Change Indication", "bthci_evt.le_features.power_change_indication",
9965
14
            FT_BOOLEAN, 64, NULL, 0x0000000400000000,
9966
14
            NULL, HFILL }
9967
14
        },
9968
14
        { &hf_bthci_evt_le_features_path_loss_monitoring,
9969
14
          { "Path Loss Monitoring", "bthci_evt.le_features.path_loss_monitoring",
9970
14
            FT_BOOLEAN, 64, NULL, 0x0000000800000000,
9971
14
            NULL, HFILL }
9972
14
        },
9973
14
        { &hf_bthci_evt_le_features_periodic_advertising_adi,
9974
14
          { "Periodic Advertising ADI", "bthci_evt.le_features.periodic_advertising_adi",
9975
14
            FT_BOOLEAN, 64, NULL, 0x0000001000000000,
9976
14
            NULL, HFILL }
9977
14
        },
9978
14
        { &hf_bthci_evt_le_features_connection_subrating,
9979
14
          { "Connection Subrating", "bthci_evt.le_features.connection_subrating",
9980
14
            FT_BOOLEAN, 64, NULL, 0x0000002000000000,
9981
14
            NULL, HFILL }
9982
14
        },
9983
14
        { &hf_bthci_evt_le_features_connection_subrating_host_support,
9984
14
          { "Connection Subrating (Host support)", "bthci_evt.le_features.connection_subrating_host_support",
9985
14
            FT_BOOLEAN, 64, NULL, 0x0000004000000000,
9986
14
            NULL, HFILL }
9987
14
        },
9988
14
        { &hf_bthci_evt_le_features_channel_classification,
9989
14
          { "Channel Classification", "bthci_evt.le_features.channel_classification",
9990
14
            FT_BOOLEAN, 64, NULL, 0x0000008000000000,
9991
14
            NULL, HFILL }
9992
14
        },
9993
14
        { &hf_bthci_evt_le_features_coding_selection,
9994
14
          { "Coding Selection", "bthci_evt.le_features.coding_selection",
9995
14
            FT_BOOLEAN, 64, NULL, 0x0000010000000000,
9996
14
            NULL, HFILL }
9997
14
        },
9998
14
        { &hf_bthci_evt_le_features_coding_selection_host_support,
9999
14
          { "Coding Selection (Host support)", "bthci_evt.le_features.coding_selection_host_support",
10000
14
            FT_BOOLEAN, 64, NULL, 0x0000020000000000,
10001
14
            NULL, HFILL }
10002
14
        },
10003
14
        { &hf_bthci_evt_le_features_decision_based_advertising_filtering,
10004
14
          { "Decision-based Advertising Filtering", "bthci_evt.le_features.decision_based_advertising_filtering",
10005
14
            FT_BOOLEAN, 64, NULL, 0x0000040000000000,
10006
14
            NULL, HFILL }
10007
14
        },
10008
14
        { &hf_bthci_evt_le_features_periodic_advertising_responses_advertiser,
10009
14
          { "Periodic Advertising with Responses - Advertiser", "bthci_evt.le_features.periodic_advertising_responses_advertiser",
10010
14
            FT_BOOLEAN, 64, NULL, 0x0000080000000000,
10011
14
            NULL, HFILL }
10012
14
        },
10013
14
        { &hf_bthci_evt_le_features_periodic_advertising_responses_scanner,
10014
14
          { "Periodic Advertising with Responses - Scanner", "bthci_evt.le_features.periodic_advertising_responses_scanner",
10015
14
            FT_BOOLEAN, 64, NULL, 0x0000100000000000,
10016
14
            NULL, HFILL }
10017
14
        },
10018
14
        { &hf_bthci_evt_le_features_unsegmented_framed_mode,
10019
14
          { "Unsegmented Framed Mode", "bthci_evt.le_features.unsegmented_framed_mode",
10020
14
            FT_BOOLEAN, 64, NULL, 0x0000200000000000,
10021
14
            NULL, HFILL }
10022
14
        },
10023
14
        { &hf_bthci_evt_le_features_channel_sounding,
10024
14
          { "Channel Sounding", "bthci_evt.le_features.channel_sounding",
10025
14
            FT_BOOLEAN, 64, NULL, 0x0000400000000000,
10026
14
            NULL, HFILL }
10027
14
        },
10028
14
        { &hf_bthci_evt_le_features_channel_sounding_host_support,
10029
14
          { "Channel Sounding (Host support)", "bthci_evt.le_features.channel_sounding_host_support",
10030
14
            FT_BOOLEAN, 64, NULL, 0x0000800000000000,
10031
14
            NULL, HFILL }
10032
14
        },
10033
14
        { &hf_bthci_evt_le_features_channel_sounding_tone_quality_indication,
10034
14
          { "Channel Sounding - Tone Quality Indication", "bthci_evt.le_features.channel_sounding_tone_quality_indication",
10035
14
            FT_BOOLEAN, 64, NULL, 0x0001000000000000,
10036
14
            NULL, HFILL }
10037
14
        },
10038
14
        { &hf_bthci_evt_le_features_ext_feature_set,
10039
14
          { "Extended Feature Set", "bthci_evt.le_features.ext_feature_set",
10040
14
            FT_BOOLEAN, 64, NULL, 0x8000000000000000,
10041
14
            NULL, HFILL }
10042
14
        },
10043
14
        { &hf_bthci_evt_le_features_reserved,
10044
14
            { "Reserved",                                  "bthci_evt.le_features.reserved",
10045
14
            FT_UINT64, BASE_HEX, NULL, UINT64_C(0x7FFE000000000000),
10046
14
            NULL, HFILL }
10047
14
        },
10048
14
        { &hf_bthci_evt_le_ext_features_1,
10049
14
          { "Supported LE Extended Features - Bit 64-127", "bthci_evt.le_ext_features_1",
10050
14
            FT_UINT64, BASE_HEX, NULL, 0x00,
10051
14
            NULL, HFILL }
10052
14
        },
10053
14
        { &hf_bthci_evt_le_ext_features_1_monitoring_advertisers,
10054
14
          { "Monitoring Advertisers", "bthci_evt.le_ext_features_1.monitoring_advertisers",
10055
14
            FT_BOOLEAN, 64, NULL, 0x0000000000000001,
10056
14
            NULL, HFILL }
10057
14
        },
10058
14
        { &hf_bthci_evt_le_ext_features_1_frame_space_update,
10059
14
          { "Frame Space Update", "bthci_evt.le_ext_features_page1.frame_space_update",
10060
14
            FT_BOOLEAN, 64, NULL, 0x0000000000000002,
10061
14
            NULL, HFILL }
10062
14
        },
10063
14
        { &hf_bthci_evt_le_ext_features_1_reserved,
10064
14
            { "Reserved",                                  "bthci_evt.le_ext_features_1.reserved",
10065
14
            FT_UINT64, BASE_HEX, NULL, UINT64_C(0xFFFFFFFFFFFFFFFC),
10066
14
            NULL, HFILL }
10067
14
        },
10068
14
        { &hf_bthci_evt_mws_number_of_transports,
10069
14
          { "Number of Transports",                        "bthci_evt.mws.number_of_transports",
10070
14
            FT_UINT8, BASE_DEC, NULL, 0x0,
10071
14
            NULL, HFILL }
10072
14
        },
10073
14
        { &hf_bthci_evt_mws_transport_layers,
10074
14
          { "Transport Layers",                            "bthci_evt.mws.transport_layers",
10075
14
            FT_NONE, BASE_NONE, NULL, 0x0,
10076
14
            NULL, HFILL }
10077
14
        },
10078
14
        { &hf_bthci_evt_mws_transport_layers_item,
10079
14
          { "Transport Layer Item",                        "bthci_evt.mws.transport_layers.item",
10080
14
            FT_NONE, BASE_NONE, NULL, 0x0,
10081
14
            NULL, HFILL }
10082
14
        },
10083
14
        { &hf_bthci_evt_mws_transport_layer,
10084
14
          { "Transport Layer",                             "bthci_evt.mws.transport_layers.item.transport_layer",
10085
14
            FT_UINT8, BASE_HEX, VALS(bthci_evt_mws_transport_layer_vals), 0x0,
10086
14
            NULL, HFILL }
10087
14
        },
10088
14
        { &hf_bthci_evt_mws_number_of_baud_rates,
10089
14
          { "Number of Baud Rates",                        "bthci_evt.mws.number_of_baud_rates",
10090
14
            FT_UINT8, BASE_DEC, NULL, 0x0,
10091
14
            NULL, HFILL }
10092
14
        },
10093
14
        { &hf_bthci_evt_mws_to_mws_baud_rates,
10094
14
          { "To MWS Baud Rates",                           "bthci_evt.mws.to_mws_baud_rates",
10095
14
            FT_NONE, BASE_NONE, NULL, 0x0,
10096
14
            NULL, HFILL }
10097
14
        },
10098
14
        { &hf_bthci_evt_mws_to_mws_baud_rates_tranport_item,
10099
14
          { "To MWS Baud Rates Item",                      "bthci_evt.mws.to_mws_baud_rates.item",
10100
14
            FT_NONE, BASE_NONE, NULL, 0x0,
10101
14
            NULL, HFILL }
10102
14
        },
10103
14
        { &hf_bthci_evt_mws_to_mws_baud_rate,
10104
14
          { "To MWS Baud Rate",                            "bthci_evt.mws.to_mws_baud_rates.item.baud_rate",
10105
14
            FT_UINT32, BASE_DEC, NULL, 0x0,
10106
14
            NULL, HFILL }
10107
14
        },
10108
14
        { &hf_bthci_evt_mws_from_mws_baud_rates,
10109
14
          { "From MWS Baud Rates",                         "bthci_evt.mws.from_mws_baud_rates",
10110
14
            FT_NONE, BASE_NONE, NULL, 0x0,
10111
14
            NULL, HFILL }
10112
14
        },
10113
14
        { &hf_bthci_evt_mws_from_mws_baud_rates_tranport_item,
10114
14
          { "From MWS Baud Rates Item",                    "bthci_evt.mws.from_mws_baud_rates.item",
10115
14
            FT_NONE, BASE_NONE, NULL, 0x0,
10116
14
            NULL, HFILL }
10117
14
        },
10118
14
        { &hf_bthci_evt_mws_from_mws_baud_rate,
10119
14
          { "From MWS Baud Rate",                          "bthci_evt.mws.from_mws_baud_rates.item.baud_rate",
10120
14
            FT_UINT32, BASE_DEC, NULL, 0x0,
10121
14
            NULL, HFILL }
10122
14
        },
10123
14
        { &hf_bthci_evt_selected_tx_power,
10124
14
          { "Selected TX Power (dBm)",                     "bthci_evt.transmit_power_level",
10125
14
            FT_INT8, BASE_DEC, NULL, 0x0,
10126
14
            NULL, HFILL }
10127
14
        },
10128
14
        { &hf_bthci_evt_which_clock,
10129
14
          { "Which Clock",                                 "bthci_evt.which_clock",
10130
14
            FT_UINT8, BASE_HEX, VALS(which_clock_vals), 0x0,
10131
14
            NULL, HFILL }
10132
14
        },
10133
14
        { &hf_bthci_evt_slot_offset,
10134
14
          { "Slot Offset",                                 "bthci_evt.slot_offset",
10135
14
            FT_UINT16, BASE_DEC, NULL, 0x0,
10136
14
            NULL, HFILL }
10137
14
        },
10138
14
        { &hf_bthci_evt_clock_offset_32,
10139
14
          { "Clock Offset",                                "bthci_evt.clock_offset_32",
10140
14
            FT_UINT32, BASE_HEX, NULL, 0x0FFFFFFF,
10141
14
            "Bits 0-27 of the Clock Offset between CLKNreceiver-CLKNtransmitter", HFILL }
10142
14
        },
10143
14
        { &hf_bthci_evt_next_broadcast_instant,
10144
14
          { "Next Broadcast Instant",                      "bthci_evt.next_broadcast_instant",
10145
14
            FT_UINT32, BASE_HEX, NULL, 0x0FFFFFFF,
10146
14
            "CLK of a future broadcast on this channel", HFILL }
10147
14
        },
10148
14
        { &hf_bthci_evt_lt_addr,
10149
14
          { "LT_ADDR",                                     "bthci_evt.lt_addr",
10150
14
            FT_UINT8, BASE_HEX, NULL, 0x0,
10151
14
            NULL, HFILL }
10152
14
        },
10153
14
        { &hf_bthci_evt_connectionless_peripheral_broadcast_interval,
10154
14
          { "Connectionless Peripheral Broadcast Interval",     "bthci_evt.connectionless_peripheral_broadcast_interval",
10155
14
            FT_UINT16, BASE_DEC, NULL, 0x0,
10156
14
            NULL, HFILL }
10157
14
        },
10158
14
        { &hf_bthci_evt_service_data,
10159
14
          { "Service Data",                                "bthci_evt.service_data",
10160
14
            FT_UINT8, BASE_HEX, NULL, 0x0,
10161
14
            NULL, HFILL }
10162
14
        },
10163
14
        { &hf_bthci_evt_local_sam_index,
10164
14
          { "Local SAM Index",                  "bthci_evt.local_sam_index",
10165
14
            FT_UINT8, BASE_HEX|BASE_SPECIAL_VALS, VALS(unique_sam_disabled), 0x0,
10166
14
            NULL, HFILL }
10167
14
        },
10168
14
        { &hf_bthci_evt_local_sam_tx_availability,
10169
14
          { "Local SAM Tx Availability",        "bthci_evt.local_sam_tx_availability",
10170
14
            FT_UINT8, BASE_DEC, NULL, 0x0,
10171
14
            NULL, HFILL }
10172
14
        },
10173
14
        { &hf_bthci_evt_local_sam_rx_availability,
10174
14
          { "Local SAM Rx Availability",        "bthci_evt.local_sam_rx_availability",
10175
14
            FT_UINT8, BASE_DEC, NULL, 0x0,
10176
14
            NULL, HFILL }
10177
14
        },
10178
14
        { &hf_bthci_evt_remote_sam_index,
10179
14
          { "Remote SAM Index",                 "bthci_evt.remote_sam_index",
10180
14
            FT_UINT8, BASE_HEX|BASE_SPECIAL_VALS, VALS(unique_sam_disabled), 0x0,
10181
14
            NULL, HFILL }
10182
14
        },
10183
14
        { &hf_bthci_evt_remote_sam_tx_availability,
10184
14
          { "Remote SAM Tx Availability",       "bthci_evt.remote_sam_tx_availability",
10185
14
            FT_UINT8, BASE_DEC, NULL, 0x0,
10186
14
            NULL, HFILL }
10187
14
        },
10188
14
        { &hf_bthci_evt_remote_sam_rx_availability,
10189
14
          { "Remote SAM Rx Availability",       "bthci_evt.remote_sam_rx_availability",
10190
14
            FT_UINT8, BASE_DEC, NULL, 0x0,
10191
14
            NULL, HFILL }
10192
14
        },
10193
14
        { &hf_bthci_evt_receive_status,
10194
14
          { "Receive Status",                              "bthci_evt.receive_status",
10195
14
            FT_UINT8, BASE_HEX, VALS(receive_status_vals), 0x0,
10196
14
            NULL, HFILL }
10197
14
        },
10198
14
        { &hf_bthci_evt_fragment,
10199
14
          { "Fragment",                                    "bthci_evt.fragment",
10200
14
            FT_UINT8, BASE_HEX, VALS(fragment_vals), 0x0,
10201
14
            NULL, HFILL }
10202
14
        },
10203
14
        { &hf_bthci_evt_data,
10204
14
          { "Data",                                        "bthci_evt.data",
10205
14
            FT_BYTES, BASE_NONE, NULL, 0x0,
10206
14
            NULL, HFILL }
10207
14
        },
10208
14
        { &hf_bthci_evt_le_number_of_reports,
10209
14
          { "Number of Reports",                           "bthci_evt.number_of_reports",
10210
14
            FT_UINT8, BASE_DEC, NULL, 0x0,
10211
14
            NULL, HFILL }
10212
14
        },
10213
14
        { &hf_bthci_evt_le_report,
10214
14
          { "Report",                                      "bthci_evt.report",
10215
14
            FT_NONE, BASE_NONE, NULL, 0x0,
10216
14
            NULL, HFILL }
10217
14
        },
10218
14
        { &hf_bthci_evt_le_event_type,
10219
14
          { "Event Type",                           "bthci_evt.event_type",
10220
14
            FT_UINT8, BASE_HEX, VALS(event_type_vals), 0x0,
10221
14
            NULL, HFILL }
10222
14
        },
10223
14
        { &hf_bthci_evt_le_direct_bd_addr,
10224
14
          { "Direct BD_ADDR",          "bthci_evt.direct_bd_addr",
10225
14
            FT_ETHER, BASE_NONE, NULL, 0x0,
10226
14
            NULL, HFILL}
10227
14
        },
10228
14
        { &hf_bthci_evt_le_direct_address_type,
10229
14
          { "Direct Address Type", "bthci_evt.le_direct_address_type",
10230
14
            FT_UINT8, BASE_HEX, VALS(bthci_cmd_address_types_vals), 0x0,
10231
14
            NULL, HFILL }
10232
14
        },
10233
14
        { &hf_bthci_evt_le_address_type,
10234
14
          { "Address Type", "bthci_evt.le_address_type",
10235
14
            FT_UINT8, BASE_HEX, VALS(bthci_cmd_address_types_vals), 0x0,
10236
14
            NULL, HFILL }
10237
14
        },
10238
14
        { &hf_bthci_evt_le_rssi,
10239
14
          { "RSSI (dBm)", "bthci_evt.le_rssi",
10240
14
            FT_INT8, BASE_DEC, NULL, 0x0,
10241
14
            NULL, HFILL }
10242
14
        },
10243
14
        { &hf_bthci_evt_le_tx_phy,
10244
14
          { "Tx PHY", "bthci_evt.le_tx_phy",
10245
14
            FT_UINT8, BASE_HEX|BASE_EXT_STRING, &bthci_cmd_le_phy_vals_ext, 0x0,
10246
14
            NULL, HFILL }
10247
14
        },
10248
14
        { &hf_bthci_evt_le_rx_phy,
10249
14
          { "Rx PHY", "bthci_evt.le_rx_phy",
10250
14
            FT_UINT8, BASE_HEX|BASE_EXT_STRING, &bthci_cmd_le_phy_vals_ext, 0x0,
10251
14
            NULL, HFILL }
10252
14
        },
10253
14
        { &hf_bthci_evt_max_adv_data_length,
10254
14
          { "Maximum Advertising Data Length", "bthci_evt.max_adv_data_length",
10255
14
            FT_UINT16, BASE_DEC, NULL, 0x0,
10256
14
            NULL, HFILL }
10257
14
        },
10258
14
        { &hf_bthci_evt_num_supported_adv_sets,
10259
14
          { "Number of Supported Advertising Sets", "bthci_evt.num_supported_adv_sets",
10260
14
            FT_UINT8, BASE_DEC, NULL, 0x0,
10261
14
            NULL, HFILL }
10262
14
        },
10263
14
        { &hf_bthci_evt_number_of_supported_codecs,
10264
14
          { "Number of Supported Codecs", "bthci_evt.number_of_supported_codecs",
10265
14
            FT_UINT8, BASE_DEC, NULL, 0x0,
10266
14
            NULL, HFILL }
10267
14
        },
10268
14
        { &hf_bthci_evt_number_of_supported_vendor_codecs,
10269
14
          { "Number of Supported Vendor Codecs", "bthci_evt.number_of_supported_vendor_codecs",
10270
14
            FT_UINT8, BASE_DEC, NULL, 0x0,
10271
14
            NULL, HFILL }
10272
14
        },
10273
14
        { &hf_bthci_evt_codecs,
10274
14
          { "Codecs", "bthci_evt.codecs",
10275
14
            FT_NONE, BASE_NONE, NULL, 0x0,
10276
14
            NULL, HFILL }
10277
14
        },
10278
14
        { &hf_bthci_evt_vendor_codecs,
10279
14
          { "Vendor Codecs", "bthci_evt.vendor_codecs",
10280
14
            FT_NONE, BASE_NONE, NULL, 0x0,
10281
14
            NULL, HFILL }
10282
14
        },
10283
14
        { &hf_bthci_evt_vendor_codecs_item,
10284
14
          { "Item", "bthci_evt.vendor_codecs.item",
10285
14
            FT_STRING, BASE_NONE, NULL, 0x0,
10286
14
            NULL, HFILL }
10287
14
        },
10288
14
        { &hf_bthci_evt_codec_id,
10289
14
          { "Codec", "bthci_evt.codec_id",
10290
14
            FT_UINT8, BASE_HEX, VALS(bthci_evt_codec_id_vals), 0x0,
10291
14
            NULL, HFILL }
10292
14
        },
10293
14
        { &hf_bthci_evt_vendor_codec_id,
10294
14
          { "Vendor Codec ID", "bthci_evt.vendor_codecs.item.codec_id",
10295
14
            FT_UINT16, BASE_HEX, NULL, 0x0,
10296
14
            NULL, HFILL }
10297
14
        },
10298
14
        { &hf_bthci_evt_mws_bt_rx_priority_assert_offset,
10299
14
          { "Bluetooth Rx Priority Assert Offset", "bthci_evt.mws.bt.rx_priority.assert.offset",
10300
14
            FT_INT16, BASE_DEC, NULL, 0x0,
10301
14
            NULL, HFILL }
10302
14
        },
10303
14
        { &hf_bthci_evt_mws_bt_rx_priority_assert_jitter,
10304
14
          { "Bluetooth Rx Priority Assert Jitter", "bthci_evt.mws.bt.rx_priority.assert.jitter",
10305
14
            FT_UINT16, BASE_DEC, NULL, 0x0,
10306
14
            NULL, HFILL }
10307
14
        },
10308
14
        { &hf_bthci_evt_mws_bt_rx_priority_deassert_offset,
10309
14
          { "Bluetooth Rx Priority Deassert Offset", "bthci_evt.mws.bt.rx_priority.deassert.offset",
10310
14
            FT_INT16, BASE_DEC, NULL, 0x0,
10311
14
            NULL, HFILL }
10312
14
        },
10313
14
        { &hf_bthci_evt_mws_bt_rx_priority_deassert_jitter,
10314
14
          { "Bluetooth Rx Priority Deassert Jitter", "bthci_evt.mws.bt.rx_priority.deassert.jitter",
10315
14
            FT_UINT16, BASE_DEC, NULL, 0x0,
10316
14
            NULL, HFILL }
10317
14
        },
10318
14
        { &hf_bthci_evt_mws_bt_tx_priority_assert_offset,
10319
14
          { "Bluetooth Tx Priority Assert Offset", "bthci_evt.mws.bt.tx_priority.assert.offset",
10320
14
            FT_INT16, BASE_DEC, NULL, 0x0,
10321
14
            NULL, HFILL }
10322
14
        },
10323
14
        { &hf_bthci_evt_mws_bt_tx_priority_assert_jitter,
10324
14
          { "Bluetooth Tx Priority Assert Jitter", "bthci_evt.mws.bt.tx_priority.assert.jitter",
10325
14
            FT_UINT16, BASE_DEC, NULL, 0x0,
10326
14
            NULL, HFILL }
10327
14
        },
10328
14
        { &hf_bthci_evt_mws_bt_tx_priority_deassert_offset,
10329
14
          { "Bluetooth Tx Priority Deassert Offset", "bthci_evt.mws.bt.tx_priority.deassert.offset",
10330
14
            FT_INT16, BASE_DEC, NULL, 0x0,
10331
14
            NULL, HFILL }
10332
14
        },
10333
14
        { &hf_bthci_evt_mws_bt_tx_priority_deassert_jitter,
10334
14
          { "Bluetooth Tx Priority Deassert Jitter", "bthci_evt.mws.bt.tx_priority.deassert.jitter",
10335
14
            FT_UINT16, BASE_DEC, NULL, 0x0,
10336
14
            NULL, HFILL }
10337
14
        },
10338
14
        { &hf_bthci_evt_mws_802_rx_priority_assert_offset,
10339
14
          { "802 Rx Priority Assert Offset", "bthci_evt.mws.802.rx_priority.assert.offset",
10340
14
            FT_INT16, BASE_DEC, NULL, 0x0,
10341
14
            NULL, HFILL }
10342
14
        },
10343
14
        { &hf_bthci_evt_mws_802_rx_priority_assert_jitter,
10344
14
          { "802 Rx Priority Assert Jitter", "bthci_evt.mws.802.rx_priority.assert.jitter",
10345
14
            FT_UINT16, BASE_DEC, NULL, 0x0,
10346
14
            NULL, HFILL }
10347
14
        },
10348
14
        { &hf_bthci_evt_mws_802_rx_priority_deassert_offset,
10349
14
          { "802 Rx Priority Deassert Offset", "bthci_evt.mws.802.rx_priority.deassert.offset",
10350
14
            FT_INT16, BASE_DEC, NULL, 0x0,
10351
14
            NULL, HFILL }
10352
14
        },
10353
14
        { &hf_bthci_evt_mws_802_rx_priority_deassert_jitter,
10354
14
          { "802 Rx Priority Deassert Jitter", "bthci_evt.mws.802.rx_priority.deassert.jitter",
10355
14
            FT_UINT16, BASE_DEC, NULL, 0x0,
10356
14
            NULL, HFILL }
10357
14
        },
10358
14
        { &hf_bthci_evt_mws_802_tx_priority_assert_offset,
10359
14
          { "802 Tx Priority Assert Offset", "bthci_evt.mws.802.tx_priority.assert.offset",
10360
14
            FT_INT16, BASE_DEC, NULL, 0x0,
10361
14
            NULL, HFILL }
10362
14
        },
10363
14
        { &hf_bthci_evt_mws_802_tx_priority_assert_jitter,
10364
14
          { "802 Tx Priority Assert Jitter", "bthci_evt.mws.802.tx_priority.assert.jitter",
10365
14
            FT_UINT16, BASE_DEC, NULL, 0x0,
10366
14
            NULL, HFILL }
10367
14
        },
10368
14
        { &hf_bthci_evt_mws_802_tx_priority_deassert_offset,
10369
14
          { "802 Tx Priority Deassert Offset", "bthci_evt.mws.802.tx_priority.deassert.offset",
10370
14
            FT_INT16, BASE_DEC, NULL, 0x0,
10371
14
            NULL, HFILL }
10372
14
        },
10373
14
        { &hf_bthci_evt_mws_802_tx_priority_deassert_jitter,
10374
14
          { "802 Tx Priority Deassert Jitter", "bthci_evt.mws.802.tx_priority.deassert.jitter",
10375
14
            FT_UINT16, BASE_DEC, NULL, 0x0,
10376
14
            NULL, HFILL }
10377
14
        },
10378
14
        { &hf_bthci_evt_sync_train_interval,
10379
14
          { "Synchronization Train Interval", "bthci_evt.sync_train_interval",
10380
14
            FT_UINT16, BASE_DEC, NULL, 0x0,
10381
14
            NULL, HFILL }
10382
14
        },
10383
14
        { &hf_bthci_evt_sync_train_to,
10384
14
          { "Synchronization Train To", "bthci_evt.sync_train_to",
10385
14
            FT_UINT32, BASE_DEC, NULL, 0x0,
10386
14
            NULL, HFILL }
10387
14
        },
10388
14
        { &hf_bthci_evt_secure_connection_host_support,
10389
14
          { "Secure Connection Host Support", "bthci_evt.secure_connection_host_support",
10390
14
            FT_UINT8, BASE_HEX, VALS(evt_enable_values), 0x0,
10391
14
            NULL, HFILL }
10392
14
        },
10393
14
        { &hf_bthci_evt_authenticated_payload_timeout,
10394
14
          { "Authenticated Payload Timeout", "bthci_evt.authenticated_payload_timeout",
10395
14
            FT_UINT16, BASE_CUSTOM, CF_FUNC(bluetooth_unit_0p01_sec), 0x0,
10396
14
            NULL, HFILL }
10397
14
        },
10398
14
        { &hf_bthci_evt_c192,
10399
14
          { "C 192", "bthci_evt.c192",
10400
14
            FT_BYTES, BASE_NONE, NULL, 0x0,
10401
14
            NULL, HFILL }
10402
14
        },
10403
14
        { &hf_bthci_evt_r192,
10404
14
          { "R 192", "bthci_evt.r192",
10405
14
            FT_BYTES, BASE_NONE, NULL, 0x0,
10406
14
            NULL, HFILL }
10407
14
        },
10408
14
        { &hf_bthci_evt_c256,
10409
14
          { "C 256", "bthci_evt.c256",
10410
14
            FT_BYTES, BASE_NONE, NULL, 0x0,
10411
14
            NULL, HFILL }
10412
14
        },
10413
14
        { &hf_bthci_evt_r256,
10414
14
          { "R 256", "bthci_evt.r256",
10415
14
            FT_BYTES, BASE_NONE, NULL, 0x0,
10416
14
            NULL, HFILL }
10417
14
        },
10418
14
        { &hf_bthci_evt_extended_inquiry_length,
10419
14
          { "Extended Inquiry Length",        "bthci_evt.extended_inquiry_length",
10420
14
            FT_UINT16, BASE_CUSTOM, CF_FUNC(bluetooth_unit_0p625_ms), 0x0,
10421
14
            NULL, HFILL }
10422
14
        },
10423
14
        { &hf_bthci_evt_suggested_max_tx_octets,
10424
14
          { "Suggested Max Tx Octets",        "bthci_evt.suggested_max_tx_octets",
10425
14
            FT_UINT16, BASE_DEC, NULL, 0x0,
10426
14
            NULL, HFILL }
10427
14
        },
10428
14
        { &hf_bthci_evt_suggested_max_tx_time,
10429
14
          { "Suggested Max Tx Time",        "bthci_evt.suggested_max_tx_time",
10430
14
            FT_UINT16, BASE_DEC|BASE_UNIT_STRING, UNS(&units_microseconds), 0x0,
10431
14
            NULL, HFILL }
10432
14
        },
10433
14
        { &hf_bthci_evt_suggested_max_rx_octets,
10434
14
          { "Suggested Max Rx Octets",        "bthci_evt.suggested_max_rx_octets",
10435
14
            FT_UINT16, BASE_DEC, NULL, 0x0,
10436
14
            NULL, HFILL }
10437
14
        },
10438
14
        { &hf_bthci_evt_suggested_max_rx_time,
10439
14
          { "Suggested Max Rx Time",        "bthci_evt.suggested_max_rx_time",
10440
14
            FT_UINT16, BASE_DEC|BASE_UNIT_STRING, UNS(&units_microseconds), 0x0,
10441
14
            NULL, HFILL }
10442
14
        },
10443
14
        { &hf_bthci_evt_resolving_list_size,
10444
14
          { "Resolving List Size",        "bthci_evt.resolving_list_size",
10445
14
            FT_UINT8, BASE_DEC, NULL, 0x0,
10446
14
            NULL, HFILL }
10447
14
        },
10448
14
        { &hf_bthci_evt_ext_advts_event_type_connectable,
10449
14
          { "Connectable",     "bthci_evt.le_ext_advts_event_type.connectable",
10450
14
            FT_BOOLEAN, 16, NULL, 0x0001,
10451
14
            NULL, HFILL }
10452
14
        },
10453
14
        { &hf_bthci_evt_ext_advts_event_type_scannable,
10454
14
          { "Scannable",     "bthci_evt.le_ext_advts_event_type.scannable",
10455
14
            FT_BOOLEAN, 16, NULL, 0x0002,
10456
14
            NULL, HFILL }
10457
14
        },
10458
14
        { &hf_bthci_evt_ext_advts_event_type_directed,
10459
14
          { "Directed",     "bthci_evt.le_ext_advts_event_type.directed",
10460
14
            FT_BOOLEAN, 16, NULL, 0x0004,
10461
14
            NULL, HFILL }
10462
14
        },
10463
14
        { &hf_bthci_evt_ext_advts_event_type_scan_response,
10464
14
          { "Scan Response",     "bthci_evt.le_ext_advts_event_type.scan_response",
10465
14
            FT_BOOLEAN, 16, NULL, 0x0008,
10466
14
            NULL, HFILL }
10467
14
        },
10468
14
        { &hf_bthci_evt_ext_advts_event_type_legacy,
10469
14
          { "Legacy",     "bthci_evt.le_ext_advts_event_type.legacy",
10470
14
            FT_BOOLEAN, 16, NULL, 0x0010,
10471
14
            NULL, HFILL }
10472
14
        },
10473
14
        { &hf_bthci_evt_ext_advts_event_type_data_status,
10474
14
          { "Data Status",     "bthci_evt.le_ext_advts_event_type.data_status",
10475
14
            FT_UINT16, BASE_HEX, VALS(ext_adv_data_status_vals), 0x0060,
10476
14
            NULL, HFILL }
10477
14
        },
10478
14
        { &hf_bthci_evt_ext_advts_event_type_reserved,
10479
14
          { "Reserved",     "bthci_evt.le_ext_advts_event_type.reserved",
10480
14
            FT_UINT16, BASE_HEX, NULL, 0xFF80,
10481
14
            NULL, HFILL }
10482
14
        },
10483
14
        { &hf_bthci_evt_primary_phy,
10484
14
          { "Primary PHY", "bthci_evt.primary_phy",
10485
14
            FT_UINT8, BASE_HEX, VALS(bthci_evt_primary_phy_vals), 0x0,
10486
14
            NULL, HFILL }
10487
14
        },
10488
14
        { &hf_bthci_evt_secondary_phy,
10489
14
          { "Secondary PHY", "bthci_evt.secondary_phy",
10490
14
            FT_UINT8, BASE_HEX, VALS(bthci_evt_secondary_phy_vals), 0x0,
10491
14
            NULL, HFILL }
10492
14
        },
10493
14
        { &hf_bthci_evt_advertising_sid,
10494
14
          { "Advertising SID", "bthci_evt.advertising_sid",
10495
14
            FT_UINT8, BASE_HEX, NULL, 0x0,
10496
14
            NULL, HFILL }
10497
14
        },
10498
14
        { &hf_bthci_evt_tx_power,
10499
14
          { "TX Power", "bthci_evt.tx_power",
10500
14
            FT_INT8, BASE_DEC|BASE_UNIT_STRING, UNS(&units_dbm), 0x0,
10501
14
            NULL, HFILL }
10502
14
        },
10503
14
        { &hf_bthci_evt_periodic_advertising_interval,
10504
14
          { "Periodic Advertising Interval", "bthci_evt.periodic_advertising_interval",
10505
14
            FT_UINT16, BASE_CUSTOM, CF_FUNC(bluetooth_unit_1p25_ms), 0x0,
10506
14
            NULL, HFILL }
10507
14
        },
10508
14
        { &hf_bthci_evt_sync_handle,
10509
14
          { "Sync Handle", "bthci_evt.sync_handle",
10510
14
            FT_UINT16, BASE_HEX|BASE_SPECIAL_VALS, VALS(uint16_no_handle), 0x0,
10511
14
            NULL, HFILL }
10512
14
        },
10513
14
        { &hf_bthci_evt_data_status,
10514
14
          { "Data Status", "bthci_evt.data_status",
10515
14
            FT_UINT8, BASE_HEX, VALS(ext_adv_data_status_vals), 0x0,
10516
14
            NULL, HFILL }
10517
14
        },
10518
14
        { &hf_bthci_evt_advertising_handle,
10519
14
          { "Advertising Handle", "bthci_evt.adv_handle",
10520
14
            FT_UINT8, BASE_HEX|BASE_SPECIAL_VALS, VALS(uint8_no_handle), 0x0,
10521
14
            NULL, HFILL }
10522
14
        },
10523
14
        { &hf_bthci_evt_num_compl_ext_advertising_events,
10524
14
          { "Number Completed Extended Advertising Events", "bthci_evt.num_compl_ext_adv_events",
10525
14
            FT_UINT8, BASE_DEC, NULL, 0x0,
10526
14
            NULL, HFILL }
10527
14
        },
10528
14
        { &hf_bthci_evt_channel_selection_algorithm,
10529
14
          { "Channel Selection Algorithm", "bthci_evt.channel_selection_algorithm",
10530
14
            FT_UINT8, BASE_HEX, VALS(channel_selection_algo_vals), 0x0,
10531
14
            NULL, HFILL }
10532
14
        },
10533
14
        { &hf_bthci_evt_advertiser_clock_accuracy,
10534
14
          { "Advertiser Clock Accuracy", "bthci_evt.adv_clock_accuracy",
10535
14
            FT_UINT8, BASE_HEX|BASE_EXT_STRING, &bthci_cmd_clock_accuray_vals_ext, 0x0,
10536
14
            NULL, HFILL }
10537
14
        },
10538
14
        { &hf_bthci_evt_advertiser_phy,
10539
14
          { "Advertiser PHY", "bthci_evt.adv_phy",
10540
14
            FT_UINT8, BASE_HEX|BASE_EXT_STRING, &bthci_cmd_le_phy_vals_ext, 0x0,
10541
14
            NULL, HFILL }
10542
14
        },
10543
14
        { &hf_bthci_evt_periodic_adv_list_size,
10544
14
          { "Periodic Advertiser List Size",        "bthci_evt.le_periodic_adv_list_size",
10545
14
            FT_UINT8, BASE_DEC, NULL, 0x0,
10546
14
            NULL, HFILL }
10547
14
        },
10548
14
        { &hf_bthci_evt_min_tx_power,
10549
14
          { "Minimum TX Power", "bthci_evt.min_tx_power",
10550
14
            FT_INT8, BASE_DEC|BASE_UNIT_STRING, UNS(&units_dbm), 0x0,
10551
14
            NULL, HFILL }
10552
14
        },
10553
14
        { &hf_bthci_evt_max_tx_power,
10554
14
          { "Maximum TX Power", "bthci_evt.max_tx_power",
10555
14
            FT_INT8, BASE_DEC|BASE_UNIT_STRING, UNS(&units_dbm), 0x0,
10556
14
            NULL, HFILL }
10557
14
        },
10558
14
        { &hf_bthci_evt_rf_tx_path_compensation,
10559
14
          { "RF Tx Path Compensation Value",   "bthci_evt.rf_tx_path_compensation_value",
10560
14
            FT_INT16, BASE_DEC, NULL, 0x0,
10561
14
            NULL, HFILL }
10562
14
        },
10563
14
        { &hf_bthci_evt_rf_rx_path_compensation,
10564
14
          { "RF Rx Path Compensation Value",   "bthci_evt.rf_rx_path_compensation_value",
10565
14
            FT_INT16, BASE_DEC, NULL, 0x0,
10566
14
            NULL, HFILL }
10567
14
        },
10568
14
        { &hf_bthci_evt_channel_index,
10569
14
          { "Channel Index",        "bthci_evt.channel_index",
10570
14
            FT_UINT8, BASE_DEC, NULL, 0x0,
10571
14
            NULL, HFILL }
10572
14
        },
10573
14
        { &hf_bthci_evt_cte_rssi,
10574
14
          { "RSSI",   "bthci_evt.cte_rssi",
10575
14
            FT_INT16, BASE_DEC, NULL, 0x0,
10576
14
            NULL, HFILL }
10577
14
        },
10578
14
        { &hf_bthci_evt_antenna_id,
10579
14
          { "Antenna Id",        "bthci_evt.antenna_id",
10580
14
            FT_UINT8, BASE_DEC, NULL, 0x0,
10581
14
            NULL, HFILL }
10582
14
        },
10583
14
        { &hf_bthci_evt_cte_type,
10584
14
          { "CTE Type",        "bthci_evt.cte_type",
10585
14
            FT_UINT8, BASE_HEX|BASE_EXT_STRING, &bthci_cmd_cte_type_vals_ext, 0x0,
10586
14
            NULL, HFILL }
10587
14
        },
10588
14
        { &hf_bthci_evt_slot_durations,
10589
14
          { "Slot Durations",        "bthci_evt.slot_durations",
10590
14
            FT_UINT8, BASE_HEX|BASE_EXT_STRING, &bthci_cmd_slot_durations_vals_ext, 0x0,
10591
14
            NULL, HFILL }
10592
14
        },
10593
14
        { &hf_bthci_evt_packet_status,
10594
14
          { "Packet Status",        "bthci_evt.packet_status",
10595
14
            FT_UINT8, BASE_HEX, VALS(packet_status_vals), 0x0,
10596
14
            NULL, HFILL }
10597
14
        },
10598
14
        { &hf_bthci_evt_event_counter,
10599
14
          { "Event Counter",        "bthci_evt.event_counter",
10600
14
            FT_UINT16, BASE_HEX, NULL, 0x0,
10601
14
            NULL, HFILL }
10602
14
        },
10603
14
        { &hf_bthci_evt_sample_count,
10604
14
          { "Sample Count",        "bthci_evt.sample_count",
10605
14
            FT_UINT8, BASE_DEC, NULL, 0x0,
10606
14
            NULL, HFILL }
10607
14
        },
10608
14
        { &hf_bthci_evt_i_sample,
10609
14
          { "I",        "bthci_evt.i_sample",
10610
14
            FT_INT8, BASE_DEC, NULL, 0x0,
10611
14
            NULL, HFILL }
10612
14
        },
10613
14
        { &hf_bthci_evt_q_sample,
10614
14
          { "Q",        "bthci_evt.q_sample",
10615
14
            FT_INT8, BASE_DEC, NULL, 0x0,
10616
14
            NULL, HFILL }
10617
14
        },
10618
14
        { &hf_bthci_evt_service_data_past,
10619
14
          { "Service Data",        "bthci_evt.service_data_past",
10620
14
            FT_UINT16, BASE_HEX, NULL, 0x0,
10621
14
            NULL, HFILL }
10622
14
        },
10623
14
        { &hf_bthci_evt_number_antennae,
10624
14
          { "Number of Antennas",        "bthci_evt.number_antennae",
10625
14
            FT_UINT8, BASE_DEC, NULL, 0x0,
10626
14
            NULL, HFILL }
10627
14
        },
10628
14
        { &hf_bthci_evt_max_cte_length,
10629
14
          { "Max CTE Length",        "bthci_evt.max_cte_length",
10630
14
            FT_UINT8, BASE_DEC, NULL, 0x0,
10631
14
            NULL, HFILL }
10632
14
        },
10633
14
        { &hf_bthci_evt_max_length_antenna_switching_pattern,
10634
14
          { "Max Length Antenna Switching Pattern", "bthci_evt.max_length_antenna_switching_pattern",
10635
14
            FT_UINT8, BASE_DEC, NULL, 0x0,
10636
14
            NULL, HFILL }
10637
14
        },
10638
14
        { &hf_bthci_evt_supported_switching_sample_rates,
10639
14
          { "Supported Switching Sampling Rates", "bthci_evt.supported_switching_sample_rates",
10640
14
            FT_UINT8, BASE_HEX, NULL, 0x0,
10641
14
            NULL, HFILL }
10642
14
        },
10643
14
        { &hf_bthci_evt_supported_switching_sample_rates_1us_switching_aod_tx,
10644
14
          { "1 usec switching for AoD Tx",  "bthci_evt.supported_switching_sample_rates.1us_switching_aod_tx",
10645
14
            FT_BOOLEAN, 8, NULL, 0x01,
10646
14
            NULL, HFILL }
10647
14
        },
10648
14
        { &hf_bthci_evt_supported_switching_sample_rates_1us_sampling_aod_rx,
10649
14
          { "1 usec sampling for AoD Rx",   "bthci_evt.supported_switching_sample_rates.1us_sampling_aod_rx",
10650
14
            FT_BOOLEAN, 8, NULL, 0x02,
10651
14
            NULL, HFILL }
10652
14
        },
10653
14
        { &hf_bthci_evt_supported_switching_sample_rates_1us_switching_and_sampling_aoa_rx,
10654
14
          { "1 usec switching and sampling for AoA Rx", "bthci_evt.supported_switching_sample_rates.1us_switching_and_sampling_aoa_rx",
10655
14
            FT_BOOLEAN, 8, NULL, 0x04,
10656
14
            NULL, HFILL }
10657
14
        },
10658
14
        { &hf_bthci_evt_supported_switching_sample_rates_reserved,
10659
14
          { "Reserved",     "bthci_evt.supported_switching_sample_rates.reserved",
10660
14
            FT_UINT8, BASE_HEX, NULL, 0xF8,
10661
14
            NULL, HFILL }
10662
14
        },
10663
14
        { &hf_bthci_evt_simple_pairing_options,
10664
14
          { "Simple Pairing Options", "bthci_evt.simple_pairing_options",
10665
14
            FT_UINT8, BASE_HEX, NULL, 0x0,
10666
14
            NULL, HFILL }
10667
14
        },
10668
14
        { &hf_bthci_evt_simple_pairing_options_remote_public_key_validation,
10669
14
          { "Remote Public Key Validation",     "bthci_evt.simple_pairing_options.remote_public_key_validation",
10670
14
            FT_BOOLEAN, 8, NULL, 0x01,
10671
14
            NULL, HFILL }
10672
14
        },
10673
14
        { &hf_bthci_evt_simple_pairing_options_reserved,
10674
14
          { "Reserved",     "bthci_evt.simple_pairing_options.reserved",
10675
14
            FT_UINT8, BASE_HEX, NULL, 0xFE,
10676
14
            NULL, HFILL }
10677
14
        },
10678
14
        { &hf_bthci_evt_max_encryption_key_size,
10679
14
          { "Max Encryption Key Size",        "bthci_evt.max_encryption_key_size",
10680
14
            FT_UINT8, BASE_DEC|BASE_UNIT_STRING, UNS(&units_octet_octets), 0x0,
10681
14
            NULL, HFILL }
10682
14
        },
10683
14
        { &hf_bthci_evt_sdu_packet_seq_num,
10684
14
          { "SDU Packet Sequence Number",     "bthci_evt.sdu_packet_seq_num",
10685
14
            FT_UINT16, BASE_DEC, NULL, 0x0,
10686
14
            NULL, HFILL }
10687
14
        },
10688
14
        { &hf_bthci_evt_sdu_packet_timestamp,
10689
14
          { "SDU Packet Timestamp",     "bthci_evt.sdu_packet_timestamp",
10690
14
            FT_UINT32, BASE_DEC|BASE_UNIT_STRING, UNS(&units_microseconds), 0x0,
10691
14
            NULL, HFILL }
10692
14
        },
10693
14
        { &hf_bthci_evt_sdu_packet_offset,
10694
14
          { "SDU Packet Offset",     "bthci_evt.sdu_packet_offset",
10695
14
            FT_UINT24, BASE_DEC|BASE_UNIT_STRING, UNS(&units_microseconds), 0x0,
10696
14
            NULL, HFILL }
10697
14
        },
10698
14
        { &hf_bthci_evt_cig_id,
10699
14
          { "CIG Id",     "bthci_evt.cig_id",
10700
14
            FT_UINT8, BASE_HEX, NULL, 0x0,
10701
14
            NULL, HFILL }
10702
14
        },
10703
14
        { &hf_bthci_evt_cis_id,
10704
14
          { "CIS Id",     "bthci_evt.cis_id",
10705
14
            FT_UINT8, BASE_HEX, NULL, 0x0,
10706
14
            NULL, HFILL }
10707
14
        },
10708
14
        { &hf_bthci_evt_cis_count,
10709
14
          { "CIS Count",     "bthci_evt.cis_count",
10710
14
            FT_UINT8, BASE_DEC, NULL, 0x0,
10711
14
            NULL, HFILL }
10712
14
        },
10713
14
        { &hf_bthci_evt_cis_handle,
10714
14
          { "CIS Handle",     "bthci_evt.cis_handle",
10715
14
            FT_UINT16, BASE_HEX, NULL, 0x0,
10716
14
            NULL, HFILL }
10717
14
        },
10718
14
        { &hf_bthci_evt_cis_bis_handle,
10719
14
          { "CIS/BIS Handle",     "bthci_evt.cis_bis_handle",
10720
14
            FT_UINT16, BASE_HEX, NULL, 0x0,
10721
14
            NULL, HFILL }
10722
14
        },
10723
14
        { &hf_bthci_evt_big_handle,
10724
14
          { "BIG Handle",     "bthci_evt.big_handle",
10725
14
            FT_UINT8, BASE_HEX, NULL, 0x0,
10726
14
            NULL, HFILL }
10727
14
        },
10728
14
        { &hf_bthci_evt_received_packet_counter,
10729
14
          { "Received Packet Counter",     "bthci_evt.received_packet_counter",
10730
14
            FT_UINT32, BASE_DEC, NULL, 0x0,
10731
14
            NULL, HFILL }
10732
14
        },
10733
14
        { &hf_bthci_evt_missed_packet_counter,
10734
14
          { "Missed Packet Counter",     "bthci_evt.missed_packet_counter",
10735
14
            FT_UINT32, BASE_DEC, NULL, 0x0,
10736
14
            NULL, HFILL }
10737
14
        },
10738
14
        { &hf_bthci_evt_failed_packet_counter,
10739
14
          { "Failed Packet Counter",     "bthci_evt.failed_packet_counter",
10740
14
            FT_UINT32, BASE_DEC, NULL, 0x0,
10741
14
            NULL, HFILL }
10742
14
        },
10743
14
        { &hf_bthci_evt_pkt_count_tx_unacked,
10744
14
          { "Tx UnACKed Packets",     "bthci_evt.pkt_count_tx_unacked",
10745
14
            FT_UINT32, BASE_DEC, NULL, 0x0,
10746
14
            NULL, HFILL }
10747
14
        },
10748
14
        { &hf_bthci_evt_pkt_count_tx_flushed,
10749
14
          { "Tx Flushed Packets",     "bthci_evt.pkt_count_tx_flushed",
10750
14
            FT_UINT32, BASE_DEC, NULL, 0x0,
10751
14
            NULL, HFILL }
10752
14
        },
10753
14
        { &hf_bthci_evt_pkt_count_tx_last_subevent,
10754
14
          { "Tx Last Subevent Packets",     "bthci_evt.pkt_count_tx_last_subevent",
10755
14
            FT_UINT32, BASE_DEC, NULL, 0x0,
10756
14
            NULL, HFILL }
10757
14
        },
10758
14
        { &hf_bthci_evt_pkt_count_tx_retransmitted,
10759
14
          { "Tx Retransmitted Packets",     "bthci_evt.pkt_count_tx_retransmitted",
10760
14
            FT_UINT32, BASE_DEC, NULL, 0x0,
10761
14
            NULL, HFILL }
10762
14
        },
10763
14
        { &hf_bthci_evt_pkt_count_rx_crc_error,
10764
14
          { "Rx CRC Error Packets",     "bthci_evt.pkt_count_rx_crc_error",
10765
14
            FT_UINT32, BASE_DEC, NULL, 0x0,
10766
14
            NULL, HFILL }
10767
14
        },
10768
14
        { &hf_bthci_evt_pkt_count_rx_unreceived,
10769
14
          { "Rx Unreceived Packets",     "bthci_evt.pkt_count_rx_unreceived",
10770
14
            FT_UINT32, BASE_DEC, NULL, 0x0,
10771
14
            NULL, HFILL }
10772
14
        },
10773
14
        { &hf_bthci_evt_pkt_count_rx_duplicate,
10774
14
          { "Rx Duplicate Packets",     "bthci_evt.pkt_count_rx_duplicate",
10775
14
            FT_UINT32, BASE_DEC, NULL, 0x0,
10776
14
            NULL, HFILL }
10777
14
        },
10778
14
        { &hf_bthci_evt_phy_and_coding,
10779
14
          { "PHY", "bthci_evt.phy_and_coding",
10780
14
            FT_UINT8, BASE_HEX|BASE_EXT_STRING, &bthci_cmd_phy_and_coding_vals_ext, 0x0,
10781
14
            NULL, HFILL }
10782
14
        },
10783
14
        { &hf_bthci_evt_cig_sync_delay,
10784
14
          { "CIG Sync Delay",     "bthci_evt.cig_sync_delay",
10785
14
            FT_UINT24, BASE_DEC|BASE_UNIT_STRING, UNS(&units_microseconds), 0x0,
10786
14
            NULL, HFILL }
10787
14
        },
10788
14
        { &hf_bthci_evt_big_sync_delay,
10789
14
          { "BIG Sync Delay",     "bthci_evt.big_sync_delay",
10790
14
            FT_UINT24, BASE_DEC|BASE_UNIT_STRING, UNS(&units_microseconds), 0x0,
10791
14
            NULL, HFILL }
10792
14
        },
10793
14
        { &hf_bthci_evt_cis_sync_delay,
10794
14
          { "CIS Sync Delay",     "bthci_evt.cis_sync_delay",
10795
14
            FT_UINT24, BASE_DEC|BASE_UNIT_STRING, UNS(&units_microseconds), 0x0,
10796
14
            NULL, HFILL }
10797
14
        },
10798
14
        { &hf_bthci_evt_transport_latency_c_to_p,
10799
14
          { "Transport Latency Central to Peripheral",     "bthci_evt.transport_latency_c_to_p",
10800
14
            FT_UINT24, BASE_DEC|BASE_UNIT_STRING, UNS(&units_microseconds), 0x0,
10801
14
            NULL, HFILL }
10802
14
        },
10803
14
        { &hf_bthci_evt_transport_latency_p_to_c,
10804
14
          { "Transport Latency Peripheral to Central",     "bthci_evt.transport_latency_p_to_c",
10805
14
            FT_UINT24, BASE_DEC|BASE_UNIT_STRING, UNS(&units_microseconds), 0x0,
10806
14
            NULL, HFILL }
10807
14
        },
10808
14
        { &hf_bthci_evt_big_transport_latency,
10809
14
          { "BIG Transport Latency",     "bthci_evt.big_transport_latency",
10810
14
            FT_UINT24, BASE_DEC|BASE_UNIT_STRING, UNS(&units_microseconds), 0x0,
10811
14
            NULL, HFILL }
10812
14
        },
10813
14
        { &hf_bthci_evt_phy_c_to_p,
10814
14
          { "PHY Central to Peripheral", "bthci_evt.phy_c_to_p",
10815
14
            FT_UINT8, BASE_HEX|BASE_EXT_STRING, &bthci_cmd_le_phy_vals_ext, 0x0,
10816
14
            NULL, HFILL }
10817
14
        },
10818
14
        { &hf_bthci_evt_phy_p_to_c,
10819
14
          { "PHY Peripheral to Central", "bthci_evt.phy_p_to_c",
10820
14
            FT_UINT8, BASE_HEX|BASE_EXT_STRING, &bthci_cmd_le_phy_vals_ext, 0x0,
10821
14
            NULL, HFILL }
10822
14
        },
10823
14
        { &hf_bthci_evt_bn_c_to_p,
10824
14
          { "Burst Number Central to Peripheral", "bthci_evt.bn_c_to_p",
10825
14
            FT_UINT8, BASE_DEC, NULL, 0x0,
10826
14
            NULL, HFILL }
10827
14
        },
10828
14
        { &hf_bthci_evt_bn_p_to_c,
10829
14
          { "Burst Number Peripheral to Central", "bthci_evt.bn_p_to_c",
10830
14
            FT_UINT8, BASE_DEC, NULL, 0x0,
10831
14
            NULL, HFILL }
10832
14
        },
10833
14
        { &hf_bthci_evt_ft_c_to_p,
10834
14
          { "Flush Timeout Central to Peripheral", "bthci_evt.ft_c_to_p",
10835
14
            FT_UINT8, BASE_DEC, NULL, 0x0,
10836
14
            NULL, HFILL }
10837
14
        },
10838
14
        { &hf_bthci_evt_ft_p_to_c,
10839
14
          { "Flush Timeout Peripheral to Central", "bthci_evt.ft_p_to_c",
10840
14
            FT_UINT8, BASE_DEC, NULL, 0x0,
10841
14
            NULL, HFILL }
10842
14
        },
10843
14
        { &hf_bthci_evt_max_pdu_c_to_p,
10844
14
          { "Max PDU Central to Peripheral", "bthci_evt.max_pdu_c_to_p",
10845
14
            FT_UINT16, BASE_DEC|BASE_UNIT_STRING, UNS(&units_octet_octets), 0x0,
10846
14
            NULL, HFILL }
10847
14
        },
10848
14
        { &hf_bthci_evt_max_pdu_p_to_c,
10849
14
          { "Max PDU Peripheral to Central", "bthci_evt.max_pdu_p_to_c",
10850
14
            FT_UINT16, BASE_DEC|BASE_UNIT_STRING, UNS(&units_octet_octets), 0x0,
10851
14
            NULL, HFILL }
10852
14
        },
10853
14
        { &hf_bthci_evt_sub_interval,
10854
14
          { "Sub-Interval",     "bthci_evt.sub_interval",
10855
14
            FT_UINT24, BASE_DEC|BASE_UNIT_STRING, UNS(&units_microseconds), 0x0,
10856
14
            NULL, HFILL }
10857
14
        },
10858
14
        { &hf_bthci_evt_max_sdu_c_to_p,
10859
14
          { "Max SDU Central to Peripheral", "bthci_evt.max_sdu_c_to_p",
10860
14
            FT_UINT16, BASE_DEC|BASE_UNIT_STRING, UNS(&units_octet_octets), 0x0,
10861
14
            NULL, HFILL }
10862
14
        },
10863
14
        { &hf_bthci_evt_max_sdu_p_to_c,
10864
14
          { "Max SDU Peripheral to Central", "bthci_evt.max_sdu_p_to_c",
10865
14
            FT_UINT16, BASE_DEC|BASE_UNIT_STRING, UNS(&units_octet_octets), 0x0,
10866
14
            NULL, HFILL }
10867
14
        },
10868
14
        { &hf_bthci_evt_sdu_interval_c_to_p,
10869
14
          { "SDU Interval Central to Peripheral", "bthci_evt.sdu_interval_c_to_p",
10870
14
            FT_UINT24, BASE_DEC|BASE_UNIT_STRING, UNS(&units_microseconds), 0x0,
10871
14
            NULL, HFILL }
10872
14
        },
10873
14
        { &hf_bthci_evt_sdu_interval_p_to_c,
10874
14
          { "SDU Interval Peripheral to Central", "bthci_evt.sdu_interval_p_to_c",
10875
14
            FT_UINT24, BASE_DEC|BASE_UNIT_STRING, UNS(&units_microseconds), 0x0,
10876
14
            NULL, HFILL }
10877
14
        },
10878
14
        { &hf_bthci_evt_phy,
10879
14
          { "PHY", "bthci_evt.phy",
10880
14
            FT_UINT8, BASE_HEX|BASE_EXT_STRING, &bthci_cmd_le_phy_vals_ext, 0x0,
10881
14
            NULL, HFILL }
10882
14
        },
10883
14
        { &hf_bthci_evt_nse,
10884
14
          { "Number of Sub-Events", "bthci_evt.nse",
10885
14
            FT_UINT8, BASE_DEC, NULL, 0x0,
10886
14
            NULL, HFILL }
10887
14
        },
10888
14
        { &hf_bthci_evt_bn,
10889
14
          { "Burst Number", "bthci_evt.bn",
10890
14
            FT_UINT8, BASE_DEC, NULL, 0x0,
10891
14
            NULL, HFILL }
10892
14
        },
10893
14
        { &hf_bthci_evt_pto,
10894
14
          { "Pre-Transmission Offset", "bthci_evt.pto",
10895
14
            FT_UINT8, BASE_DEC, NULL, 0x0,
10896
14
            NULL, HFILL }
10897
14
        },
10898
14
        { &hf_bthci_evt_irc,
10899
14
          { "Scheduled Payload Retransmissions", "bthci_evt.irc",
10900
14
            FT_UINT8, BASE_DEC, NULL, 0x0,
10901
14
            NULL, HFILL }
10902
14
        },
10903
14
        { &hf_bthci_evt_max_pdu,
10904
14
          { "Max PDU", "bthci_evt.max_pdu",
10905
14
            FT_UINT16, BASE_DEC|BASE_UNIT_STRING, UNS(&units_octet_octets), 0x0,
10906
14
            NULL, HFILL }
10907
14
        },
10908
14
        { &hf_bthci_evt_iso_interval,
10909
14
          { "ISO Interval", "bthci_evt.iso_interval",
10910
14
            FT_UINT16, BASE_CUSTOM, CF_FUNC(bluetooth_unit_1p25_ms), 0x0,
10911
14
            NULL, HFILL }
10912
14
        },
10913
14
        { &hf_bthci_evt_num_bis,
10914
14
          { "Number of BISes", "bthci_evt.num_bis",
10915
14
            FT_UINT8, BASE_DEC, NULL, 0x0,
10916
14
            NULL, HFILL }
10917
14
        },
10918
14
        { &hf_bthci_evt_bis_handle,
10919
14
          { "BIS Handle", "bthci_evt.bis_handle",
10920
14
            FT_UINT16, BASE_HEX, NULL, 0x0,
10921
14
            NULL, HFILL }
10922
14
        },
10923
14
        { &hf_bthci_evt_current_path_loss,
10924
14
          { "Current Path Loss", "bthci_evt.current_path_loss",
10925
14
            FT_UINT8, BASE_DEC|BASE_UNIT_STRING, UNS(&units_decibels), 0x0,
10926
14
            NULL, HFILL }
10927
14
        },
10928
14
        { &hf_bthci_evt_zone_entered,
10929
14
          { "Zone Entered", "bthci_evt.zone_entered",
10930
14
            FT_UINT8, BASE_HEX, VALS(zone_entered_vals), 0x0,
10931
14
            NULL, HFILL }
10932
14
        },
10933
14
        { &hf_bthci_evt_power_report_reason,
10934
14
          { "Reason", "bthci_evt.power_report_reason",
10935
14
            FT_UINT8, BASE_HEX, VALS(power_report_reason_vals), 0x0,
10936
14
            NULL, HFILL }
10937
14
        },
10938
14
        { &hf_bthci_evt_transmit_power_level_flags,
10939
14
          { "Transmit Power Level Flags", "bthci_evt.power_level_flags",
10940
14
            FT_UINT8, BASE_HEX, NULL, 0x0,
10941
14
            NULL, HFILL }
10942
14
        },
10943
14
        { &hf_bthci_evt_transmit_power_level_flags_minimum_power,
10944
14
          { "At Minimum Power Level",     "bthci_evt.transmit_power_level_flags.minimum_power",
10945
14
            FT_BOOLEAN, 8, NULL, 0x01,
10946
14
            NULL, HFILL }
10947
14
        },
10948
14
        { &hf_bthci_evt_transmit_power_level_flags_maximum_power,
10949
14
          { "At Maximum Power Level",     "bthci_evt.transmit_power_level_flags.maximum_power",
10950
14
            FT_BOOLEAN, 8, NULL, 0x02,
10951
14
            NULL, HFILL }
10952
14
        },
10953
14
        { &hf_bthci_evt_transmit_power_level_flags_reserved,
10954
14
          { "Reserved",     "bthci_evt.transmit_power_level_flags.reserved",
10955
14
            FT_UINT8, BASE_HEX, NULL, 0xFC,
10956
14
            NULL, HFILL }
10957
14
        },
10958
14
        { &hf_bthci_evt_power_level_delta,
10959
14
          { "Transmit Power Delta", "bthci_evt.power_level_delta",
10960
14
            FT_INT8, BASE_DEC|BASE_UNIT_STRING, UNS(&units_decibels), 0x0,
10961
14
            NULL, HFILL }
10962
14
        },
10963
14
        { &hf_bthci_evt_sdu_interval,
10964
14
          { "SDU Interval",   "bthci_evt.sdu_interval",
10965
14
            FT_UINT24, BASE_DEC|BASE_UNIT_STRING, UNS(&units_microseconds), 0x0,
10966
14
            NULL, HFILL }
10967
14
        },
10968
14
        { &hf_bthci_evt_max_sdu,
10969
14
          { "Max SDU", "bthci_evt.max_sdu",
10970
14
            FT_UINT16, BASE_DEC|BASE_UNIT_STRING, UNS(&units_octet_octets), 0x0,
10971
14
            NULL, HFILL }
10972
14
        },
10973
14
        { &hf_bthci_evt_framing,
10974
14
          { "Framing", "bthci_evt.framing",
10975
14
            FT_UINT8, BASE_HEX|BASE_EXT_STRING, &bthci_cmd_framing_vals_ext, 0x0,
10976
14
            NULL, HFILL }
10977
14
        },
10978
14
        { &hf_bthci_evt_peer_clock_accuracy,
10979
14
          { "Peer Clock Accuracy", "bthci_evt.peer_clock_accuracy",
10980
14
            FT_UINT8, BASE_HEX|BASE_EXT_STRING, &bthci_cmd_clock_accuray_vals_ext, 0x0,
10981
14
            NULL, HFILL }
10982
14
        },
10983
14
        { &hf_bthci_evt_subrate_factor,
10984
14
          { "Subrate Factor", "bthci_evt.subrate_factor",
10985
14
            FT_UINT16, BASE_DEC|BASE_UNIT_STRING, UNS(&units_number_events), 0x0,
10986
14
            NULL, HFILL }
10987
14
        },
10988
14
        { &hf_bthci_evt_continuation_number,
10989
14
          { "Continuation Number", "bthci_evt.continuation_number",
10990
14
            FT_UINT16, BASE_DEC|BASE_UNIT_STRING, UNS(&units_number_events), 0x0,
10991
14
            NULL, HFILL }
10992
14
        },
10993
14
        { &hf_bthci_evt_subevent_start,
10994
14
          { "Sub-event Start", "bthci_evt.subevent_start",
10995
14
            FT_UINT8, BASE_DEC, NULL, 0x0,
10996
14
            NULL, HFILL }
10997
14
        },
10998
14
        { &hf_bthci_evt_subevent_count,
10999
14
          { "Sub-event Count", "bthci_evt.subevent_count",
11000
14
            FT_UINT8, BASE_DEC, NULL, 0x0,
11001
14
            NULL, HFILL }
11002
14
        },
11003
14
        { &hf_bthci_evt_subevent,
11004
14
          { "Sub-event", "bthci_evt.subevent",
11005
14
            FT_UINT8, BASE_DEC, NULL, 0x0,
11006
14
            NULL, HFILL }
11007
14
        },
11008
14
        { &hf_bthci_evt_subevent_tx_status,
11009
14
          { "Sub-event Tx Status", "bthci_evt.subevent_tx_status",
11010
14
            FT_UINT8, BASE_HEX, VALS(tx_status_vals), 0x0,
11011
14
            NULL, HFILL }
11012
14
        },
11013
14
        { &hf_bthci_evt_subevent_responses,
11014
14
          { "Sub-events Responses", "bthci_evt.subevent_responses",
11015
14
            FT_NONE, BASE_NONE, NULL, 0x0,
11016
14
            NULL, HFILL }
11017
14
        },
11018
14
        { &hf_bthci_evt_response_slot,
11019
14
          { "Response Slot", "bthci_evt.response_slot",
11020
14
            FT_UINT8, BASE_DEC, NULL, 0x0,
11021
14
            NULL, HFILL }
11022
14
        },
11023
14
        { &hf_bthci_evt_num_subevents,
11024
14
          { "Number of Sub-events", "bthci_evt.num_subevents",
11025
14
            FT_UINT8, BASE_DEC, NULL, 0x0,
11026
14
            NULL, HFILL }
11027
14
        },
11028
14
        { &hf_bthci_evt_subevent_interval,
11029
14
          { "Sub-event Interval", "bthci_evt.subevent_interval",
11030
14
            FT_UINT8, BASE_CUSTOM, CF_FUNC(bluetooth_unit_1p25_ms), 0x0,
11031
14
            NULL, HFILL }
11032
14
        },
11033
14
        { &hf_bthci_evt_response_slot_delay,
11034
14
          { "Response Slot Delay", "bthci_evt.resp_slot_delay",
11035
14
            FT_UINT8, BASE_CUSTOM, CF_FUNC(bluetooth_unit_1p25_ms), 0x0,
11036
14
            NULL, HFILL }
11037
14
        },
11038
14
        { &hf_bthci_evt_response_slot_spacing,
11039
14
          { "Response Slot Spacing", "bthci_evt.resp_slot_spacing",
11040
14
            FT_UINT8, BASE_CUSTOM, CF_FUNC(bluetooth_unit_0p125_ms), 0x0,
11041
14
            NULL, HFILL }
11042
14
        },
11043
14
        { &hf_bthci_evt_periodic_event_counter,
11044
14
          { "Periodic Event Counter", "bthci_evt.periodic_evt_counter",
11045
14
            FT_UINT16, BASE_DEC, NULL, 0x0,
11046
14
            NULL, HFILL }
11047
14
        },
11048
14
        { &hf_bthci_evt_monitoring_adv_list_size,
11049
14
          { "Monitoring Advertisers List Size", "bthci_evt.monitoring_adv_list_size",
11050
14
            FT_UINT8, BASE_DEC, NULL, 0x0,
11051
14
            NULL, HFILL }
11052
14
        },
11053
14
        { &hf_bthci_evt_max_remote_page,
11054
14
          { "Max Remote Page", "bthci_evt.max_remote_page",
11055
14
            FT_UINT8, BASE_DEC, NULL, 0x0,
11056
14
            NULL, HFILL }
11057
14
        },
11058
14
        { &hf_bthci_evt_max_valid_page,
11059
14
          { "Max Valid Page", "bthci_evt.max_valid_page",
11060
14
            FT_UINT8, BASE_DEC, NULL, 0x0,
11061
14
            NULL, HFILL }
11062
14
        },
11063
14
        { &hf_bthci_evt_config_id,
11064
14
          { "Config Id", "bthci_evt.config_id",
11065
14
            FT_UINT8, BASE_DEC, NULL, 0x0,
11066
14
            NULL, HFILL }
11067
14
        },
11068
14
        { &hf_bthci_evt_num_config,
11069
14
          { "Number of Configurations", "bthci_evt.num_config",
11070
14
            FT_UINT8, BASE_DEC, NULL, 0x0,
11071
14
            NULL, HFILL }
11072
14
        },
11073
14
        { &hf_bthci_evt_max_consecutive_procedures,
11074
14
          { "Max Consecutive Procedures", "bthci_evt.max_consecutive_procedures",
11075
14
            FT_UINT16, BASE_DEC|BASE_SPECIAL_VALS, VALS(bluetooth_procedure_count_special), 0x0,
11076
14
            NULL, HFILL }
11077
14
        },
11078
14
        { &hf_bthci_evt_remote_fae_table,
11079
14
          {"Channel Map", "bthci_evt.remote_fae_table",
11080
14
           FT_BYTES, BASE_NONE, NULL, 0x0,
11081
14
           NULL, HFILL}
11082
14
        },
11083
14
        { &hf_bthci_evt_channel_map,
11084
14
          {"Channel Map", "bthci_evt.channel_map",
11085
14
           FT_BYTES, BASE_NONE, NULL, 0x0,
11086
14
           NULL, HFILL}
11087
14
        },
11088
14
        { &hf_bthci_evt_cs_action,
11089
14
          { "Action", "bthci_evt.cs_action",
11090
14
            FT_UINT8, BASE_HEX, VALS(cs_action_vals), 0x0,
11091
14
            NULL, HFILL }
11092
14
        },
11093
14
        { &hf_bthci_evt_main_mode_type,
11094
14
          { "Main Mode Type", "bthci_evt.main_mode_type",
11095
14
            FT_UINT8, BASE_DEC, NULL, 0x0,
11096
14
            NULL, HFILL }
11097
14
        },
11098
14
        { &hf_bthci_evt_sub_mode_type,
11099
14
          { "Sub Mode Type", "bthci_evt.sub_mode_type",
11100
14
            FT_UINT8, BASE_DEC|BASE_SPECIAL_VALS, VALS(bluetooth_not_used_0xff_special), 0x0,
11101
14
            NULL, HFILL }
11102
14
        },
11103
14
        { &hf_bthci_evt_min_main_mode_steps,
11104
14
          { "Min Main Mode Steps", "bthci_evt.min_main_mode_steps",
11105
14
            FT_UINT8, BASE_DEC, NULL, 0x0,
11106
14
            NULL, HFILL }
11107
14
        },
11108
14
        { &hf_bthci_evt_max_main_mode_steps,
11109
14
          { "Max Main Mode Steps", "bthci_evt.max_main_mode_steps",
11110
14
            FT_UINT8, BASE_DEC, NULL, 0x0,
11111
14
            NULL, HFILL }
11112
14
        },
11113
14
        { &hf_bthci_evt_main_mode_repetition,
11114
14
          { "Main Mode Repetitions", "bthci_evt.main_mode_repetition",
11115
14
            FT_UINT8, BASE_DEC, NULL, 0x0,
11116
14
            NULL, HFILL }
11117
14
        },
11118
14
        { &hf_bthci_evt_mode_0_steps,
11119
14
          { "Mode-0 Steps", "bthci_evt.mode0_steps",
11120
14
            FT_UINT8, BASE_DEC, NULL, 0x0,
11121
14
            NULL, HFILL }
11122
14
        },
11123
14
        { &hf_bthci_evt_cs_role,
11124
14
          { "Role", "bthci_evt.cs_role",
11125
14
            FT_UINT8, BASE_HEX|BASE_EXT_STRING, &bthci_cmd_cs_role_vals_ext, 0x0,
11126
14
            NULL, HFILL }
11127
14
        },
11128
14
        { &hf_bthci_evt_rtt_type,
11129
14
          { "RTT Type", "bthci_evt.rtt_type",
11130
14
            FT_UINT8, BASE_HEX|BASE_EXT_STRING, &bthci_cmd_cs_rtt_type_vals_ext, 0x0,
11131
14
            NULL, HFILL }
11132
14
        },
11133
14
        { &hf_bthci_evt_cs_sync_phy,
11134
14
          { "CS Sync PHY", "bthci_evt.cs_sync_phy",
11135
14
            FT_UINT8, BASE_HEX|BASE_EXT_STRING, &bthci_cmd_le_phy_vals_ext, 0x0,
11136
14
            NULL, HFILL }
11137
14
        },
11138
14
        { &hf_bthci_evt_channel_map_repetition,
11139
14
          { "Channel Map Repetitions", "bthci_evt.channel_map_repetition",
11140
14
            FT_UINT8, BASE_DEC, NULL, 0x0,
11141
14
            NULL, HFILL }
11142
14
        },
11143
14
        { &hf_bthci_evt_channel_selection_type,
11144
14
          { "Channel Selection Type", "bthci_evt.channel_selection_type",
11145
14
            FT_UINT8, BASE_HEX|BASE_EXT_STRING, &bthci_cmd_cs_ch_selection_type_vals_ext, 0x0,
11146
14
            NULL, HFILL }
11147
14
        },
11148
14
        { &hf_bthci_evt_ch3c_shape,
11149
14
          { "Ch3c Shape", "bthci_evt.ch3c_shape",
11150
14
            FT_UINT8, BASE_HEX|BASE_EXT_STRING, &bthci_cmd_cs_shape_vals_ext, 0x0,
11151
14
            NULL, HFILL }
11152
14
        },
11153
14
        { &hf_bthci_evt_ch3c_jump,
11154
14
          { "Ch3c Jump", "bthci_evt.ch3c_jump",
11155
14
            FT_UINT8, BASE_DEC, NULL, 0x0,
11156
14
            NULL, HFILL }
11157
14
        },
11158
14
        { &hf_bthci_evt_companion_signal_enable,
11159
14
          { "Companion Signal Enable", "bthci_evt.companion_signal_enable",
11160
14
            FT_UINT8, BASE_HEX, VALS(evt_enable_values), 0x0,
11161
14
            NULL, HFILL }
11162
14
        },
11163
14
        { &hf_bthci_evt_t_ip1_time,
11164
14
          { "T_IP1 Time", "bthci_evt.t_ip1_time",
11165
14
            FT_UINT8, BASE_DEC|BASE_UNIT_STRING, UNS(&units_microseconds), 0x0,
11166
14
            NULL, HFILL }
11167
14
        },
11168
14
        { &hf_bthci_evt_t_ip2_time,
11169
14
          { "T_IP2 Time", "bthci_evt.t_ip2_time",
11170
14
            FT_UINT8, BASE_DEC|BASE_UNIT_STRING, UNS(&units_microseconds), 0x0,
11171
14
            NULL, HFILL }
11172
14
        },
11173
14
        { &hf_bthci_evt_t_fcs_time,
11174
14
          { "T_FCS Time", "bthci_evt.t_fcs_time",
11175
14
            FT_UINT8, BASE_DEC|BASE_UNIT_STRING, UNS(&units_microseconds), 0x0,
11176
14
            NULL, HFILL }
11177
14
        },
11178
14
        { &hf_bthci_evt_t_pm_time,
11179
14
          { "T_PM Time", "bthci_evt.t_pm_time",
11180
14
            FT_UINT8, BASE_DEC|BASE_UNIT_STRING, UNS(&units_microseconds), 0x0,
11181
14
            NULL, HFILL }
11182
14
        },
11183
14
        { &hf_bthci_evt_cs_state,
11184
14
          { "State", "bthci_evt.cs_state",
11185
14
            FT_UINT8, BASE_HEX, VALS(evt_enable_values), 0x0,
11186
14
            NULL, HFILL }
11187
14
        },
11188
14
        { &hf_bthci_evt_tone_antenna_selection,
11189
14
          { "Antenna Config Selection Index", "bthci_evt.tone_antenna_selection",
11190
14
            FT_UINT8, BASE_HEX|BASE_EXT_STRING, &bthci_cmd_aci_vals_ext, 0x0,
11191
14
            NULL, HFILL }
11192
14
        },
11193
14
        { &hf_bthci_evt_cs_subevent_len,
11194
14
          { "Subevent Length", "bthci_evt.cs_subevent_len",
11195
14
            FT_UINT24, BASE_DEC|BASE_UNIT_STRING, UNS(&units_microseconds), 0x0,
11196
14
            NULL, HFILL }
11197
14
        },
11198
14
        { &hf_bthci_evt_cs_subevents_per_event,
11199
14
          { "Subevents Per Event", "bthci_evt.subevents_per_event",
11200
14
            FT_UINT8, BASE_DEC, NULL, 0x0,
11201
14
            NULL, HFILL }
11202
14
        },
11203
14
        { &hf_bthci_evt_cs_subevent_interval,
11204
14
          { "Subevent Interval", "bthci_evt.cs_subevent_interval",
11205
14
            FT_UINT16, BASE_CUSTOM, CF_FUNC(bluetooth_unit_0p625_ms), 0x0,
11206
14
            NULL, HFILL }
11207
14
        },
11208
14
        { &hf_bthci_evt_cs_event_interval,
11209
14
          { "Event Interval", "bthci_evt.cs_event_interval",
11210
14
            FT_UINT16, BASE_DEC|BASE_UNIT_STRING, UNS(&units_number_events), 0x0,
11211
14
            NULL, HFILL }
11212
14
        },
11213
14
        { &hf_bthci_evt_cs_procedure_interval,
11214
14
          { "Procedure Interval", "bthci_evt.cs_procedure_interval",
11215
14
            FT_UINT16, BASE_DEC|BASE_UNIT_STRING, UNS(&units_number_events), 0x0,
11216
14
            NULL, HFILL }
11217
14
        },
11218
14
        { &hf_bthci_evt_cs_procedure_count,
11219
14
          { "Procedure Count", "bthci_evt.cs_procedure_count",
11220
14
            FT_UINT16, BASE_DEC|BASE_SPECIAL_VALS, VALS(bluetooth_procedure_count_special), 0x0,
11221
14
            NULL, HFILL }
11222
14
        },
11223
14
        { &hf_bthci_evt_max_procedure_len,
11224
14
          { "Max Procedure Length", "bthci_evt.max_procedure_len",
11225
14
            FT_UINT16, BASE_CUSTOM, CF_FUNC(bluetooth_unit_0p625_ms), 0x0,
11226
14
            NULL, HFILL }
11227
14
        },
11228
14
        { &hf_bthci_evt_start_acl_conn_event,
11229
14
          { "Start ACL Connection Event", "bthci_evt.start_acl_conn_event",
11230
14
            FT_UINT16, BASE_DEC, NULL, 0x0,
11231
14
            NULL, HFILL }
11232
14
        },
11233
14
        { &hf_bthci_evt_procedure_counter,
11234
14
          { "Procedure Counter", "bthci_evt.procedure_counter",
11235
14
            FT_UINT16, BASE_DEC, NULL, 0x0,
11236
14
            NULL, HFILL }
11237
14
        },
11238
14
        { &hf_bthci_evt_freq_compensation,
11239
14
          { "Frequency Compensation", "bthci_evt.freq_compensation",
11240
14
            FT_INT16, BASE_CUSTOM, CF_FUNC(freq_compensation), 0x0,
11241
14
            NULL, HFILL }
11242
14
        },
11243
14
        { &hf_bthci_evt_ref_power_level,
11244
14
          { "Reference Power Level", "bthci_evt.ref_power_level",
11245
14
            FT_INT8, BASE_CUSTOM, CF_FUNC(ref_power_level), 0x0,
11246
14
            NULL, HFILL }
11247
14
        },
11248
14
        { &hf_bthci_evt_procedure_done_status,
11249
14
          { "Procedure Done Status", "bthci_evt.procedure_done_status",
11250
14
            FT_UINT8, BASE_HEX, VALS(cs_done_status_vals), 0x0,
11251
14
            NULL, HFILL }
11252
14
        },
11253
14
        { &hf_bthci_evt_subevent_done_status,
11254
14
          { "Subevent Done Status", "bthci_evt.subevent_done_status",
11255
14
            FT_UINT8, BASE_HEX, VALS(cs_done_status_vals), 0x0,
11256
14
            NULL, HFILL }
11257
14
        },
11258
14
        { &hf_bthci_evt_cs_abort_reason,
11259
14
          { "Procedure Abort Reason", "bthci_evt.cs_abort_reason",
11260
14
            FT_UINT8, BASE_HEX, NULL, 0x0,
11261
14
            NULL, HFILL }
11262
14
        },
11263
14
        { &hf_bthci_evt_cs_abort_reason_procedure,
11264
14
          { "Procedure Abort Reason", "bthci_evt.cs_abort_reason_procedure",
11265
14
            FT_UINT8, BASE_HEX, VALS(cs_procedure_abort_reason_vals), 0x0F,
11266
14
            NULL, HFILL }
11267
14
        },
11268
14
        { &hf_bthci_evt_cs_abort_reason_subevent,
11269
14
          { "Subevent Abort Reason", "bthci_evt.cs_abort_reason_subevent",
11270
14
            FT_UINT8, BASE_HEX, VALS(cs_subevent_abort_reason_vals), 0xF0,
11271
14
            NULL, HFILL }
11272
14
        },
11273
14
        { &hf_bthci_evt_num_antenna_paths,
11274
14
          { "Number of Antenna Paths", "bthci_evt.num_antenna_paths",
11275
14
            FT_UINT8, BASE_DEC, NULL, 0x0,
11276
14
            NULL, HFILL }
11277
14
        },
11278
14
        { &hf_bthci_evt_cs_roles,
11279
14
          { "Roles", "bthci_evt.cs_roles",
11280
14
            FT_UINT8, BASE_HEX, NULL, 0x0,
11281
14
            NULL, HFILL }
11282
14
        },
11283
14
        { &hf_bthci_evt_cs_roles_initiator,
11284
14
          { "Initiator", "bthci_evt.cs_roles.initiator",
11285
14
            FT_BOOLEAN, 8, NULL, 0x01,
11286
14
            NULL, HFILL }
11287
14
        },
11288
14
        { &hf_bthci_evt_cs_roles_reflector,
11289
14
          { "Reflector", "bthci_evt.cs_roles.reflector",
11290
14
            FT_BOOLEAN, 8, NULL, 0x02,
11291
14
            NULL, HFILL }
11292
14
        },
11293
14
        { &hf_bthci_evt_cs_roles_reserved,
11294
14
          { "Reserved", "bthci_evt.cs_roles.reserved",
11295
14
            FT_UINT8, BASE_HEX, NULL, 0xfc,
11296
14
            NULL, HFILL }
11297
14
        },
11298
14
        { &hf_bthci_evt_cs_modes_supported,
11299
14
          { "Modes Supported", "bthci_evt.cs_modes_supported",
11300
14
            FT_UINT8, BASE_HEX, NULL, 0x0,
11301
14
            NULL, HFILL }
11302
14
        },
11303
14
        { &hf_bthci_evt_cs_modes_supported_3,
11304
14
          { "Mode-3", "bthci_evt.cs_modes_supported.3",
11305
14
            FT_BOOLEAN, 8, NULL, 0x01,
11306
14
            NULL, HFILL }
11307
14
        },
11308
14
        { &hf_bthci_evt_cs_modes_supported_reserved,
11309
14
          { "Reserved", "bthci_evt.cs_modes_supported.reserved",
11310
14
            FT_UINT8, BASE_HEX, NULL, 0xfe,
11311
14
            NULL, HFILL }
11312
14
        },
11313
14
        { &hf_bthci_evt_rtt_capability,
11314
14
          { "RTT Capability", "bthci_evt.rtt_capability",
11315
14
            FT_UINT8, BASE_HEX, NULL, 0x0,
11316
14
            NULL, HFILL }
11317
14
        },
11318
14
        { &hf_bthci_evt_rtt_capability_coarse_precision,
11319
14
          { "10ns Coarse Precision", "bthci_evt.rtt_capability.coarse_precision",
11320
14
            FT_BOOLEAN, 8, NULL, 0x01,
11321
14
            NULL, HFILL }
11322
14
        },
11323
14
        { &hf_bthci_evt_rtt_capability_sounding_precision,
11324
14
          { "10ns Sounding Precision", "bthci_evt.rtt_capability.sounding_precision",
11325
14
            FT_BOOLEAN, 8, NULL, 0x02,
11326
14
            NULL, HFILL }
11327
14
        },
11328
14
        { &hf_bthci_evt_rtt_capability_random_precision,
11329
14
          { "10ns Random Precision", "bthci_evt.rtt_capability.random_precision",
11330
14
            FT_BOOLEAN, 8, NULL, 0x04,
11331
14
            NULL, HFILL }
11332
14
        },
11333
14
        { &hf_bthci_evt_rtt_capability_reserved,
11334
14
          { "Reserved", "bthci_evt.rtt_capability.reserved",
11335
14
            FT_UINT8, BASE_HEX, NULL, 0xf8,
11336
14
            NULL, HFILL }
11337
14
        },
11338
14
        { &hf_bthci_evt_rtt_aa_only_n,
11339
14
          { "RTT Coarse, CS Sync exchanges needed", "bthci_evt.rtt_aa_only_n",
11340
14
            FT_UINT8, BASE_DEC|BASE_SPECIAL_VALS, VALS(bluetooth_not_supported_0x00_special), 0x0,
11341
14
            NULL, HFILL }
11342
14
        },
11343
14
        { &hf_bthci_evt_rtt_sounding_n,
11344
14
          { "RTT Sounding, CS Sync exchanges needed", "bthci_evt.rtt_sounding_n",
11345
14
            FT_UINT8, BASE_DEC|BASE_SPECIAL_VALS, VALS(bluetooth_not_supported_0x00_special), 0x0,
11346
14
            NULL, HFILL }
11347
14
        },
11348
14
        { &hf_bthci_evt_rtt_random_n,
11349
14
          { "RTT Random Payload, CS Sync exchanges needed", "bthci_evt.rtt_random_n",
11350
14
            FT_UINT8, BASE_DEC|BASE_SPECIAL_VALS, VALS(bluetooth_not_supported_0x00_special), 0x0,
11351
14
            NULL, HFILL }
11352
14
        },
11353
14
        { &hf_bthci_evt_nadm_sounding_capability,
11354
14
          { "Optional NADM Sounding Capability", "bthci_evt.optional_nadm_sounding_capability",
11355
14
            FT_UINT16, BASE_HEX, NULL, 0x0,
11356
14
            NULL, HFILL }
11357
14
        },
11358
14
        { &hf_bthci_evt_nadm_sounding_capability_supported,
11359
14
          { "Phase-based NADM Metric", "bthci_evt.optional_nadm_sounding_capability.supported",
11360
14
            FT_BOOLEAN, 16, NULL, 0x0001,
11361
14
            NULL, HFILL }
11362
14
        },
11363
14
        { &hf_bthci_evt_nadm_sounding_capability_reserved,
11364
14
          { "Reserved", "bthci_evt.optional_nadm_sounding_capability.reserved",
11365
14
            FT_UINT16, BASE_HEX, NULL, 0xfffe,
11366
14
            NULL, HFILL }
11367
14
        },
11368
14
        { &hf_bthci_evt_nadm_random_capability,
11369
14
          { "Optional NADM Random Capability", "bthci_evt.optional_nadm_random_capability",
11370
14
            FT_UINT16, BASE_HEX, NULL, 0x0,
11371
14
            NULL, HFILL }
11372
14
        },
11373
14
        { &hf_bthci_evt_nadm_random_capability_supported,
11374
14
          { "Phase-based NADM Metric", "bthci_evt.optional_nadm_random_capability.supported",
11375
14
            FT_BOOLEAN, 16, NULL, 0x0001,
11376
14
            NULL, HFILL }
11377
14
        },
11378
14
        { &hf_bthci_evt_nadm_random_capability_reserved,
11379
14
          { "Reserved", "bthci_evt.optional_nadm_random_capability.reserved",
11380
14
            FT_BOOLEAN, 16, NULL, 0xfffe,
11381
14
            NULL, HFILL }
11382
14
        },
11383
14
        { &hf_bthci_evt_cs_sync_phys_supported,
11384
14
          { "Optional CS_SYNC PHYs", "bthci_evt.cs_sync_phys_supported",
11385
14
            FT_UINT8, BASE_HEX, NULL, 0x0,
11386
14
            NULL, HFILL }
11387
14
        },
11388
14
        { &hf_bthci_evt_cs_sync_phys_supported_2m,
11389
14
          { "LE 2M", "bthci_evt.cs_sync_phys_supported.2m",
11390
14
            FT_BOOLEAN, 8, NULL, 0x02,
11391
14
            NULL, HFILL }
11392
14
        },
11393
14
        { &hf_bthci_evt_cs_sync_phys_supported_2m2bt,
11394
14
          { "LE 2M 2BT", "bthci_evt.cs_sync_phys_supported.2m2bt",
11395
14
            FT_BOOLEAN, 8, NULL, 0x04,
11396
14
            NULL, HFILL }
11397
14
        },
11398
14
        { &hf_bthci_evt_cs_sync_phys_supported_reserved,
11399
14
          { "Reserved", "bthci_evt.cs_sync_phys_supported.reserved",
11400
14
            FT_UINT8, BASE_HEX, NULL, 0xf9,
11401
14
            NULL, HFILL }
11402
14
        },
11403
14
        { &hf_bthci_evt_cs_subfeatures,
11404
14
          { "Optional Subfeatures", "bthci_evt.optional_cs_subfeatures",
11405
14
            FT_UINT16, BASE_HEX, NULL, 0x0,
11406
14
            NULL, HFILL }
11407
14
        },
11408
14
        { &hf_bthci_evt_cs_subfeatures_companion_signal,
11409
14
          { "Companion Signal", "bthci_evt.optional_cs_subfeatures.companion_signal",
11410
14
            FT_BOOLEAN, 16, NULL, 0x0001,
11411
14
            NULL, HFILL }
11412
14
        },
11413
14
        { &hf_bthci_evt_cs_subfeatures_freq_actuation_error,
11414
14
          { "Zero Freq. Actuation Error Relative to Mode-0 Tx in Reflector", "bthci_evt.optional_cs_subfeatures.freq_actuation_error",
11415
14
            FT_BOOLEAN, 16, NULL, 0x0002,
11416
14
            NULL, HFILL }
11417
14
        },
11418
14
        { &hf_bthci_evt_cs_subfeatures_channel_selection_3c,
11419
14
          { "Channel Selection Algorithm #3c", "bthci_evt.optional_cs_subfeatures.channel_selection_3c",
11420
14
            FT_BOOLEAN, 16, NULL, 0x0004,
11421
14
            NULL, HFILL }
11422
14
        },
11423
14
        { &hf_bthci_evt_cs_subfeatures_pbr_from_rtt,
11424
14
          { "Phase-based Ranging from RTT sounding sequence", "bthci_evt.optional_cs_subfeatures.pbr_from_rtt",
11425
14
            FT_BOOLEAN, 16, NULL, 0x0008,
11426
14
            NULL, HFILL }
11427
14
        },
11428
14
        { &hf_bthci_evt_cs_subfeatures_reserved,
11429
14
          { "Reserved", "bthci_evt.optional_cs_subfeatures.reserved",
11430
14
            FT_UINT16, BASE_HEX, NULL, 0xfff0,
11431
14
            NULL, HFILL }
11432
14
        },
11433
14
        { &hf_bthci_evt_tip1_times_supported,
11434
14
          { "T_IP1 Times Supported", "bthci_evt.tip1_times_supported",
11435
14
            FT_UINT16, BASE_HEX, NULL, 0x0,
11436
14
            NULL, HFILL }
11437
14
        },
11438
14
        { &hf_bthci_evt_tip2_times_supported,
11439
14
          { "T_IP2 Times Supported", "bthci_evt.tip2_times_supported",
11440
14
            FT_UINT16, BASE_HEX, NULL, 0x0,
11441
14
            NULL, HFILL }
11442
14
        },
11443
14
        { &hf_bthci_evt_tip_times_supported_10us,
11444
14
          { "10 microseconds", "bthci_evt.tip_times_supported_10us",
11445
14
            FT_BOOLEAN, 16, NULL, 0x0001,
11446
14
            NULL, HFILL }
11447
14
        },
11448
14
        { &hf_bthci_evt_tip_times_supported_20us,
11449
14
          { "20 microseconds", "bthci_evt.tip_times_supported_20us",
11450
14
            FT_BOOLEAN, 16, NULL, 0x0002,
11451
14
            NULL, HFILL }
11452
14
        },
11453
14
        { &hf_bthci_evt_tip_times_supported_30us,
11454
14
          { "30 microseconds", "bthci_evt.tip_times_supported_30us",
11455
14
            FT_BOOLEAN, 16, NULL, 0x0004,
11456
14
            NULL, HFILL }
11457
14
        },
11458
14
        { &hf_bthci_evt_tip_times_supported_40us,
11459
14
          { "40 microseconds", "bthci_evt.tip_times_supported_40us",
11460
14
            FT_BOOLEAN, 16, NULL, 0x0008,
11461
14
            NULL, HFILL }
11462
14
        },
11463
14
        { &hf_bthci_evt_tip_times_supported_50us,
11464
14
          { "50 microseconds", "bthci_evt.tip_times_supported_50us",
11465
14
            FT_BOOLEAN, 16, NULL, 0x0010,
11466
14
            NULL, HFILL }
11467
14
        },
11468
14
        { &hf_bthci_evt_tip_times_supported_60us,
11469
14
          { "60 microseconds", "bthci_evt.tip_times_supported_60us",
11470
14
            FT_BOOLEAN, 16, NULL, 0x0020,
11471
14
            NULL, HFILL }
11472
14
        },
11473
14
        { &hf_bthci_evt_tip_times_supported_80us,
11474
14
          { "80 microseconds", "bthci_evt.tip_times_supported_80us",
11475
14
            FT_BOOLEAN, 16, NULL, 0x0040,
11476
14
            NULL, HFILL }
11477
14
        },
11478
14
        { &hf_bthci_evt_tip_times_supported_reserved,
11479
14
          { "Reserved", "bthci_evt.tip_times_supported_reserved",
11480
14
            FT_UINT16, BASE_HEX, NULL, 0xff80,
11481
14
            NULL, HFILL }
11482
14
        },
11483
14
        { &hf_bthci_evt_tfcs_times_supported,
11484
14
          { "T_FCS Times Supported", "bthci_evt.tfcs_times_supported",
11485
14
            FT_UINT16, BASE_HEX, NULL, 0x0,
11486
14
            NULL, HFILL }
11487
14
        },
11488
14
        { &hf_bthci_evt_tfcs_times_supported_15us,
11489
14
          { "15 microseconds", "bthci_evt.tfcs_times_supported_15us",
11490
14
            FT_BOOLEAN, 16, NULL, 0x0001,
11491
14
            NULL, HFILL }
11492
14
        },
11493
14
        { &hf_bthci_evt_tfcs_times_supported_20us,
11494
14
          { "20 microseconds", "bthci_evt.tfcs_times_supported_20us",
11495
14
            FT_BOOLEAN, 16, NULL, 0x0002,
11496
14
            NULL, HFILL }
11497
14
        },
11498
14
        { &hf_bthci_evt_tfcs_times_supported_30us,
11499
14
          { "30 microseconds", "bthci_evt.tfcs_times_supported_30us",
11500
14
            FT_BOOLEAN, 16, NULL, 0x0004,
11501
14
            NULL, HFILL }
11502
14
        },
11503
14
        { &hf_bthci_evt_tfcs_times_supported_40us,
11504
14
          { "40 microseconds", "bthci_evt.tfcs_times_supported_40us",
11505
14
            FT_BOOLEAN, 16, NULL, 0x0008,
11506
14
            NULL, HFILL }
11507
14
        },
11508
14
        { &hf_bthci_evt_tfcs_times_supported_50us,
11509
14
          { "50 microseconds", "bthci_evt.tfcs_times_supported_50us",
11510
14
            FT_BOOLEAN, 16, NULL, 0x0010,
11511
14
            NULL, HFILL }
11512
14
        },
11513
14
        { &hf_bthci_evt_tfcs_times_supported_60us,
11514
14
          { "60 microseconds", "bthci_evt.tfcs_times_supported_60us",
11515
14
            FT_BOOLEAN, 16, NULL, 0x0020,
11516
14
            NULL, HFILL }
11517
14
        },
11518
14
        { &hf_bthci_evt_tfcs_times_supported_80us,
11519
14
          { "80 microseconds", "bthci_evt.tfcs_times_supported_80us",
11520
14
            FT_BOOLEAN, 16, NULL, 0x0040,
11521
14
            NULL, HFILL }
11522
14
        },
11523
14
        { &hf_bthci_evt_tfcs_times_supported_100us,
11524
14
          { "100 microseconds", "bthci_evt.tfcs_times_supported_100us",
11525
14
            FT_BOOLEAN, 16, NULL, 0x0080,
11526
14
            NULL, HFILL }
11527
14
        },
11528
14
        { &hf_bthci_evt_tfcs_times_supported_120us,
11529
14
          { "120 microseconds", "bthci_evt.tfcs_times_supported_120us",
11530
14
            FT_BOOLEAN, 16, NULL, 0x0100,
11531
14
            NULL, HFILL }
11532
14
        },
11533
14
        { &hf_bthci_evt_tfcs_times_supported_reserved,
11534
14
          { "Reserved", "bthci_evt.tfcs_times_supported_reserved",
11535
14
            FT_UINT16, BASE_HEX, NULL, 0xfe00,
11536
14
            NULL, HFILL }
11537
14
        },
11538
14
        { &hf_bthci_evt_tpm_times_supported,
11539
14
          { "T_PM Times Supported", "bthci_evt.tpm_times_supported",
11540
14
            FT_UINT16, BASE_HEX, NULL, 0x0,
11541
14
            NULL, HFILL }
11542
14
        },
11543
14
        { &hf_bthci_evt_tpm_times_supported_10us,
11544
14
          { "10 microseconds", "bthci_evt.tpm_times_supported_10us",
11545
14
            FT_BOOLEAN, 16, NULL, 0x0001,
11546
14
            NULL, HFILL }
11547
14
        },
11548
14
        { &hf_bthci_evt_tpm_times_supported_20us,
11549
14
          { "20 microseconds", "bthci_evt.tpm_times_supported_20us",
11550
14
            FT_BOOLEAN, 16, NULL, 0x0002,
11551
14
            NULL, HFILL }
11552
14
        },
11553
14
        { &hf_bthci_evt_tpm_times_supported_reserved,
11554
14
          { "Reserved", "bthci_evt.tpm_times_supported_reserved",
11555
14
            FT_UINT16, BASE_HEX, NULL, 0xfffc,
11556
14
            NULL, HFILL }
11557
14
        },
11558
14
        { &hf_bthci_evt_tsw_time_supported,
11559
14
          { "T_SW Time Supported", "bthci_evt.tsw_time_supported",
11560
14
            FT_UINT8, BASE_DEC|BASE_UNIT_STRING, UNS(&units_microseconds), 0x0,
11561
14
            NULL, HFILL }
11562
14
        },
11563
14
        { &hf_bthci_evt_tx_snr_capability,
11564
14
          { "Tx SNR Capability", "bthci_evt.tx_snr_capability",
11565
14
            FT_UINT8, BASE_HEX, NULL, 0x0,
11566
14
            NULL, HFILL }
11567
14
        },
11568
14
        { &hf_bthci_evt_tx_snr_capability_18dB,
11569
14
          { "18 dB", "bthci_evt.tx_snr_capability_18dB",
11570
14
            FT_BOOLEAN, 8, NULL, 0x01,
11571
14
            NULL, HFILL }
11572
14
        },
11573
14
        { &hf_bthci_evt_tx_snr_capability_21dB,
11574
14
          { "21 dB", "bthci_evt.tx_snr_capability_21dB",
11575
14
            FT_BOOLEAN, 8, NULL, 0x02,
11576
14
            NULL, HFILL }
11577
14
        },
11578
14
        { &hf_bthci_evt_tx_snr_capability_24dB,
11579
14
          { "24 dB", "bthci_evt.tx_snr_capability_24dB",
11580
14
            FT_BOOLEAN, 8, NULL, 0x04,
11581
14
            NULL, HFILL }
11582
14
        },
11583
14
        { &hf_bthci_evt_tx_snr_capability_27dB,
11584
14
          { "27 dB", "bthci_evt.tx_snr_capability_27dB",
11585
14
            FT_BOOLEAN, 8, NULL, 0x08,
11586
14
            NULL, HFILL }
11587
14
        },
11588
14
        { &hf_bthci_evt_tx_snr_capability_30dB,
11589
14
          { "30 dB", "bthci_evt.tx_snr_capability_30dB",
11590
14
            FT_BOOLEAN, 8, NULL, 0x10,
11591
14
            NULL, HFILL }
11592
14
        },
11593
14
        { &hf_bthci_evt_tx_snr_capability_reserved,
11594
14
          { "Reserved", "bthci_evt.tx_snr_capability_reserved",
11595
14
            FT_UINT8, BASE_HEX, NULL, 0xe0,
11596
14
            NULL, HFILL }
11597
14
        },
11598
14
        { &hf_bthci_evt_num_steps_reported,
11599
14
          { "Steps Reported", "bthci_evt.num_steps_reported",
11600
14
            FT_UINT8, BASE_DEC, NULL, 0x0,
11601
14
            NULL, HFILL }
11602
14
        },
11603
14
        { &hf_bthci_evt_cs_step,
11604
14
          { "Step", "bthci_evt.cs_step",
11605
14
            FT_STRING, BASE_NONE, NULL, 0x0,
11606
14
            NULL, HFILL }
11607
14
        },
11608
14
        { &hf_bthci_evt_step_mode,
11609
14
          { "Mode", "bthci_evt.step_mode",
11610
14
            FT_UINT8, BASE_DEC, NULL, 0x0,
11611
14
            NULL, HFILL }
11612
14
        },
11613
14
        { &hf_bthci_evt_step_channel,
11614
14
          { "Channel", "bthci_evt.step_channel",
11615
14
            FT_UINT8, BASE_DEC, NULL, 0x0,
11616
14
            NULL, HFILL }
11617
14
        },
11618
14
        { &hf_bthci_evt_step_data_length,
11619
14
          { "Data Length", "bthci_evt.step_data_length",
11620
14
            FT_UINT8, BASE_DEC, NULL, 0x0,
11621
14
            NULL, HFILL }
11622
14
        },
11623
14
        { &hf_bthci_evt_packet_quality,
11624
14
          { "Packet Quality", "bthci_evt.packet_quality",
11625
14
            FT_UINT8, BASE_HEX, NULL, 0x0,
11626
14
            NULL, HFILL }
11627
14
        },
11628
14
        { &hf_bthci_evt_packet_quality_aa_check,
11629
14
          { "Access Address Check", "bthci_evt.packet_quality.aa_check",
11630
14
            FT_UINT8, BASE_HEX, VALS(access_address_check_vals), 0x0f,
11631
14
            NULL, HFILL }
11632
14
        },
11633
14
        { &hf_bthci_evt_packet_quality_bit_errors,
11634
14
          { "Bit Errors in Sounding/Random Sequence", "bthci_evt.packet_quality.bit_errors",
11635
14
            FT_UINT8, BASE_DEC, NULL, 0xf0,
11636
14
            NULL, HFILL }
11637
14
        },
11638
14
        { &hf_bthci_evt_measured_freq_offset,
11639
14
          { "Measured Frequency Offset", "bthci_evt.measured_freq_offset",
11640
14
            FT_INT16, BASE_CUSTOM, CF_FUNC(freq_compensation), 0x0,
11641
14
            NULL, HFILL }
11642
14
        },
11643
14
        { &hf_bthci_evt_nadm_attack_chance,
11644
14
          { "NADM Attack Chance",        "bthci_evt.nadm_attack_chance",
11645
14
            FT_UINT8, BASE_HEX, VALS(nadm_attack_chance_vals), 0x0,
11646
14
            NULL, HFILL }
11647
14
        },
11648
14
        { &hf_bthci_evt_toa_tod_initiator,
11649
14
          { "ToA-ToD Time, Initiator", "bthci_evt.toa_tod_initiator",
11650
14
            FT_INT16, BASE_CUSTOM, CF_FUNC(convert_time_unit_0p5_ns), 0x0,
11651
14
            NULL, HFILL }
11652
14
        },
11653
14
        { &hf_bthci_evt_tod_toa_reflector,
11654
14
          { "ToD-ToA Time, Reflector", "bthci_evt.tod_toa_reflector",
11655
14
            FT_INT16, BASE_CUSTOM, CF_FUNC(convert_time_unit_0p5_ns), 0x0,
11656
14
            NULL, HFILL }
11657
14
        },
11658
14
        { &hf_bthci_evt_pct1,
11659
14
          { "PCT1", "bthci_evt.pct1",
11660
14
            FT_STRING, BASE_NONE, NULL, 0x0,
11661
14
            NULL, HFILL }
11662
14
        },
11663
14
        { &hf_bthci_evt_pct2,
11664
14
          { "PCT2", "bthci_evt.pct2",
11665
14
            FT_STRING, BASE_NONE, NULL, 0x0,
11666
14
            NULL, HFILL }
11667
14
        },
11668
14
        { &hf_bthci_evt_pct_not_available,
11669
14
          { "PCT Not Available", "bthci_evt.pct_not_available",
11670
14
            FT_UINT32, BASE_HEX, NULL, 0x0,
11671
14
            NULL, HFILL }
11672
14
        },
11673
14
        { &hf_bthci_evt_tone_pct,
11674
14
          { "Tone PCT", "bthci_evt.tone_pct",
11675
14
            FT_STRING, BASE_NONE, NULL, 0x0,
11676
14
            NULL, HFILL }
11677
14
        },
11678
14
        { &hf_bthci_evt_pct_i_sample,
11679
14
          { "I Sample", "bthci_evt.pct_i_sample",
11680
14
            FT_UINT24, BASE_CUSTOM, CF_FUNC(sint12_convert), 0x000FFF,
11681
14
            NULL, HFILL }
11682
14
        },
11683
14
        { &hf_bthci_evt_pct_q_sample,
11684
14
          { "Q Sample", "bthci_evt.pct_q_sample",
11685
14
            FT_UINT24, BASE_CUSTOM, CF_FUNC(sint12_convert), 0xFFF000,
11686
14
            NULL, HFILL }
11687
14
        },
11688
14
        { &hf_bthci_evt_antenna_permutation_index,
11689
14
          { "Antenna Permutation Index", "bthci_evt.antenna_permutation_index",
11690
14
            FT_UINT8, BASE_DEC, NULL, 0x0,
11691
14
            NULL, HFILL }
11692
14
        },
11693
14
        { &hf_bthci_evt_tone_quality,
11694
14
          { "Tone Quality", "bthci_evt.tone_quality",
11695
14
            FT_UINT8, BASE_HEX, VALS(tone_quality_vals), 0x0F,
11696
14
            NULL, HFILL }
11697
14
        },
11698
14
        { &hf_bthci_evt_tone_extension_presence,
11699
14
          { "Tone Extension", "bthci_evt.tone_extension_presence",
11700
14
            FT_UINT8, BASE_HEX, VALS(tone_ext_presence_vals), 0xF0,
11701
14
            NULL, HFILL }
11702
14
        },
11703
14
        { &hf_bthci_evt_cs_tone,
11704
14
          { "Tone", "bthci_evt.cs_tone",
11705
14
            FT_STRING, BASE_NONE, NULL, 0x0,
11706
14
            NULL, HFILL }
11707
14
        },
11708
14
        { &hf_bthci_evt_monitoring_condition,
11709
14
          { "Condition",        "bthci_evt.monitoring_condition",
11710
14
            FT_UINT8, BASE_HEX, VALS(monitoring_condition_vals), 0x0,
11711
14
            NULL, HFILL }
11712
14
        },
11713
14
        { &hf_bthci_evt_initiator,
11714
14
          { "Initiator",        "bthci_evt.initiator",
11715
14
            FT_UINT8, BASE_HEX, VALS(initiator_vals), 0x0,
11716
14
            NULL, HFILL }
11717
14
        },
11718
14
        { &hf_bthci_evt_frame_space,
11719
14
          { "Frame Space", "bthci_evt.frame_space",
11720
14
            FT_UINT16, BASE_DEC|BASE_UNIT_STRING, UNS(&units_microseconds), 0x0,
11721
14
            NULL, HFILL }
11722
14
        },
11723
14
        { &hf_bthci_evt_spacing_types,
11724
14
          { "Spacing Types", "bthci_evt.spacing_types",
11725
14
            FT_UINT16, BASE_HEX, NULL, 0x0,
11726
14
            NULL, HFILL }
11727
14
        },
11728
14
        { &hf_bthci_evt_spacing_types_tifs_acl_cp,
11729
14
          { "T_IFS_ACL_CP", "bthci_evt.spacing_types.tifs_acl_cp",
11730
14
            FT_BOOLEAN, 16, NULL, 0x0001,
11731
14
            NULL, HFILL }
11732
14
        },
11733
14
        { &hf_bthci_evt_spacing_types_tifs_acl_pc,
11734
14
          { "T_IFS_ACL_PC", "bthci_evt.spacing_types.tifs_acl_pc",
11735
14
            FT_BOOLEAN, 16, NULL, 0x0002,
11736
14
            NULL, HFILL }
11737
14
        },
11738
14
        { &hf_bthci_evt_spacing_types_tmces,
11739
14
          { "T_MCES", "bthci_evt.spacing_types.tmces",
11740
14
            FT_BOOLEAN, 16, NULL, 0x0004,
11741
14
            NULL, HFILL }
11742
14
        },
11743
14
        { &hf_bthci_evt_spacing_types_tifs_cis,
11744
14
          { "T_IFS_CIS", "bthci_evt.spacing_types.tifs_cis",
11745
14
            FT_BOOLEAN, 16, NULL, 0x0008,
11746
14
            NULL, HFILL }
11747
14
        },
11748
14
        { &hf_bthci_evt_spacing_types_tmss_cis,
11749
14
          { "T_MSS_CIS", "bthci_evt.spacing_types.tmss_cis",
11750
14
            FT_BOOLEAN, 16, NULL, 0x0010,
11751
14
            NULL, HFILL }
11752
14
        },
11753
14
        { &hf_bthci_evt_spacing_types_reserved,
11754
14
          { "Reserved", "bthci_evt.spacing_types.reserved",
11755
14
            FT_UINT16, BASE_HEX, NULL, 0xFFE0,
11756
14
            NULL, HFILL }
11757
14
        },
11758
14
        { &hf_bthci_evt_le_phys,
11759
14
          { "PHYs", "bthci_evt.le_phys",
11760
14
            FT_UINT8, BASE_HEX, NULL, 0x0,
11761
14
            NULL, HFILL }
11762
14
        },
11763
14
        { &hf_bthci_evt_le_phys_le_1m,
11764
14
          { "LE 1M", "bthci_evt.le_phys.le_1m",
11765
14
            FT_BOOLEAN, 8, NULL, 0x1,
11766
14
            NULL, HFILL }
11767
14
        },
11768
14
        { &hf_bthci_evt_le_phys_le_2m,
11769
14
          { "LE 2M", "bthci_evt.le_phys.le_2m",
11770
14
            FT_BOOLEAN, 8, NULL, 0x2,
11771
14
            NULL, HFILL }
11772
14
        },
11773
14
        { &hf_bthci_evt_le_phys_le_coded,
11774
14
          { "LE Coded", "bthci_evt.le_phys.le_coded",
11775
14
            FT_BOOLEAN, 8, NULL, 0x4,
11776
14
            NULL, HFILL }
11777
14
        },
11778
14
        { &hf_bthci_evt_le_phys_reserved,
11779
14
          { "Reserved", "bthci_evt.le_phys.reserved",
11780
14
            FT_UINT8, BASE_HEX, NULL, 0xF8,
11781
14
            NULL, HFILL }
11782
14
        },
11783
11784
14
    };
11785
11786
14
    static ei_register_info ei[] = {
11787
14
        { &ei_event_undecoded,            { "bthci_evt.expert.event.undecoded",                 PI_UNDECODED, PI_NOTE,     "Event undecoded", EXPFILL }},
11788
14
        { &ei_event_unknown_event,        { "bthci_evt.expert.event.unknown_event",             PI_PROTOCOL, PI_WARN,      "Unknown event", EXPFILL }},
11789
14
        { &ei_event_unexpected_event,     { "bthci_evt.expert.event.unexpected_event",          PI_PROTOCOL, PI_WARN,      "Unexpected event", EXPFILL }},
11790
14
        { &ei_event_unexpected_parameter, { "bthci_evt.expert.event.unexpected_parameter",      PI_PROTOCOL, PI_WARN,      "Unexpected parameter", EXPFILL }},
11791
14
        { &ei_event_unknown_command,      { "bthci_evt.expert.event.unknown_command",           PI_PROTOCOL, PI_WARN,      "Unknown command", EXPFILL }},
11792
14
        { &ei_parameter_unexpected,       { "bthci_evt.expert.parameter.unexpected",            PI_PROTOCOL, PI_WARN,      "Unexpected command parameter", EXPFILL }},
11793
14
        { &ei_manufacturer_data_changed,  { "bthci_evt.expert.event.manufacturer_data_changed", PI_PROTOCOL, PI_WARN,      "Manufacturer data changed", EXPFILL }},
11794
14
        { &ei_hci_revision_changed,       { "bthci_evt.expert.event.hci_revision_changed",      PI_PROTOCOL, PI_WARN,      "HCI Revision changed", EXPFILL }},
11795
14
        { &ei_lmp_subversion_changed,     { "bthci_evt.expert.event.lmp_subversion_changed",    PI_PROTOCOL, PI_WARN,      "LMP Subversion changed", EXPFILL }},
11796
14
        { &ei_bad_link_type,              { "bthci_evt.expert.bad_link_type",                   PI_PROTOCOL, PI_WARN,      "Bad Link type, should be ACL or SCO", EXPFILL }},
11797
14
    };
11798
11799
    /* Setup protocol subtree array */
11800
14
    static int *ett[] = {
11801
14
        &ett_bthci_evt,
11802
14
        &ett_opcode,
11803
14
        &ett_lmp_subtree,
11804
14
        &ett_ptype_subtree,
11805
14
        &ett_le_state_subtree,
11806
14
        &ett_le_channel_map,
11807
14
        &ett_le_features,
11808
14
        &ett_le_report,
11809
14
        &ett_codecs,
11810
14
        &ett_mws_transport_layers,
11811
14
        &ett_mws_transport_layers_item,
11812
14
        &ett_mws_to_mws_baud_rates,
11813
14
        &ett_mws_to_mws_baud_rates_transport_item,
11814
14
        &ett_mws_from_mws_baud_rates,
11815
14
        &ett_mws_from_mws_baud_rates_transport_item,
11816
14
        &ett_expert,
11817
14
        &ett_le_ext_advts_event_type,
11818
14
        &ett_iq_sample_list,
11819
14
        &ett_iq_samples,
11820
14
        &ett_simple_pairing_options,
11821
14
        &ett_supported_switching_sample_rates,
11822
14
        &ett_transmit_power_level_flags,
11823
14
        &ett_adv_subevent_responses,
11824
14
        &ett_cs_abort_reason,
11825
14
        &ett_cs_step,
11826
14
        &ett_cs_tone,
11827
14
        &ett_cs_pct_sample,
11828
14
        &ett_packet_quality,
11829
14
        &ett_cs_roles,
11830
14
        &ett_cs_modes,
11831
14
        &ett_cs_capability,
11832
14
        &ett_cs_times,
11833
14
        &ett_spacing_types,
11834
14
        &ett_phys
11835
14
    };
11836
11837
    /* Decode As handling
11838
       This doesn't use register_decode_as_next_proto because it shares a dissector table
11839
       with "bthci_cmd.vendor" */
11840
14
    static build_valid_func bthci_evt_vendor_da_build_value[1] = {bthci_evt_vendor_value};
11841
14
    static decode_as_value_t bthci_evt_vendor_da_values = {bthci_evt_vendor_prompt, 1, bthci_evt_vendor_da_build_value};
11842
14
    static decode_as_t bthci_evt_vendor_da = {"bthci_cmd", "bthci_cmd.vendor", 1, 0, &bthci_evt_vendor_da_values, NULL, NULL,
11843
14
            decode_as_default_populate_list, decode_as_default_reset, decode_as_default_change, NULL};
11844
11845
11846
    /* Register the protocol name and description */
11847
14
    proto_bthci_evt = proto_register_protocol("Bluetooth HCI Event",
11848
14
            "HCI_EVT", "bthci_evt");
11849
14
    bthci_evt_handle = register_dissector("bthci_evt", dissect_bthci_evt, proto_bthci_evt);
11850
11851
    /* Required function calls to register the header fields and subtrees used */
11852
14
    proto_register_field_array(proto_bthci_evt, hf, array_length(hf));
11853
14
    proto_register_subtree_array(ett, array_length(ett));
11854
11855
14
    expert_bthci_evt = expert_register_protocol(proto_bthci_evt);
11856
14
    expert_register_field_array(expert_bthci_evt, ei, array_length(ei));
11857
11858
14
    module = prefs_register_protocol_subtree("Bluetooth", proto_bthci_evt, NULL);
11859
14
    prefs_register_static_text_preference(module, "hci_evt.version",
11860
14
            "Bluetooth HCI version: 4.0 (Core) + Addendum 4",
11861
14
            "Version of protocol supported by this dissector.");
11862
11863
14
    register_decode_as(&bthci_evt_vendor_da);
11864
11865
14
    hci_evt_vendor_dissector_table = register_decode_as_next_proto(proto_bthci_evt, "bthci_evt.vendor",
11866
14
                                                           "BT HCI Event Vendor", bthci_evt_vendor_prompt);
11867
14
}
11868
11869
11870
void
11871
proto_reg_handoff_bthci_evt(void)
11872
14
{
11873
14
    hci_cmd_vendor_dissector_table = find_dissector_table("bthci_cmd.vendor");
11874
14
    hci_vendor_table = find_dissector_table("bluetooth.vendor");
11875
11876
14
    dissector_add_uint("hci_h4.type", HCI_H4_TYPE_EVT, bthci_evt_handle);
11877
14
    dissector_add_uint("hci_h1.type", BTHCI_CHANNEL_EVENT, bthci_evt_handle);
11878
11879
14
    bthci_cmd_handle    = find_dissector_add_dependency("bthci_cmd", proto_bthci_evt);
11880
14
    btcommon_cod_handle = find_dissector_add_dependency("btcommon.cod", proto_bthci_evt);
11881
14
    btcommon_eir_handle = find_dissector_add_dependency("btcommon.eir_ad.eir", proto_bthci_evt);
11882
14
    btcommon_ad_handle  = find_dissector_add_dependency("btcommon.eir_ad.ad", proto_bthci_evt);
11883
14
    btcommon_le_channel_map_handle = find_dissector_add_dependency("btcommon.le_channel_map", proto_bthci_evt);
11884
14
}
11885
11886
/*
11887
 * Editor modelines  -  https://www.wireshark.org/tools/modelines.html
11888
 *
11889
 * Local variables:
11890
 * c-basic-offset: 4
11891
 * tab-width: 8
11892
 * indent-tabs-mode: nil
11893
 * End:
11894
 *
11895
 * vi: set shiftwidth=4 tabstop=8 expandtab:
11896
 * :indentSize=4:tabSize=8:noTabs=true:
11897
 */