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
6 * Refactored for wireshark checkin
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
16 * Wireshark - Network traffic analyzer
17 * By Gerald Combs <gerald@wireshark.org>
18 * Copyright 1998 Gerald Combs
20 * This program is free software; you can redistribute it and/or
21 * modify it under the terms of the GNU General Public License
22 * as published by the Free Software Foundation; either version 2
23 * of the License, or (at your option) any later version.
25 * This program is distributed in the hope that it will be useful,
26 * but WITHOUT ANY WARRANTY; without even the implied warranty of
27 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
28 * GNU General Public License for more details.
30 * You should have received a copy of the GNU General Public License
31 * along with this program; if not, write to the Free Software
32 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
37 #include <epan/packet.h>
38 #include <epan/addr_resolv.h>
39 #include <epan/wmem/wmem.h>
40 #include <epan/expert.h>
41 #include <epan/prefs.h>
43 #include "packet-bluetooth-hci.h"
44 #include "packet-sdp.h"
46 static dissector_handle_t bthci_cmd_handle
;
48 /* Initialize the protocol and registered fields */
49 static int proto_bthci_evt
= -1;
50 static int hf_bthci_evt_code
= -1;
51 static int hf_bthci_evt_param_length
= -1;
52 static int hf_bthci_evt_num_command_packets
= -1;
53 static int hf_bthci_evt_num_handles
= -1;
54 static int hf_bthci_evt_connection_handle
= -1;
55 static int hf_bthci_evt_num_compl_packets
= -1;
56 static int hf_bthci_evt_ret_params
= -1;
57 static int hf_bthci_evt_status
= -1;
58 static int hf_bthci_evt_status_pending
= -1;
59 static int hf_bthci_evt_opcode
= -1;
60 static int hf_bthci_evt_ogf
= -1;
61 static int hf_bthci_evt_ocf
= -1;
62 static int hf_bthci_evt_ocf_link_control
= -1;
63 static int hf_bthci_evt_ocf_link_policy
= -1;
64 static int hf_bthci_evt_ocf_host_controller_and_baseband
= -1;
65 static int hf_bthci_evt_ocf_informational
= -1;
66 static int hf_bthci_evt_ocf_status
= -1;
67 static int hf_bthci_evt_ocf_testing
= -1;
68 static int hf_bthci_evt_ocf_logo_testing
= -1;
69 static int hf_bthci_evt_ocf_low_energy
= -1;
70 static int hf_bthci_evt_bd_addr
= -1;
71 static int hf_bthci_evt_class_of_device
= -1;
72 static int hf_bthci_evt_cod_format_type
= -1;
73 static int hf_bthci_evt_cod_major_service_class_information
= -1;
74 static int hf_bthci_evt_cod_major_service_class_telephony
= -1;
75 static int hf_bthci_evt_cod_major_service_class_audio
= -1;
76 static int hf_bthci_evt_cod_major_service_class_object_transfer
= -1;
77 static int hf_bthci_evt_cod_major_service_class_capturing
= -1;
78 static int hf_bthci_evt_cod_major_service_class_rendering
= -1;
79 static int hf_bthci_evt_cod_major_service_class_networking
= -1;
80 static int hf_bthci_evt_cod_major_service_class_positioning
= -1;
81 static int hf_bthci_evt_cod_major_service_class_reserved
= -1;
82 static int hf_bthci_evt_cod_major_service_class_limited_discoverable_mode
= -1;
83 static int hf_bthci_evt_cod_major_device_class
= -1;
84 static int hf_bthci_evt_cod_minor_device_class_computer
= -1;
85 static int hf_bthci_evt_cod_minor_device_class_phone
= -1;
86 static int hf_bthci_evt_cod_minor_device_class_lan_net_load_factor
= -1;
87 static int hf_bthci_evt_cod_minor_device_class_lan_net_type
= -1;
88 static int hf_bthci_evt_cod_minor_device_class_audio_video
= -1;
89 static int hf_bthci_evt_cod_minor_device_class_peripheral_class
= -1;
90 static int hf_bthci_evt_cod_minor_device_class_peripheral_type
= -1;
91 static int hf_bthci_evt_cod_minor_device_class_imaging_class_printer
= -1;
92 static int hf_bthci_evt_cod_minor_device_class_imaging_class_scanner
= -1;
93 static int hf_bthci_evt_cod_minor_device_class_imaging_class_camera
= -1;
94 static int hf_bthci_evt_cod_minor_device_class_imaging_class_display
= -1;
95 static int hf_bthci_evt_cod_minor_device_class_imaging_type
= -1;
96 static int hf_bthci_evt_cod_minor_device_class_wearable
= -1;
97 static int hf_bthci_evt_cod_minor_device_class_toy
= -1;
98 static int hf_bthci_evt_cod_minor_device_class_health
= -1;
99 static int hf_bthci_evt_cod_minor_device_class_unknown
= -1;
100 static int hf_bthci_evt_link_type
= -1;
101 static int hf_bthci_evt_encryption_mode
= -1;
102 static int hf_bthci_evt_reason
= -1;
103 static int hf_bthci_evt_remote_name
= -1;
104 static int hf_bthci_evt_encryption_enable
= -1;
105 static int hf_bthci_evt_key_flag
= -1;
106 static int hf_bthci_evt_vers_nr
= -1;
107 static int hf_bthci_evt_hci_vers_nr
= -1;
108 static int hf_bthci_evt_hci_revision
= -1;
109 static int hf_bthci_evt_comp_id
= -1;
110 static int hf_bthci_evt_sub_vers_nr
= -1;
111 static int hf_bthci_evt_flags
= -1;
112 static int hf_bthci_evt_service_type
= -1;
113 static int hf_bthci_evt_token_rate
= -1;
114 static int hf_bthci_evt_peak_bandwidth
= -1;
115 static int hf_bthci_evt_latency
= -1;
116 static int hf_bthci_evt_delay_variation
= -1;
117 static int hf_bthci_evt_hardware_code
= -1;
118 static int hf_bthci_evt_role
= -1;
119 static int hf_bthci_evt_curr_role
= -1;
120 static int hf_bthci_evt_curr_mode
= -1;
121 static int hf_bthci_evt_interval
= -1;
122 static int hf_bthci_evt_link_key
= -1;
123 static int hf_bthci_evt_key_type
= -1;
124 static int hf_bthci_evt_max_slots
= -1;
125 static int hf_bthci_evt_clock_offset
= -1;
126 static int hf_bthci_evt_link_type_2dh1
= -1;
127 static int hf_bthci_evt_link_type_3dh1
= -1;
128 static int hf_bthci_evt_link_type_dm1
= -1;
129 static int hf_bthci_evt_link_type_dh1
= -1;
130 static int hf_bthci_evt_link_type_2dh3
= -1;
131 static int hf_bthci_evt_link_type_3dh3
= -1;
132 static int hf_bthci_evt_link_type_dm3
= -1;
133 static int hf_bthci_evt_link_type_dh3
= -1;
134 static int hf_bthci_evt_link_type_2dh5
= -1;
135 static int hf_bthci_evt_link_type_3dh5
= -1;
136 static int hf_bthci_evt_link_type_dm5
= -1;
137 static int hf_bthci_evt_link_type_dh5
= -1;
138 static int hf_bthci_evt_link_type_hv1
= -1;
139 static int hf_bthci_evt_link_type_hv2
= -1;
140 static int hf_bthci_evt_link_type_hv3
= -1;
141 static int hf_bthci_evt_page_scan_mode
= -1;
142 static int hf_bthci_evt_page_scan_repetition_mode
= -1;
143 static int hf_bthci_evt_page_scan_period_mode
= -1;
144 static int hf_bthci_evt_num_keys
= -1;
145 static int hf_bthci_evt_num_keys_read
= -1;
146 static int hf_bthci_evt_max_num_keys
= -1;
147 static int hf_bthci_evt_num_responses
= -1;
148 static int hf_bthci_evt_num_keys_written
= -1;
149 static int hf_bthci_evt_num_keys_deleted
= -1;
150 static int hf_bthci_evt_link_policy_setting_switch
= -1;
151 static int hf_bthci_evt_link_policy_setting_hold
= -1;
152 static int hf_bthci_evt_link_policy_setting_sniff
= -1;
153 static int hf_bthci_evt_link_policy_setting_park
= -1;
154 static int hf_bthci_evt_pin_type
= -1;
155 static int hf_bthci_evt_device_name
= -1;
156 static int hf_bthci_evt_timeout
= -1;
157 static int hf_bthci_evt_scan_enable
= -1;
158 static int hf_bthci_evt_authentication_enable
= -1;
159 static int hf_bthci_evt_sco_flow_cont_enable
= -1;
160 static int hf_bthci_evt_window
= -1;
161 static int hf_bthci_evt_input_unused
= -1;
162 static int hf_bthci_evt_input_coding
= -1;
163 static int hf_bthci_evt_input_data_format
= -1;
164 static int hf_bthci_evt_input_sample_size
= -1;
165 static int hf_bthci_evt_linear_pcm_bit_pos
= -1;
166 static int hf_bthci_evt_air_coding_format
= -1;
167 static int hf_bthci_evt_num_broadcast_retransm
= -1;
168 static int hf_bthci_evt_hold_mode_act_page
= -1;
169 static int hf_bthci_evt_hold_mode_act_inquiry
= -1;
170 static int hf_bthci_evt_hold_mode_act_periodic
= -1;
171 static int hf_bthci_evt_transmit_power_level
= -1;
172 static int hf_bthci_evt_transmit_power_level_gfsk
= -1;
173 static int hf_bthci_evt_transmit_power_level_dqpsk
= -1;
174 static int hf_bthci_evt_transmit_power_level_8dpsk
= -1;
175 static int hf_bthci_evt_flush_to_us
= -1;
176 static int hf_bthci_evt_num_supp_iac
= -1;
177 static int hf_bthci_evt_num_curr_iac
= -1;
178 static int hf_bthci_evt_iac_lap
= -1;
179 static int hf_bthci_evt_loopback_mode
= -1;
180 static int hf_bthci_evt_country_code
= -1;
181 static int hf_bthci_evt_failed_contact_counter
= -1;
182 static int hf_bthci_evt_link_quality
= -1;
183 static int hf_bthci_evt_rssi
= -1;
184 static int hf_bthci_evt_host_data_packet_length_acl
= -1;
185 static int hf_bthci_evt_host_data_packet_length_sco
= -1;
186 static int hf_bthci_evt_host_total_num_acl_data_packets
= -1;
187 static int hf_bthci_evt_host_total_num_sco_data_packets
= -1;
188 static int hf_bthci_evt_page_number
= -1;
189 static int hf_bthci_evt_max_page_number
= -1;
190 static int hf_bthci_evt_local_supported_cmds
= -1;
191 static int hf_bthci_evt_fec_required
= -1;
192 static int hf_bthci_evt_err_data_reporting
= -1;
193 static int hf_bthci_evt_scan_type
= -1;
194 static int hf_bthci_evt_inq_mode
= -1;
195 static int hf_bthci_evt_power_level_type
= -1;
196 static int hf_lmp_features
= -1;
197 static int hf_lmp_feature_3slot_packets
= -1;
198 static int hf_lmp_feature_5slot_packets
= -1;
199 static int hf_lmp_feature_encryption
= -1;
200 static int hf_lmp_feature_slot_offset
= -1;
201 static int hf_lmp_feature_timing_accuracy
= -1;
202 static int hf_lmp_feature_role_switch
= -1;
203 static int hf_lmp_feature_hold_mode
= -1;
204 static int hf_lmp_feature_sniff_mode
= -1;
205 static int hf_lmp_feature_park_state
= -1;
206 static int hf_lmp_feature_power_control_requests
= -1;
207 static int hf_lmp_feature_channel_quality_driven_data_rate
= -1;
208 static int hf_lmp_feature_sco_link
= -1;
209 static int hf_lmp_feature_hv2_packets
= -1;
210 static int hf_lmp_feature_hv3_packets
= -1;
211 static int hf_lmp_feature_u_law_log_synchronous_data
= -1;
212 static int hf_lmp_feature_a_law_log_synchronous_data
= -1;
213 static int hf_lmp_feature_cvsd_synchronous_data
= -1;
214 static int hf_lmp_feature_paging_parameter_negotiation
= -1;
215 static int hf_lmp_feature_power_control
= -1;
216 static int hf_lmp_feature_transparent_synchronous_data
= -1;
217 static int hf_lmp_feature_flow_control_lag
= -1;
218 static int hf_lmp_feature_broadcast_encryption
= -1;
219 static int hf_lmp_feature_reserved_24
= -1;
220 static int hf_lmp_feature_edr_acl_2mbps_mode
= -1;
221 static int hf_lmp_feature_edr_acl_3mbps_mode
= -1;
222 static int hf_lmp_feature_enhanced_inquiry_scan
= -1;
223 static int hf_lmp_feature_interlaced_inquiry_scan
= -1;
224 static int hf_lmp_feature_interlaced_page_scan
= -1;
225 static int hf_lmp_feature_rssi_with_inquiry_results
= -1;
226 static int hf_lmp_feature_ev3_packets
= -1;
227 static int hf_lmp_feature_ev4_packets
= -1;
228 static int hf_lmp_feature_ev5_packets
= -1;
229 static int hf_lmp_feature_reserved_34
= -1;
230 static int hf_lmp_feature_afh_capable_slave
= -1;
231 static int hf_lmp_feature_afh_classification_slave
= -1;
232 static int hf_lmp_feature_br_edr_not_supported
= -1;
233 static int hf_lmp_feature_le_supported_controller
= -1;
234 static int hf_lmp_feature_3slot_edr_acl_packets
= -1;
235 static int hf_lmp_feature_5slot_edr_acl_packets
= -1;
236 static int hf_lmp_feature_sniff_subrating
= -1;
237 static int hf_lmp_feature_pause_encryption
= -1;
238 static int hf_lmp_feature_afh_capable_master
= -1;
239 static int hf_lmp_feature_afh_classification_master
= -1;
240 static int hf_lmp_feature_edr_esco_2mbps_mode
= -1;
241 static int hf_lmp_feature_edr_esco_3mbps_mode
= -1;
242 static int hf_lmp_feature_3slot_edr_esco_packets
= -1;
243 static int hf_lmp_feature_extended_inquiry_response
= -1;
244 static int hf_lmp_feature_simultaneous_le_and_br_edr_controller
= -1;
245 static int hf_lmp_feature_reserved_50
= -1;
246 static int hf_lmp_feature_secure_simple_pairing
= -1;
247 static int hf_lmp_feature_encapsulated_pdu
= -1;
248 static int hf_lmp_feature_erroneous_data_reporting
= -1;
249 static int hf_lmp_feature_non_flushable_packet_boundary_flag
= -1;
250 static int hf_lmp_feature_reserved_55
= -1;
251 static int hf_lmp_feature_link_supervision_timeout_changed_event
= -1;
252 static int hf_lmp_feature_inquiry_tx_power_level
= -1;
253 static int hf_lmp_feature_enhanced_power_control
= -1;
254 static int hf_lmp_feature_reserved_59_62
= -1;
255 static int hf_lmp_feature_extended_features
= -1;
256 static int hf_lmp_feature_secure_simple_pairing_host
= -1;
257 static int hf_lmp_feature_le_supported_host
= -1;
258 static int hf_lmp_feature_simultaneous_le_and_br_edr_host
= -1;
259 static int hf_lmp_feature_reserved_67_71
= -1;
260 static int hf_lmp_feature_reserved
= -1;
261 static int hf_bthci_evt_sync_link_type
= -1;
262 static int hf_bthci_evt_sync_tx_interval
= -1;
263 static int hf_bthci_evt_sync_rtx_window
= -1;
264 static int hf_bthci_evt_sync_rx_packet_length
= -1;
265 static int hf_bthci_evt_sync_tx_packet_length
= -1;
266 static int hf_bthci_evt_air_mode
= -1;
267 static int hf_bthci_evt_max_tx_latency
= -1;
268 static int hf_bthci_evt_max_rx_latency
= -1;
269 static int hf_bthci_evt_min_remote_timeout
= -1;
270 static int hf_bthci_evt_min_local_timeout
= -1;
271 static int hf_bthci_evt_link_supervision_timeout
= -1;
272 static int hf_bthci_evt_token_bucket_size
= -1;
273 static int hf_bthci_evt_flow_direction
= -1;
274 static int hf_bthci_evt_afh_ch_assessment_mode
= -1;
275 static int hf_bthci_evt_lmp_handle
= -1;
276 static int hf_bthci_evt_clock
= -1;
277 static int hf_bthci_evt_clock_accuracy
= -1;
278 static int hf_bthci_evt_afh_mode
= -1;
279 static int hf_bthci_evt_afh_channel_map
= -1;
280 static int hf_bthci_evt_simple_pairing_mode
= -1;
281 static int hf_bthci_evt_randomizer_r
= -1;
282 static int hf_bthci_evt_hash_c
= -1;
283 static int hf_bthci_evt_io_capability
= -1;
284 static int hf_bthci_evt_oob_data_present
= -1;
285 static int hf_bthci_evt_auth_requirements
= -1;
286 static int hf_bthci_evt_numeric_value
= -1;
287 static int hf_bthci_evt_passkey
= -1;
288 static int hf_bthci_evt_notification_type
= -1;
289 static int hf_bthci_evt_data
= -1;
290 static int hf_bthci_evt_eir_struct_length
= -1;
291 static int hf_bthci_evt_eir_struct_type
= -1;
292 static int hf_bthci_evt_sc_uuid16
= -1;
293 static int hf_bthci_evt_sc_uuid32
= -1;
294 static int hf_bthci_evt_sc_uuid128
= -1;
295 static int hf_bthci_evt_data_length
= -1;
297 static int hf_bthci_evt_location_domain_aware
= -1;
298 static int hf_bthci_evt_location_domain
= -1;
299 static int hf_bthci_evt_location_domain_options
= -1;
300 static int hf_bthci_evt_location_options
= -1;
301 static int hf_bthci_evt_flow_control_mode
= -1;
302 static int hf_bthci_evt_physical_link_handle
= -1;
303 static int hf_bthci_evt_flow_spec_identifier
= -1;
304 static int hf_bthci_evt_logical_link_handle
= -1;
305 static int hf_bthci_evt_max_acl_data_packet_length
= -1;
306 static int hf_bthci_evt_data_block_length
= -1;
307 static int hf_bthci_evt_total_num_data_blocks
= -1;
308 static int hf_bthci_evt_enc_key_size
= -1;
309 static int hf_bthci_evt_amp_remaining_assoc_length
= -1;
310 static int hf_bthci_evt_amp_assoc_fragment
= -1;
311 static int hf_bthci_evt_amp_status
= -1;
312 static int hf_bthci_evt_total_bandwidth
= -1;
313 static int hf_bthci_evt_max_guaranteed_bandwidth
= -1;
314 static int hf_bthci_evt_min_latency
= -1;
315 static int hf_bthci_evt_max_pdu_size
= -1;
316 static int hf_bthci_evt_amp_controller_type
= -1;
317 static int hf_bthci_evt_pal_capabilities_00
= -1;
318 static int hf_bthci_evt_max_amp_assoc_length
= -1;
319 static int hf_bthci_evt_max_flush_to_us
= -1;
320 static int hf_bthci_evt_best_effort_flush_to_us
= -1;
321 static int hf_bthci_evt_link_loss_reason
= -1;
322 static int hf_bthci_evt_num_compl_blocks
= -1;
323 static int hf_bthci_evt_test_scenario
= -1;
324 static int hf_bthci_evt_report_reason
= -1;
325 static int hf_bthci_evt_report_event_type
= -1;
326 static int hf_bthci_evt_num_frames
= -1;
327 static int hf_bthci_evt_num_error_frames
= -1;
328 static int hf_bthci_evt_num_bits
= -1;
329 static int hf_bthci_evt_num_error_bits
= -1;
330 static int hf_bthci_evt_short_range_mode_state
= -1;
331 static int hf_bthci_evt_le_supported_host
= -1;
332 static int hf_bthci_evt_le_simultaneous_host
= -1;
333 static int hf_bthci_evt_le_acl_data_pkt_len
= -1;
334 static int hf_bthci_evt_total_num_le_acl_data_pkts
= -1;
335 static int hf_bthci_evt_le_features
= -1;
336 static int hf_bthci_evt_le_feature_00
= -1;
337 static int hf_bthci_evt_white_list_size
= -1;
338 static int hf_bthci_evt_le_channel_map
= -1;
339 static int hf_bthci_evt_encrypted_data
= -1;
340 static int hf_bthci_evt_random_number
= -1;
341 static int hf_bthci_evt_le_num_packets
= -1;
342 static int hf_bthci_evt_le_meta_subevent
= -1;
343 static int hf_bthci_evt_le_peer_address_type
= -1;
344 static int hf_bthci_evt_le_con_interval
= -1;
345 static int hf_bthci_evt_le_con_latency
= -1;
346 static int hf_bthci_evt_le_supervision_timeout
= -1;
347 static int hf_bthci_evt_encrypted_diversifier
= -1;
348 static int hf_bthci_evt_le_master_clock_accuracy
= -1;
349 static int hf_bthci_evt_num_reports
= -1;
350 static int hf_bthci_evt_advts_event_type
= -1;
351 static int hf_bthci_evt_appearance
= -1;
352 static int hf_bthci_evt_flags_limited_disc_mode
= -1;
353 static int hf_bthci_evt_flags_general_disc_mode
= -1;
354 static int hf_bthci_evt_flags_bredr_not_support
= -1;
355 static int hf_bthci_evt_flags_le_bredr_support_ctrl
= -1;
356 static int hf_bthci_evt_flags_le_bredr_support_host
= -1;
357 static int hf_bthci_evt_flags_reserved
= -1;
358 static int hf_bthci_evt_oob_flags_oob_data_present
= -1;
359 static int hf_bthci_evt_oob_flags_le_supported_host
= -1;
360 static int hf_bthci_evt_oob_flags_simultaneous_le_and_br_edr_host
= -1;
361 static int hf_bthci_evt_oob_flags_address_type
= -1;
362 static int hf_bthci_evt_le_states
= -1;
363 static int hf_bthci_evt_le_states_00
= -1;
364 static int hf_bthci_evt_le_states_01
= -1;
365 static int hf_bthci_evt_le_states_02
= -1;
366 static int hf_bthci_evt_le_states_03
= -1;
367 static int hf_bthci_evt_le_states_04
= -1;
368 static int hf_bthci_evt_le_states_05
= -1;
369 static int hf_bthci_evt_le_states_06
= -1;
370 static int hf_bthci_evt_le_states_07
= -1;
371 static int hf_bthci_evt_le_states_10
= -1;
372 static int hf_bthci_evt_le_states_11
= -1;
373 static int hf_bthci_evt_le_states_12
= -1;
374 static int hf_bthci_evt_le_states_13
= -1;
375 static int hf_bthci_evt_le_states_14
= -1;
376 static int hf_bthci_evt_le_states_15
= -1;
377 static int hf_bthci_evt_le_states_16
= -1;
378 static int hf_bthci_evt_le_states_17
= -1;
379 static int hf_bthci_evt_le_states_20
= -1;
380 static int hf_bthci_evt_le_states_21
= -1;
381 static int hf_bthci_evt_le_states_22
= -1;
382 static int hf_bthci_evt_le_states_23
= -1;
383 static int hf_bthci_evt_le_states_24
= -1;
384 static int hf_bthci_evt_le_states_25
= -1;
385 static int hf_bthci_evt_le_states_26
= -1;
386 static int hf_bthci_evt_le_states_27
= -1;
387 static int hf_bthci_evt_le_states_30
= -1;
388 static int hf_bthci_evt_le_states_31
= -1;
389 static int hf_bthci_evt_le_states_32
= -1;
390 static int hf_bthci_evt_le_states_33
= -1;
391 static int hf_bthci_evt_le_states_34
= -1;
392 static int hf_bthci_evt_eir_ad_ssp_oob_length
= -1;
393 static int hf_bthci_evt_eir_ad_advertising_interval
= -1;
394 static int hf_bthci_evt_eir_ad_company_id
= -1;
395 static int hf_eir_ad_item
= -1;
396 static int hf_extended_inquiry_response_data
= -1;
397 static int hf_advertising_data
= -1;
398 static int hf_usable_packet_types
= -1;
399 static int hf_3ds_association_notification
= -1;
400 static int hf_3ds_battery_level_reporting
= -1;
401 static int hf_3ds_send_battery_level_report_on_startup
= -1;
402 static int hf_3ds_reserved
= -1;
403 static int hf_3ds_factory_test_mode
= -1;
404 static int hf_3ds_path_loss_threshold
= -1;
405 static int hf_3ds_legacy_fixed
= -1;
406 static int hf_3ds_legacy_3d_capable_tv
= -1;
407 static int hf_3ds_legacy_ignored_1_3
= -1;
408 static int hf_3ds_legacy_fixed_4
= -1;
409 static int hf_3ds_legacy_ignored_5
= -1;
410 static int hf_3ds_legacy_fixed_6
= -1;
411 static int hf_3ds_legacy_test_mode
= -1;
412 static int hf_3ds_legacy_path_loss_threshold
= -1;
413 static int hf_did_vendor_id
= -1;
414 static int hf_did_vendor_id_bluetooth_sig
= -1;
415 static int hf_did_vendor_id_usb_forum
= -1;
416 static int hf_did_product_id
= -1;
417 static int hf_did_version
= -1;
418 static int hf_did_vendor_id_source
= -1;
420 static expert_field ei_eir_undecoded
= EI_INIT
;
421 static expert_field ei_eir_unknown
= EI_INIT
;
422 static expert_field ei_event_undecoded
= EI_INIT
;
423 static expert_field ei_event_unknown
= EI_INIT
;
425 /* Initialize the subtree pointers */
426 static gint ett_bthci_evt
= -1;
427 static gint ett_opcode
= -1;
428 static gint ett_cod
= -1;
429 static gint ett_lmp_subtree
= -1;
430 static gint ett_ptype_subtree
= -1;
431 static gint ett_eir_subtree
= -1;
432 static gint ett_eir_struct_subtree
= -1;
433 static gint ett_le_state_subtree
= -1;
435 extern value_string_ext ext_usb_vendors_vals
;
436 extern value_string_ext ext_usb_products_vals
;
437 extern value_string_ext did_vendor_id_source_vals_ext
;
439 static const value_string evt_code_vals
[] = {
440 {0x01, "Inquiry Complete"},
441 {0x02, "Inquiry Result"},
442 {0x03, "Connect Complete"},
443 {0x04, "Connect Request"},
444 {0x05, "Disconnect Complete"},
445 {0x06, "Auth Complete"},
446 {0x07, "Remote Name Req Complete"},
447 {0x08, "Encrypt Change"},
448 {0x09, "Change Connection Link Key Complete"},
449 {0x0a, "Master Link Key Complete"},
450 {0x0b, "Read Remote Supported Features"},
451 {0x0c, "Read Remote Ver Info Complete"},
452 {0x0d, "QoS Setup Complete"},
453 {0x0e, "Command Complete"},
454 {0x0f, "Command Status"},
455 {0x10, "Hardware Error"},
456 {0x11, "Flush Occurred"},
457 {0x12, "Role Change"},
458 {0x13, "Number of Completed Packets"},
459 {0x14, "Mode Change"},
460 {0x15, "Return Link Keys"},
461 {0x16, "PIN Code Request"},
462 {0x17, "Link Key Request"},
463 {0x18, "Link Key Notification"},
464 {0x19, "Loopback Command"},
465 {0x1a, "Data Buffer Overflow"},
466 {0x1b, "Max Slots Change"},
467 {0x1c, "Read Clock Offset Complete"},
468 {0x1d, "Connection Packet Type Changed"},
469 {0x1e, "QoS Violation"},
470 {0x1f, "Page Scan Mode Change"},
471 {0x20, "Page Scan Repetition Mode Change"},
472 {0x21, "Flow Specification Complete"},
473 {0x22, "Inquiry Result With RSSI"},
474 {0x23, "Read Remote Extended Features Complete"},
475 {0x2c, "Synchronous Connection Complete"},
476 {0x2d, "Synchronous Connection Changed"},
477 {0x2e, "Sniff Subrating"},
478 {0x2f, "Extended Inquiry Result"},
479 {0x30, "Encryption Key Refresh Complete"},
480 {0x31, "IO Capability Request"},
481 {0x32, "IO Capability Response"},
482 {0x33, "User Confirmation Request"},
483 {0x34, "User Passkey Request"},
484 {0x35, "Remote OOB Data Request"},
485 {0x36, "Simple Pairing Complete"},
486 {0x38, "Link Supervision Timeout Changed"},
487 {0x39, "Enhanced Flush Complete"},
488 {0x3b, "User Passkey Notification"},
489 {0x3c, "Keypress Notification"},
490 {0x3d, "Remote Host Supported Features Notification"},
492 {0x40, "Physical Link Complete"},
493 {0x41, "Channel Selected"},
494 {0x42, "Disconnect Physical Link Complete"},
495 {0x43, "Physical Link Loss Early Warning"},
496 {0x44, "Physical Link Recovery"},
497 {0x45, "Logical Link Complete"},
498 {0x46, "Disconnect Logical Link Complete"},
499 {0x47, "Flow Spec Modify Complete"},
500 {0x48, "Number Of Completed Data Blocks"},
501 {0x49, "AMP Start Test"},
502 {0x4a, "AMP Test End"},
503 {0x4b, "AMP Receiver Report"},
504 {0x4c, "Short Range Mode Change Complete"},
505 {0x4d, "AMP Status Change"},
506 /* From "Bluetooth Core Specification Addendum 4 */
507 {0x4e, "Triggered Clock Capture"},
508 {0x4f, "Synchronization Train Complete"},
509 {0x50, "Synchronization Train Received"},
510 {0x51, "Connectionless Slave Broadcast Receive"},
511 {0x52, "Connectionless Slave Broadcast Timeout"},
512 {0x53, "Truncated Page Complete"},
513 {0x54, "Slave Page Response Timeout"},
514 {0x55, "Connectionless Slave Broadcast Channel Map Change"},
515 {0x56, "Inquiry Response Notification"},
517 {0xfe, "Bluetooth Logo Testing"},
518 {0xff, "Vendor-Specific"},
522 static const value_string bthci_cmd_status_pending_vals
[] = {
527 static const value_string evt_link_types
[] = {
528 {0x00, "SCO connection (Voice Channels)"},
529 {0x01, "ACL connection (Data Channels)"},
530 {0x02, "eSCO connection (Voice Channels)"},
534 static const value_string evt_sync_link_types
[] = {
535 {0x00, "SCO connection"},
536 {0x02, "eSCO connection"},
540 static const value_string evt_encryption_modes
[] = {
541 {0x00, "Encryption Disabled"},
542 {0x01, "Encryption only for point-to-point packets"},
543 {0x02, "Encryption for both point-to-point and broadcast packets"},
547 static const value_string evt_encryption_enable
[] = {
548 {0x00, "Link Level Encryption is OFF"},
549 {0x01, "Link Level Encryption is ON"},
553 static const value_string evt_key_flag
[] = {
554 {0x00, "Using Semi-permanent Link Key"},
555 {0x01, "Using Temporary Link Key"},
559 /* Taken from https://www.bluetooth.org/Technical/AssignedNumbers/link_manager.htm */
560 static const value_string evt_lmp_vers_nr
[] = {
571 /* Taken from https://www.bluetooth.org/Technical/AssignedNumbers/hci.htm
572 * (requires a login/password)
574 static const value_string evt_hci_vers_nr
[] = {
585 /* Taken from https://www.bluetooth.org/technical/assignednumbers/identifiers.htm */
586 static const value_string bthci_evt_comp_id
[] = {
587 {0x0000, "Ericsson Technology Licensing"},
588 {0x0001, "Nokia Mobile Phones"},
589 {0x0002, "Intel Corp."},
590 {0x0003, "IBM Corp."},
591 {0x0004, "Toshiba Corp."},
593 {0x0006, "Microsoft"},
595 {0x0008, "Motorola"},
596 {0x0009, "Infineon Technologies AG"},
597 {0x000A, "Cambridge Silicon Radio"},
598 {0x000B, "Silicon Wave"},
599 {0x000C, "Digianswer A/S"},
600 {0x000D, "Texas Instruments Inc."},
601 {0x000E, "Ceva, Inc. (formerly Parthus Technologies, Inc.)"},
602 {0x000F, "Broadcom Corporation"},
603 {0x0010, "Mitel Semiconductor"},
604 {0x0011, "Widcomm, Inc."},
605 {0x0012, "Zeevo, Inc."},
606 {0x0013, "Atmel Corporation"},
607 {0x0014, "Mitsubishi Electric Corporation"},
608 {0x0015, "RTX Telecom A/S"},
609 {0x0016, "KC Technology Inc."},
610 {0x0017, "Newlogic"},
611 {0x0018, "Transilica, Inc."},
612 {0x0019, "Rohde & Schwarz GmbH & Co. KG"},
613 {0x001A, "TTPCom Limited"},
614 {0x001B, "Signia Technologies, Inc."},
615 {0x001C, "Conexant Systems Inc."},
616 {0x001D, "Qualcomm"},
617 {0x001E, "Inventel"},
618 {0x001F, "AVM Berlin"},
619 {0x0020, "BandSpeed, Inc."},
620 {0x0021, "Mansella Ltd"},
621 {0x0022, "NEC Corporation"},
622 {0x0023, "WavePlus Technology Co., Ltd."},
624 {0x0025, "Philips Semiconductors"},
625 {0x0026, "C Technologies"},
626 {0x0027, "Open Interface"},
627 {0x0028, "R F Micro Devices"},
628 {0x0029, "Hitachi Ltd"},
629 {0x002A, "Symbol Technologies, Inc."},
631 {0x002C, "Macronix International Co. Ltd."},
632 {0x002D, "GCT Semiconductor"},
633 {0x002E, "Norwood Systems"},
634 {0x002F, "MewTel Technology Inc."},
635 {0x0030, "ST Microelectronics"},
636 {0x0031, "Synopsys"},
637 {0x0032, "Red-M (Communications) Ltd"},
638 {0x0033, "Commil Ltd"},
639 {0x0034, "Computer Access Technology Corporation (CATC)"},
640 {0x0035, "Eclipse (HQ Espana) S.L."},
641 {0x0036, "Renesas Technology Corp."},
642 {0x0037, "Mobilian Corporation"},
644 {0x0039, "Integrated System Solution Corp."},
645 {0x003A, "Matsushita Electric Industrial Co., Ltd."},
646 {0x003B, "Gennum Corporation"},
647 {0x003C, "Research In Motion"},
648 {0x003D, "IPextreme, Inc."},
649 {0x003E, "Systems and Chips, Inc"},
650 {0x003F, "Bluetooth SIG, Inc"},
651 {0x0040, "Seiko Epson Corporation"},
652 {0x0041, "Integrated Silicon Solution Taiwan, Inc."},
653 {0x0042, "CONWISE Technology Corporation Ltd"},
654 {0x0043, "PARROT SA"},
655 {0x0044, "Socket Mobile"},
656 {0x0045, "Atheros Communications, Inc."},
657 {0x0046, "MediaTek, Inc."},
658 {0x0047, "Bluegiga"},
659 {0x0048, "Marvell Technology Group Ltd."},
660 {0x0049, "3DSP Corporation"},
661 {0x004A, "Accel Semiconductor Ltd."},
662 {0x004B, "Continental Automotive Systems"},
663 {0x004C, "Apple, Inc."},
664 {0x004D, "Staccato Communications, Inc."},
665 {0x004E, "Avago Technologies"},
666 {0x004F, "APT Licensing Ltd."},
667 {0x0050, "SiRF Technology, Inc."},
668 {0x0051, "Tzero Technologies, Inc."},
669 {0x0052, "J&M Corporation"},
670 {0x0053, "Free2move AB"},
671 {0x0054, "3DiJoy Corporation"},
672 {0x0055, "Plantronics, Inc."},
673 {0x0056, "Sony Ericsson Mobile Communications"},
674 {0x0057, "Harman International Industries, Inc."},
675 {0x0058, "Vizio, Inc."},
676 {0x0059, "Nordic Semiconductor ASA"},
677 {0x005A, "EM Microelectronic-Marin SA"},
678 {0x005B, "Ralink Technology Corporation"},
679 {0x005C, "Belkin International, Inc."},
680 {0x005D, "Realtek Semiconductor Corporation"},
681 {0x005E, "Stonestreet One, LLC"},
682 {0x005F, "Wicentric, Inc."},
683 {0x0060, "RivieraWaves S.A.S"},
684 {0x0061, "RDA Microelectronics"},
685 {0x0062, "Gibson Guitars"},
686 {0x0063, "MiCommand Inc."},
687 {0x0064, "Band XI International, LLC"},
688 {0x0065, "Hewlett-Packard Company"},
689 {0x0066, "9Solutions Oy"},
690 {0x0067, "GN Netcom A/S"},
691 {0x0068, "General Motors"},
692 {0x0069, "A&D Engineering, Inc."},
693 {0x006A, "MindTree Ltd."},
694 {0x006B, "Polar Electro OY"},
695 {0x006C, "Beautiful Enterprise Co., Ltd."},
696 {0x006D, "BriarTek, Inc."},
697 {0x006E, "Summit Data Communications, Inc."},
698 {0x006F, "Sound ID"},
699 {0x0070, "Monster, LLC"},
700 {0x0071, "connectBlue AB"},
701 {0x0072, "ShangHai Super Smart Electronics Co. Ltd."},
702 {0x0073, "Group Sense Ltd."},
703 {0x0074, "Zomm, LLC"},
704 {0x0075, "Samsung Electronics Co. Ltd."},
705 {0x0076, "Creative Technology Ltd."},
706 {0x0077, "Laird Technologies"},
707 {0x0078, "Nike, Inc."},
708 {0x0079, "lesswire AG"},
709 {0x007A, "MStar Semiconductor, Inc."},
710 {0x007B, "Hanlynn Technologies"},
711 {0x007C, "A & R Cambridge"},
712 {0x007D, "Seers Technology Co. Ltd."},
713 {0x007E, "Sports Tracking Technologies Ltd."},
714 {0x007F, "Autonet Mobile"},
715 {0x0080, "DeLorme Publishing Company, Inc."},
716 {0x0081, "WuXi Vimicro"},
717 {0x0082, "Sennheiser Communications A/S"},
718 {0x0083, "TimeKeeping Systems, Inc."},
719 {0x0084, "Ludus Helsinki Ltd."},
720 {0x0085, "BlueRadios, Inc."},
721 {0x0086, "equinux AG"},
722 {0x0087, "Garmin International, Inc."},
724 {0x0089, "GN ReSound A/S"},
726 {0x008B, "Topcon Positioning Systems, LLC"},
727 {0x008C, "Qualcomm Labs, Inc."},
728 {0x008D, "Zscan Software"},
729 {0x008E, "Quintic Corp."},
730 {0x008F, "Stollmann E+V GmbH"},
731 {0x0090, "Funai Electric Co., Ltd."},
732 {0x0091, "Advanced PANMOBIL systems GmbH & Co. KG"},
733 {0x0092, "ThinkOptics, Inc."},
734 {0x0093, "Universal Electronics, Inc."},
735 {0x0094, "Airoha Technology Corp."},
736 {0x0095, "NEC Lighting, Ltd."},
737 {0x0096, "ODM Technology, Inc."},
738 {0x0097, "Bluetrek Technologies Limited"},
739 {0x0098, "zero1.tv GmbH"},
740 {0x0099, "i.Tech Dynamic Global Distribution Ltd."},
742 {0x009B, "Jiangsu Toppower Automotive Electronics Co., Ltd."},
743 {0x009C, "Colorfy, Inc."},
744 {0x009D, "Geoforce Inc."},
745 {0x009E, "Bose Corporation"},
746 {0x009F, "Suunto Oy"},
747 {0x00A0, "Kensington Computer Products Group"},
748 {0x00A1, "SR-Medizinelektronik"},
749 {0x00A2, "Vertu Corporation Limited"},
750 {0x00A3, "Meta Watch Ltd."},
751 {0x00A4, "LINAK A/S"},
752 {0x00A5, "OTL Dynamics LLC"},
753 {0x00A6, "Panda Ocean Inc."},
754 {0x00A7, "Visteon Corporation"},
755 {0x00A8, "ARP Devices Limited"},
756 {0x00A9, "Magneti Marelli S.p.A."},
757 {0x00AA, "CAEN RFID srl"},
758 {0x00AB, "Ingenieur-Systemgruppe Zahn GmbH"},
759 {0x00AC, "Green Throttle Games"},
760 {0x00AD, "Peter Systemtechnik GmbH"},
761 {0x00AE, "Omegawave Oy"},
763 {0x00B0, "Passif Semiconductor Corp"},
764 {0x00B1, "Saris Cycling Group, Inc"},
765 {0x00B2, "Bekey A/S"},
766 {0x00B3, "Clarinox Technologies Pty. Ltd."},
767 {0x00B4, "BDE Technology Co., Ltd."},
768 {0x00B5, "Swirl Networks"},
769 {0x00B6, "Meso international"},
770 {0x00B7, "TreLab Ltd"},
771 {0x00B8, "Qualcomm Innovation Center, Inc. (QuIC)"},
772 {0x00B9, "Johnson Controls, Inc."},
773 {0x00BA, "Starkey Laboratories Inc."},
774 {0x00BB, "S-Power Electronics Limited"},
775 {0xFFFF, "For use in internal and interoperability tests."},
778 value_string_ext bthci_evt_comp_id_ext
= VALUE_STRING_EXT_INIT(bthci_evt_comp_id
);
780 static const value_string evt_service_types
[] = {
781 {0x00, "No Traffic Available"},
782 {0x01, "Best Effort Available"},
783 {0x02, "Guaranteed Available"},
787 static const value_string evt_role_vals
[] = {
788 {0x00, "Currently the Master for specified BD_ADDR"},
789 {0x01, "Currently the Slave for specified BD_ADDR"},
793 static const value_string evt_role_vals_handle
[] = {
794 {0x00, "Currently the Master for this connection handle"},
795 {0x01, "Currently the Slave for this connection handle"},
799 static const value_string evt_modes
[] = {
800 {0x00, "Active Mode"},
802 {0x02, "Sniff Mode"},
807 static const value_string evt_key_types
[] = {
808 {0x00, "Combination Key"},
809 {0x01, "Local Unit Key"},
810 {0x02, "Remote Unit Key"},
811 {0x03, "Debug Combination Key"},
812 {0x04, "Unauthenticated Combination Key"},
813 {0x05, "Authenticated Combination Key"},
814 {0x06, "Changed Combination Key"},
818 static const value_string evt_scan_types
[] = {
819 {0x00, "Standard Scan" },
820 {0x01, "Interlaced Scan" },
824 static const value_string evt_inq_modes
[] = {
825 {0x00, "Standard Results" },
826 {0x01, "Results With RSSI" },
827 {0x02, "Results With RSSI or Extended Results" },
831 static const value_string evt_power_level_types
[] = {
832 {0x00, "Read Current Transmission Power Level" },
833 {0x01, "Read Maximum Transmission Power Level" },
837 static const value_string evt_pin_types
[] = {
838 {0x00, "Variable PIN" },
839 {0x01, "Fixed PIN" },
843 static const value_string evt_auth_enable_values
[] = {
845 {0x01, "Enabled for all connections "},
849 static const value_string evt_enable_values
[] = {
855 static const value_string evt_loopback_modes
[] = {
856 {0x00, "No Loopback mode enabled" },
857 {0x01, "Enable Local Loopback" },
858 {0x02, "Enable Remote Loopback" },
862 static const value_string evt_country_code_values
[] = {
863 {0x0, "North America & Europe (except France) and Japan" },
868 static const value_string evt_flow_direction_values
[] = {
869 {0x0, "Outgoing Traffic" },
870 {0x1, "Incoming Traffic" },
874 static const value_string evt_flow_ctrl_mode
[] = {
875 { 0x00, "Packet based" },
876 { 0x01, "Data Block based" },
880 static const value_string evt_amp_status
[] = {
881 { 0x00, "Controller available but currently physically powered down" },
882 { 0x01, "Controller available exclusively for Bluetooth" },
883 { 0x02, "No capacity available for Bluetooth operation" },
884 { 0x03, "Low capacity available for Bluetooth operation" },
885 { 0x04, "Medium capacity available for Bluetooth operation" },
886 { 0x05, "High capacity available for Bluetooth operation" },
887 { 0x06, "Full capacity available for Bluetooth operation" },
891 static const value_string evt_controller_types
[] = {
892 { 0x00, "Primary BR/EDR" },
893 { 0x01, "802.11 AMP" },
897 static const value_string evt_link_loss_reasons
[] = {
899 { 0x01, "Range related" },
900 { 0x02, "Bandwidth related" },
901 { 0x03, "Resolving Conflict" },
902 { 0x04, "Interference" },
906 static const value_string evt_report_reasons
[] = {
907 { 0x00, "Configured Interval" },
908 { 0x01, "Test Ended" },
912 static const value_string evt_report_event_types
[] = {
913 { 0x00, "Frames Received" },
914 { 0x01, "Frames Received & Bits in Error" },
918 static const value_string evt_le_meta_subevent
[] = {
919 { 0x01, "LE Connection Complete" },
920 { 0x02, "LE Advertising Report" },
921 { 0x03, "LE Connection Update Complete" },
922 { 0x04, "LE Read Remote Used Features Complete" },
923 { 0x05, "LE Long Term Key Request" },
927 static const value_string evt_le_advertising_evt_types
[] = {
928 { 0x00, "Connectable Unidirected Advertising" },
929 { 0x01, "Connectable Directed Advertising" },
930 { 0x02, "Scannable Unidirected Advertising" },
931 { 0x03, "Non-Connectable Unidirected Advertising" },
932 { 0x04, "Scan Response" },
936 static const value_string evt_master_clock_accuray
[] = {
948 static const value_string evt_air_mode_vals
[] = {
949 { 0x00, "\xb5-law log" },
950 { 0x01, "A-law log" },
952 { 0x03, "Transparent Data" },
956 void proto_register_bthci_evt(void);
957 void proto_reg_handoff_bthci_evt(void);
960 dissect_bthci_evt_bd_addr(tvbuff_t
*tvb
, int offset
, packet_info
*pinfo _U_
,
961 proto_tree
*tree
, guint8
*bdaddr
)
965 bd_addr
[5] = tvb_get_guint8(tvb
, offset
);
966 bd_addr
[4] = tvb_get_guint8(tvb
, offset
+ 1);
967 bd_addr
[3] = tvb_get_guint8(tvb
, offset
+ 2);
968 bd_addr
[2] = tvb_get_guint8(tvb
, offset
+ 3);
969 bd_addr
[1] = tvb_get_guint8(tvb
, offset
+ 4);
970 bd_addr
[0] = tvb_get_guint8(tvb
, offset
+ 5);
973 memcpy(bdaddr
, bd_addr
, 6);
975 proto_tree_add_ether(tree
, hf_bthci_evt_bd_addr
, tvb
, offset
, 6, bd_addr
);
982 dissect_bthci_evt_cod(tvbuff_t
*tvb
, int offset
, packet_info
*pinfo _U_
, proto_tree
*tree
)
984 guint16 major_service_classes
;
985 guint8 major_device_class
;
986 guint8 minor_device_class
;
987 const gchar
*minor_device_class_name
;
988 proto_item
*cod_item
;
989 proto_item
*cod_tree
;
991 cod_item
= proto_tree_add_item(tree
, hf_bthci_evt_class_of_device
, tvb
, offset
, 3, ENC_LITTLE_ENDIAN
);
992 cod_tree
= proto_item_add_subtree(cod_item
, ett_cod
);
994 major_device_class
= tvb_get_guint8(tvb
, offset
+ 1) & 0x1F;
995 minor_device_class
= tvb_get_guint8(tvb
, offset
) >> 2;
997 switch(major_device_class
) {
998 case 0x01: /* Computer */
999 proto_tree_add_item(cod_tree
, hf_bthci_evt_cod_minor_device_class_computer
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
1000 minor_device_class_name
= val_to_str_ext_const(minor_device_class
, &bthci_cmd_cod_minor_device_class_computer_vals_ext
, "Unknown");
1002 case 0x02: /* Phone */
1003 proto_tree_add_item(cod_tree
, hf_bthci_evt_cod_minor_device_class_phone
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
1004 minor_device_class_name
= val_to_str_ext_const(minor_device_class
, &bthci_cmd_cod_minor_device_class_phone_vals_ext
, "Unknown");
1006 case 0x03: /* LAN/Network Access Point */
1007 proto_tree_add_item(cod_tree
, hf_bthci_evt_cod_minor_device_class_lan_net_load_factor
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
1008 proto_tree_add_item(cod_tree
, hf_bthci_evt_cod_minor_device_class_lan_net_type
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
1009 minor_device_class_name
= val_to_str_ext_const(minor_device_class
, &bthci_cmd_cod_minor_device_class_lan_net_load_factor_vals_ext
, "Unknown");
1011 case 0x04: /* Audio/Video */
1012 proto_tree_add_item(cod_tree
, hf_bthci_evt_cod_minor_device_class_audio_video
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
1013 minor_device_class_name
= val_to_str_ext_const(minor_device_class
, &bthci_cmd_cod_minor_device_class_audio_video_vals_ext
, "Unknown");
1015 case 0x05: /* Peripheral */
1016 proto_tree_add_item(cod_tree
, hf_bthci_evt_cod_minor_device_class_peripheral_class
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
1017 proto_tree_add_item(cod_tree
, hf_bthci_evt_cod_minor_device_class_peripheral_type
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
1018 minor_device_class_name
= val_to_str_ext_const(minor_device_class
, &bthci_cmd_cod_minor_device_class_peripheral_class_vals_ext
, "Unknown");
1020 case 0x06: /* Imaging */
1021 proto_tree_add_item(cod_tree
, hf_bthci_evt_cod_minor_device_class_imaging_class_printer
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
1022 proto_tree_add_item(cod_tree
, hf_bthci_evt_cod_minor_device_class_imaging_class_scanner
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
1023 proto_tree_add_item(cod_tree
, hf_bthci_evt_cod_minor_device_class_imaging_class_camera
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
1024 proto_tree_add_item(cod_tree
, hf_bthci_evt_cod_minor_device_class_imaging_class_display
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
1026 proto_tree_add_item(cod_tree
, hf_bthci_evt_cod_minor_device_class_imaging_type
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
1027 minor_device_class_name
= val_to_str_ext_const(minor_device_class
, &bthci_cmd_cod_minor_device_class_imaging_type_vals_ext
, "Unknown");
1029 case 0x07: /* Wearable */
1030 proto_tree_add_item(cod_tree
, hf_bthci_evt_cod_minor_device_class_wearable
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
1031 minor_device_class_name
= val_to_str_ext_const(minor_device_class
, &bthci_cmd_cod_minor_device_class_wearable_vals_ext
, "Unknown");
1033 case 0x08: /* Toy */
1034 proto_tree_add_item(cod_tree
, hf_bthci_evt_cod_minor_device_class_toy
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
1035 minor_device_class_name
= val_to_str_ext_const(minor_device_class
, &bthci_cmd_cod_minor_device_class_toy_vals_ext
, "Unknown");
1037 case 0x09: /* Health */
1038 proto_tree_add_item(cod_tree
, hf_bthci_evt_cod_minor_device_class_health
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
1039 minor_device_class_name
= val_to_str_ext_const(minor_device_class
, &bthci_cmd_cod_minor_device_class_health_vals_ext
, "Unknown");
1042 minor_device_class_name
= "Unknown";
1043 proto_tree_add_item(cod_tree
, hf_bthci_evt_cod_minor_device_class_unknown
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
1046 proto_tree_add_item(cod_tree
, hf_bthci_evt_cod_format_type
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
1049 proto_tree_add_item(cod_tree
, hf_bthci_evt_cod_major_service_class_information
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
1050 proto_tree_add_item(cod_tree
, hf_bthci_evt_cod_major_service_class_telephony
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
1051 proto_tree_add_item(cod_tree
, hf_bthci_evt_cod_major_service_class_audio
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
1052 proto_tree_add_item(cod_tree
, hf_bthci_evt_cod_major_service_class_object_transfer
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
1053 proto_tree_add_item(cod_tree
, hf_bthci_evt_cod_major_service_class_capturing
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
1054 proto_tree_add_item(cod_tree
, hf_bthci_evt_cod_major_service_class_rendering
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
1055 proto_tree_add_item(cod_tree
, hf_bthci_evt_cod_major_service_class_networking
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
1056 proto_tree_add_item(cod_tree
, hf_bthci_evt_cod_major_service_class_positioning
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
1057 proto_tree_add_item(cod_tree
, hf_bthci_evt_cod_major_service_class_reserved
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
1058 proto_tree_add_item(cod_tree
, hf_bthci_evt_cod_major_service_class_limited_discoverable_mode
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
1059 major_service_classes
= tvb_get_letohs(tvb
, offset
) >> 5;
1061 proto_tree_add_item(cod_tree
, hf_bthci_evt_cod_major_device_class
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
1064 proto_item_append_text(cod_item
, " (%s:%s - services:",
1065 val_to_str_ext_const(major_device_class
, &bthci_cmd_cod_major_device_class_vals_ext
, "Unknown"),
1066 minor_device_class_name
);
1068 if (major_service_classes
& 0x001) proto_item_append_text(cod_item
, " LimitedDiscoverableMode");
1069 if (major_service_classes
& 0x008) proto_item_append_text(cod_item
, " Positioning");
1070 if (major_service_classes
& 0x010) proto_item_append_text(cod_item
, " Networking");
1072 if (major_service_classes
& 0x020) proto_item_append_text(cod_item
, " Rendering");
1073 if (major_service_classes
& 0x040) proto_item_append_text(cod_item
, " Capturing");
1074 if (major_service_classes
& 0x080) proto_item_append_text(cod_item
, " ObjectTransfer");
1075 if (major_service_classes
& 0x100) proto_item_append_text(cod_item
, " Audio");
1076 if (major_service_classes
& 0x200) proto_item_append_text(cod_item
, " Telephony");
1077 if (major_service_classes
& 0x400) proto_item_append_text(cod_item
, " Information");
1079 proto_item_append_text(cod_item
, ")");
1085 dissect_bthci_evt_inq_complete(tvbuff_t
*tvb
, int offset
, packet_info
*pinfo _U_
, proto_tree
*tree
)
1087 proto_tree_add_item(tree
, hf_bthci_evt_status
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
1094 dissect_bthci_evt_conn_complete(tvbuff_t
*tvb
, int offset
, packet_info
*pinfo
,
1095 proto_tree
*tree
, hci_data_t
*hci_data
)
1097 guint16 connection_handle
;
1101 proto_tree_add_item(tree
, hf_bthci_evt_status
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
1102 status
= tvb_get_guint8(tvb
, offset
);
1105 connection_handle
= tvb_get_letohs(tvb
, offset
) & 0x0FFF;
1106 proto_tree_add_item(tree
, hf_bthci_evt_connection_handle
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
1109 offset
= dissect_bthci_evt_bd_addr(tvb
, offset
, pinfo
, tree
, bd_addr
);
1110 if (!pinfo
->fd
->flags
.visited
&& hci_data
!= NULL
&& status
== 0x00) {
1111 wmem_tree_key_t key
[5];
1112 guint32 k_interface_id
;
1113 guint32 k_adapter_id
;
1114 guint32 k_connection_handle
;
1115 guint32 k_frame_number
;
1116 remote_bdaddr_t
*remote_bdaddr
;
1118 k_interface_id
= hci_data
->interface_id
;
1119 k_adapter_id
= hci_data
->adapter_id
;
1120 k_connection_handle
= connection_handle
;
1121 k_frame_number
= pinfo
->fd
->num
;
1124 key
[0].key
= &k_interface_id
;
1126 key
[1].key
= &k_adapter_id
;
1128 key
[2].key
= &k_connection_handle
;
1130 key
[3].key
= &k_frame_number
;
1134 remote_bdaddr
= (remote_bdaddr_t
*) wmem_new(wmem_file_scope(), remote_bdaddr_t
);
1135 remote_bdaddr
->interface_id
= hci_data
->interface_id
;
1136 remote_bdaddr
->adapter_id
= hci_data
->adapter_id
;
1137 remote_bdaddr
->chandle
= connection_handle
;
1138 memcpy(remote_bdaddr
->bd_addr
, bd_addr
, 6);
1140 wmem_tree_insert32_array(hci_data
->chandle_to_bdaddr_table
, key
, remote_bdaddr
);
1144 proto_tree_add_item(tree
, hf_bthci_evt_link_type
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
1147 proto_tree_add_item(tree
, hf_bthci_evt_encryption_mode
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
1154 dissect_bthci_evt_conn_request(tvbuff_t
*tvb
, int offset
, packet_info
*pinfo
, proto_tree
*tree
)
1156 offset
= dissect_bthci_evt_bd_addr(tvb
, offset
, pinfo
, tree
, NULL
);
1158 offset
= dissect_bthci_evt_cod(tvb
, offset
, pinfo
, tree
);
1160 proto_tree_add_item(tree
, hf_bthci_evt_link_type
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
1167 dissect_bthci_evt_disconn_complete(tvbuff_t
*tvb
, int offset
, packet_info
*pinfo _U_
, proto_tree
*tree
)
1169 proto_tree_add_item(tree
, hf_bthci_evt_status
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
1172 proto_tree_add_item(tree
, hf_bthci_evt_connection_handle
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
1175 proto_tree_add_item(tree
, hf_bthci_evt_reason
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
1182 dissect_bthci_evt_auth_complete(tvbuff_t
*tvb
, int offset
, packet_info
*pinfo _U_
, proto_tree
*tree
)
1184 proto_tree_add_item(tree
, hf_bthci_evt_status
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
1187 proto_tree_add_item(tree
, hf_bthci_evt_connection_handle
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
1194 dissect_bthci_evt_lmp_features(tvbuff_t
*tvb
, int offset
, packet_info
*pinfo _U_
, proto_tree
*tree
, guint8 page_numer
)
1197 proto_item
*fl_lag_item
;
1198 proto_tree
*lmp_tree
= NULL
;
1201 proto_item
*lmp_item
;
1203 lmp_item
= proto_tree_add_item(tree
, hf_lmp_features
, tvb
, offset
, 8, ENC_NA
);
1204 lmp_tree
= proto_item_add_subtree(lmp_item
, ett_lmp_subtree
);
1207 switch (page_numer
) {
1209 proto_tree_add_item(lmp_tree
, hf_lmp_feature_3slot_packets
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
1210 proto_tree_add_item(lmp_tree
, hf_lmp_feature_5slot_packets
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
1211 proto_tree_add_item(lmp_tree
, hf_lmp_feature_encryption
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
1212 proto_tree_add_item(lmp_tree
, hf_lmp_feature_slot_offset
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
1213 proto_tree_add_item(lmp_tree
, hf_lmp_feature_timing_accuracy
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
1214 proto_tree_add_item(lmp_tree
, hf_lmp_feature_role_switch
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
1215 proto_tree_add_item(lmp_tree
, hf_lmp_feature_hold_mode
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
1216 proto_tree_add_item(lmp_tree
, hf_lmp_feature_sniff_mode
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
1219 proto_tree_add_item(lmp_tree
, hf_lmp_feature_park_state
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
1220 proto_tree_add_item(lmp_tree
, hf_lmp_feature_power_control_requests
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
1221 proto_tree_add_item(lmp_tree
, hf_lmp_feature_channel_quality_driven_data_rate
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
1222 proto_tree_add_item(lmp_tree
, hf_lmp_feature_sco_link
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
1223 proto_tree_add_item(lmp_tree
, hf_lmp_feature_hv2_packets
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
1224 proto_tree_add_item(lmp_tree
, hf_lmp_feature_hv3_packets
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
1225 proto_tree_add_item(lmp_tree
, hf_lmp_feature_u_law_log_synchronous_data
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
1226 proto_tree_add_item(lmp_tree
, hf_lmp_feature_a_law_log_synchronous_data
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
1229 proto_tree_add_item(lmp_tree
, hf_lmp_feature_cvsd_synchronous_data
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
1230 proto_tree_add_item(lmp_tree
, hf_lmp_feature_paging_parameter_negotiation
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
1231 proto_tree_add_item(lmp_tree
, hf_lmp_feature_power_control
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
1232 proto_tree_add_item(lmp_tree
, hf_lmp_feature_transparent_synchronous_data
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
1233 fl_lag_item
= proto_tree_add_item(lmp_tree
,hf_lmp_feature_flow_control_lag
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
1234 fc_lag
= (tvb_get_guint8(tvb
, offset
) & 0x70) >> 4;
1235 proto_item_append_text(fl_lag_item
, " (%i bytes)", 256 * fc_lag
);
1237 proto_tree_add_item(lmp_tree
,hf_lmp_feature_broadcast_encryption
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
1240 proto_tree_add_item(lmp_tree
, hf_lmp_feature_reserved_24
, tvb
, offset
, 1, ENC_NA
);
1241 proto_tree_add_item(lmp_tree
, hf_lmp_feature_edr_acl_2mbps_mode
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
1242 proto_tree_add_item(lmp_tree
, hf_lmp_feature_edr_acl_3mbps_mode
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
1243 proto_tree_add_item(lmp_tree
, hf_lmp_feature_enhanced_inquiry_scan
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
1244 proto_tree_add_item(lmp_tree
, hf_lmp_feature_interlaced_inquiry_scan
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
1245 proto_tree_add_item(lmp_tree
, hf_lmp_feature_interlaced_page_scan
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
1246 proto_tree_add_item(lmp_tree
, hf_lmp_feature_rssi_with_inquiry_results
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
1247 proto_tree_add_item(lmp_tree
, hf_lmp_feature_ev3_packets
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
1250 proto_tree_add_item(lmp_tree
, hf_lmp_feature_ev4_packets
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
1251 proto_tree_add_item(lmp_tree
, hf_lmp_feature_ev5_packets
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
1252 proto_tree_add_item(lmp_tree
, hf_lmp_feature_reserved_34
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
1253 proto_tree_add_item(lmp_tree
, hf_lmp_feature_afh_capable_slave
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
1254 proto_tree_add_item(lmp_tree
, hf_lmp_feature_afh_classification_slave
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
1255 proto_tree_add_item(lmp_tree
, hf_lmp_feature_br_edr_not_supported
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
1256 proto_tree_add_item(lmp_tree
, hf_lmp_feature_le_supported_controller
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
1257 proto_tree_add_item(lmp_tree
, hf_lmp_feature_3slot_edr_acl_packets
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
1260 proto_tree_add_item(lmp_tree
, hf_lmp_feature_5slot_edr_acl_packets
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
1261 proto_tree_add_item(lmp_tree
, hf_lmp_feature_sniff_subrating
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
1262 proto_tree_add_item(lmp_tree
, hf_lmp_feature_pause_encryption
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
1263 proto_tree_add_item(lmp_tree
, hf_lmp_feature_afh_capable_master
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
1264 proto_tree_add_item(lmp_tree
, hf_lmp_feature_afh_classification_master
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
1265 proto_tree_add_item(lmp_tree
, hf_lmp_feature_edr_esco_2mbps_mode
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
1266 proto_tree_add_item(lmp_tree
, hf_lmp_feature_edr_esco_3mbps_mode
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
1267 proto_tree_add_item(lmp_tree
, hf_lmp_feature_3slot_edr_esco_packets
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
1270 proto_tree_add_item(lmp_tree
, hf_lmp_feature_extended_inquiry_response
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
1271 proto_tree_add_item(lmp_tree
, hf_lmp_feature_simultaneous_le_and_br_edr_controller
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
1272 proto_tree_add_item(lmp_tree
, hf_lmp_feature_reserved_50
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
1273 proto_tree_add_item(lmp_tree
, hf_lmp_feature_secure_simple_pairing
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
1274 proto_tree_add_item(lmp_tree
, hf_lmp_feature_encapsulated_pdu
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
1275 proto_tree_add_item(lmp_tree
, hf_lmp_feature_erroneous_data_reporting
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
1276 proto_tree_add_item(lmp_tree
, hf_lmp_feature_non_flushable_packet_boundary_flag
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
1277 proto_tree_add_item(lmp_tree
, hf_lmp_feature_reserved_55
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
1280 proto_tree_add_item(lmp_tree
, hf_lmp_feature_link_supervision_timeout_changed_event
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
1281 proto_tree_add_item(lmp_tree
, hf_lmp_feature_inquiry_tx_power_level
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
1282 proto_tree_add_item(lmp_tree
, hf_lmp_feature_enhanced_power_control
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
1283 proto_tree_add_item(lmp_tree
, hf_lmp_feature_reserved_59_62
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
1284 proto_tree_add_item(lmp_tree
, hf_lmp_feature_extended_features
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
1289 proto_tree_add_item(lmp_tree
, hf_lmp_feature_secure_simple_pairing_host
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
1290 proto_tree_add_item(lmp_tree
, hf_lmp_feature_le_supported_host
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
1291 proto_tree_add_item(lmp_tree
, hf_lmp_feature_simultaneous_le_and_br_edr_host
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
1292 proto_tree_add_item(lmp_tree
, hf_lmp_feature_reserved_67_71
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
1295 proto_tree_add_item(lmp_tree
, hf_lmp_feature_reserved
, tvb
, offset
, 7, ENC_NA
);
1300 proto_tree_add_item(lmp_tree
, hf_lmp_feature_reserved
, tvb
, offset
, 8, ENC_NA
);
1308 dissect_bthci_evt_pin_code_request(tvbuff_t
*tvb
, int offset
, packet_info
*pinfo
, proto_tree
*tree
)
1310 offset
= dissect_bthci_evt_bd_addr(tvb
, offset
, pinfo
, tree
, NULL
);
1316 dissect_bthci_evt_link_key_request(tvbuff_t
*tvb
, int offset
, packet_info
*pinfo
, proto_tree
*tree
)
1318 offset
= dissect_bthci_evt_bd_addr(tvb
, offset
, pinfo
, tree
, NULL
);
1324 dissect_bthci_evt_link_key_notification(tvbuff_t
*tvb
, int offset
, packet_info
*pinfo
, proto_tree
*tree
)
1326 offset
= dissect_bthci_evt_bd_addr(tvb
, offset
, pinfo
, tree
, NULL
);
1328 proto_tree_add_item(tree
, hf_bthci_evt_link_key
, tvb
, offset
, 16, ENC_NA
);
1331 proto_tree_add_item(tree
, hf_bthci_evt_key_type
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
1338 dissect_bthci_evt_return_link_keys(tvbuff_t
*tvb
, int offset
, packet_info
*pinfo
, proto_tree
*tree
)
1340 guint8 evt_num_keys
;
1342 evt_num_keys
= tvb_get_guint8(tvb
, offset
);
1343 proto_tree_add_item(tree
, hf_bthci_evt_num_keys
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
1346 while(evt_num_keys
--){
1347 offset
= dissect_bthci_evt_bd_addr(tvb
, offset
, pinfo
, tree
, NULL
);
1349 proto_tree_add_item(tree
, hf_bthci_evt_link_key
, tvb
, offset
, 16, ENC_NA
);
1358 dissect_bthci_evt_read_remote_support_features_complete(tvbuff_t
*tvb
, int offset
, packet_info
*pinfo
, proto_tree
*tree
)
1360 proto_tree_add_item(tree
, hf_bthci_evt_status
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
1363 proto_tree_add_item(tree
, hf_bthci_evt_connection_handle
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
1366 offset
= dissect_bthci_evt_lmp_features(tvb
, offset
, pinfo
, tree
, 0);
1372 dissect_bthci_evt_remote_name_req_complete(tvbuff_t
*tvb
, int offset
,
1373 packet_info
*pinfo
, proto_tree
*tree
, hci_data_t
*hci_data
)
1377 proto_tree_add_item(tree
, hf_bthci_evt_status
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
1380 offset
= dissect_bthci_evt_bd_addr(tvb
, offset
, pinfo
, tree
, bd_addr
);
1382 proto_tree_add_item(tree
, hf_bthci_evt_remote_name
, tvb
, offset
, 248, ENC_ASCII
|ENC_NA
);
1383 if (!pinfo
->fd
->flags
.visited
&& hci_data
!= NULL
) {
1385 wmem_tree_key_t key
[4];
1386 guint32 k_bd_addr_oui
;
1387 guint32 k_bd_addr_id
;
1388 guint32 k_frame_number
;
1390 device_name_t
*device_name
;
1392 name
= tvb_get_string(wmem_packet_scope(), tvb
, offset
, 248);
1394 k_frame_number
= pinfo
->fd
->num
;
1395 k_bd_addr_oui
= bd_addr
[0] << 16 | bd_addr
[1] << 8 | bd_addr
[2];
1396 k_bd_addr_id
= bd_addr
[3] << 16 | bd_addr
[4] << 8 | bd_addr
[5];
1399 key
[0].key
= &k_bd_addr_id
;
1401 key
[1].key
= &k_bd_addr_oui
;
1403 key
[2].key
= &k_frame_number
;
1407 device_name
= (device_name_t
*) wmem_new(wmem_file_scope(), device_name_t
);
1408 device_name
->bd_addr_oui
= bd_addr
[0] << 16 | bd_addr
[1] << 8 | bd_addr
[2];
1409 device_name
->bd_addr_id
= bd_addr
[3] << 16 | bd_addr
[4] << 8 | bd_addr
[5];
1410 device_name
->name
= wmem_strdup(wmem_file_scope(), name
);
1412 wmem_tree_insert32_array(hci_data
->bdaddr_to_name_table
, key
, device_name
);
1420 dissect_bthci_evt_read_remote_version_information_complete(tvbuff_t
*tvb
, int offset
, packet_info
*pinfo _U_
, proto_tree
*tree
)
1422 proto_tree_add_item(tree
, hf_bthci_evt_status
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
1425 proto_tree_add_item(tree
, hf_bthci_evt_connection_handle
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
1428 proto_tree_add_item(tree
, hf_bthci_evt_vers_nr
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
1431 proto_tree_add_item(tree
, hf_bthci_evt_comp_id
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
1434 proto_tree_add_item(tree
, hf_bthci_evt_sub_vers_nr
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
1441 dissect_bthci_evt_flush_occured(tvbuff_t
*tvb
, int offset
, packet_info
*pinfo _U_
, proto_tree
*tree
)
1443 proto_tree_add_item(tree
, hf_bthci_evt_connection_handle
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
1450 dissect_bthci_evt_number_of_completed_packets(tvbuff_t
*tvb
, int offset
, packet_info
*pinfo _U_
, proto_tree
*tree
)
1452 guint8 evt_num_handles
;
1454 evt_num_handles
= tvb_get_guint8(tvb
, offset
);
1455 proto_tree_add_item(tree
, hf_bthci_evt_num_handles
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
1458 while(evt_num_handles
--){
1459 proto_tree_add_item(tree
, hf_bthci_evt_connection_handle
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
1462 proto_tree_add_item(tree
, hf_bthci_evt_num_compl_packets
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
1471 dissect_bthci_evt_mode_change(tvbuff_t
*tvb
, int offset
, packet_info
*pinfo _U_
, proto_tree
*tree
)
1473 proto_item
*handle_item
;
1475 proto_tree_add_item(tree
, hf_bthci_evt_status
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
1478 proto_tree_add_item(tree
, hf_bthci_evt_connection_handle
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
1481 proto_tree_add_item(tree
, hf_bthci_evt_curr_mode
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
1484 handle_item
= proto_tree_add_item(tree
, hf_bthci_evt_interval
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
1485 proto_item_append_text(handle_item
, " Baseband slots (%f msec)", tvb_get_letohs(tvb
, offset
)*0.625);
1492 dissect_bthci_evt_role_change(tvbuff_t
*tvb
, int offset
, packet_info
*pinfo
, proto_tree
*tree
)
1494 proto_tree_add_item(tree
, hf_bthci_evt_status
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
1497 offset
= dissect_bthci_evt_bd_addr(tvb
, offset
, pinfo
, tree
, NULL
);
1499 proto_tree_add_item(tree
, hf_bthci_evt_role
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
1506 dissect_bthci_evt_hardware_error(tvbuff_t
*tvb
, int offset
, packet_info
*pinfo _U_
, proto_tree
*tree
)
1508 proto_tree_add_item(tree
, hf_bthci_evt_hardware_code
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
1515 dissect_bthci_evt_loopback_command(tvbuff_t
*tvb
, int offset
,
1516 packet_info
*pinfo
, proto_tree
*tree
, hci_data_t
*hci_data
)
1520 next_tvb
= tvb_new_subset_remaining(tvb
, offset
);
1521 call_dissector_with_data(bthci_cmd_handle
, next_tvb
, pinfo
, tree
, hci_data
);
1523 offset
+=tvb_length_remaining(tvb
, offset
);
1529 dissect_bthci_evt_data_buffer_overflow(tvbuff_t
*tvb
, int offset
, packet_info
*pinfo _U_
, proto_tree
*tree
)
1531 proto_tree_add_item(tree
, hf_bthci_evt_link_type
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
1538 dissect_bthci_evt_read_clock_offset_complete(tvbuff_t
*tvb
, int offset
, packet_info
*pinfo _U_
, proto_tree
*tree
)
1540 proto_item
*handle_item
;
1543 proto_tree_add_item(tree
, hf_bthci_evt_status
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
1546 proto_tree_add_item(tree
, hf_bthci_evt_connection_handle
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
1549 handle_item
= proto_tree_add_item(tree
, hf_bthci_evt_clock_offset
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
1550 clk
=tvb_get_letohs(tvb
, offset
) & 32767; /* only bit0-14 are valid */
1551 proto_item_append_text(handle_item
, " (%g ms)", 1.25*clk
);
1558 dissect_bthci_evt_max_slots_change(tvbuff_t
*tvb
, int offset
, packet_info
*pinfo _U_
, proto_tree
*tree
)
1560 proto_tree_add_item(tree
, hf_bthci_evt_connection_handle
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
1563 proto_tree_add_item(tree
, hf_bthci_evt_max_slots
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
1570 dissect_bthci_evt_qos_violation(tvbuff_t
*tvb
, int offset
, packet_info
*pinfo _U_
, proto_tree
*tree
)
1572 proto_tree_add_item(tree
, hf_bthci_evt_connection_handle
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
1579 dissect_bthci_evt_conn_packet_type_changed(tvbuff_t
*tvb
, int offset
, packet_info
*pinfo _U_
, proto_tree
*tree
)
1582 proto_tree
*handle_tree
;
1583 proto_item
*ti_ptype_subtree
;
1585 proto_tree_add_item(tree
, hf_bthci_evt_status
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
1588 flags
=tvb_get_letohs(tvb
, offset
);
1589 proto_tree_add_item(tree
, hf_bthci_evt_connection_handle
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
1592 handle_tree
= proto_tree_add_item(tree
, hf_usable_packet_types
, tvb
, offset
, 2, ENC_NA
);
1593 ti_ptype_subtree
= proto_item_add_subtree(handle_tree
, ett_ptype_subtree
);
1596 proto_item_append_text(handle_tree
, "DM1 ");
1598 proto_item_append_text(handle_tree
, "DH1 ");
1600 proto_item_append_text(handle_tree
, "DM3 ");
1602 proto_item_append_text(handle_tree
, "DH3 ");
1604 proto_item_append_text(handle_tree
, "DM5 ");
1606 proto_item_append_text(handle_tree
, "DH5 ");
1608 proto_item_append_text(handle_tree
, "HV1 ");
1610 proto_item_append_text(handle_tree
, "HV2 ");
1612 proto_item_append_text(handle_tree
, "HV3 ");
1614 proto_item_append_text(handle_tree
, "2-DH1 ");
1616 proto_item_append_text(handle_tree
, "3-DH1 ");
1618 proto_item_append_text(handle_tree
, "2-DH3 ");
1620 proto_item_append_text(handle_tree
, "3-DH3 ");
1622 proto_item_append_text(handle_tree
, "2-DH5 ");
1624 proto_item_append_text(handle_tree
, "3-DH5 ");
1626 proto_tree_add_item(ti_ptype_subtree
, hf_bthci_evt_link_type_2dh1
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
1627 proto_tree_add_item(ti_ptype_subtree
, hf_bthci_evt_link_type_3dh1
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
1628 proto_tree_add_item(ti_ptype_subtree
, hf_bthci_evt_link_type_dm1
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
1629 proto_tree_add_item(ti_ptype_subtree
, hf_bthci_evt_link_type_dh1
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
1630 proto_tree_add_item(ti_ptype_subtree
, hf_bthci_evt_link_type_2dh3
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
1631 proto_tree_add_item(ti_ptype_subtree
, hf_bthci_evt_link_type_3dh3
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
1632 proto_tree_add_item(ti_ptype_subtree
, hf_bthci_evt_link_type_dm3
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
1633 proto_tree_add_item(ti_ptype_subtree
, hf_bthci_evt_link_type_dh3
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
1634 proto_tree_add_item(ti_ptype_subtree
, hf_bthci_evt_link_type_2dh5
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
1635 proto_tree_add_item(ti_ptype_subtree
, hf_bthci_evt_link_type_3dh5
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
1636 proto_tree_add_item(ti_ptype_subtree
, hf_bthci_evt_link_type_dm5
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
1637 proto_tree_add_item(ti_ptype_subtree
, hf_bthci_evt_link_type_dh5
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
1638 proto_tree_add_item(ti_ptype_subtree
, hf_bthci_evt_link_type_hv1
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
1639 proto_tree_add_item(ti_ptype_subtree
, hf_bthci_evt_link_type_hv2
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
1640 proto_tree_add_item(ti_ptype_subtree
, hf_bthci_evt_link_type_hv3
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
1647 dissect_bthci_evt_command_status(tvbuff_t
*tvb
, int offset
, packet_info
*pinfo
, proto_tree
*tree
)
1649 proto_item
*ti_opcode
;
1650 proto_tree
*opcode_tree
;
1656 status_code
= tvb_get_guint8(tvb
, offset
);
1658 if (status_code
!= 0) {
1659 proto_tree_add_item(tree
, hf_bthci_evt_status
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
1662 proto_tree_add_item(tree
, hf_bthci_evt_status_pending
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
1666 proto_tree_add_item(tree
, hf_bthci_evt_num_command_packets
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
1669 opcode
= tvb_get_letohs(tvb
, offset
);
1672 ti_opcode
= proto_tree_add_item(tree
, hf_bthci_evt_opcode
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
1673 opcode_tree
= proto_item_add_subtree(ti_opcode
, ett_opcode
);
1674 proto_tree_add_item(opcode_tree
, hf_bthci_evt_ogf
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
1676 if (ogf
== HCI_OGF_LINK_CONTROL
)
1677 hfx
= hf_bthci_evt_ocf_link_control
;
1678 else if (ogf
== HCI_OGF_LINK_POLICY
)
1679 hfx
= hf_bthci_evt_ocf_link_policy
;
1680 else if (ogf
== HCI_OGF_HOST_CONTROLLER
)
1681 hfx
= hf_bthci_evt_ocf_host_controller_and_baseband
;
1682 else if (ogf
== HCI_OGF_INFORMATIONAL
)
1683 hfx
= hf_bthci_evt_ocf_informational
;
1684 else if (ogf
== HCI_OGF_STATUS
)
1685 hfx
= hf_bthci_evt_ocf_status
;
1686 else if (ogf
== HCI_OGF_TESTING
)
1687 hfx
= hf_bthci_evt_ocf_testing
;
1688 else if (ogf
== HCI_OGF_LOW_ENERGY
)
1689 hfx
= hf_bthci_evt_ocf_low_energy
;
1690 else if (ogf
== HCI_OGF_LOGO_TESTING
)
1691 hfx
= hf_bthci_evt_ocf_logo_testing
;
1693 hfx
= hf_bthci_evt_ocf
;
1694 proto_tree_add_item(opcode_tree
, hfx
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
1697 col_append_fstr(pinfo
->cinfo
, COL_INFO
, " (%s)",
1698 val_to_str_ext(opcode
, &bthci_cmd_opcode_vals_ext
, "Unknown 0x%08x"));
1704 dissect_bthci_evt_page_scan_mode_change(tvbuff_t
*tvb
, int offset
, packet_info
*pinfo
, proto_tree
*tree
)
1706 offset
= dissect_bthci_evt_bd_addr(tvb
, offset
, pinfo
, tree
, NULL
);
1708 proto_tree_add_item(tree
, hf_bthci_evt_page_scan_mode
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
1715 dissect_bthci_evt_page_scan_repetition_mode_change(tvbuff_t
*tvb
, int offset
, packet_info
*pinfo
, proto_tree
*tree
)
1717 offset
= dissect_bthci_evt_bd_addr(tvb
, offset
, pinfo
, tree
, NULL
);
1719 proto_tree_add_item(tree
, hf_bthci_evt_page_scan_repetition_mode
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
1726 dissect_bthci_evt_inq_result_with_rssi(tvbuff_t
*tvb
, int offset
,
1727 packet_info
*pinfo
, proto_tree
*tree
, guint8
*bd_addr
)
1729 guint8 num
, evt_num_responses
;
1731 evt_num_responses
= tvb_get_guint8(tvb
, offset
);
1732 proto_tree_add_item(tree
, hf_bthci_evt_num_responses
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
1735 for(num
= 0; num
< evt_num_responses
; num
++) {
1736 offset
= dissect_bthci_evt_bd_addr(tvb
, offset
, pinfo
, tree
, (num
== 0) ? bd_addr
: NULL
);
1738 proto_tree_add_item(tree
, hf_bthci_evt_page_scan_repetition_mode
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
1744 offset
= dissect_bthci_evt_cod(tvb
, offset
, pinfo
, tree
);
1746 proto_tree_add_item(tree
, hf_bthci_evt_clock_offset
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
1749 proto_tree_add_item(tree
, hf_bthci_evt_rssi
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
1758 dissect_bthci_evt_eir_ad_data(tvbuff_t
*tvb
, int offset
, packet_info
*pinfo
,
1759 proto_tree
*tree
, guint8 size
, guint8
*bd_addr
, hci_data_t
*hci_data
)
1762 guint8 length
, type
;
1763 proto_item
*ti_eir
= NULL
;
1764 proto_item
*ti_eir_subtree
= NULL
;
1765 proto_item
*sub_item
;
1768 ti_eir
= proto_tree_add_item(tree
, (size
== 240) ? hf_extended_inquiry_response_data
: hf_advertising_data
,
1769 tvb
, offset
, size
, ENC_NA
);
1770 ti_eir_subtree
=proto_item_add_subtree(ti_eir
, ett_eir_subtree
);
1775 length
= tvb_get_guint8(tvb
, offset
+i
);
1778 proto_item
*ti_eir_struct
;
1779 proto_tree
*ti_eir_struct_subtree
;
1781 type
= tvb_get_guint8(tvb
, offset
+ i
+ 1);
1783 ti_eir_struct
= proto_tree_add_none_format(ti_eir_subtree
, hf_eir_ad_item
, tvb
, offset
+ i
, length
+ 1, "%s",
1784 val_to_str_ext_const(type
, &bthci_cmd_eir_data_type_vals_ext
, "Unknown"));
1785 ti_eir_struct_subtree
= proto_item_add_subtree(ti_eir_struct
, ett_eir_struct_subtree
);
1787 proto_item_append_text(ti_eir_struct
,"%s", val_to_str_ext_const(type
, &bthci_cmd_eir_data_type_vals_ext
, "Unknown"));
1789 proto_tree_add_item(ti_eir_struct_subtree
,hf_bthci_evt_eir_struct_length
, tvb
, offset
+ i
, 1, ENC_LITTLE_ENDIAN
);
1790 proto_tree_add_item(ti_eir_struct_subtree
,hf_bthci_evt_eir_struct_type
, tvb
, offset
+ i
+ 1, 1, ENC_LITTLE_ENDIAN
);
1793 case 0x01: /* Flags */
1796 proto_tree_add_item(ti_eir_struct_subtree
, hf_bthci_evt_flags_limited_disc_mode
, tvb
, offset
+i
+2, 1, ENC_LITTLE_ENDIAN
);
1797 proto_tree_add_item(ti_eir_struct_subtree
, hf_bthci_evt_flags_general_disc_mode
, tvb
, offset
+i
+2, 1, ENC_LITTLE_ENDIAN
);
1798 proto_tree_add_item(ti_eir_struct_subtree
, hf_bthci_evt_flags_bredr_not_support
, tvb
, offset
+i
+2, 1, ENC_LITTLE_ENDIAN
);
1799 proto_tree_add_item(ti_eir_struct_subtree
, hf_bthci_evt_flags_le_bredr_support_ctrl
, tvb
, offset
+i
+2, 1, ENC_LITTLE_ENDIAN
);
1800 proto_tree_add_item(ti_eir_struct_subtree
, hf_bthci_evt_flags_le_bredr_support_host
, tvb
, offset
+i
+2, 1, ENC_LITTLE_ENDIAN
);
1801 proto_tree_add_item(ti_eir_struct_subtree
, hf_bthci_evt_flags_reserved
, tvb
, offset
+i
+2, 1, ENC_LITTLE_ENDIAN
);
1805 case 0x02: /* 16-bit Service Class UUIDs, incomplete list */
1806 case 0x03: /* 16-bit Service Class UUIDs, complete list */
1807 case 0x14: /* 16-bit Service Solicitation UUIDs */
1809 while(j
<(guint8
)(length
-1))
1811 proto_tree_add_item(ti_eir_struct_subtree
, hf_bthci_evt_sc_uuid16
, tvb
, offset
+i
+j
+2, 2, ENC_LITTLE_ENDIAN
);
1815 case 0x04: /* 32-bit Service Class UUIDs, incomplete list */
1816 case 0x05: /* 32-bit Service Class UUIDs, complete list */
1818 while(j
<(guint8
)(length
-1))
1820 proto_tree_add_item(ti_eir_struct_subtree
, hf_bthci_evt_sc_uuid32
, tvb
, offset
+i
+j
+2, 4, ENC_LITTLE_ENDIAN
);
1824 case 0x06: /* 128-bit Service Class UUIDs, incomplete list */
1825 case 0x07: /* 128-bit Service Class UUIDs, complete list */
1826 case 0x15: /* 128-bit Service Solicitation UUIDs */
1828 while(j
<(guint8
)(length
-1))
1830 proto_tree_add_item(ti_eir_struct_subtree
, hf_bthci_evt_sc_uuid128
, tvb
, offset
+i
+j
+2, 16, ENC_NA
);
1834 case 0x08: /* Device Name, shortened */
1835 case 0x09: /* Device Name, full */
1836 proto_tree_add_item(ti_eir_struct_subtree
, hf_bthci_evt_device_name
, tvb
, offset
+i
+2, length
-1, ENC_ASCII
|ENC_NA
);
1837 proto_item_append_text(ti_eir_struct
,": %s", tvb_format_text(tvb
,offset
+i
+2,length
-1));
1838 if (!pinfo
->fd
->flags
.visited
&& hci_data
!= NULL
&&bd_addr
) {
1839 wmem_tree_key_t key
[4];
1840 guint32 k_bd_addr_oui
;
1841 guint32 k_bd_addr_id
;
1842 guint32 k_frame_number
;
1844 device_name_t
*device_name
;
1846 name
= tvb_get_string(wmem_packet_scope(), tvb
, offset
+i
+2, length
-1);
1848 k_frame_number
= pinfo
->fd
->num
;
1849 k_bd_addr_oui
= bd_addr
[0] << 16 | bd_addr
[1] << 8 | bd_addr
[2];
1850 k_bd_addr_id
= bd_addr
[3] << 16 | bd_addr
[4] << 8 | bd_addr
[5];
1853 key
[0].key
= &k_bd_addr_id
;
1855 key
[1].key
= &k_bd_addr_oui
;
1857 key
[2].key
= &k_frame_number
;
1861 device_name
= (device_name_t
*) wmem_new(wmem_file_scope(), device_name_t
);
1862 device_name
->bd_addr_oui
= bd_addr
[0] << 16 | bd_addr
[1] << 8 | bd_addr
[2];
1863 device_name
->bd_addr_id
= bd_addr
[3] << 16 | bd_addr
[4] << 8 | bd_addr
[5];
1864 device_name
->name
= wmem_strdup(wmem_file_scope(), name
);
1866 wmem_tree_insert32_array(hci_data
->bdaddr_to_name_table
, key
, device_name
);
1869 case 0x0A: /* Tx Power Level */
1870 proto_tree_add_item(ti_eir_struct_subtree
, hf_bthci_evt_transmit_power_level
, tvb
, offset
+i
+2, 1, ENC_LITTLE_ENDIAN
);
1872 case 0x0B: /* Secure Simple Pairing OOB Length */
1873 /* From CSS v3.pdf */
1874 proto_tree_add_item(ti_eir_struct_subtree
, hf_bthci_evt_eir_ad_ssp_oob_length
, tvb
, offset
+ i
+ 2, 2, ENC_LITTLE_ENDIAN
);
1876 case 0x0C: /* BD_ADDR */
1877 /* From CSS v3.pdf */
1878 dissect_bthci_evt_bd_addr(tvb
, offset
+ i
+ 2, pinfo
, tree
, NULL
);
1880 case 0x0D: /* Class of Device */
1881 dissect_bthci_evt_cod(tvb
, offset
+i
+2, pinfo
, ti_eir_struct_subtree
);
1883 case 0x0E: /* Simple Pairing Hash C */
1884 proto_tree_add_item(ti_eir_struct_subtree
, hf_bthci_evt_hash_c
, tvb
, offset
+i
+2, 16, ENC_NA
);
1886 case 0x0F: /* Simple Pairing Randomizer R */
1887 proto_tree_add_item(ti_eir_struct_subtree
, hf_bthci_evt_randomizer_r
, tvb
, offset
+i
+2, 16, ENC_NA
);
1889 case 0x10: /* Device ID / Security Manager TK Value */
1891 /* XXX: Need to know how to check (or is it possible) that is le_physical_channel or not */
1892 if (le_physical_channel
) { /* Security Manager TK Value - Value as used in pairing over LE Physical channel. */
1893 sub_item
= proto_tree_add_item(ti_eir_struct_subtree
, hf_bthci_evt_data
, tvb
, offset
+ i
+ 2, 16, ENC_NA
);
1894 expert_add_info(pinfo
, sub_item
, &ei_eir_undecoded
);
1900 guint16 vendor_id_source
;
1903 const gchar
*str_val
;
1905 proto_tree_add_item(ti_eir_struct_subtree
, hf_did_vendor_id_source
, tvb
, offset
+ i
+ 2, 2, ENC_LITTLE_ENDIAN
);
1906 vendor_id_source
= tvb_get_letohs(tvb
, offset
+ i
+ 2);
1908 if (vendor_id_source
== DID_VENDOR_ID_SOURCE_BLUETOOTH_SIG
) {
1909 proto_tree_add_item(ti_eir_struct_subtree
, hf_did_vendor_id_bluetooth_sig
, tvb
, offset
+ i
+ 2 + 2, 2, ENC_LITTLE_ENDIAN
);
1910 } else if (vendor_id_source
== DID_VENDOR_ID_SOURCE_USB_FORUM
) {
1911 proto_tree_add_item(ti_eir_struct_subtree
, hf_did_vendor_id_usb_forum
, tvb
, offset
+ i
+ 2 + 2, 2, ENC_LITTLE_ENDIAN
);
1913 proto_tree_add_item(ti_eir_struct_subtree
, hf_did_vendor_id
, tvb
, offset
+ i
+ 2 + 2, 2, ENC_LITTLE_ENDIAN
);
1915 vendor_id
= tvb_get_letohs(tvb
, offset
+ i
+ 2 + 2);
1917 sub_item
= proto_tree_add_item(ti_eir_struct_subtree
, hf_did_product_id
, tvb
, offset
+ i
+ 2 + 4, 2, ENC_LITTLE_ENDIAN
);
1918 product_id
= tvb_get_letohs(tvb
, offset
+ i
+ 2 + 4);
1920 if (vendor_id_source
== DID_VENDOR_ID_SOURCE_USB_FORUM
) {
1921 str_val
= val_to_str_ext_const(vendor_id
<< 16 | product_id
, &ext_usb_products_vals
, "Unknown");
1922 proto_item_append_text(sub_item
, " (%s)", str_val
);
1925 proto_tree_add_item(ti_eir_struct_subtree
, hf_did_version
, tvb
, offset
+ i
+ 2 + 6, 2, ENC_LITTLE_ENDIAN
);
1928 case 0x11: /* Security Manager OOB Flags */
1929 proto_tree_add_item(ti_eir_struct_subtree
, hf_bthci_evt_oob_flags_oob_data_present
, tvb
, offset
+i
+2, 1, ENC_LITTLE_ENDIAN
);
1930 proto_tree_add_item(ti_eir_struct_subtree
, hf_bthci_evt_oob_flags_le_supported_host
, tvb
, offset
+i
+2, 1, ENC_LITTLE_ENDIAN
);
1931 proto_tree_add_item(ti_eir_struct_subtree
, hf_bthci_evt_oob_flags_simultaneous_le_and_br_edr_host
, tvb
, offset
+i
+2, 1, ENC_LITTLE_ENDIAN
);
1932 proto_tree_add_item(ti_eir_struct_subtree
, hf_bthci_evt_oob_flags_address_type
, tvb
, offset
+i
+2, 1, ENC_LITTLE_ENDIAN
);
1934 case 0x12: /* Slave Connection Interval Range */
1935 sub_item
= proto_tree_add_item(tree
, hf_bthci_evt_le_con_interval
, tvb
, offset
+i
+2, 2, ENC_LITTLE_ENDIAN
);
1936 proto_item_append_text(sub_item
, " Min (%g msec)", tvb_get_letohs(tvb
, offset
+i
+2)*1.25);
1938 sub_item
= proto_tree_add_item(tree
, hf_bthci_evt_le_con_interval
, tvb
, offset
+i
+4, 2, ENC_LITTLE_ENDIAN
);
1939 proto_item_append_text(sub_item
, " Max (%g msec)", tvb_get_letohs(tvb
, offset
+i
+4)*1.25);
1940 proto_item_append_text(ti_eir_struct
,": %g - %g msec", tvb_get_letohs(tvb
, offset
+i
+2)*1.25, tvb_get_letohs(tvb
, offset
+i
+4)*1.25);
1942 case 0x16: /* Service Data */
1943 proto_tree_add_item(ti_eir_struct_subtree
, hf_bthci_evt_sc_uuid16
, tvb
, offset
+i
+2, 2, ENC_LITTLE_ENDIAN
);
1944 proto_tree_add_item(ti_eir_struct_subtree
, hf_bthci_evt_data
, tvb
, offset
+ i
+ 4, length
- 3, ENC_NA
);
1946 case 0x17: /* Public Target Address */
1947 case 0x18: /* Random Target Address */
1950 while(j
<(guint8
)(length
-1))
1952 dissect_bthci_evt_bd_addr(tvb
, offset
+i
+j
+2, pinfo
, ti_eir_struct_subtree
, NULL
);
1957 case 0x19: /* Appearance */
1959 guint16 appearance
= tvb_get_letohs(tvb
, offset
+i
+2);
1960 proto_tree_add_item(ti_eir_struct_subtree
, hf_bthci_evt_appearance
, tvb
, offset
+i
+2, 2, ENC_LITTLE_ENDIAN
);
1961 proto_item_append_text(ti_eir_struct
,": %s", val_to_str_ext(appearance
, &bthci_cmd_appearance_vals_ext
, "Unknown"));
1964 case 0x1A: /* Advertising Interval */
1965 /* From CSS v3.pdf */
1966 sub_item
= proto_tree_add_item(ti_eir_struct_subtree
, hf_bthci_evt_eir_ad_advertising_interval
, tvb
, offset
+ i
+ 2, 2, ENC_LITTLE_ENDIAN
);
1967 proto_item_append_text(sub_item
, " (%g msec)", tvb_get_letohs(tvb
, offset
+ i
+ 2) * 0.625);
1969 case 0x3D: /* 3D Information Data */
1970 proto_tree_add_item(ti_eir_struct_subtree
, hf_3ds_factory_test_mode
, tvb
, offset
+ i
+ 2, 1, ENC_LITTLE_ENDIAN
);
1971 proto_tree_add_item(ti_eir_struct_subtree
, hf_3ds_reserved
, tvb
, offset
+ i
+ 2, 1, ENC_LITTLE_ENDIAN
);
1972 proto_tree_add_item(ti_eir_struct_subtree
, hf_3ds_send_battery_level_report_on_startup
, tvb
, offset
+ i
+ 2, 1, ENC_LITTLE_ENDIAN
);
1973 proto_tree_add_item(ti_eir_struct_subtree
, hf_3ds_battery_level_reporting
, tvb
, offset
+ i
+ 2, 1, ENC_LITTLE_ENDIAN
);
1974 proto_tree_add_item(ti_eir_struct_subtree
, hf_3ds_association_notification
, tvb
, offset
+ i
+ 2, 1, ENC_LITTLE_ENDIAN
);
1976 proto_tree_add_item(ti_eir_struct_subtree
, hf_3ds_path_loss_threshold
, tvb
, offset
+ i
+ 2 + 1, 1, ENC_LITTLE_ENDIAN
);
1979 case 0xFF: /* Manufacturer Specific */ {
1982 proto_tree_add_item(ti_eir_struct_subtree
, hf_bthci_evt_eir_ad_company_id
, tvb
, offset
+ i
+ 2, 2, ENC_LITTLE_ENDIAN
);
1983 company_id
= tvb_get_letohs(tvb
, offset
+ i
+ 2);
1984 if (company_id
== 0x000F && tvb_get_guint8(tvb
, offset
+ i
+ 2 + 2) == 0) { /* 3DS profile Legacy Devices */
1985 proto_tree_add_item(ti_eir_struct_subtree
, hf_3ds_legacy_fixed
, tvb
, offset
+ i
+ 2 + 2, 1, ENC_LITTLE_ENDIAN
);
1987 proto_tree_add_item(ti_eir_struct_subtree
, hf_3ds_legacy_3d_capable_tv
, tvb
, offset
+ i
+ 2 + 3, 1, ENC_LITTLE_ENDIAN
);
1988 proto_tree_add_item(ti_eir_struct_subtree
, hf_3ds_legacy_ignored_1_3
, tvb
, offset
+ i
+ 2 + 3, 1, ENC_LITTLE_ENDIAN
);
1989 proto_tree_add_item(ti_eir_struct_subtree
, hf_3ds_legacy_fixed_4
, tvb
, offset
+ i
+ 2 + 3, 1, ENC_LITTLE_ENDIAN
);
1990 proto_tree_add_item(ti_eir_struct_subtree
, hf_3ds_legacy_ignored_5
, tvb
, offset
+ i
+ 2 + 3, 1, ENC_LITTLE_ENDIAN
);
1991 proto_tree_add_item(ti_eir_struct_subtree
, hf_3ds_legacy_fixed_6
, tvb
, offset
+ i
+ 2 + 3, 1, ENC_LITTLE_ENDIAN
);
1992 proto_tree_add_item(ti_eir_struct_subtree
, hf_3ds_legacy_test_mode
, tvb
, offset
+ i
+ 2 + 3, 1, ENC_LITTLE_ENDIAN
);
1994 proto_tree_add_item(ti_eir_struct_subtree
, hf_3ds_legacy_path_loss_threshold
, tvb
, offset
+ i
+ 2 + 4, 1, ENC_LITTLE_ENDIAN
);
1996 sub_item
= proto_tree_add_item(ti_eir_struct_subtree
, hf_bthci_evt_data
, tvb
, offset
+ i
+ 2, length
- 1, ENC_NA
);
1997 expert_add_info(pinfo
, sub_item
, &ei_eir_undecoded
);
2002 sub_item
= proto_tree_add_item(ti_eir_struct_subtree
, hf_bthci_evt_data
, tvb
, offset
+ i
+ 2, length
- 1, ENC_NA
);
2003 expert_add_info(pinfo
, sub_item
, &ei_eir_unknown
);
2012 return offset
+ size
;
2016 dissect_bthci_evt_io_capability_request(tvbuff_t
*tvb
, int offset
, packet_info
*pinfo
, proto_tree
*tree
)
2018 offset
= dissect_bthci_evt_bd_addr(tvb
, offset
, pinfo
, tree
, NULL
);
2024 dissect_bthci_evt_io_capability_response(tvbuff_t
*tvb
, int offset
, packet_info
*pinfo
, proto_tree
*tree
)
2026 offset
= dissect_bthci_evt_bd_addr(tvb
, offset
, pinfo
, tree
, NULL
);
2028 proto_tree_add_item(tree
, hf_bthci_evt_io_capability
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
2031 proto_tree_add_item(tree
, hf_bthci_evt_oob_data_present
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
2034 proto_tree_add_item(tree
, hf_bthci_evt_auth_requirements
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
2041 dissect_bthci_evt_user_confirmation_request(tvbuff_t
*tvb
, int offset
, packet_info
*pinfo
, proto_tree
*tree
)
2043 offset
= dissect_bthci_evt_bd_addr(tvb
, offset
, pinfo
, tree
, NULL
);
2045 proto_tree_add_item(tree
, hf_bthci_evt_numeric_value
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
2052 dissect_bthci_evt_user_passkey_request(tvbuff_t
*tvb
, int offset
, packet_info
*pinfo
, proto_tree
*tree
)
2054 offset
= dissect_bthci_evt_bd_addr(tvb
, offset
, pinfo
, tree
, NULL
);
2060 dissect_bthci_evt_remote_oob_data_request(tvbuff_t
*tvb
, int offset
, packet_info
*pinfo
, proto_tree
*tree
)
2062 offset
= dissect_bthci_evt_bd_addr(tvb
, offset
, pinfo
, tree
, NULL
);
2068 dissect_bthci_evt_simple_pairing_complete(tvbuff_t
*tvb
, int offset
, packet_info
*pinfo
, proto_tree
*tree
)
2070 proto_tree_add_item(tree
, hf_bthci_evt_status
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
2073 offset
= dissect_bthci_evt_bd_addr(tvb
, offset
, pinfo
, tree
, NULL
);
2079 dissect_bthci_evt_user_passkey_notification(tvbuff_t
*tvb
, int offset
, packet_info
*pinfo
, proto_tree
*tree
)
2081 offset
= dissect_bthci_evt_bd_addr(tvb
, offset
, pinfo
, tree
, NULL
);
2083 proto_tree_add_item(tree
, hf_bthci_evt_passkey
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
2090 dissect_bthci_evt_keypress_notification(tvbuff_t
*tvb
, int offset
, packet_info
*pinfo
, proto_tree
*tree
)
2092 offset
= dissect_bthci_evt_bd_addr(tvb
, offset
, pinfo
, tree
, NULL
);
2094 proto_tree_add_item(tree
, hf_bthci_evt_notification_type
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
2101 dissect_bthci_evt_remote_host_sup_feat_notification(tvbuff_t
*tvb
, int offset
, packet_info
*pinfo
, proto_tree
*tree
)
2103 offset
= dissect_bthci_evt_bd_addr(tvb
, offset
, pinfo
, tree
, NULL
);
2104 offset
= dissect_bthci_evt_lmp_features(tvb
, offset
, pinfo
, tree
, 0);
2110 dissect_bthci_evt_le_meta(tvbuff_t
*tvb
, int offset
, packet_info
*pinfo
,
2111 proto_tree
*tree
, hci_data_t
*hci_data
)
2114 guint8 subevent_code
;
2116 subevent_code
= tvb_get_guint8(tvb
, offset
);
2117 proto_tree_add_item(tree
, hf_bthci_evt_le_meta_subevent
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
2119 col_append_fstr(pinfo
->cinfo
, COL_INFO
, " (%s)", val_to_str(subevent_code
, evt_le_meta_subevent
, "Unknown 0x%02x"));
2123 switch(subevent_code
) {
2124 case 0x01: /* LE Connection Complete */
2125 proto_tree_add_item(tree
, hf_bthci_evt_status
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
2127 proto_tree_add_item(tree
, hf_bthci_evt_connection_handle
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
2129 proto_tree_add_item(tree
, hf_bthci_evt_role
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
2131 proto_tree_add_item(tree
, hf_bthci_evt_le_peer_address_type
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
2133 offset
= dissect_bthci_evt_bd_addr(tvb
, offset
, pinfo
, tree
, NULL
);
2134 item
= proto_tree_add_item(tree
, hf_bthci_evt_le_con_interval
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
2135 proto_item_append_text(item
, " (%g msec)", tvb_get_letohs(tvb
, offset
)*1.25);
2137 item
= proto_tree_add_item(tree
, hf_bthci_evt_le_con_latency
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
2138 proto_item_append_text(item
, " (number events)");
2140 item
= proto_tree_add_item(tree
, hf_bthci_evt_le_supervision_timeout
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
2141 proto_item_append_text(item
, " (%g sec)", tvb_get_letohs(tvb
, offset
)*0.01);
2143 proto_tree_add_item(tree
, hf_bthci_evt_le_master_clock_accuracy
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
2146 case 0x02: /* LE Advertising Report */
2148 guint8 i
, num_reports
, length
;
2150 num_reports
= tvb_get_guint8(tvb
, offset
);
2151 proto_tree_add_item(tree
, hf_bthci_evt_num_reports
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
2153 for(i
=0; i
<num_reports
; i
++) {
2154 proto_tree_add_item(tree
, hf_bthci_evt_advts_event_type
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
2156 proto_tree_add_item(tree
, hf_bthci_evt_le_peer_address_type
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
2158 offset
= dissect_bthci_evt_bd_addr(tvb
, offset
, pinfo
, tree
, NULL
);
2159 length
= tvb_get_guint8(tvb
, offset
);
2160 proto_tree_add_item(tree
, hf_bthci_evt_data_length
, tvb
, offset
, 1, ENC_NA
);
2162 offset
=dissect_bthci_evt_eir_ad_data(tvb
, offset
, pinfo
, tree
, length
, NULL
, hci_data
);
2163 proto_tree_add_item(tree
, hf_bthci_evt_rssi
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
2168 case 0x03: /* LE Connection Update Complete */
2169 proto_tree_add_item(tree
, hf_bthci_evt_status
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
2171 proto_tree_add_item(tree
, hf_bthci_evt_connection_handle
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
2173 item
= proto_tree_add_item(tree
, hf_bthci_evt_le_con_interval
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
2174 proto_item_append_text(item
, " (%g msec)", tvb_get_letohs(tvb
, offset
)*1.25);
2176 item
= proto_tree_add_item(tree
, hf_bthci_evt_le_con_latency
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
2177 proto_item_append_text(item
, " (number events)");
2179 item
= proto_tree_add_item(tree
, hf_bthci_evt_le_supervision_timeout
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
2180 proto_item_append_text(item
, " (%g sec)", tvb_get_letohs(tvb
, offset
)*0.01);
2183 case 0x04: /* LE Read Remote Used Features Complete */
2184 proto_tree_add_item(tree
, hf_bthci_evt_status
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
2186 proto_tree_add_item(tree
, hf_bthci_evt_connection_handle
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
2188 proto_tree_add_item(tree
, hf_bthci_evt_le_feature_00
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
2191 case 0x05: /* LE Long Term Key Request */
2192 proto_tree_add_item(tree
, hf_bthci_evt_connection_handle
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
2194 proto_tree_add_item(tree
, hf_bthci_evt_random_number
, tvb
, offset
, 8, ENC_NA
);
2196 proto_tree_add_item(tree
, hf_bthci_evt_encrypted_diversifier
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
2206 dissect_bthci_evt_physical_link_complete(tvbuff_t
*tvb
, int offset
, packet_info
*pinfo _U_
, proto_tree
*tree
)
2208 proto_tree_add_item(tree
, hf_bthci_evt_status
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
2210 proto_tree_add_item(tree
, hf_bthci_evt_physical_link_handle
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
2216 dissect_bthci_evt_channel_select_physical_link_recovery(tvbuff_t
*tvb
, int offset
, packet_info
*pinfo _U_
, proto_tree
*tree
)
2218 proto_tree_add_item(tree
, hf_bthci_evt_physical_link_handle
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
2224 dissect_bthci_evt_disconnect_physical_link_complete(tvbuff_t
*tvb
, int offset
, packet_info
*pinfo _U_
, proto_tree
*tree
)
2226 proto_tree_add_item(tree
, hf_bthci_evt_status
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
2229 proto_tree_add_item(tree
, hf_bthci_evt_physical_link_handle
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
2231 proto_tree_add_item(tree
, hf_bthci_evt_reason
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
2237 dissect_bthci_evt_physical_link_loss_early_warning(tvbuff_t
*tvb
, int offset
, packet_info
*pinfo _U_
, proto_tree
*tree
)
2239 proto_tree_add_item(tree
, hf_bthci_evt_physical_link_handle
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
2241 proto_tree_add_item(tree
, hf_bthci_evt_link_loss_reason
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
2247 dissect_bthci_evt_logical_link_complete(tvbuff_t
*tvb
, int offset
, packet_info
*pinfo _U_
, proto_tree
*tree
)
2249 proto_tree_add_item(tree
, hf_bthci_evt_status
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
2251 proto_tree_add_item(tree
, hf_bthci_evt_logical_link_handle
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
2253 proto_tree_add_item(tree
, hf_bthci_evt_physical_link_handle
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
2255 proto_tree_add_item(tree
, hf_bthci_evt_flow_spec_identifier
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
2261 dissect_bthci_evt_disconnect_logical_link_complete(tvbuff_t
*tvb
, int offset
, packet_info
*pinfo _U_
, proto_tree
*tree
)
2263 proto_tree_add_item(tree
, hf_bthci_evt_status
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
2265 proto_tree_add_item(tree
, hf_bthci_evt_logical_link_handle
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
2267 proto_tree_add_item(tree
, hf_bthci_evt_reason
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
2273 dissect_bthci_evt_flow_spec_modify_complete(tvbuff_t
*tvb
, int offset
, packet_info
*pinfo _U_
, proto_tree
*tree
)
2275 proto_tree_add_item(tree
, hf_bthci_evt_status
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
2277 proto_tree_add_item(tree
, hf_bthci_evt_connection_handle
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
2283 dissect_bthci_evt_num_completed_data_blocks(tvbuff_t
*tvb
, int offset
, packet_info
*pinfo _U_
, proto_tree
*tree
)
2285 guint8 evt_num_handles
;
2287 proto_tree_add_item(tree
, hf_bthci_evt_total_num_data_blocks
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
2290 evt_num_handles
= tvb_get_guint8(tvb
, offset
);
2291 proto_tree_add_item(tree
, hf_bthci_evt_num_handles
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
2294 while(evt_num_handles
--){
2295 proto_tree_add_item(tree
, hf_bthci_evt_connection_handle
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
2297 proto_tree_add_item(tree
, hf_bthci_evt_num_compl_packets
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
2299 proto_tree_add_item(tree
, hf_bthci_evt_num_compl_blocks
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
2306 dissect_bthci_evt_amp_start_stop_test(tvbuff_t
*tvb
, int offset
, packet_info
*pinfo _U_
, proto_tree
*tree
)
2308 proto_tree_add_item(tree
, hf_bthci_evt_status
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
2310 proto_tree_add_item(tree
, hf_bthci_evt_test_scenario
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
2316 dissect_bthci_evt_amp_receiver_test(tvbuff_t
*tvb
, int offset
, packet_info
*pinfo _U_
, proto_tree
*tree
)
2318 proto_tree_add_item(tree
, hf_bthci_evt_amp_controller_type
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
2320 proto_tree_add_item(tree
, hf_bthci_evt_report_reason
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
2322 proto_tree_add_item(tree
, hf_bthci_evt_report_event_type
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
2324 proto_tree_add_item(tree
, hf_bthci_evt_num_frames
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
2326 proto_tree_add_item(tree
, hf_bthci_evt_num_error_frames
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
2328 proto_tree_add_item(tree
, hf_bthci_evt_num_bits
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
2330 proto_tree_add_item(tree
, hf_bthci_evt_num_error_bits
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
2336 dissect_bthci_evt_short_range_mode_change_complete(tvbuff_t
*tvb
, int offset
, packet_info
*pinfo _U_
, proto_tree
*tree
)
2338 proto_tree_add_item(tree
, hf_bthci_evt_status
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
2340 proto_tree_add_item(tree
, hf_bthci_evt_physical_link_handle
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
2342 proto_tree_add_item(tree
, hf_bthci_evt_short_range_mode_state
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
2348 dissect_bthci_evt_amp_status_change(tvbuff_t
*tvb
, int offset
, packet_info
*pinfo _U_
, proto_tree
*tree
)
2350 proto_tree_add_item(tree
, hf_bthci_evt_status
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
2352 proto_tree_add_item(tree
, hf_bthci_evt_amp_status
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
2358 dissect_bthci_evt_command_complete(tvbuff_t
*tvb
, int offset
,
2359 packet_info
*pinfo
, proto_tree
*tree
, hci_data_t
*hci_data
)
2361 proto_item
*ti_opcode
;
2362 proto_tree
*opcode_tree
;
2371 gboolean local_addr
= FALSE
;
2374 proto_tree_add_item(tree
, hf_bthci_evt_num_command_packets
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
2377 opcode
= tvb_get_letohs(tvb
, offset
);
2380 ti_opcode
= proto_tree_add_item(tree
, hf_bthci_evt_opcode
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
2381 opcode_tree
= proto_item_add_subtree(ti_opcode
, ett_opcode
);
2382 proto_tree_add_item(opcode_tree
, hf_bthci_evt_ogf
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
2384 if (ogf
== HCI_OGF_LINK_CONTROL
)
2385 hfx
= hf_bthci_evt_ocf_link_control
;
2386 else if (ogf
== HCI_OGF_LINK_POLICY
)
2387 hfx
= hf_bthci_evt_ocf_link_policy
;
2388 else if (ogf
== HCI_OGF_HOST_CONTROLLER
)
2389 hfx
= hf_bthci_evt_ocf_host_controller_and_baseband
;
2390 else if (ogf
== HCI_OGF_INFORMATIONAL
)
2391 hfx
= hf_bthci_evt_ocf_informational
;
2392 else if (ogf
== HCI_OGF_STATUS
)
2393 hfx
= hf_bthci_evt_ocf_status
;
2394 else if (ogf
== HCI_OGF_TESTING
)
2395 hfx
= hf_bthci_evt_ocf_testing
;
2396 else if (ogf
== HCI_OGF_LOW_ENERGY
)
2397 hfx
= hf_bthci_evt_ocf_low_energy
;
2398 else if (ogf
== HCI_OGF_LOGO_TESTING
)
2399 hfx
= hf_bthci_evt_ocf_logo_testing
;
2401 hfx
= hf_bthci_evt_ocf
;
2402 proto_tree_add_item(opcode_tree
, hfx
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
2405 col_append_fstr(pinfo
->cinfo
, COL_INFO
, " (%s)",
2406 val_to_str_ext(opcode
, &bthci_cmd_opcode_vals_ext
, "Unknown 0x%08x"));
2409 /* This is a list of Commands that all return just the status */
2410 case 0x0402: /* Inquiry Cancel */
2411 case 0x0403: /* Periodic Inquiry Mode */
2412 case 0x0404: /* Exit Periodic Enquiry Mode */
2413 case 0x080f: /* Write Default Link Policy Settings */
2414 case 0x0c01: /* Set Event Mask */
2415 case 0x0c03: /* Reset */
2416 case 0x0c05: /* Set Event Filter */
2417 case 0x0c0a: /* Write PIN Type */
2418 case 0x0c0b: /* Create Unit Key */
2419 case 0x0c13: /* Change Local Name */
2420 case 0x0c16: /* Write Connection Accept Timeout */
2421 case 0x0c18: /* Write Page Timeout */
2422 case 0x0c1a: /* Write Scan Enable */
2423 case 0x0c1c: /* Write Page Scan Activity */
2424 case 0x0c1e: /* Write Inquiry Scan Activity */
2425 case 0x0c20: /* Write Authentication Enable */
2426 case 0x0c22: /* Write Encryption Mode */
2427 case 0x0c24: /* Write Class of Device */
2428 case 0x0c26: /* Write Voice Setting */
2429 case 0x0c2a: /* Write Num Broadcast Retransmissions */
2430 case 0x0c2c: /* Write Hold Mode Activity */
2431 case 0x0c2f: /* Write SCO Flow Control Enable */
2432 case 0x0c31: /* Set Host Controller To Host Flow Control */
2433 case 0x0c33: /* Host Buffer Size */
2434 case 0x0c3a: /* Write Current IAC LAP */
2435 case 0x0c3c: /* Write Page Scan Period Mode */
2436 case 0x0c3e: /* Write Page Scan Mode */
2437 case 0x0c3f: /* Set AFH Host Channel Classification */
2438 case 0x0c43: /* Write Inquiry Scan Type */
2439 case 0x0c45: /* Write Inquiry Mode */
2440 case 0x0c47: /* Write Page Scan Type */
2441 case 0x0c49: /* Write AFH Channel Assessment Mode */
2442 case 0x0c52: /* Write Extended Inquiry Response */
2443 case 0x0c53: /* Refresh Encryption Key */
2444 case 0x0c56: /* Write Simple Pairing Mode */
2445 case 0x0c59: /* Write Inquiry Tx Power Level */
2446 case 0x0c5b: /* Write Default Erroneous Data Reporting */
2447 case 0x0c62: /* Write Logical Link Accept Timeout */
2448 case 0x0c63: /* Set Event Mask Page 2 */
2449 case 0x0c65: /* Write Location Data */
2450 case 0x0c67: /* Write Flow Control Mode */
2451 case 0x0c6a: /* Write Best Effort Timeout */
2452 case 0x0c6b: /* Short Range Mode */
2453 case 0x0c6d: /* Write LE Host Supported */
2454 case 0x1802: /* Write Loopback Mode */
2455 case 0x1803: /* Enable Device Under Test Mode */
2456 case 0x1804: /* Write Simple Pairing Debug Mode */
2457 case 0x1807: /* Enable AMP Receiver Reports */
2458 case 0x1808: /* AMP Test End */
2459 case 0x1809: /* AMP Test */
2460 case 0x2001: /* LE Set Event Mask */
2461 case 0x2005: /* LE Set Random Address */
2462 case 0x2006: /* LE Set Advertising Parameters */
2463 case 0x2008: /* LE Set Advertising Data */
2464 case 0x2009: /* LE Set Scan Response Data */
2465 case 0x200a: /* LE Set Advertise Enable */
2466 case 0x200b: /* LE Set Scan Parameters */
2467 case 0x200c: /* LE Set Scan Enable */
2468 case 0x200e: /* LE Create Connection Cancel */
2469 case 0x2010: /* LE Clear White List */
2470 case 0x2011: /* LE Add Device To White List */
2471 case 0x2012: /* LE Remove Device From White List */
2472 case 0x2014: /* LE Set Host Channel Classification */
2473 case 0x201d: /* LE Receiver Test */
2474 case 0x201e: /* LE Transmitter Test */
2475 proto_tree_add_item(tree
, hf_bthci_evt_status
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
2479 /* This is a list of Commands that all return status and BD_ADDR */
2480 case 0x1009: /* Read BD_ADDR */
2483 case 0x0408: /* Create Connection Cancel */
2484 case 0x040b: /* Link Key Request Reply */
2485 case 0x040c: /* Link Key Request Negative Reply */
2486 case 0x040d: /* PIN Code Request Reply */
2487 case 0x040e: /* PIN Code Request Negative Reply */
2488 case 0x041a: /* Remote Name Request Cancel */
2489 case 0x042b: /* IO Capability Request Reply */
2490 case 0x0434: /* IO Capability Request Negative Reply */
2491 case 0x042c: /* User Confirmation Request Reply */
2492 case 0x042d: /* User Confirmation Request Negative Reply */
2493 case 0x042e: /* User Passkey Request Reply */
2494 case 0x042f: /* User Passkey Request Negative Reply */
2495 case 0x0430: /* Remote OOB Data Request Reply */
2496 case 0x0433: /* Remote OOB Data Request Negative Reply */
2497 case 0x0c60: /* Send Keypress Notification */
2498 proto_tree_add_item(tree
, hf_bthci_evt_status
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
2501 offset
= dissect_bthci_evt_bd_addr(tvb
, offset
, pinfo
, tree
, bd_addr
);
2502 if (!pinfo
->fd
->flags
.visited
&& hci_data
!= NULL
&& local_addr
) {
2503 wmem_tree_key_t key
[4];
2504 guint32 k_interface_id
;
2505 guint32 k_adapter_id
;
2506 guint32 k_frame_number
;
2507 localhost_bdaddr_entry_t
*localhost_bdaddr_entry
;
2509 k_interface_id
= hci_data
->interface_id
;
2510 k_adapter_id
= hci_data
->adapter_id
;
2511 k_frame_number
= pinfo
->fd
->num
;
2514 key
[0].key
= &k_interface_id
;
2516 key
[1].key
= &k_adapter_id
;
2518 key
[2].key
= &k_frame_number
;
2522 localhost_bdaddr_entry
= (localhost_bdaddr_entry_t
*) wmem_new(wmem_file_scope(), localhost_bdaddr_entry_t
);
2523 localhost_bdaddr_entry
->interface_id
= k_interface_id
;
2524 localhost_bdaddr_entry
->adapter_id
= k_adapter_id
;
2525 memcpy(localhost_bdaddr_entry
->bd_addr
, bd_addr
, 6);
2526 wmem_tree_insert32_array(hci_data
->localhost_bdaddr
, key
, localhost_bdaddr_entry
);
2531 /* This is a list of Commands that all return status and connection_handle */
2532 case 0x080d: /* Write Link Policy Settings */
2533 case 0x0811: /* Sniff Subrating */
2534 case 0x0c08: /* Flush */
2535 case 0x0c28: /* Write Automatic Flush Timeout */
2536 case 0x0c37: /* Write Link Supervision Timeout */
2537 case 0x0c5f: /* Enhanced Flush */
2538 case 0x1402: /* Reset Failed Contact Counter */
2539 case 0x201a: /* LE Long Term Key Request Reply */
2540 case 0x201b: /* LE Long Term Key Request Neg Reply */
2541 proto_tree_add_item(tree
, hf_bthci_evt_status
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
2544 proto_tree_add_item(tree
, hf_bthci_evt_connection_handle
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
2549 /* This is a list of Commands that all return status and timeout */
2550 case 0x0c15: /* Read Connection Accept Timeout */
2551 case 0x0c17: /* Read Page Timeout */
2552 proto_tree_add_item(tree
, hf_bthci_evt_status
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
2555 timeout
= tvb_get_letohs(tvb
, offset
);
2556 item
= proto_tree_add_item(tree
, hf_bthci_evt_timeout
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
2557 proto_item_append_text(item
, " slots (%g msec)", timeout
*0.625);
2562 /* This is a list of Commands that all return status, connection handle and timeout */
2563 case 0x0c27: /* Read Automatic Flush Timeout */
2564 case 0x0c36: /* Read Link Supervision Timeout */
2565 proto_tree_add_item(tree
, hf_bthci_evt_status
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
2568 proto_tree_add_item(tree
, hf_bthci_evt_connection_handle
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
2571 timeout
= tvb_get_letohs(tvb
, offset
);
2572 item
= proto_tree_add_item(tree
, hf_bthci_evt_timeout
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
2573 proto_item_append_text(item
, " slots (%g msec)", timeout
*0.625);
2578 /* This is a list of Commands that all return status, interval and window */
2579 case 0x0c1b: /* Read Page Scan Activity */
2580 case 0x0c1d: /* Read Inquiry Scan Activity */
2581 proto_tree_add_item(tree
, hf_bthci_evt_status
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
2584 proto_tree_add_item(tree
, hf_bthci_evt_interval
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
2587 proto_tree_add_item(tree
, hf_bthci_evt_window
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
2592 case 0x0420: /* Read LMP Handle */
2593 proto_tree_add_item(tree
, hf_bthci_evt_status
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
2596 proto_tree_add_item(tree
, hf_bthci_evt_connection_handle
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
2599 proto_tree_add_item(tree
, hf_bthci_evt_lmp_handle
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
2602 /* 4 reserved bytes */
2606 case 0x043b: /* Logical Link Cancel */
2607 proto_tree_add_item(tree
, hf_bthci_evt_status
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
2610 proto_tree_add_item(tree
, hf_bthci_evt_physical_link_handle
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
2613 proto_tree_add_item(tree
, hf_bthci_evt_flow_spec_identifier
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
2617 case 0x0809: /* Role Discovery */
2618 proto_tree_add_item(tree
, hf_bthci_evt_status
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
2621 proto_tree_add_item(tree
, hf_bthci_evt_connection_handle
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
2624 proto_tree_add_item(tree
, hf_bthci_evt_curr_role
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
2629 case 0x080c: /* Read Link Policy Settings */
2630 proto_tree_add_item(tree
, hf_bthci_evt_status
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
2633 proto_tree_add_item(tree
, hf_bthci_evt_connection_handle
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
2636 proto_tree_add_item(tree
, hf_bthci_evt_link_policy_setting_switch
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
2637 proto_tree_add_item(tree
, hf_bthci_evt_link_policy_setting_hold
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
2638 proto_tree_add_item(tree
, hf_bthci_evt_link_policy_setting_sniff
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
2639 proto_tree_add_item(tree
, hf_bthci_evt_link_policy_setting_park
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
2644 case 0x080e: /* Read Default Link Policy Settings */
2645 proto_tree_add_item(tree
, hf_bthci_evt_status
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
2648 proto_tree_add_item(tree
, hf_bthci_evt_link_policy_setting_switch
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
2649 proto_tree_add_item(tree
, hf_bthci_evt_link_policy_setting_hold
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
2650 proto_tree_add_item(tree
, hf_bthci_evt_link_policy_setting_sniff
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
2651 proto_tree_add_item(tree
, hf_bthci_evt_link_policy_setting_park
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
2656 case 0x0c09: /* Read PIN Type */
2657 proto_tree_add_item(tree
, hf_bthci_evt_status
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
2660 proto_tree_add_item(tree
, hf_bthci_evt_pin_type
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
2665 case 0x0c0d: /* Read Stored Link Key */
2666 proto_tree_add_item(tree
, hf_bthci_evt_status
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
2669 proto_tree_add_item(tree
, hf_bthci_evt_max_num_keys
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
2672 proto_tree_add_item(tree
, hf_bthci_evt_num_keys_read
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
2677 case 0x0c11: /* Write Stored Link Key */
2678 proto_tree_add_item(tree
, hf_bthci_evt_status
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
2681 proto_tree_add_item(tree
, hf_bthci_evt_num_keys_written
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
2686 case 0x0c12: /* Delete Stored Link Key */
2687 proto_tree_add_item(tree
, hf_bthci_evt_status
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
2690 proto_tree_add_item(tree
, hf_bthci_evt_num_keys_deleted
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
2695 case 0x0c14: /* Read Local Name */
2696 proto_tree_add_item(tree
, hf_bthci_evt_status
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
2699 proto_tree_add_item(tree
, hf_bthci_evt_device_name
, tvb
, offset
, 248, ENC_ASCII
|ENC_NA
);
2700 if (!pinfo
->fd
->flags
.visited
&& hci_data
!= NULL
) {
2701 wmem_tree_key_t key
[4];
2702 guint32 k_interface_id
;
2703 guint32 k_adapter_id
;
2704 guint32 k_frame_number
;
2706 localhost_name_entry_t
*localhost_name_entry
;
2708 k_interface_id
= hci_data
->interface_id
;
2709 k_adapter_id
= hci_data
->adapter_id
;
2710 k_frame_number
= pinfo
->fd
->num
;
2712 name
= tvb_get_string(wmem_packet_scope(), tvb
, offset
, 248);
2715 key
[0].key
= &k_interface_id
;
2717 key
[1].key
= &k_adapter_id
;
2719 key
[2].key
= &k_frame_number
;
2723 localhost_name_entry
= (localhost_name_entry_t
*) wmem_new(wmem_file_scope(), localhost_name_entry_t
);
2724 localhost_name_entry
->interface_id
= k_interface_id
;
2725 localhost_name_entry
->adapter_id
= k_adapter_id
;
2726 localhost_name_entry
->name
= wmem_strdup(wmem_file_scope(), name
);
2728 wmem_tree_insert32_array(hci_data
->localhost_name
, key
, localhost_name_entry
);
2734 case 0x0c19: /* Read Scan Enable */
2735 proto_tree_add_item(tree
, hf_bthci_evt_status
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
2738 proto_tree_add_item(tree
, hf_bthci_evt_scan_enable
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
2743 case 0x0c1f: /* Read Authentication Enable */
2744 proto_tree_add_item(tree
, hf_bthci_evt_status
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
2747 proto_tree_add_item(tree
, hf_bthci_evt_authentication_enable
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
2752 case 0x0c21: /* Read Encryption Mode */
2753 proto_tree_add_item(tree
, hf_bthci_evt_status
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
2756 proto_tree_add_item(tree
, hf_bthci_evt_encryption_mode
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
2761 case 0x0c23: /* Read Class of Device */
2762 proto_tree_add_item(tree
, hf_bthci_evt_status
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
2765 offset
= dissect_bthci_evt_cod(tvb
, offset
, pinfo
, tree
);
2769 case 0x0c25: /* Read Voice Setting */
2770 proto_tree_add_item(tree
, hf_bthci_evt_status
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
2773 proto_tree_add_item(tree
, hf_bthci_evt_input_unused
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
2774 proto_tree_add_item(tree
, hf_bthci_evt_input_coding
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
2775 proto_tree_add_item(tree
, hf_bthci_evt_input_data_format
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
2776 proto_tree_add_item(tree
, hf_bthci_evt_input_sample_size
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
2777 proto_tree_add_item(tree
, hf_bthci_evt_linear_pcm_bit_pos
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
2778 proto_tree_add_item(tree
, hf_bthci_evt_air_coding_format
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
2783 case 0x0c29: /* Read Num Broadcast Retransmissions */
2784 proto_tree_add_item(tree
, hf_bthci_evt_status
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
2787 proto_tree_add_item(tree
, hf_bthci_evt_num_broadcast_retransm
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
2792 case 0x0c2b: /* Read Hold Mode Activity */
2793 proto_tree_add_item(tree
, hf_bthci_evt_status
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
2796 proto_tree_add_item(tree
, hf_bthci_evt_hold_mode_act_page
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
2797 proto_tree_add_item(tree
, hf_bthci_evt_hold_mode_act_inquiry
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
2798 proto_tree_add_item(tree
, hf_bthci_evt_hold_mode_act_periodic
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
2803 case 0x0c2d: /* Read Transmit Power Level */
2804 proto_tree_add_item(tree
, hf_bthci_evt_status
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
2807 proto_tree_add_item(tree
, hf_bthci_evt_connection_handle
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
2810 proto_tree_add_item(tree
, hf_bthci_evt_transmit_power_level
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
2815 case 0x0c2e: /* Read SCO Flow Control Enable */
2816 proto_tree_add_item(tree
, hf_bthci_evt_status
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
2819 proto_tree_add_item(tree
, hf_bthci_evt_sco_flow_cont_enable
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
2825 case 0x0c38: /* Read Number of Supported IAC */
2826 proto_tree_add_item(tree
, hf_bthci_evt_status
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
2829 proto_tree_add_item(tree
, hf_bthci_evt_num_supp_iac
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
2834 case 0x0c39: /* Read Current IAC LAP */
2835 proto_tree_add_item(tree
, hf_bthci_evt_status
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
2838 num8
= tvb_get_guint8(tvb
, offset
);
2839 proto_tree_add_item(tree
, hf_bthci_evt_num_curr_iac
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
2842 for (i
=0; i
<num8
; i
++) {
2843 proto_tree_add_item(tree
, hf_bthci_evt_iac_lap
, tvb
, offset
, 3, ENC_LITTLE_ENDIAN
);
2848 case 0x0c3b: /* Read Page Scan Period Mode */
2849 proto_tree_add_item(tree
, hf_bthci_evt_status
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
2852 proto_tree_add_item(tree
, hf_bthci_evt_page_scan_period_mode
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
2857 case 0x0c3d: /* Read Page Scan Mode */
2858 proto_tree_add_item(tree
, hf_bthci_evt_status
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
2861 proto_tree_add_item(tree
, hf_bthci_evt_page_scan_mode
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
2866 case 0x0c42: /* Read Inquiry Scan Type */
2867 case 0x0c46: /* Read Page Scan Type */
2868 proto_tree_add_item(tree
, hf_bthci_evt_status
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
2870 proto_tree_add_item(tree
, hf_bthci_evt_scan_type
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
2874 case 0x0c44: /* Read Inquiry Mode */
2875 proto_tree_add_item(tree
, hf_bthci_evt_status
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
2877 proto_tree_add_item(tree
, hf_bthci_evt_inq_mode
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
2881 case 0x0c48: /* Read AFH Channel Assessment Mode */
2882 proto_tree_add_item(tree
, hf_bthci_evt_status
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
2884 proto_tree_add_item(tree
, hf_bthci_evt_afh_ch_assessment_mode
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
2888 case 0x0c51: /* Read Extended Inquiry Response */
2889 proto_tree_add_item(tree
, hf_bthci_evt_status
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
2892 proto_tree_add_item(tree
, hf_bthci_evt_fec_required
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
2895 offset
=dissect_bthci_evt_eir_ad_data(tvb
, offset
, pinfo
, tree
, 240, NULL
, hci_data
);
2898 case 0x0c55: /* Read Simple Pairing Mode */
2899 proto_tree_add_item(tree
, hf_bthci_evt_status
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
2902 proto_tree_add_item(tree
, hf_bthci_evt_simple_pairing_mode
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
2906 case 0x0c57: /* Read Local OOB Data */
2907 proto_tree_add_item(tree
, hf_bthci_evt_status
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
2909 proto_tree_add_item(tree
, hf_bthci_evt_hash_c
, tvb
, offset
, 16, ENC_NA
);
2911 proto_tree_add_item(tree
, hf_bthci_evt_randomizer_r
, tvb
, offset
, 16, ENC_NA
);
2915 case 0x0c58: /* Read Inquiry Response Tx Power Level */
2916 proto_tree_add_item(tree
, hf_bthci_evt_status
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
2918 proto_tree_add_item(tree
, hf_bthci_evt_power_level_type
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
2923 case 0x0c5a: /* Read Default Erroneous Data Reporting */
2924 proto_tree_add_item(tree
, hf_bthci_evt_status
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
2927 proto_tree_add_item(tree
, hf_bthci_evt_err_data_reporting
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
2932 case 0x0c61: /* Read Logical Link Accept Timeout */
2933 proto_tree_add_item(tree
, hf_bthci_evt_status
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
2935 item
= proto_tree_add_item(tree
, hf_bthci_evt_timeout
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
2936 proto_item_append_text(item
, " slots (%g msec)", tvb_get_letohs(tvb
, offset
)*0.625);
2940 case 0x0c64: /* Read Location Data */
2941 proto_tree_add_item(tree
, hf_bthci_evt_status
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
2943 proto_tree_add_item(tree
, hf_bthci_evt_location_domain_aware
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
2945 proto_tree_add_item(tree
, hf_bthci_evt_location_domain
, tvb
, offset
, 2, ENC_ASCII
| ENC_NA
);
2947 proto_tree_add_item(tree
, hf_bthci_evt_location_domain_options
, tvb
, offset
, 1, ENC_ASCII
| ENC_NA
);
2949 proto_tree_add_item(tree
, hf_bthci_evt_location_options
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
2953 case 0x0c66: /* Read Flow Control Mode */
2954 proto_tree_add_item(tree
, hf_bthci_evt_status
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
2956 proto_tree_add_item(tree
, hf_bthci_evt_flow_control_mode
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
2960 case 0x0c68: /* Read Enhanced Tx Power Level */
2961 proto_tree_add_item(tree
, hf_bthci_evt_status
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
2963 proto_tree_add_item(tree
, hf_bthci_evt_connection_handle
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
2965 proto_tree_add_item(tree
, hf_bthci_evt_transmit_power_level_gfsk
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
2967 proto_tree_add_item(tree
, hf_bthci_evt_transmit_power_level_dqpsk
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
2969 proto_tree_add_item(tree
, hf_bthci_evt_transmit_power_level_8dpsk
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
2973 case 0x0c69: /* Read Best Effort Timeout */
2974 proto_tree_add_item(tree
, hf_bthci_evt_status
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
2976 proto_tree_add_item(tree
, hf_bthci_evt_flush_to_us
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
2980 case 0x0c6c: /* Read LE Host Supported */
2981 proto_tree_add_item(tree
, hf_bthci_evt_status
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
2983 proto_tree_add_item(tree
, hf_bthci_evt_le_supported_host
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
2985 proto_tree_add_item(tree
, hf_bthci_evt_le_simultaneous_host
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
2989 case 0x1001: /* Read Local Version Information */
2990 proto_tree_add_item(tree
, hf_bthci_evt_status
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
2993 proto_tree_add_item(tree
, hf_bthci_evt_hci_vers_nr
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
2996 proto_tree_add_item(tree
, hf_bthci_evt_hci_revision
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
2999 proto_tree_add_item(tree
, hf_bthci_evt_vers_nr
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
3002 proto_tree_add_item(tree
, hf_bthci_evt_comp_id
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
3005 proto_tree_add_item(tree
, hf_bthci_evt_sub_vers_nr
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
3010 case 0x1002: /* Read Local Supported Commands */
3011 proto_tree_add_item(tree
, hf_bthci_evt_status
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
3014 proto_tree_add_item(tree
, hf_bthci_evt_local_supported_cmds
, tvb
, offset
, 64, ENC_NA
);
3019 case 0x1003: /* Read Local Supported Features */
3020 proto_tree_add_item(tree
, hf_bthci_evt_status
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
3023 offset
= dissect_bthci_evt_lmp_features(tvb
, offset
, pinfo
, tree
, 0);
3027 case 0x1004: /* Read Local Extended Features */
3031 proto_tree_add_item(tree
, hf_bthci_evt_status
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
3034 page_number
= tvb_get_guint8(tvb
, offset
);
3035 proto_tree_add_item(tree
, hf_bthci_evt_page_number
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
3038 proto_tree_add_item(tree
, hf_bthci_evt_max_page_number
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
3041 offset
= dissect_bthci_evt_lmp_features(tvb
, offset
, pinfo
, tree
, page_number
);
3046 case 0x1005: /* Read Buffer Size */
3047 proto_tree_add_item(tree
, hf_bthci_evt_status
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
3050 proto_tree_add_item(tree
, hf_bthci_evt_host_data_packet_length_acl
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
3053 proto_tree_add_item(tree
, hf_bthci_evt_host_data_packet_length_sco
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
3056 proto_tree_add_item(tree
, hf_bthci_evt_host_total_num_acl_data_packets
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
3059 proto_tree_add_item(tree
, hf_bthci_evt_host_total_num_sco_data_packets
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
3064 case 0x100a: /* Read Data Block Size */
3065 proto_tree_add_item(tree
, hf_bthci_evt_status
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
3067 proto_tree_add_item(tree
, hf_bthci_evt_max_acl_data_packet_length
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
3069 proto_tree_add_item(tree
, hf_bthci_evt_data_block_length
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
3071 proto_tree_add_item(tree
, hf_bthci_evt_total_num_data_blocks
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
3075 case 0x1007: /* Read Country Code */
3076 proto_tree_add_item(tree
, hf_bthci_evt_status
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
3079 proto_tree_add_item(tree
, hf_bthci_evt_country_code
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
3084 case 0x1401: /* Read Failed Contact Counter */
3085 proto_tree_add_item(tree
, hf_bthci_evt_status
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
3088 proto_tree_add_item(tree
, hf_bthci_evt_connection_handle
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
3091 proto_tree_add_item(tree
, hf_bthci_evt_failed_contact_counter
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
3096 case 0x1403: /* Get Link Quality */
3097 proto_tree_add_item(tree
, hf_bthci_evt_status
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
3100 proto_tree_add_item(tree
, hf_bthci_evt_connection_handle
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
3103 proto_tree_add_item(tree
, hf_bthci_evt_link_quality
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
3108 case 0x1405: /* Read RSSI */
3109 proto_tree_add_item(tree
, hf_bthci_evt_status
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
3112 proto_tree_add_item(tree
, hf_bthci_evt_connection_handle
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
3115 proto_tree_add_item(tree
, hf_bthci_evt_rssi
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
3120 case 0x1406: /* Read AFH Channel Map */
3121 proto_tree_add_item(tree
, hf_bthci_evt_status
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
3124 proto_tree_add_item(tree
, hf_bthci_evt_connection_handle
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
3127 proto_tree_add_item(tree
, hf_bthci_evt_afh_mode
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
3130 proto_tree_add_item(tree
, hf_bthci_evt_afh_channel_map
, tvb
, offset
, 10, ENC_NA
);
3135 case 0x1407: /* Read Clock */
3136 proto_tree_add_item(tree
, hf_bthci_evt_status
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
3139 proto_tree_add_item(tree
, hf_bthci_evt_connection_handle
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
3142 proto_tree_add_item(tree
, hf_bthci_evt_clock
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
3145 accuracy
= tvb_get_letohl(tvb
, offset
);
3146 item
= proto_tree_add_item(tree
, hf_bthci_evt_clock_accuracy
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
3147 proto_item_append_text(item
, " %g msec", accuracy
*0.3125);
3151 case 0x1408: /* Read Encryption Key Size */
3152 proto_tree_add_item(tree
, hf_bthci_evt_status
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
3154 proto_tree_add_item(tree
, hf_bthci_evt_connection_handle
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
3156 proto_tree_add_item(tree
, hf_bthci_evt_enc_key_size
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
3160 case 0x1409: /* Read Local AMP Info */
3161 proto_tree_add_item(tree
, hf_bthci_evt_status
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
3163 proto_tree_add_item(tree
, hf_bthci_evt_amp_status
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
3165 proto_tree_add_item(tree
, hf_bthci_evt_total_bandwidth
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
3167 proto_tree_add_item(tree
, hf_bthci_evt_max_guaranteed_bandwidth
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
3169 proto_tree_add_item(tree
, hf_bthci_evt_min_latency
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
3171 proto_tree_add_item(tree
, hf_bthci_evt_max_pdu_size
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
3173 proto_tree_add_item(tree
, hf_bthci_evt_amp_controller_type
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
3175 proto_tree_add_item(tree
, hf_bthci_evt_pal_capabilities_00
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
3177 proto_tree_add_item(tree
, hf_bthci_evt_max_amp_assoc_length
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
3179 proto_tree_add_item(tree
, hf_bthci_evt_max_flush_to_us
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
3181 proto_tree_add_item(tree
, hf_bthci_evt_best_effort_flush_to_us
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
3185 case 0x140a: /* Read Local AMP Assoc */
3186 proto_tree_add_item(tree
, hf_bthci_evt_status
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
3188 proto_tree_add_item(tree
, hf_bthci_evt_physical_link_handle
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
3190 proto_tree_add_item(tree
, hf_bthci_evt_amp_remaining_assoc_length
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
3192 proto_tree_add_item(tree
, hf_bthci_evt_amp_assoc_fragment
, tvb
, offset
, -1, ENC_NA
);
3193 offset
+=tvb_length_remaining(tvb
, offset
);
3196 case 0x140b: /* Write Remote AMP Assoc */
3197 proto_tree_add_item(tree
, hf_bthci_evt_status
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
3199 proto_tree_add_item(tree
, hf_bthci_evt_physical_link_handle
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
3203 case 0x1801: /* Read Loopback Mode */
3204 proto_tree_add_item(tree
, hf_bthci_evt_status
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
3206 proto_tree_add_item(tree
, hf_bthci_evt_loopback_mode
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
3210 case 0x2002: /* LE Read Buffer Size */
3211 proto_tree_add_item(tree
, hf_bthci_evt_status
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
3213 item
= proto_tree_add_item(tree
, hf_bthci_evt_le_acl_data_pkt_len
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
3214 if( (tvb_get_letohs(tvb
, offset
) == 0) && (tvb_get_guint8(tvb
, offset
+2) == 0) )
3215 proto_item_append_text(item
, " (buffers shared between BR/EDR and LE) ");
3217 proto_tree_add_item(tree
, hf_bthci_evt_total_num_le_acl_data_pkts
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
3221 case 0x2003: /* LE Read Local Supported Features */
3222 proto_tree_add_item(tree
, hf_bthci_evt_status
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
3226 proto_item
*ti_le_features
;
3227 proto_item
*ti_le_subtree
;
3229 ti_le_features
= proto_tree_add_item(tree
, hf_bthci_evt_le_features
, tvb
, offset
, 8, ENC_NA
);
3230 ti_le_subtree
= proto_item_add_subtree(ti_le_features
, ett_lmp_subtree
);
3232 proto_tree_add_item(ti_le_subtree
,hf_bthci_evt_le_feature_00
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
3236 case 0x2007: /* LE Read Advertising Channel Tx Power */
3238 proto_tree_add_item(tree
, hf_bthci_evt_status
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
3240 proto_tree_add_item(tree
, hf_bthci_evt_transmit_power_level
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
3245 case 0x200f: /* LE Read White List Size */
3247 proto_tree_add_item(tree
, hf_bthci_evt_status
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
3249 proto_tree_add_item(tree
, hf_bthci_evt_white_list_size
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
3254 case 0x2015: /* LE Read Channel Map */
3256 proto_tree_add_item(tree
, hf_bthci_evt_status
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
3258 proto_tree_add_item(tree
, hf_bthci_evt_connection_handle
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
3260 proto_tree_add_item(tree
, hf_bthci_evt_le_channel_map
, tvb
, offset
, 1, ENC_NA
);
3265 case 0x2017: /* LE Encrypt */
3267 proto_tree_add_item(tree
, hf_bthci_evt_status
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
3269 proto_tree_add_item(tree
, hf_bthci_evt_encrypted_data
, tvb
, offset
, 16, ENC_NA
);
3274 case 0x2018: /* LE Rand */
3276 proto_tree_add_item(tree
, hf_bthci_evt_status
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
3278 proto_tree_add_item(tree
, hf_bthci_evt_random_number
, tvb
, offset
, 8, ENC_NA
);
3283 case 0x201c: /* LE Read Supported States */
3285 proto_item
*ti_le_states
;
3286 proto_item
*ti_le_states_subtree
;
3288 proto_tree_add_item(tree
, hf_bthci_evt_status
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
3291 ti_le_states
=proto_tree_add_item(tree
, hf_bthci_evt_le_states
, tvb
, offset
, 8, ENC_NA
);
3292 ti_le_states_subtree
=proto_item_add_subtree(ti_le_states
, ett_le_state_subtree
);
3294 proto_tree_add_item(ti_le_states_subtree
,hf_bthci_evt_le_states_00
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
3295 proto_tree_add_item(ti_le_states_subtree
,hf_bthci_evt_le_states_01
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
3296 proto_tree_add_item(ti_le_states_subtree
,hf_bthci_evt_le_states_02
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
3297 proto_tree_add_item(ti_le_states_subtree
,hf_bthci_evt_le_states_03
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
3298 proto_tree_add_item(ti_le_states_subtree
,hf_bthci_evt_le_states_04
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
3299 proto_tree_add_item(ti_le_states_subtree
,hf_bthci_evt_le_states_05
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
3300 proto_tree_add_item(ti_le_states_subtree
,hf_bthci_evt_le_states_06
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
3301 proto_tree_add_item(ti_le_states_subtree
,hf_bthci_evt_le_states_07
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
3303 proto_tree_add_item(ti_le_states_subtree
,hf_bthci_evt_le_states_10
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
3304 proto_tree_add_item(ti_le_states_subtree
,hf_bthci_evt_le_states_11
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
3305 proto_tree_add_item(ti_le_states_subtree
,hf_bthci_evt_le_states_12
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
3306 proto_tree_add_item(ti_le_states_subtree
,hf_bthci_evt_le_states_13
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
3307 proto_tree_add_item(ti_le_states_subtree
,hf_bthci_evt_le_states_14
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
3308 proto_tree_add_item(ti_le_states_subtree
,hf_bthci_evt_le_states_15
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
3309 proto_tree_add_item(ti_le_states_subtree
,hf_bthci_evt_le_states_16
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
3310 proto_tree_add_item(ti_le_states_subtree
,hf_bthci_evt_le_states_17
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
3312 proto_tree_add_item(ti_le_states_subtree
,hf_bthci_evt_le_states_20
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
3313 proto_tree_add_item(ti_le_states_subtree
,hf_bthci_evt_le_states_21
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
3314 proto_tree_add_item(ti_le_states_subtree
,hf_bthci_evt_le_states_22
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
3315 proto_tree_add_item(ti_le_states_subtree
,hf_bthci_evt_le_states_23
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
3316 proto_tree_add_item(ti_le_states_subtree
,hf_bthci_evt_le_states_24
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
3317 proto_tree_add_item(ti_le_states_subtree
,hf_bthci_evt_le_states_25
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
3318 proto_tree_add_item(ti_le_states_subtree
,hf_bthci_evt_le_states_26
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
3319 proto_tree_add_item(ti_le_states_subtree
,hf_bthci_evt_le_states_27
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
3321 proto_tree_add_item(ti_le_states_subtree
,hf_bthci_evt_le_states_30
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
3322 proto_tree_add_item(ti_le_states_subtree
,hf_bthci_evt_le_states_31
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
3323 proto_tree_add_item(ti_le_states_subtree
,hf_bthci_evt_le_states_32
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
3324 proto_tree_add_item(ti_le_states_subtree
,hf_bthci_evt_le_states_33
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
3325 proto_tree_add_item(ti_le_states_subtree
,hf_bthci_evt_le_states_34
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
3330 case 0x201f: /* LE Test End */
3332 proto_tree_add_item(tree
, hf_bthci_evt_status
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
3334 proto_tree_add_item(tree
, hf_bthci_evt_le_num_packets
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
3340 proto_tree_add_item(tree
, hf_bthci_evt_ret_params
, tvb
, offset
, -1, ENC_NA
);
3341 offset
+=tvb_length_remaining(tvb
, offset
);
3349 dissect_bthci_evt_qos_setup_complete(tvbuff_t
*tvb
, int offset
, packet_info
*pinfo _U_
, proto_tree
*tree
)
3351 proto_tree_add_item(tree
, hf_bthci_evt_status
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
3354 proto_tree_add_item(tree
, hf_bthci_evt_connection_handle
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
3357 proto_tree_add_item(tree
, hf_bthci_evt_flags
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
3360 proto_tree_add_item(tree
, hf_bthci_evt_service_type
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
3363 proto_tree_add_item(tree
, hf_bthci_evt_token_rate
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
3366 proto_tree_add_item(tree
, hf_bthci_evt_peak_bandwidth
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
3369 proto_tree_add_item(tree
, hf_bthci_evt_latency
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
3372 proto_tree_add_item(tree
, hf_bthci_evt_delay_variation
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
3379 dissect_bthci_evt_change_conn_link_key_complete(tvbuff_t
*tvb
, int offset
, packet_info
*pinfo _U_
, proto_tree
*tree
)
3381 proto_tree_add_item(tree
, hf_bthci_evt_status
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
3384 proto_tree_add_item(tree
, hf_bthci_evt_connection_handle
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
3391 dissect_bthci_evt_master_link_key_complete(tvbuff_t
*tvb
, int offset
, packet_info
*pinfo _U_
, proto_tree
*tree
)
3393 proto_tree_add_item(tree
, hf_bthci_evt_status
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
3396 proto_tree_add_item(tree
, hf_bthci_evt_connection_handle
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
3399 proto_tree_add_item(tree
, hf_bthci_evt_key_flag
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
3406 dissect_bthci_evt_encryption_change(tvbuff_t
*tvb
, int offset
, packet_info
*pinfo _U_
, proto_tree
*tree
)
3408 proto_tree_add_item(tree
, hf_bthci_evt_status
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
3411 proto_tree_add_item(tree
, hf_bthci_evt_connection_handle
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
3414 proto_tree_add_item(tree
, hf_bthci_evt_encryption_enable
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
3421 dissect_bthci_evt_read_remote_ext_features_complete(tvbuff_t
*tvb
, int offset
, packet_info
*pinfo
, proto_tree
*tree
)
3425 proto_tree_add_item(tree
, hf_bthci_evt_status
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
3428 proto_tree_add_item(tree
, hf_bthci_evt_connection_handle
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
3431 page_number
= tvb_get_guint8(tvb
, offset
);
3432 proto_tree_add_item(tree
, hf_bthci_evt_page_number
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
3435 proto_tree_add_item(tree
, hf_bthci_evt_max_page_number
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
3438 offset
= dissect_bthci_evt_lmp_features(tvb
, offset
, pinfo
, tree
, page_number
);
3444 dissect_bthci_evt_sync_connection_complete(tvbuff_t
*tvb
, int offset
, packet_info
*pinfo
, proto_tree
*tree
)
3448 proto_tree_add_item(tree
, hf_bthci_evt_status
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
3451 proto_tree_add_item(tree
, hf_bthci_evt_connection_handle
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
3454 offset
= dissect_bthci_evt_bd_addr(tvb
, offset
, pinfo
, tree
, NULL
);
3456 proto_tree_add_item(tree
, hf_bthci_evt_sync_link_type
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
3459 item
= proto_tree_add_item(tree
, hf_bthci_evt_sync_tx_interval
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
3460 proto_item_append_text(item
, " slots (%g msec)", tvb_get_guint8(tvb
, offset
)*0.625);
3463 item
= proto_tree_add_item(tree
, hf_bthci_evt_sync_rtx_window
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
3464 proto_item_append_text(item
, " slots (%g msec)", tvb_get_guint8(tvb
, offset
)*0.625);
3467 proto_tree_add_item(tree
, hf_bthci_evt_sync_rx_packet_length
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
3470 proto_tree_add_item(tree
, hf_bthci_evt_sync_tx_packet_length
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
3473 proto_tree_add_item(tree
, hf_bthci_evt_air_mode
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
3480 dissect_bthci_evt_sync_connection_changed(tvbuff_t
*tvb
, int offset
, packet_info
*pinfo _U_
, proto_tree
*tree
)
3484 proto_tree_add_item(tree
, hf_bthci_evt_status
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
3487 proto_tree_add_item(tree
, hf_bthci_evt_connection_handle
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
3490 item
= proto_tree_add_item(tree
, hf_bthci_evt_sync_tx_interval
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
3491 proto_item_append_text(item
, " slots (%g msec)", tvb_get_guint8(tvb
, offset
)*0.625);
3494 item
= proto_tree_add_item(tree
, hf_bthci_evt_sync_rtx_window
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
3495 proto_item_append_text(item
, " slots (%g msec)", tvb_get_guint8(tvb
, offset
)*0.625);
3498 proto_tree_add_item(tree
, hf_bthci_evt_sync_rx_packet_length
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
3501 proto_tree_add_item(tree
, hf_bthci_evt_sync_tx_packet_length
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
3508 dissect_bthci_evt_sniff_subrating(tvbuff_t
*tvb
, int offset
, packet_info
*pinfo _U_
, proto_tree
*tree
)
3512 proto_tree_add_item(tree
, hf_bthci_evt_status
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
3515 proto_tree_add_item(tree
, hf_bthci_evt_connection_handle
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
3518 item
= proto_tree_add_item(tree
, hf_bthci_evt_max_tx_latency
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
3519 proto_item_append_text(item
, " slots (%g msec)", tvb_get_letohs(tvb
, offset
)*0.625);
3522 item
= proto_tree_add_item(tree
, hf_bthci_evt_max_rx_latency
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
3523 proto_item_append_text(item
, " slots (%g msec)", tvb_get_letohs(tvb
, offset
)*0.625);
3526 item
= proto_tree_add_item(tree
, hf_bthci_evt_min_remote_timeout
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
3527 proto_item_append_text(item
, " slots (%g msec)", tvb_get_letohs(tvb
, offset
)*0.625);
3530 item
= proto_tree_add_item(tree
, hf_bthci_evt_min_local_timeout
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
3531 proto_item_append_text(item
, " slots (%g msec)", tvb_get_letohs(tvb
, offset
)*0.625);
3538 dissect_bthci_evt_flow_specification_complete(tvbuff_t
*tvb
, int offset
, packet_info
*pinfo _U_
, proto_tree
*tree
)
3540 proto_tree_add_item(tree
, hf_bthci_evt_status
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
3543 proto_tree_add_item(tree
, hf_bthci_evt_connection_handle
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
3546 proto_tree_add_item(tree
, hf_bthci_evt_flags
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
3549 proto_tree_add_item(tree
, hf_bthci_evt_flow_direction
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
3552 proto_tree_add_item(tree
, hf_bthci_evt_service_type
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
3555 proto_tree_add_item(tree
, hf_bthci_evt_token_rate
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
3558 proto_tree_add_item(tree
, hf_bthci_evt_token_bucket_size
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
3561 proto_tree_add_item(tree
, hf_bthci_evt_peak_bandwidth
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
3564 proto_tree_add_item(tree
, hf_bthci_evt_latency
, tvb
, offset
, 4, ENC_LITTLE_ENDIAN
);
3571 dissect_bthci_evt_enhanced_flush_complete(tvbuff_t
*tvb
, int offset
, packet_info
*pinfo _U_
, proto_tree
*tree
)
3573 proto_tree_add_item(tree
, hf_bthci_evt_connection_handle
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
3580 dissect_bthci_evt_encryption_key_refresh_complete(tvbuff_t
*tvb
, int offset
, packet_info
*pinfo _U_
, proto_tree
*tree
)
3582 proto_tree_add_item(tree
, hf_bthci_evt_status
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
3585 proto_tree_add_item(tree
, hf_bthci_evt_connection_handle
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
3592 dissect_bthci_evt_link_supervision_timeout_changed(tvbuff_t
*tvb
, int offset
, packet_info
*pinfo _U_
, proto_tree
*tree
)
3596 proto_tree_add_item(tree
, hf_bthci_evt_connection_handle
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
3599 item
= proto_tree_add_item(tree
, hf_bthci_evt_link_supervision_timeout
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
3600 proto_item_append_text(item
, " slots (%g msec)", tvb_get_letohs(tvb
, offset
)*0.625);
3607 dissect_bthci_evt_inq_result(tvbuff_t
*tvb
, int offset
, packet_info
*pinfo
, proto_tree
*tree
)
3609 guint8 num
, evt_num_responses
;
3611 evt_num_responses
= tvb_get_guint8(tvb
, offset
);
3612 proto_tree_add_item(tree
, hf_bthci_evt_num_responses
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
3615 for(num
=0;num
<evt_num_responses
;num
++){
3616 offset
= dissect_bthci_evt_bd_addr(tvb
, offset
, pinfo
, tree
, NULL
);
3618 proto_tree_add_item(tree
, hf_bthci_evt_page_scan_repetition_mode
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
3621 proto_tree_add_item(tree
, hf_bthci_evt_page_scan_period_mode
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
3624 proto_tree_add_item(tree
, hf_bthci_evt_page_scan_mode
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
3627 offset
= dissect_bthci_evt_cod(tvb
, offset
, pinfo
, tree
);
3629 proto_tree_add_item(tree
, hf_bthci_evt_clock_offset
, tvb
, offset
, 2, ENC_LITTLE_ENDIAN
);
3637 /* Code to actually dissect the packets */
3639 dissect_bthci_evt(tvbuff_t
*tvb
, packet_info
*pinfo
, proto_tree
*tree
, void *data
)
3642 proto_tree
*bthci_evt_tree
;
3643 guint8 param_length
, evt_code
;
3646 hci_data_t
*hci_data
;
3648 ti
= proto_tree_add_item(tree
, proto_bthci_evt
, tvb
, offset
, -1, ENC_NA
);
3649 bthci_evt_tree
= proto_item_add_subtree(ti
, ett_bthci_evt
);
3651 switch (pinfo
->p2p_dir
) {
3653 col_set_str(pinfo
->cinfo
, COL_INFO
, "Sent ");
3656 col_set_str(pinfo
->cinfo
, COL_INFO
, "Rcvd ");
3659 col_add_fstr(pinfo
->cinfo
, COL_INFO
, "Unknown direction %d ",
3664 hci_data
= (hci_data_t
*) data
;
3665 DISSECTOR_ASSERT(hci_data
);
3667 evt_code
= tvb_get_guint8(tvb
, offset
);
3668 proto_tree_add_item(bthci_evt_tree
, hf_bthci_evt_code
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
3669 proto_item_append_text(bthci_evt_tree
, " - %s", val_to_str_const(evt_code
, evt_code_vals
, "Unknown 0x%08x"));
3672 param_length
= tvb_get_guint8(tvb
, offset
);
3673 proto_tree_add_item(bthci_evt_tree
, hf_bthci_evt_param_length
, tvb
, offset
, 1, ENC_LITTLE_ENDIAN
);
3677 col_set_str(pinfo
->cinfo
, COL_PROTOCOL
, "HCI_EVT");
3679 col_append_str(pinfo
->cinfo
, COL_INFO
, val_to_str_const(evt_code
, evt_code_vals
, "Unknown 0x%08x"));
3681 if (param_length
> 0) {
3683 case 0x01: /* Inquiry Complete */
3684 offset
=dissect_bthci_evt_inq_complete(tvb
, offset
, pinfo
, bthci_evt_tree
);
3687 case 0x02: /* Inquiry result event */
3688 offset
=dissect_bthci_evt_inq_result(tvb
, offset
, pinfo
, bthci_evt_tree
);
3691 case 0x03: /* Connection Complete */
3692 offset
=dissect_bthci_evt_conn_complete(tvb
, offset
, pinfo
, bthci_evt_tree
, hci_data
);
3695 case 0x04: /* Connection Request */
3696 offset
=dissect_bthci_evt_conn_request(tvb
, offset
, pinfo
, bthci_evt_tree
);
3699 case 0x05: /* Disconnection Complete */
3700 offset
=dissect_bthci_evt_disconn_complete(tvb
, offset
, pinfo
, bthci_evt_tree
);
3703 case 0x06: /* Authentication Complete */
3704 offset
=dissect_bthci_evt_auth_complete(tvb
, offset
, pinfo
, bthci_evt_tree
);
3707 case 0x07: /* Remote Name Request Complete */
3708 offset
=dissect_bthci_evt_remote_name_req_complete(tvb
, offset
, pinfo
, bthci_evt_tree
, hci_data
);
3711 case 0x08: /* Encryption Change */
3712 offset
=dissect_bthci_evt_encryption_change(tvb
, offset
, pinfo
, bthci_evt_tree
);
3715 case 0x09: /* Change Connection Link Key Complete */
3716 offset
=dissect_bthci_evt_change_conn_link_key_complete(tvb
, offset
, pinfo
, bthci_evt_tree
);
3719 case 0x0a: /* Master Link Key Complete */
3720 offset
=dissect_bthci_evt_master_link_key_complete(tvb
, offset
, pinfo
, bthci_evt_tree
);
3723 case 0x0b: /* Read Remote Support Features Complete */
3724 offset
=dissect_bthci_evt_read_remote_support_features_complete(tvb
, offset
, pinfo
, bthci_evt_tree
);
3727 case 0x0c: /* Read Remote Version Information Complete */
3728 offset
=dissect_bthci_evt_read_remote_version_information_complete(tvb
, offset
, pinfo
, bthci_evt_tree
);
3731 case 0x0d: /* QoS Setup Complete */
3732 offset
=dissect_bthci_evt_qos_setup_complete(tvb
, offset
, pinfo
, bthci_evt_tree
);
3735 case 0x0e: /* Command Complete */
3736 offset
=dissect_bthci_evt_command_complete(tvb
, offset
, pinfo
, bthci_evt_tree
, hci_data
);
3739 case 0x0f: /* Command Status */
3740 offset
=dissect_bthci_evt_command_status(tvb
, offset
, pinfo
, bthci_evt_tree
);
3743 case 0x10: /* Hardware Error */
3744 offset
=dissect_bthci_evt_hardware_error(tvb
, offset
, pinfo
, bthci_evt_tree
);
3747 case 0x11: /* Flush Occurred */
3748 offset
=dissect_bthci_evt_flush_occured(tvb
, offset
, pinfo
, bthci_evt_tree
);
3751 case 0x12: /* Role Change */
3752 offset
=dissect_bthci_evt_role_change(tvb
, offset
, pinfo
, bthci_evt_tree
);
3755 case 0x13: /* Number Of Completed Packets */
3756 offset
=dissect_bthci_evt_number_of_completed_packets(tvb
, offset
, pinfo
, bthci_evt_tree
);
3759 case 0x14: /* Mode Change */
3760 offset
=dissect_bthci_evt_mode_change(tvb
, offset
, pinfo
, bthci_evt_tree
);
3763 case 0x15: /* Return Link Keys */
3764 offset
=dissect_bthci_evt_return_link_keys(tvb
, offset
, pinfo
, bthci_evt_tree
);
3767 case 0x16: /* PIN Code Request */
3768 offset
=dissect_bthci_evt_pin_code_request(tvb
, offset
, pinfo
, bthci_evt_tree
);
3771 case 0x17: /* Link Key Request */
3772 offset
=dissect_bthci_evt_link_key_request(tvb
, offset
, pinfo
, bthci_evt_tree
);
3775 case 0x18: /* Link Key Notification */
3776 offset
=dissect_bthci_evt_link_key_notification(tvb
, offset
, pinfo
, bthci_evt_tree
);
3779 case 0x19: /* Loopback Command */
3780 offset
=dissect_bthci_evt_loopback_command(tvb
, offset
, pinfo
, bthci_evt_tree
, hci_data
);
3783 case 0x1a: /* Data Buffer Overflow */
3784 offset
=dissect_bthci_evt_data_buffer_overflow(tvb
, offset
, pinfo
, bthci_evt_tree
);
3787 case 0x1b: /* Max Slots Change */
3788 offset
=dissect_bthci_evt_max_slots_change(tvb
, offset
, pinfo
, bthci_evt_tree
);
3791 case 0x1c: /* Read Clock Offset Complete */
3792 offset
=dissect_bthci_evt_read_clock_offset_complete(tvb
, offset
, pinfo
, bthci_evt_tree
);
3795 case 0x1d: /* Connection Packet Type Changed */
3796 offset
=dissect_bthci_evt_conn_packet_type_changed(tvb
, offset
, pinfo
, bthci_evt_tree
);
3799 case 0x1e: /* QoS Violation */
3800 offset
=dissect_bthci_evt_qos_violation(tvb
, offset
, pinfo
, bthci_evt_tree
);
3803 case 0x1f: /* Page Scan Mode Change */
3804 offset
=dissect_bthci_evt_page_scan_mode_change(tvb
, offset
, pinfo
, bthci_evt_tree
);
3807 case 0x20: /* Page Scan Repetition Mode Change */
3808 offset
=dissect_bthci_evt_page_scan_repetition_mode_change(tvb
, offset
, pinfo
, bthci_evt_tree
);
3811 case 0x21: /* Flow Specification Complete */
3812 offset
=dissect_bthci_evt_flow_specification_complete(tvb
, offset
, pinfo
, bthci_evt_tree
);
3815 case 0x22: /* Inquiry Result with RSSI */
3816 offset
=dissect_bthci_evt_inq_result_with_rssi(tvb
, offset
, pinfo
, bthci_evt_tree
, NULL
);
3819 case 0x23: /* Read Remote Extended Features Complete */
3820 offset
=dissect_bthci_evt_read_remote_ext_features_complete(tvb
, offset
, pinfo
, bthci_evt_tree
);
3823 case 0x2c: /* Synchronous Connection Complete */
3824 offset
=dissect_bthci_evt_sync_connection_complete(tvb
, offset
, pinfo
, bthci_evt_tree
);
3827 case 0x2d: /* Synchronous Connection Changed */
3828 offset
=dissect_bthci_evt_sync_connection_changed(tvb
, offset
, pinfo
, bthci_evt_tree
);
3831 case 0x2e: /* Sniff Subrating */
3832 offset
=dissect_bthci_evt_sniff_subrating(tvb
, offset
, pinfo
, bthci_evt_tree
);
3835 case 0x2f: /* Extended Inquiry Result */
3836 /* TODO: Get bd_addr from first and pass to second*/
3837 offset
= dissect_bthci_evt_inq_result_with_rssi(tvb
, offset
, pinfo
, bthci_evt_tree
, bd_addr
);
3838 offset
= dissect_bthci_evt_eir_ad_data(tvb
, offset
, pinfo
, bthci_evt_tree
, 240, bd_addr
, hci_data
);
3841 case 0x30: /* Encryption Key Refresh Complete */
3842 offset
=dissect_bthci_evt_encryption_key_refresh_complete(tvb
, offset
, pinfo
, bthci_evt_tree
);
3845 case 0x31: /* IO Capability Request */
3846 offset
=dissect_bthci_evt_io_capability_request(tvb
, offset
, pinfo
, bthci_evt_tree
);
3849 case 0x32: /* IO Capability Response */
3850 offset
=dissect_bthci_evt_io_capability_response(tvb
, offset
, pinfo
, bthci_evt_tree
);
3853 case 0x33: /* User Confirmation Request */
3854 offset
=dissect_bthci_evt_user_confirmation_request(tvb
, offset
, pinfo
, bthci_evt_tree
);
3857 case 0x34: /* User Passkey Request */
3858 offset
=dissect_bthci_evt_user_passkey_request(tvb
, offset
, pinfo
, bthci_evt_tree
);
3861 case 0x35: /* Remote OOB Data Request */
3862 offset
=dissect_bthci_evt_remote_oob_data_request(tvb
, offset
, pinfo
, bthci_evt_tree
);
3865 case 0x36: /* Simple Pairing Complete */
3866 offset
=dissect_bthci_evt_simple_pairing_complete(tvb
, offset
, pinfo
, bthci_evt_tree
);
3869 case 0x38: /* Link Supervision Timeout Changed */
3870 offset
=dissect_bthci_evt_link_supervision_timeout_changed(tvb
, offset
, pinfo
, bthci_evt_tree
);
3873 case 0x39: /* Enhanced Flush Complete */
3874 offset
=dissect_bthci_evt_enhanced_flush_complete(tvb
, offset
, pinfo
, bthci_evt_tree
);
3877 case 0x3b: /* Enhanced Flush Complete */
3878 offset
=dissect_bthci_evt_user_passkey_notification(tvb
, offset
, pinfo
, bthci_evt_tree
);
3881 case 0x3c: /* Enhanced Flush Complete */
3882 offset
=dissect_bthci_evt_keypress_notification(tvb
, offset
, pinfo
, bthci_evt_tree
);
3885 case 0x3d: /* Remote Host Supported Features Notification */
3886 offset
=dissect_bthci_evt_remote_host_sup_feat_notification(tvb
, offset
, pinfo
, bthci_evt_tree
);
3889 case 0x3e: /* LE Meta */
3890 offset
=dissect_bthci_evt_le_meta(tvb
, offset
, pinfo
, bthci_evt_tree
, hci_data
);
3893 case 0x40: /* Physical Link Complete */
3894 offset
=dissect_bthci_evt_physical_link_complete(tvb
, offset
, pinfo
, bthci_evt_tree
);
3897 case 0x41: /* Channel Selected */
3898 case 0x44: /* Physical Link Recovery */
3899 offset
=dissect_bthci_evt_channel_select_physical_link_recovery(tvb
, offset
, pinfo
, bthci_evt_tree
);
3902 case 0x42: /* Disconnect Physical Link Complete */
3903 offset
=dissect_bthci_evt_disconnect_physical_link_complete(tvb
, offset
, pinfo
, bthci_evt_tree
);
3906 case 0x43: /* Physical Link Loss Early Warning */
3907 offset
=dissect_bthci_evt_physical_link_loss_early_warning(tvb
, offset
, pinfo
, bthci_evt_tree
);
3910 case 0x45: /* Logical Link Complete */
3911 offset
=dissect_bthci_evt_logical_link_complete(tvb
, offset
, pinfo
, bthci_evt_tree
);
3914 case 0x46: /* Disconnect Logical Link Complete */
3915 offset
=dissect_bthci_evt_disconnect_logical_link_complete(tvb
, offset
, pinfo
, bthci_evt_tree
);
3918 case 0x47: /* Flow Spec Modify Complete */
3919 offset
=dissect_bthci_evt_flow_spec_modify_complete(tvb
, offset
, pinfo
, bthci_evt_tree
);
3922 case 0x48: /* Number Of Completed Data Blocks */
3923 offset
=dissect_bthci_evt_num_completed_data_blocks(tvb
, offset
, pinfo
, bthci_evt_tree
);
3926 case 0x49: /* AMP Start Test */
3927 case 0x4a: /* AMP Test End */
3928 offset
=dissect_bthci_evt_amp_start_stop_test(tvb
, offset
, pinfo
, bthci_evt_tree
);
3931 case 0x4b: /* AMP Receiver Test */
3932 offset
=dissect_bthci_evt_amp_receiver_test(tvb
, offset
, pinfo
, bthci_evt_tree
);
3935 case 0x4c: /* Short Range Mode Change Complete */
3936 offset
=dissect_bthci_evt_short_range_mode_change_complete(tvb
, offset
, pinfo
, bthci_evt_tree
);
3939 case 0x4d: /* AMP Status Change */
3940 offset
=dissect_bthci_evt_amp_status_change(tvb
, offset
, pinfo
, bthci_evt_tree
);
3943 case 0x4e: /* Triggered Clock Capture */
3944 case 0x4f: /* Synchronization Train Complete */
3945 case 0x50: /* Synchronization Train Received */
3946 case 0x51: /* Connectionless Slave Broadcast Receive */
3947 case 0x52: /* Connectionless Slave Broadcast Timeout */
3948 case 0x53: /* Truncated Page Complete */
3949 case 0x54: /* Slave Page Response Timeout */
3950 case 0x55: /* Connectionless Slave Broadcast Channel Map Change */
3951 case 0x56: /* Inquiry Response Notification */
3952 case 0xfe: /* Bluetooth Logo Testing */
3953 case 0xff: /* Vendor-Specific */
3954 /* TODO: Implement above cases */
3955 proto_tree_add_expert(bthci_evt_tree
, pinfo
, &ei_event_undecoded
, tvb
, offset
, -1);
3956 offset
+= tvb_length_remaining(tvb
, offset
);
3960 proto_tree_add_expert(bthci_evt_tree
, pinfo
, &ei_event_unknown
, tvb
, offset
, -1);
3961 offset
+= tvb_length_remaining(tvb
, offset
);
3971 /* Register the protocol with Wireshark */
3973 /* this format is require because a script is used to build the C function
3974 that calls all the protocol registration.
3978 proto_register_bthci_evt(void)
3981 expert_module_t
*expert_bthci_evt
;
3983 /* Setup list of header fields See Section 1.6.1 for details*/
3984 static hf_register_info hf
[] = {
3985 { &hf_bthci_evt_code
,
3986 { "Event Code", "bthci_evt.code",
3987 FT_UINT8
, BASE_HEX
, VALS(evt_code_vals
), 0x0,
3990 { &hf_bthci_evt_param_length
,
3991 { "Parameter Total Length", "bthci_evt.param_length",
3992 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
3995 { &hf_bthci_evt_num_command_packets
,
3996 { "Number of Allowed Command Packets", "bthci_evt.num_command_packets",
3997 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
4000 { &hf_bthci_evt_num_handles
,
4001 { "Number of Connection Handles", "bthci_evt.num_handles",
4002 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
4003 "Number of Connection Handles and Num_HCI_Data_Packets parameter pairs", HFILL
}
4005 { &hf_bthci_evt_connection_handle
,
4006 { "Connection Handle", "bthci_evt.connection_handle",
4007 FT_UINT16
, BASE_HEX
, NULL
, 0x0,
4011 { &hf_bthci_evt_num_compl_packets
,
4012 { "Number of Completed Packets", "bthci_evt.num_compl_packets",
4013 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
4014 "The number of HCI Data Packets that have been completed", HFILL
}
4017 { &hf_bthci_evt_opcode
,
4018 { "Command Opcode", "bthci_evt.opcode",
4019 FT_UINT16
, BASE_HEX
|BASE_EXT_STRING
, &bthci_cmd_opcode_vals_ext
, 0x0,
4020 "HCI Command Opcode", HFILL
}
4022 { &hf_bthci_evt_ogf
,
4023 { "Opcode Group Field", "bthci_evt.opcode.ogf",
4024 FT_UINT16
, BASE_HEX
|BASE_EXT_STRING
, &bthci_ogf_vals_ext
, 0xfc00,
4027 { &hf_bthci_evt_ocf_link_control
,
4028 { "Opcode Command Field", "bthci_evt.opcode.ocf",
4029 FT_UINT16
, BASE_HEX
| BASE_EXT_STRING
, &bthci_cmd_ocf_link_control_vals_ext
, 0x03ff,
4032 { &hf_bthci_evt_ocf_link_policy
,
4033 { "Opcode Command Field", "bthci_evt.opcode.ocf",
4034 FT_UINT16
, BASE_HEX
| BASE_EXT_STRING
, &bthci_cmd_ocf_link_policy_vals_ext
, 0x03ff,
4037 { &hf_bthci_evt_ocf_host_controller_and_baseband
,
4038 { "Opcode Command Field", "bthci_evt.opcode.ocf",
4039 FT_UINT16
, BASE_HEX
| BASE_EXT_STRING
, &bthci_cmd_ocf_host_controller_and_baseband_vals_ext
, 0x03ff,
4042 { &hf_bthci_evt_ocf_informational
,
4043 { "Opcode Command Field", "bthci_evt.opcode.ocf",
4044 FT_UINT16
, BASE_HEX
| BASE_EXT_STRING
, &bthci_cmd_ocf_informational_vals_ext
, 0x03ff,
4047 { &hf_bthci_evt_ocf_status
,
4048 { "Opcode Command Field", "bthci_evt.opcode.ocf",
4049 FT_UINT16
, BASE_HEX
| BASE_EXT_STRING
, &bthci_cmd_ocf_status_vals_ext
, 0x03ff,
4052 { &hf_bthci_evt_ocf_testing
,
4053 { "Opcode Command Field", "bthci_evt.opcode.ocf",
4054 FT_UINT16
, BASE_HEX
| BASE_EXT_STRING
, &bthci_cmd_ocf_testing_vals_ext
, 0x03ff,
4057 { &hf_bthci_evt_ocf_low_energy
,
4058 { "Opcode Command Field", "bthci_evt.opcode.ocf",
4059 FT_UINT16
, BASE_HEX
| BASE_EXT_STRING
, &bthci_cmd_ocf_low_energy_vals_ext
, 0x03ff,
4062 { &hf_bthci_evt_ocf_logo_testing
,
4063 { "Opcode Command Field", "bthci_evt.opcode.ocf",
4064 FT_UINT16
, BASE_HEX
, NULL
, 0x03ff,
4067 { &hf_bthci_evt_ocf
,
4068 { "Opcode Command Field", "bthci_evt.opcode.ocf",
4069 FT_UINT16
, BASE_HEX
, NULL
, 0x03ff,
4072 { &hf_bthci_evt_ret_params
,
4073 { "Return Parameter", "bthci_evt.ret_params",
4074 FT_NONE
, BASE_NONE
, NULL
, 0x0,
4077 { &hf_bthci_evt_status
,
4078 { "Status", "bthci_evt.status",
4079 FT_UINT8
, BASE_HEX
|BASE_EXT_STRING
, &bthci_cmd_status_vals_ext
, 0x0,
4082 { &hf_bthci_evt_status_pending
,
4083 { "Status", "bthci_evt.status",
4084 FT_UINT8
, BASE_HEX
, VALS(bthci_cmd_status_pending_vals
), 0x0,
4087 { &hf_bthci_evt_bd_addr
,
4088 { "BD_ADDR", "bthci_evt.bd_addr",
4089 FT_ETHER
, BASE_NONE
, NULL
, 0x0,
4090 "Bluetooth Device Address", HFILL
}
4092 { &hf_bthci_evt_class_of_device
,
4093 { "Class of Device", "bthci_evt.class_of_device",
4094 FT_UINT24
, BASE_HEX
, NULL
, 0x0,
4097 { &hf_bthci_evt_cod_major_service_class_information
,
4098 { "Major Service Classes: Information", "bthci_evt.class_of_device.major_service_classes.information",
4099 FT_BOOLEAN
, 16, NULL
, 0x8000,
4102 { &hf_bthci_evt_cod_major_service_class_telephony
,
4103 { "Major Service Classes: Telephony", "bthci_evt.class_of_device.major_service_classes.telephony",
4104 FT_BOOLEAN
, 16, NULL
, 0x4000,
4107 { &hf_bthci_evt_cod_major_service_class_audio
,
4108 { "Major Service Classes: Audio", "bthci_evt.class_of_device.major_service_classes.audio",
4109 FT_BOOLEAN
, 16, NULL
, 0x2000,
4112 { &hf_bthci_evt_cod_major_service_class_object_transfer
,
4113 { "Major Service Classes: Object Transfer", "bthci_evt.class_of_device.major_service_classes.object_transfer",
4114 FT_BOOLEAN
, 16, NULL
, 0x1000,
4117 { &hf_bthci_evt_cod_major_service_class_capturing
,
4118 { "Major Service Classes: Capturing", "bthci_evt.class_of_device.major_service_classes.capturing",
4119 FT_BOOLEAN
, 16, NULL
, 0x0800,
4122 { &hf_bthci_evt_cod_major_service_class_rendering
,
4123 { "Major Service Classes: Rendering", "bthci_evt.class_of_device.major_service_classes.rendering",
4124 FT_BOOLEAN
, 16, NULL
, 0x0400,
4127 { &hf_bthci_evt_cod_major_service_class_networking
,
4128 { "Major Service Classes: Networking", "bthci_evt.class_of_device.major_service_classes.networking",
4129 FT_BOOLEAN
, 16, NULL
, 0x0200,
4132 { &hf_bthci_evt_cod_major_service_class_positioning
,
4133 { "Major Service Classes: Positioning", "bthci_evt.class_of_device.major_service_classes.positioning",
4134 FT_BOOLEAN
, 16, NULL
, 0x0100,
4137 { &hf_bthci_evt_cod_major_service_class_reserved
,
4138 { "Major Service Classes: Reserved", "bthci_evt.class_of_device.major_service_classes.reserved",
4139 FT_UINT16
, BASE_HEX
, NULL
, 0x00C0,
4142 { &hf_bthci_evt_cod_major_service_class_limited_discoverable_mode
,
4143 { "Major Service Classes: Limited Discoverable Mode", "bthci_evt.class_of_device.major_service_classes.limited_discoverable_mode",
4144 FT_BOOLEAN
, 16, NULL
, 0x0020,
4147 { &hf_bthci_evt_cod_major_device_class
,
4148 { "Major Device Class", "bthci_evt.class_of_device.major_device_class",
4149 FT_UINT16
, BASE_HEX
| BASE_EXT_STRING
, &bthci_cmd_cod_major_device_class_vals_ext
, 0x1F,
4152 { &hf_bthci_evt_cod_minor_device_class_computer
,
4153 { "Minor Device Class", "bthci_evt.class_of_device.minor_device_class",
4154 FT_UINT8
, BASE_HEX
| BASE_EXT_STRING
, &bthci_cmd_cod_minor_device_class_computer_vals_ext
, 0xFC,
4157 { &hf_bthci_evt_cod_minor_device_class_phone
,
4158 { "Minor Device Class", "bthci_evt.class_of_device.minor_device_class",
4159 FT_UINT8
, BASE_HEX
| BASE_EXT_STRING
, &bthci_cmd_cod_minor_device_class_phone_vals_ext
, 0xFC,
4162 { &hf_bthci_evt_cod_minor_device_class_lan_net_load_factor
,
4163 { "Minor Device Class: Load Factor", "bthci_evt.class_of_device.minor_device_class.load_factor",
4164 FT_UINT8
, BASE_HEX
| BASE_EXT_STRING
, &bthci_cmd_cod_minor_device_class_lan_net_load_factor_vals_ext
, 0xE0,
4167 { &hf_bthci_evt_cod_minor_device_class_lan_net_type
,
4168 { "Minor Device Class: Type", "bthci_evt.class_of_device.minor_device_class.type",
4169 FT_UINT8
, BASE_HEX
| BASE_EXT_STRING
, &bthci_cmd_cod_minor_device_class_lan_net_type_vals_ext
, 0x1C,
4172 { &hf_bthci_evt_cod_minor_device_class_audio_video
,
4173 { "Minor Device Class", "bthci_evt.class_of_device.minor_device_class",
4174 FT_UINT8
, BASE_HEX
| BASE_EXT_STRING
, &bthci_cmd_cod_minor_device_class_audio_video_vals_ext
, 0xFC,
4177 { &hf_bthci_evt_cod_minor_device_class_peripheral_class
,
4178 { "Minor Device Class", "bthci_evt.class_of_device.minor_device_class",
4179 FT_UINT8
, BASE_HEX
| BASE_EXT_STRING
, &bthci_cmd_cod_minor_device_class_peripheral_class_vals_ext
, 0xC0,
4182 { &hf_bthci_evt_cod_minor_device_class_peripheral_type
,
4183 { "Minor Device Class", "bthci_evt.class_of_device.minor_device_class",
4184 FT_UINT8
, BASE_HEX
| BASE_EXT_STRING
, &bthci_cmd_cod_minor_device_class_peripheral_type_vals_ext
, 0x3C,
4187 { &hf_bthci_evt_cod_minor_device_class_imaging_class_printer
,
4188 { "Minor Device Class: Class: Printer", "bthci_evt.class_of_device.minor_device_class.class.printer",
4189 FT_UINT8
, BASE_HEX
| BASE_EXT_STRING
, &bthci_cmd_cod_minor_device_class_imaging_type_vals_ext
, 0x80,
4192 { &hf_bthci_evt_cod_minor_device_class_imaging_class_scanner
,
4193 { "Minor Device Class: Class: Scanner", "bthci_evt.class_of_device.minor_device_class.class.scanner",
4194 FT_UINT8
, BASE_HEX
| BASE_EXT_STRING
, &bthci_cmd_cod_minor_device_class_imaging_type_vals_ext
, 0x40,
4197 { &hf_bthci_evt_cod_minor_device_class_imaging_class_camera
,
4198 { "Minor Device Class: Class: Camera", "bthci_evt.class_of_device.minor_device_class.class.camera",
4199 FT_UINT8
, BASE_HEX
| BASE_EXT_STRING
, &bthci_cmd_cod_minor_device_class_imaging_type_vals_ext
, 0x20,
4202 { &hf_bthci_evt_cod_minor_device_class_imaging_class_display
,
4203 { "Minor Device Class: Class: Display", "bthci_evt.class_of_device.minor_device_class.class.display",
4204 FT_UINT8
, BASE_HEX
| BASE_EXT_STRING
, &bthci_cmd_cod_minor_device_class_imaging_type_vals_ext
, 0x10,
4207 { &hf_bthci_evt_cod_minor_device_class_imaging_type
,
4208 { "Minor Device Class: Type", "bthci_evt.class_of_device.minor_device_class.type",
4209 FT_UINT8
, BASE_HEX
| BASE_EXT_STRING
, &bthci_cmd_cod_minor_device_class_imaging_type_vals_ext
, 0x0C,
4212 { &hf_bthci_evt_cod_minor_device_class_wearable
,
4213 { "Minor Device Class", "bthci_evt.class_of_device.minor_device_class",
4214 FT_UINT8
, BASE_HEX
| BASE_EXT_STRING
, &bthci_cmd_cod_minor_device_class_wearable_vals_ext
, 0xFC,
4217 { &hf_bthci_evt_cod_minor_device_class_toy
,
4218 { "Minor Device Class", "bthci_evt.class_of_device.minor_device_class",
4219 FT_UINT8
, BASE_HEX
| BASE_EXT_STRING
, &bthci_cmd_cod_minor_device_class_toy_vals_ext
, 0xFC,
4222 { &hf_bthci_evt_cod_minor_device_class_health
,
4223 { "Minor Device Class", "bthci_evt.class_of_device.minor_device_class",
4224 FT_UINT8
, BASE_HEX
| BASE_EXT_STRING
, &bthci_cmd_cod_minor_device_class_health_vals_ext
, 0xFC,
4227 { &hf_bthci_evt_cod_minor_device_class_unknown
,
4228 { "Minor Device Class", "bthci_evt.class_of_device.minor_device_class",
4229 FT_UINT8
, BASE_HEX
, NULL
, 0xFC,
4232 { &hf_bthci_evt_cod_format_type
,
4233 { "Format Type", "bthci_evt.class_of_device.format_type",
4234 FT_UINT8
, BASE_HEX
, NULL
, 0x03,
4237 { &hf_bthci_evt_link_type
,
4238 { "Link Type", "bthci_evt.link_type",
4239 FT_UINT8
, BASE_HEX
, VALS(evt_link_types
), 0x0,
4242 { &hf_bthci_evt_encryption_mode
,
4243 { "Encryption Mode", "bthci_evt.encryption_mode",
4244 FT_UINT8
, BASE_HEX
, VALS(evt_encryption_modes
), 0x0,
4247 { &hf_bthci_evt_reason
,
4248 { "Reason", "bthci_evt.reason",
4249 FT_UINT8
, BASE_HEX
|BASE_EXT_STRING
, &bthci_cmd_status_vals_ext
, 0x0,
4252 { &hf_bthci_evt_remote_name
,
4253 { "Remote Name", "bthci_evt.remote_name",
4254 FT_STRINGZ
, BASE_NONE
, NULL
, 0x0,
4255 "Userfriendly descriptive name for the remote device", HFILL
}
4257 { &hf_bthci_evt_encryption_enable
,
4258 { "Encryption Enable", "bthci_evt.encryption_enable",
4259 FT_UINT8
, BASE_HEX
, VALS(evt_encryption_enable
), 0x0,
4262 { &hf_bthci_evt_key_flag
,
4263 { "Key Flag", "bthci_evt.key_flag",
4264 FT_UINT8
, BASE_HEX
, VALS(evt_key_flag
), 0x0,
4267 { &hf_bthci_evt_vers_nr
,
4268 { "LMP Version", "bthci_evt.lmp_vers_nr",
4269 FT_UINT8
, BASE_HEX
, VALS(evt_lmp_vers_nr
), 0x0,
4270 "Version of the Current LMP", HFILL
}
4272 { &hf_bthci_evt_hci_vers_nr
,
4273 { "HCI Version", "bthci_evt.hci_vers_nr",
4274 FT_UINT8
, BASE_HEX
, VALS(evt_hci_vers_nr
), 0x0,
4275 "Version of the Current HCI", HFILL
}
4277 { &hf_bthci_evt_hci_revision
,
4278 { "HCI Revision", "bthci_evt.hci_vers_nr",
4279 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
4280 "Revision of the Current HCI", HFILL
}
4282 { &hf_bthci_evt_comp_id
,
4283 { "Manufacturer Name", "bthci_evt.comp_id",
4284 FT_UINT16
, BASE_HEX
| BASE_EXT_STRING
, &bthci_evt_comp_id_ext
, 0x0,
4285 "Manufacturer Name of Bluetooth Hardware", HFILL
}
4287 { &hf_bthci_evt_sub_vers_nr
,
4288 { "LMP Subversion", "bthci_evt.lmp_sub_vers_nr",
4289 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
4290 "Subversion of the Current LMP", HFILL
}
4292 { &hf_bthci_evt_flags
,
4293 { "Flags", "bthci_evt.flags",
4294 FT_UINT8
, BASE_HEX
, NULL
, 0x0,
4297 { &hf_bthci_evt_service_type
,
4298 { "Service Type", "bthci_evt.service_type",
4299 FT_UINT8
, BASE_HEX
, VALS(evt_service_types
), 0x0,
4302 { &hf_bthci_evt_token_rate
,
4303 { "Available Token Rate", "bthci_evt.token_rate",
4304 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
4305 "Available Token Rate, in bytes per second", HFILL
}
4307 { &hf_bthci_evt_peak_bandwidth
,
4308 { "Available Peak Bandwidth", "bthci_evt.peak_bandwidth",
4309 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
4310 "Available Peak Bandwidth, in bytes per second", HFILL
}
4312 { &hf_bthci_evt_latency
,
4313 { "Available Latency", "bthci_evt.latency",
4314 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
4315 "Available Latency, in microseconds", HFILL
}
4317 { &hf_bthci_evt_delay_variation
,
4318 { "Available Delay Variation", "bthci_evt.delay_variation",
4319 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
4320 "Available Delay Variation, in microseconds", HFILL
}
4322 { &hf_bthci_evt_hardware_code
,
4323 { "Hardware Code", "bthci_evt.hardware_code",
4324 FT_UINT8
, BASE_HEX
, NULL
, 0x0,
4325 "Hardware Code (implementation specific)", HFILL
}
4327 { &hf_bthci_evt_role
,
4328 { "Role", "bthci_evt.role",
4329 FT_UINT8
, BASE_HEX
, VALS(evt_role_vals
), 0x0,
4332 { &hf_bthci_evt_curr_mode
,
4333 { "Current Mode", "bthci_evt.current_mode",
4334 FT_UINT8
, BASE_HEX
, VALS(evt_modes
), 0x0,
4337 { &hf_bthci_evt_interval
,
4338 { "Interval", "bthci_evt.interval",
4339 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
4340 "Interval - Number of Baseband slots", HFILL
}
4342 { &hf_bthci_evt_link_key
,
4343 { "Link Key", "bthci_evt.link_key",
4344 FT_BYTES
, BASE_NONE
, NULL
, 0x0,
4345 "Link Key for the associated BD_ADDR", HFILL
}
4347 { &hf_bthci_evt_key_type
,
4348 { "Key Type", "bthci_evt.key_type",
4349 FT_UINT8
, BASE_HEX
, VALS(evt_key_types
), 0x0,
4352 { &hf_bthci_evt_max_slots
,
4353 { "Maximum Number of Slots", "bthci_evt.max_slots",
4354 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
4355 "Maximum Number of slots allowed for baseband packets", HFILL
}
4357 { &hf_bthci_evt_clock_offset
,
4358 { "Clock Offset", "bthci_evt.clock_offset",
4359 FT_UINT16
, BASE_HEX
, NULL
, 0x7FFF,
4360 "Bit 2-16 of the Clock Offset between CLKmaster-CLKslave", HFILL
}
4362 { &hf_bthci_evt_page_scan_mode
,
4363 { "Page Scan Mode", "bthci_evt.page_scan_mode",
4364 FT_UINT8
, BASE_HEX
, VALS(bthci_cmd_page_scan_modes
), 0x0,
4367 { &hf_bthci_evt_page_scan_repetition_mode
,
4368 { "Page Scan Repetition Mode", "bthci_evt.page_scan_repetition_mode",
4369 FT_UINT8
, BASE_HEX
, VALS(bthci_cmd_page_scan_repetition_modes
), 0x0,
4372 { &hf_bthci_evt_page_scan_period_mode
,
4373 { "Page Scan Period Mode", "bthci_evt.page_scan_period_mode",
4374 FT_UINT8
, BASE_HEX
, VALS(bthci_cmd_page_scan_period_modes
), 0x0,
4377 { &hf_bthci_evt_link_type_2dh1
,
4378 { "ACL Link Type 2-DH1", "bthci_evt.link_type_2dh1",
4379 FT_BOOLEAN
, 16, NULL
, 0x0002,
4382 { &hf_bthci_evt_link_type_3dh1
,
4383 { "ACL Link Type 3-DH1", "bthci_evt.link_type_3dh1",
4384 FT_BOOLEAN
, 16, NULL
, 0x0004,
4387 { &hf_bthci_evt_link_type_dm1
,
4388 { "ACL Link Type DM1", "bthci_evt.link_type_dm1",
4389 FT_BOOLEAN
, 16, NULL
, 0x0008,
4392 { &hf_bthci_evt_link_type_dh1
,
4393 { "ACL Link Type DH1", "bthci_evt.link_type_dh1",
4394 FT_BOOLEAN
, 16, NULL
, 0x0010,
4397 { &hf_bthci_evt_link_type_2dh3
,
4398 { "ACL Link Type 2-DH3", "bthci_evt.link_type_2dh3",
4399 FT_BOOLEAN
, 16, NULL
, 0x0100,
4402 { &hf_bthci_evt_link_type_3dh3
,
4403 { "ACL Link Type 3-DH3", "bthci_evt.link_type_3dh3",
4404 FT_BOOLEAN
, 16, NULL
, 0x0200,
4407 { &hf_bthci_evt_link_type_dm3
,
4408 { "ACL Link Type DM3", "bthci_evt.link_type_dm3",
4409 FT_BOOLEAN
, 16, NULL
, 0x0400,
4412 { &hf_bthci_evt_link_type_dh3
,
4413 { "ACL Link Type DH3", "bthci_evt.link_type_dh3",
4414 FT_BOOLEAN
, 16, NULL
, 0x0800,
4417 { &hf_bthci_evt_link_type_2dh5
,
4418 { "ACL Link Type 2-DH5", "bthci_evt.link_type_2dh5",
4419 FT_BOOLEAN
, 16, NULL
, 0x1000,
4422 { &hf_bthci_evt_link_type_3dh5
,
4423 { "ACL Link Type 3-DH5", "bthci_evt.link_type_3dh5",
4424 FT_BOOLEAN
, 16, NULL
, 0x2000,
4427 { &hf_bthci_evt_link_type_dm5
,
4428 { "ACL Link Type DM5", "bthci_evt.link_type_dm5",
4429 FT_BOOLEAN
, 16, NULL
, 0x4000,
4432 { &hf_bthci_evt_link_type_dh5
,
4433 { "ACL Link Type DH5", "bthci_evt.link_type_dh5",
4434 FT_BOOLEAN
, 16, NULL
, 0x8000,
4437 { &hf_bthci_evt_link_type_hv1
,
4438 { "SCO Link Type HV1", "bthci_evt.link_type_hv1",
4439 FT_BOOLEAN
, 16, NULL
, 0x0020,
4442 { &hf_bthci_evt_link_type_hv2
,
4443 { "SCO Link Type HV2", "bthci_evt.link_type_hv2",
4444 FT_BOOLEAN
, 16, NULL
, 0x0040,
4447 { &hf_bthci_evt_link_type_hv3
,
4448 { "SCO Link Type HV3", "bthci_evt.link_type_hv3",
4449 FT_BOOLEAN
, 16, NULL
, 0x0080,
4453 { "LMP Features", "bthci_evt.lmp_features",
4454 FT_NONE
, BASE_NONE
, NULL
, 0x00,
4457 { &hf_lmp_feature_3slot_packets
,
4458 { "3-slot packets", "bthci_evt.lmp_features.3slot_packets",
4459 FT_BOOLEAN
, 8, NULL
, 0x01,
4462 { &hf_lmp_feature_5slot_packets
,
4463 { "5-slot packets", "bthci_evt.lmp_features.5slot_packets",
4464 FT_BOOLEAN
, 8, NULL
, 0x02,
4467 { &hf_lmp_feature_encryption
,
4468 { "Encryption", "bthci_evt.lmp_features.encryption",
4469 FT_BOOLEAN
, 8, NULL
, 0x04,
4472 { &hf_lmp_feature_slot_offset
,
4473 { "Slot Offset", "bthci_evt.lmp_features.slot_offset",
4474 FT_BOOLEAN
, 8, NULL
, 0x08,
4477 { &hf_lmp_feature_timing_accuracy
,
4478 { "Timing Accuracy", "bthci_evt.lmp_features.timing_accuracy",
4479 FT_BOOLEAN
, 8, NULL
, 0x10,
4482 { &hf_lmp_feature_role_switch
,
4483 { "Role Switch", "bthci_evt.lmp_features.role_switch",
4484 FT_BOOLEAN
, 8, NULL
, 0x20,
4487 { &hf_lmp_feature_hold_mode
,
4488 { "Hold Mode", "bthci_evt.lmp_features.hold_mode",
4489 FT_BOOLEAN
, 8, NULL
, 0x40,
4492 { &hf_lmp_feature_sniff_mode
,
4493 { "Sniff Mode", "bthci_evt.lmp_features.sniff_mode",
4494 FT_BOOLEAN
, 8, NULL
, 0x80,
4497 { &hf_lmp_feature_park_state
,
4498 { "Park Mode", "bthci_evt.lmp_features.park_state",
4499 FT_BOOLEAN
, 8, NULL
, 0x01,
4502 { &hf_lmp_feature_power_control_requests
,
4503 { "Power Control Requests", "bthci_evt.lmp_features.power_control_requests",
4504 FT_BOOLEAN
, 8, NULL
, 0x02,
4507 { &hf_lmp_feature_channel_quality_driven_data_rate
,
4508 { "Channel Quality Driven Data Rate", "bthci_evt.lmp_features.channel_quality_driven_data_rate",
4509 FT_BOOLEAN
, 8, NULL
, 0x04,
4512 { &hf_lmp_feature_sco_link
,
4513 { "SCO Link", "bthci_evt.lmp_features.sco_link",
4514 FT_BOOLEAN
, 8, NULL
, 0x08,
4517 { &hf_lmp_feature_hv2_packets
,
4518 { "HV2 packets", "bthci_evt.lmp_features.hv2_packets",
4519 FT_BOOLEAN
, 8, NULL
, 0x10,
4522 { &hf_lmp_feature_hv3_packets
,
4523 { "HV3 packets", "bthci_evt.lmp_features.hv3_packets",
4524 FT_BOOLEAN
, 8, NULL
, 0x20,
4527 { &hf_lmp_feature_u_law_log_synchronous_data
,
4528 { "u-law Log Synchronous Data", "bthci_evt.lmp_features.u_law_log_synchronous_data",
4529 FT_BOOLEAN
, 8, NULL
, 0x40,
4532 { &hf_lmp_feature_a_law_log_synchronous_data
,
4533 { "A-law Log Synchronous Data", "bthci_evt.lmp_features.a_law_log_synchronous_data",
4534 FT_BOOLEAN
, 8, NULL
, 0x80,
4537 { &hf_lmp_feature_cvsd_synchronous_data
,
4538 { "CVSD Synchronous Data", "bthci_evt.lmp_features.cvsd_synchronous_data",
4539 FT_BOOLEAN
, 8, NULL
, 0x01,
4542 { &hf_lmp_feature_paging_parameter_negotiation
,
4543 { "Paging Parameter Negotiation", "bthci_evt.lmp_features.paging_parameter_negotiation",
4544 FT_BOOLEAN
, 8, NULL
, 0x02,
4547 { &hf_lmp_feature_power_control
,
4548 { "Power Control", "bthci_evt.lmp_features.power_control",
4549 FT_BOOLEAN
, 8, NULL
, 0x04,
4552 { &hf_lmp_feature_transparent_synchronous_data
,
4553 { "Transparent Synchronous Data", "bthci_evt.lmp_features.transparent_synchronous_data",
4554 FT_BOOLEAN
, 8, NULL
, 0x08,
4557 { &hf_lmp_feature_flow_control_lag
,
4558 { "Flow Control Lag", "bthci_evt.lmp_features.flow_control_lag",
4559 FT_UINT8
, BASE_DEC
, NULL
, 0x70,
4562 { &hf_lmp_feature_broadcast_encryption
,
4563 { "Broadband Encryption", "bthci_evt.lmp_features.broadcast_encryption",
4564 FT_BOOLEAN
, 8, NULL
, 0x80,
4567 { &hf_lmp_feature_reserved_24
,
4568 { "Reserved", "bthci_evt.lmp_features.reserved.24",
4569 FT_BOOLEAN
, 8, NULL
, 0x01,
4572 { &hf_lmp_feature_edr_acl_2mbps_mode
,
4573 { "EDR ACL 2 Mbps Mode", "bthci_evt.lmp_features.edr_acl_2mbps_mode",
4574 FT_BOOLEAN
, 8, NULL
, 0x02,
4577 { &hf_lmp_feature_edr_acl_3mbps_mode
,
4578 { "EDR ACL 3 Mbps Mode", "bthci_evt.lmp_features.edr_acl_3mbps_mode",
4579 FT_BOOLEAN
, 8, NULL
, 0x04,
4582 { &hf_lmp_feature_enhanced_inquiry_scan
,
4583 { "Enhanced Inquiry Scan", "bthci_evt.lmp_features.enhanced_inquiry_scan",
4584 FT_BOOLEAN
, 8, NULL
, 0x08,
4587 { &hf_lmp_feature_interlaced_inquiry_scan
,
4588 { "Interlaced Inquiry Scan", "bthci_evt.lmp_features.interlaced_inquiry_scan",
4589 FT_BOOLEAN
, 8, NULL
, 0x10,
4592 { &hf_lmp_feature_interlaced_page_scan
,
4593 { "Interlaced Page Scan", "bthci_evt.lmp_features.interlaced_page_scan",
4594 FT_BOOLEAN
, 8, NULL
, 0x20,
4597 { &hf_lmp_feature_rssi_with_inquiry_results
,
4598 { "RSSI with Inquiry Results", "bthci_evt.lmp_features.rssi_with_inquiry_results",
4599 FT_BOOLEAN
, 8, NULL
, 0x40,
4602 { &hf_lmp_feature_ev3_packets
,
4603 { "EV3 Packets", "bthci_evt.lmp_features.ev3_packets",
4604 FT_BOOLEAN
, 8, NULL
, 0x80,
4607 { &hf_lmp_feature_ev4_packets
,
4608 { "EV4 Packets", "bthci_evt.lmp_features.ev4_packets",
4609 FT_BOOLEAN
, 8, NULL
, 0x01,
4612 { &hf_lmp_feature_ev5_packets
,
4613 { "EV5 Packets", "bthci_evt.lmp_features.ev5_packets",
4614 FT_BOOLEAN
, 8, NULL
, 0x02,
4617 { &hf_lmp_feature_reserved_34
,
4618 { "Reserved", "bthci_evt.lmp_features.reserved.34",
4619 FT_BOOLEAN
, 8, NULL
, 0x04,
4622 { &hf_lmp_feature_afh_capable_slave
,
4623 { "AFH Capable Slave", "bthci_evt.lmp_features.afh_capable_slave",
4624 FT_BOOLEAN
, 8, NULL
, 0x08,
4627 { &hf_lmp_feature_afh_classification_slave
,
4628 { "AFH Classification Slave", "bthci_evt.lmp_features.afh_classification_slave",
4629 FT_BOOLEAN
, 8, NULL
, 0x10,
4632 { &hf_lmp_feature_br_edr_not_supported
,
4633 { "BR/EDR Not Supported", "bthci_evt.lmp_features.br_edr_not_supported",
4634 FT_BOOLEAN
, 8, NULL
, 0x20,
4637 { &hf_lmp_feature_le_supported_controller
,
4638 { "LE Supported Controller", "bthci_evt.lmp_features.le_supported_controller",
4639 FT_BOOLEAN
, 8, NULL
, 0x40,
4642 { &hf_lmp_feature_3slot_edr_acl_packets
,
4643 { "3-slot EDR ACL packets", "bthci_evt.lmp_features.3slot_edr_acl_packets",
4644 FT_BOOLEAN
, 8, NULL
, 0x80,
4647 { &hf_lmp_feature_5slot_edr_acl_packets
,
4648 { "5-slot EDR ACL packets", "bthci_evt.lmp_features.5slot_edr_acl_packets",
4649 FT_BOOLEAN
, 8, NULL
, 0x01,
4652 { &hf_lmp_feature_sniff_subrating
,
4653 { "Sniff Subrating", "bthci_evt.lmp_features.sniff_subrating",
4654 FT_BOOLEAN
, 8, NULL
, 0x02,
4657 { &hf_lmp_feature_pause_encryption
,
4658 { "Pause Encryption", "bthci_evt.lmp_features.pause_encryption",
4659 FT_BOOLEAN
, 8, NULL
, 0x04,
4662 { &hf_lmp_feature_afh_capable_master
,
4663 { "AFH Capable Master", "bthci_evt.lmp_features.afh_capable_master",
4664 FT_BOOLEAN
, 8, NULL
, 0x08,
4667 { &hf_lmp_feature_afh_classification_master
,
4668 { "AFH Classification Master", "bthci_evt.lmp_features.afh_classification_master",
4669 FT_BOOLEAN
, 8, NULL
, 0x10,
4672 { &hf_lmp_feature_edr_esco_2mbps_mode
,
4673 { "EDR eSCO 2 Mbps Mode", "bthci_evt.lmp_features.edr_esco_2mbps_mode",
4674 FT_BOOLEAN
, 8, NULL
, 0x20,
4677 { &hf_lmp_feature_edr_esco_3mbps_mode
,
4678 { "EDR eSCO 3 Mbps Mode", "bthci_evt.lmp_features.edr_esco_3mbps_mode",
4679 FT_BOOLEAN
, 8, NULL
, 0x40,
4682 { &hf_lmp_feature_3slot_edr_esco_packets
,
4683 { "3-slot EDR eSCO Packets", "bthci_evt.lmp_features.3slot_edr_esco_packets",
4684 FT_BOOLEAN
, 8, NULL
, 0x80,
4687 { &hf_lmp_feature_extended_inquiry_response
,
4688 { "Extended Inquiry Response", "bthci_evt.lmp_features.extended_inquiry_response",
4689 FT_BOOLEAN
, 8, NULL
, 0x01,
4692 { &hf_lmp_feature_simultaneous_le_and_br_edr_controller
,
4693 {"Simultaneous LE and BR/EDR to Same Device Capable Controller", "bthci_evt.lmp_features.simultaneous_le_and_br_edr.controller",
4694 FT_BOOLEAN
, 8, NULL
, 0x02,
4697 { &hf_lmp_feature_reserved_50
,
4698 { "Reserved", "bthci_evt.lmp_features.reserved.50",
4699 FT_BOOLEAN
, 8, NULL
, 0x04,
4702 { &hf_lmp_feature_secure_simple_pairing
,
4703 { "Secure Simple Pairing", "bthci_evt.lmp_features.secure_simple_pairing",
4704 FT_BOOLEAN
, 8, NULL
, 0x08,
4707 { &hf_lmp_feature_encapsulated_pdu
,
4708 { "Encapsulated PDU", "bthci_evt.lmp_features.encapsulated_pdu",
4709 FT_BOOLEAN
, 8, NULL
, 0x10,
4712 { &hf_lmp_feature_erroneous_data_reporting
,
4713 { "Erroneous Data Reporting", "bthci_evt.lmp_features.erroneous_data_reporting",
4714 FT_BOOLEAN
, 8, NULL
, 0x20,
4717 { &hf_lmp_feature_non_flushable_packet_boundary_flag
,
4718 { "Non-flushable Packet Boundary Flag", "bthci_evt.lmp_features.non_flushable_packet_boundary_flag",
4719 FT_BOOLEAN
, 8, NULL
, 0x40,
4722 { &hf_lmp_feature_reserved_55
,
4723 { "Reserved", "bthci_evt.lmp_features.reserved.55",
4724 FT_BOOLEAN
, 8, NULL
, 0x80,
4727 { &hf_lmp_feature_link_supervision_timeout_changed_event
,
4728 { "Link Supervision Timeout Changed Event", "bthci_evt.lmp_features.supervision_timeout_changed_event",
4729 FT_BOOLEAN
, 8, NULL
, 0x01,
4732 { &hf_lmp_feature_inquiry_tx_power_level
,
4733 { "Inquiry TX Power Level", "bthci_evt.lmp_features.inquiry_tx_power_level",
4734 FT_BOOLEAN
, 8, NULL
, 0x02,
4737 { &hf_lmp_feature_enhanced_power_control
,
4738 { "Enhanced Power Control", "bthci_evt.lmp_features.enhanced_power_control",
4739 FT_BOOLEAN
, 8, NULL
, 0x04,
4742 { &hf_lmp_feature_reserved_59_62
,
4743 { "Reserved", "bthci_evt.lmp_features.reserved.59_62",
4744 FT_BOOLEAN
, 8, NULL
, 0x78,
4747 { &hf_lmp_feature_extended_features
,
4748 { "Extended Features", "bthci_evt.lmp_features.extended_features",
4749 FT_BOOLEAN
, 8, NULL
, 0x80,
4752 { &hf_lmp_feature_secure_simple_pairing_host
,
4753 {"Secure Simple Pairing Host", "bthci_evt.lmp_features.secure_simple_pairing_host",
4754 FT_BOOLEAN
, 8, NULL
, 0x01,
4757 { &hf_lmp_feature_le_supported_host
,
4758 {"LE Supported Host", "bthci_evt.lmp_features.le_supported.host",
4759 FT_BOOLEAN
, 8, NULL
, 0x02,
4762 { &hf_lmp_feature_simultaneous_le_and_br_edr_host
,
4763 {"Simultaneous LE and BR/EDR to Same Device Capable Host", "bthci_evt.lmp_features.simultaneous_le_and_br_edr.host",
4764 FT_BOOLEAN
, 8, NULL
, 0x04,
4767 { &hf_lmp_feature_reserved_67_71
,
4768 {"Reserved", "bthci_evt.lmp_features.reserved.67_71",
4769 FT_UINT8
, BASE_HEX
, NULL
, 0xF8,
4772 { &hf_lmp_feature_reserved
,
4773 {"Reserved", "bthci_evt.lmp_features.reserved",
4774 FT_BYTES
, BASE_NONE
, NULL
, 0x0,
4777 { &hf_bthci_evt_num_keys
,
4778 { "Number of Link Keys", "bthci_evt.num_keys",
4779 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
4780 "Number of Link Keys contained", HFILL
}
4782 { &hf_bthci_evt_num_keys_read
,
4783 { "Number of Link Keys Read", "bthci_evt.num_keys_read",
4784 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
4787 { &hf_bthci_evt_num_keys_deleted
,
4788 { "Number of Link Keys Deleted", "bthci_evt.num_keys_deleted",
4789 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
4792 { &hf_bthci_evt_num_keys_written
,
4793 { "Number of Link Keys Written", "bthci_evt.num_keys_written",
4794 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
4797 { &hf_bthci_evt_max_num_keys
,
4798 { "Max Num Keys", "bthci_evt.max_num_keys",
4799 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
4800 "Total Number of Link Keys that the Host Controller can store", HFILL
}
4802 { &hf_bthci_evt_num_responses
,
4803 { "Number of responses", "bthci_evt.num_responses",
4804 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
4805 "Number of Responses from Inquiry", HFILL
}
4807 { &hf_bthci_evt_link_policy_setting_switch
,
4808 { "Enable Master Slave Switch", "bthci_evt.link_policy_switch",
4809 FT_BOOLEAN
, 16, NULL
, 0x0001,
4812 { &hf_bthci_evt_link_policy_setting_hold
,
4813 { "Enable Hold Mode", "bthci_evt.link_policy_hold",
4814 FT_BOOLEAN
, 16, NULL
, 0x0002,
4817 { &hf_bthci_evt_link_policy_setting_sniff
,
4818 { "Enable Sniff Mode", "bthci_evt.link_policy_sniff",
4819 FT_BOOLEAN
, 16, NULL
, 0x0004,
4822 { &hf_bthci_evt_link_policy_setting_park
,
4823 { "Enable Park Mode", "bthci_evt.link_policy_park",
4824 FT_BOOLEAN
, 16, NULL
, 0x0008,
4827 { &hf_bthci_evt_curr_role
,
4828 { "Current Role", "bthci_evt.curr_role",
4829 FT_UINT8
, BASE_HEX
, VALS(evt_role_vals_handle
), 0x0,
4830 "Current role for this connection handle", HFILL
}
4832 { &hf_bthci_evt_pin_type
,
4833 { "PIN Type", "bthci_evt.pin_type",
4834 FT_UINT8
, BASE_HEX
, VALS(evt_pin_types
), 0x0,
4835 "PIN Types", HFILL
}
4837 { &hf_bthci_evt_device_name
,
4838 { "Device Name", "bthci_evt.device_name",
4839 FT_STRINGZ
, BASE_NONE
, NULL
, 0x0,
4840 "Userfriendly descriptive name for the device", HFILL
}
4842 { &hf_bthci_evt_timeout
,
4843 { "Timeout", "bthci_evt.timeout",
4844 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
4845 "Number of Baseband slots for timeout.", HFILL
}
4847 { &hf_bthci_evt_scan_enable
,
4848 { "Scan", "bthci_evt.scan_enable",
4849 FT_UINT8
, BASE_HEX
, VALS(bthci_cmd_scan_enable_values
), 0x0,
4850 "Scan Enable", HFILL
}
4852 { &hf_bthci_evt_authentication_enable
,
4853 { "Authentication", "bthci_evt.auth_enable",
4854 FT_UINT8
, BASE_HEX
, VALS(evt_auth_enable_values
), 0x0,
4855 "Authentication Enable", HFILL
}
4857 { &hf_bthci_evt_sco_flow_cont_enable
,
4858 { "SCO Flow Control", "bthci_evt.sco_flow_cont_enable",
4859 FT_UINT8
, BASE_HEX
, VALS(evt_enable_values
), 0x0,
4860 "SCO Flow Control Enable", HFILL
}
4862 { &hf_bthci_evt_window
,
4863 { "Interval", "bthci_evt.window",
4864 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
4867 { &hf_bthci_evt_input_unused
,
4868 { "Unused bits", "bthci_evt.voice.unused",
4869 FT_UINT16
, BASE_HEX
, NULL
, 0xfc00,
4872 { &hf_bthci_evt_input_coding
,
4873 { "Input Coding", "bthci_evt.voice.input_coding",
4874 FT_UINT16
, BASE_DEC
| BASE_EXT_STRING
, &bthci_cmd_input_coding_vals_ext
, 0x0300,
4875 "Authentication Enable", HFILL
}
4877 { &hf_bthci_evt_input_data_format
,
4878 { "Input Data Format", "bthci_evt.voice.input_data_format",
4879 FT_UINT16
, BASE_DEC
| BASE_EXT_STRING
, &bthci_cmd_input_data_format_vals_ext
, 0x00c0,
4882 { &hf_bthci_evt_input_sample_size
,
4883 { "Input Sample Size", "bthci_evt.voice.input_sample_size",
4884 FT_UINT16
, BASE_DEC
| BASE_EXT_STRING
, &bthci_cmd_input_sample_size_vals_ext
, 0x0020,
4887 { &hf_bthci_evt_linear_pcm_bit_pos
,
4888 { "Linear PCM Bit Position", "bthci_evt.voice.linear_pcm_bit_pos",
4889 FT_UINT16
, BASE_DEC
, NULL
, 0x001c,
4890 "# bit pos. that MSB of sample is away from starting at MSB", HFILL
}
4892 { &hf_bthci_evt_air_coding_format
,
4893 { "Air Coding Format", "bthci_evt.voice.air_coding_format",
4894 FT_UINT16
, BASE_DEC
| BASE_EXT_STRING
, &bthci_cmd_air_coding_format_vals_ext
, 0x0003,
4897 { &hf_bthci_evt_num_broadcast_retransm
,
4898 { "Num Broadcast Retran", "bthci_evt.num_broad_retran",
4899 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
4900 "Number of Broadcast Retransmissions", HFILL
}
4902 { &hf_bthci_evt_hold_mode_act_page
,
4903 { "Suspend Page Scan", "bthci_evt.hold_mode_page",
4904 FT_BOOLEAN
, 8, NULL
, 0x1,
4905 "Device can enter low power state", HFILL
}
4907 { &hf_bthci_evt_hold_mode_act_inquiry
,
4908 { "Suspend Inquiry Scan", "bthci_evt.hold_mode_inquiry",
4909 FT_BOOLEAN
, 8, NULL
, 0x2,
4910 "Device can enter low power state", HFILL
}
4912 { &hf_bthci_evt_hold_mode_act_periodic
,
4913 { "Suspend Periodic Inquiries", "bthci_evt.hold_mode_periodic",
4914 FT_BOOLEAN
, 8, NULL
, 0x4,
4915 "Device can enter low power state", HFILL
}
4917 { &hf_bthci_evt_transmit_power_level
,
4918 { "Transmit Power Level (dBm)", "bthci_evt.transmit_power_level",
4919 FT_INT8
, BASE_DEC
, NULL
, 0x0,
4922 { &hf_bthci_evt_num_supp_iac
,
4923 {"Num Support IAC", "bthci_evt.num_supp_iac",
4924 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
4925 "Num of supported IAC the device can simultaneously listen", HFILL
}
4927 { &hf_bthci_evt_num_curr_iac
,
4928 {"Num Current IAC", "bthci_evt.num_curr_iac",
4929 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
4930 "Num of IACs currently in use to simultaneously listen", HFILL
}
4932 { &hf_bthci_evt_iac_lap
,
4933 { "IAC LAP", "bthci_evt.num_curr_iac",
4934 FT_UINT24
, BASE_HEX
, NULL
, 0x0,
4935 "LAP(s)used to create IAC", HFILL
}
4937 { &hf_bthci_evt_loopback_mode
,
4938 {"Loopback Mode", "bthci_evt.loopback_mode",
4939 FT_UINT8
, BASE_HEX
, VALS(evt_loopback_modes
), 0x0,
4942 { &hf_bthci_evt_country_code
,
4943 {"Country Code", "bthci_evt.country_code",
4944 FT_UINT8
, BASE_HEX
, VALS(evt_country_code_values
), 0x0,
4947 { &hf_bthci_evt_failed_contact_counter
,
4948 {"Failed Contact Counter", "bthci_evt.failed_contact_counter",
4949 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
4952 { &hf_bthci_evt_link_quality
,
4953 {"Link Quality", "bthci_evt.link_quality",
4954 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
4955 "Link Quality (0x00 - 0xFF Higher Value = Better Link)", HFILL
}
4957 { &hf_bthci_evt_rssi
,
4958 { "RSSI (dB)", "bthci_evt.rssi",
4959 FT_INT8
, BASE_DEC
, NULL
, 0x0,
4962 { &hf_bthci_evt_host_data_packet_length_acl
,
4963 {"Host ACL Data Packet Length (bytes)", "bthci_evt.max_data_length_acl",
4964 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
4965 "Max Host ACL Data Packet length of data portion host is able to accept", HFILL
}
4967 { &hf_bthci_evt_host_data_packet_length_sco
,
4968 {"Host SCO Data Packet Length (bytes)", "bthci_evt.max_data_length_sco",
4969 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
4970 "Max Host SCO Data Packet length of data portion host is able to accept", HFILL
}
4972 { &hf_bthci_evt_host_total_num_acl_data_packets
,
4973 {"Host Total Num ACL Data Packets", "bthci_evt.max_data_num_acl",
4974 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
4975 "Total Number of HCI ACL Data Packets that can be stored in the data buffers of the Host", HFILL
}
4977 { &hf_bthci_evt_host_total_num_sco_data_packets
,
4978 {"Host Total Num SCO Data Packets", "bthci_evt.max_data_num_sco",
4979 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
4980 "Total Number of HCI SCO Data Packets that can be stored in the data buffers of the Host", HFILL
}
4982 { &hf_bthci_evt_page_number
,
4983 {"Page Number", "bthci_evt.page_number",
4984 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
4987 { &hf_bthci_evt_max_page_number
,
4988 {"Max. Page Number", "bthci_evt.max_page_number",
4989 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
4992 { &hf_bthci_evt_local_supported_cmds
,
4993 { "Local Supported Commands", "bthci_evt.local_supported_cmds",
4994 FT_BYTES
, BASE_NONE
, NULL
, 0x0,
4997 { &hf_bthci_evt_fec_required
,
4998 {"FEC Required", "bthci_evt.fec_required",
4999 FT_BOOLEAN
, 8, NULL
, 0x0,
5002 { &hf_bthci_evt_err_data_reporting
,
5003 {"Erroneous Data Reporting", "bthci_evt.err_data_reporting",
5004 FT_UINT8
, BASE_DEC
, VALS(evt_enable_values
), 0x0,
5007 { &hf_bthci_evt_scan_type
,
5008 {"Scan Type", "bthci_evt.inq_scan_type",
5009 FT_UINT8
, BASE_DEC
, VALS(evt_scan_types
), 0x0,
5012 { &hf_bthci_evt_inq_mode
,
5013 {"Inquiry Mode", "bthci_evt.inq_scan_type",
5014 FT_UINT8
, BASE_DEC
, VALS(evt_inq_modes
), 0x0,
5017 { &hf_bthci_evt_power_level_type
,
5018 {"Type", "bthci_evt.power_level_type",
5019 FT_UINT8
, BASE_HEX
, VALS(evt_power_level_types
), 0x0,
5022 { &hf_bthci_evt_sync_link_type
,
5023 {"Link Type", "bthci_evt.sync_link_type",
5024 FT_UINT8
, BASE_HEX
, VALS(evt_sync_link_types
), 0x0,
5027 { &hf_bthci_evt_sync_tx_interval
,
5028 {"Transmit Interval", "bthci_evt.sync_tx_interval",
5029 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
5032 { &hf_bthci_evt_sync_rtx_window
,
5033 {"Retransmit Window", "bthci_evt.sync_rtx_window",
5034 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
5037 { &hf_bthci_evt_sync_rx_packet_length
,
5038 {"Rx Packet Length", "bthci_evt.sync_rx_pkt_len",
5039 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
5042 { &hf_bthci_evt_sync_tx_packet_length
,
5043 {"Tx Packet Length", "bthci_evt.sync_tx_pkt_len",
5044 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
5047 { &hf_bthci_evt_air_mode
,
5048 {"Air Mode", "bthci_evt.air_mode",
5049 FT_UINT8
, BASE_DEC
, VALS(evt_air_mode_vals
), 0x0,
5052 { &hf_bthci_evt_max_tx_latency
,
5053 {"Max. Tx Latency", "bthci_evt.max_tx_latency",
5054 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
5057 { &hf_bthci_evt_max_rx_latency
,
5058 {"Max. Rx Latency", "bthci_evt.max_rx_latency",
5059 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
5062 { &hf_bthci_evt_min_remote_timeout
,
5063 {"Min. Remote Timeout", "bthci_evt.min_remote_timeout",
5064 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
5067 { &hf_bthci_evt_min_local_timeout
,
5068 {"Min. Local Timeout", "bthci_evt.min_local_timeout",
5069 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
5072 { &hf_bthci_evt_link_supervision_timeout
,
5073 {"Link Supervision Timeout", "bthci_evt.link_supervision_timeout",
5074 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
5077 { &hf_bthci_evt_token_bucket_size
,
5078 { "Token Bucket Size", "bthci_evt.token_bucket_size",
5079 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
5080 "Token Bucket Size (bytes)", HFILL
}
5082 { &hf_bthci_evt_flow_direction
,
5083 {"Flow Direction", "bthci_evt.flow_direction",
5084 FT_UINT8
, BASE_DEC
, VALS(evt_flow_direction_values
), 0x0,
5087 { &hf_bthci_evt_afh_ch_assessment_mode
,
5088 {"AFH Channel Assessment Mode", "bthci_evt.afh_ch_assessment_mode",
5089 FT_UINT8
, BASE_DEC
, VALS(evt_enable_values
), 0x0,
5092 { &hf_bthci_evt_lmp_handle
,
5093 { "LMP Handle", "bthci_evt.lmp_handle",
5094 FT_UINT16
, BASE_HEX
, NULL
, 0x0,
5097 { &hf_bthci_evt_clock
,
5098 { "Clock", "bthci_evt.clock",
5099 FT_UINT32
, BASE_HEX
, NULL
, 0x0,
5102 { &hf_bthci_evt_clock_accuracy
,
5103 { "Clock", "bthci_evt.clock_accuracy",
5104 FT_UINT16
, BASE_HEX
, NULL
, 0x0,
5107 { &hf_bthci_evt_afh_mode
,
5108 {"AFH Mode", "bthci_evt.afh_mode",
5109 FT_UINT8
, BASE_DEC
, VALS(evt_enable_values
), 0x0,
5112 { &hf_bthci_evt_afh_channel_map
,
5113 {"AFH Channel Map", "bthci_evt.afh_channel_map",
5114 FT_BYTES
, BASE_NONE
, NULL
, 0x0,
5117 { &hf_bthci_evt_simple_pairing_mode
,
5118 {"Simple Pairing Mode", "bthci_evt.simple_pairing_mode",
5119 FT_UINT8
, BASE_DEC
, VALS(evt_enable_values
), 0x0,
5122 { &hf_bthci_evt_hash_c
,
5123 {"Hash C", "bthci_evt.hash_c",
5124 FT_BYTES
, BASE_NONE
, NULL
, 0x0,
5127 { &hf_bthci_evt_randomizer_r
,
5128 {"Randomizer R", "bthci_evt.randomizer_r",
5129 FT_BYTES
, BASE_NONE
, NULL
, 0x0,
5132 { &hf_bthci_evt_io_capability
,
5133 {"IO Capability", "bthci_evt.io_capability",
5134 FT_UINT8
, BASE_HEX
, VALS(bthci_cmd_io_capability_vals
), 0x0,
5137 { &hf_bthci_evt_oob_data_present
,
5138 {"OOB Data Present", "bthci_evt.oob_data_present",
5139 FT_UINT8
, BASE_DEC
, VALS(bthci_cmd_oob_data_present_vals
), 0x0,
5142 { &hf_bthci_evt_auth_requirements
,
5143 {"Authentication Requirements", "bthci_evt.auth_requirements",
5144 FT_UINT8
, BASE_DEC
|BASE_EXT_STRING
, &bthci_cmd_auth_req_vals_ext
, 0x0,
5147 { &hf_bthci_evt_numeric_value
,
5148 {"Numeric Value", "bthci_evt.numeric_value",
5149 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
5152 { &hf_bthci_evt_passkey
,
5153 {"Passkey", "bthci_evt.passkey",
5154 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
5157 { &hf_bthci_evt_notification_type
,
5158 {"Notification Type", "bthci_evt.notification_type",
5159 FT_UINT8
, BASE_DEC
, VALS(bthci_cmd_notification_types
), 0x0,
5162 { &hf_bthci_evt_data
,
5163 {"Data", "bthci_evt.data",
5164 FT_BYTES
, BASE_NONE
, NULL
, 0x0,
5167 { &hf_bthci_evt_eir_struct_length
,
5168 { "Length", "bthci_evt.eir_struct_length",
5169 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
5170 "Structure Length", HFILL
}
5172 { &hf_bthci_evt_eir_struct_type
,
5173 { "Type", "bthci_evt.eir_data_type",
5174 FT_UINT8
, BASE_HEX
|BASE_EXT_STRING
, &bthci_cmd_eir_data_type_vals_ext
, 0x0,
5175 "Data Type", HFILL
}
5177 { &hf_bthci_evt_sc_uuid16
,
5178 { "UUID", "bthci_evt.service_class_uuid16",
5179 FT_UINT16
, BASE_HEX
|BASE_EXT_STRING
, &bthci_cmd_service_class_type_vals_ext
, 0x0,
5180 "16-bit Service Class UUID", HFILL
}
5182 { &hf_bthci_evt_sc_uuid32
,
5183 { "UUID", "bthci_evt.service_class_uuid32",
5184 FT_UINT32
, BASE_HEX
, NULL
, 0x0,
5185 "32-bit Service Class UUID", HFILL
}
5187 { &hf_bthci_evt_sc_uuid128
,
5188 { "UUID", "bthci_evt.service_class_uuid128",
5189 FT_BYTES
, BASE_NONE
, NULL
, 0x0,
5190 "128-bit Service Class UUID", HFILL
}
5192 { &hf_bthci_evt_data_length
,
5193 { "Data Length", "bthci_evt.data_length",
5194 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
5197 { &hf_bthci_evt_location_domain_aware
,
5198 { "Location Domain Aware", "bthci_evt.location_domain_aware",
5199 FT_BOOLEAN
, 8, NULL
, 0x0,
5202 { &hf_bthci_evt_location_domain
,
5203 { "Location Domain", "bthci_evt.location_domain",
5204 FT_STRING
, BASE_NONE
, NULL
, 0x0,
5205 "ISO 3166-1 Country Code", HFILL
}
5207 { &hf_bthci_evt_location_domain_options
,
5208 { "Location Domain Options", "bthci_evt.location_domain_options",
5209 FT_STRING
, BASE_NONE
, NULL
, 0x0,
5212 { &hf_bthci_evt_location_options
,
5213 { "Location Options", "bthci_evt.location_options",
5214 FT_UINT8
, BASE_HEX
, NULL
, 0x0,
5217 { &hf_bthci_evt_flow_control_mode
,
5218 { "Flow Control Mode", "bthci_evt.flow_control_mode",
5219 FT_UINT8
, BASE_HEX
, VALS(evt_flow_ctrl_mode
), 0x0,
5222 { &hf_bthci_evt_physical_link_handle
,
5223 { "Physical Link Handle", "bthci_evt.physical_link_handle",
5224 FT_UINT8
, BASE_HEX
, NULL
, 0x0,
5227 { &hf_bthci_evt_flow_spec_identifier
,
5228 { "Flow Spec Identifier", "bthci_evt.flow_spec_id",
5229 FT_UINT8
, BASE_HEX
, NULL
, 0x0,
5232 { &hf_bthci_evt_logical_link_handle
,
5233 { "Logical Link Handle", "bthci_evt.logical_link_handle",
5234 FT_UINT16
, BASE_HEX
, NULL
, 0x0,
5237 { &hf_bthci_evt_max_acl_data_packet_length
,
5238 { "Max. ACL Data Packet Length", "bthci_evt.max_acl_data_packet_length",
5239 FT_UINT16
, BASE_HEX
, NULL
, 0x0,
5242 { &hf_bthci_evt_data_block_length
,
5243 { "Max. Data Block Length", "bthci_evt.data_block_length",
5244 FT_UINT16
, BASE_HEX
, NULL
, 0x0,
5247 { &hf_bthci_evt_total_num_data_blocks
,
5248 { "Total Number of Data Blocks", "bthci_evt.total_num_data_blocks",
5249 FT_UINT16
, BASE_HEX
, NULL
, 0x0,
5252 { &hf_bthci_evt_enc_key_size
,
5253 { "Encryption Key Size", "bthci_evt.enc_key_size",
5254 FT_INT8
, BASE_DEC
, NULL
, 0x0,
5257 { &hf_bthci_evt_amp_remaining_assoc_length
,
5258 { "AMP Remaining Assoc Length", "bthci_evt.amp_remaining_assoc_length",
5259 FT_UINT16
, BASE_DEC
, 0x0, 0x0,
5262 { &hf_bthci_evt_amp_assoc_fragment
,
5263 { "AMP Assoc Fragment", "bthci_evt.amp_assoc_fragment",
5264 FT_BYTES
, BASE_NONE
, 0x0, 0x0,
5267 { &hf_bthci_evt_amp_status
,
5268 { "AMP Status", "bthci_evt.amp_status",
5269 FT_UINT8
, BASE_HEX
, VALS(evt_amp_status
), 0x0,
5272 { &hf_bthci_evt_total_bandwidth
,
5273 { "Total Bandwidth (kbps)", "bthci_evt.total_bandwidth",
5274 FT_UINT32
, BASE_DEC
, 0x0, 0x0,
5277 { &hf_bthci_evt_max_guaranteed_bandwidth
,
5278 { "Max Guaranteed Bandwidth (kbps)", "bthci_evt.max_guaranteed_bandwidth",
5279 FT_UINT32
, BASE_DEC
, 0x0, 0x0,
5282 { &hf_bthci_evt_min_latency
,
5283 { "Min Latency (us)", "bthci_evt.min_latency",
5284 FT_UINT32
, BASE_DEC
, 0x0, 0x0,
5287 { &hf_bthci_evt_max_pdu_size
,
5288 { "Max PDU Size", "bthci_evt.max_pdu_size",
5289 FT_UINT32
, BASE_DEC
, 0x0, 0x0,
5292 { &hf_bthci_evt_amp_controller_type
,
5293 { "Controller Type", "bthci_evt.controller_type",
5294 FT_UINT8
, BASE_HEX
, VALS(evt_controller_types
), 0x0,
5297 { &hf_bthci_evt_pal_capabilities_00
,
5298 { "Guaranteed Service", "bthci_evt.pal_capabilities",
5299 FT_BOOLEAN
, 16, NULL
, 0x0001,
5302 { &hf_bthci_evt_max_amp_assoc_length
,
5303 { "Max AMP Assoc Length", "bthci_evt.max_amp_assoc_length",
5304 FT_UINT32
, BASE_DEC
, 0x0, 0x0,
5307 { &hf_bthci_evt_max_flush_to_us
,
5308 { "Max Flush Timeout (us)", "bthci_evt.max_flush_to",
5309 FT_UINT32
, BASE_DEC
, 0x0, 0x0,
5312 { &hf_bthci_evt_best_effort_flush_to_us
,
5313 { "Best Effort Flush Timeout (us)", "bthci_evt.best_effort_flush_to",
5314 FT_UINT32
, BASE_DEC
, 0x0, 0x0,
5317 { &hf_bthci_evt_link_loss_reason
,
5318 { "Reason", "bthci_evt.link_loss_reason",
5319 FT_UINT8
, BASE_HEX
, VALS(evt_link_loss_reasons
), 0x0,
5322 { &hf_bthci_evt_num_compl_blocks
,
5323 { "Number Of Completed Blocks", "bthci_evt.num_compl_blocks",
5324 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
5327 { &hf_bthci_evt_test_scenario
,
5328 { "Test Scenario", "bthci_evt.test_scenario",
5329 FT_UINT8
, BASE_HEX
, NULL
, 0x0,
5332 { &hf_bthci_evt_report_reason
,
5333 { "Reason", "bthci_evt.report_reason",
5334 FT_UINT8
, BASE_HEX
, VALS(evt_report_reasons
), 0x0,
5337 { &hf_bthci_evt_report_event_type
,
5338 { "Report Event Type", "bthci_evt.report_event_type",
5339 FT_UINT8
, BASE_HEX
, VALS(evt_report_event_types
), 0x0,
5342 { &hf_bthci_evt_num_frames
,
5343 { "Number Of Frames", "bthci_evt.num_frames",
5344 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
5347 { &hf_bthci_evt_num_error_frames
,
5348 { "Number Of Error Frames", "bthci_evt.num_error_frames",
5349 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
5352 { &hf_bthci_evt_num_bits
,
5353 { "Number Of Bits", "bthci_evt.num_bits",
5354 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
5357 { &hf_bthci_evt_num_error_bits
,
5358 { "Number Of Error Bits", "bthci_evt.num_error_bits",
5359 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
5362 { &hf_bthci_evt_short_range_mode_state
,
5363 { "Short Range Mode State", "bthci_evt.short_range_mode_state",
5364 FT_BOOLEAN
, 8, NULL
, 0x0,
5367 { &hf_bthci_evt_transmit_power_level_gfsk
,
5368 { "Transmit Power Level GFSK (dBm)", "bthci_evt.transmit_power_level_gfsk",
5369 FT_INT8
, BASE_DEC
, NULL
, 0x0,
5372 { &hf_bthci_evt_transmit_power_level_dqpsk
,
5373 { "Transmit Power Level DQPSK (dBm)", "bthci_evt.transmit_power_level_dqpsk",
5374 FT_INT8
, BASE_DEC
, NULL
, 0x0,
5377 { &hf_bthci_evt_transmit_power_level_8dpsk
,
5378 { "Transmit Power Level 8DPSK (dBm)", "bthci_evt.transmit_power_level_8dpsk",
5379 FT_INT8
, BASE_DEC
, NULL
, 0x0,
5382 { &hf_bthci_evt_flush_to_us
,
5383 { "Flush Timeout (us)", "bthci_evt.flushto",
5384 FT_UINT32
, BASE_DEC
, NULL
, 0x0,
5387 { &hf_bthci_evt_le_supported_host
,
5388 { "LE Supported Host", "bthci_evt.le_supported_host",
5389 FT_BOOLEAN
, 8, NULL
, 0x0,
5392 { &hf_bthci_evt_le_simultaneous_host
,
5393 { "Simultaneous LE Host", "bthci_evt.le_simlutaneous_host",
5394 FT_BOOLEAN
, 8, NULL
, 0x0,
5395 "Support for both LE and BR/EDR to same device", HFILL
}
5397 { &hf_bthci_evt_le_acl_data_pkt_len
,
5398 { "LE ACL Data Packet Length", "bthci_evt.le_acl_data_pkt_len",
5399 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
5402 { &hf_bthci_evt_total_num_le_acl_data_pkts
,
5403 { "Total Number LE ACL Data Packets", "bthci_evt.le_total_num_acl_data_pkts",
5404 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
5407 { &hf_bthci_evt_le_features
,
5408 { "Supported LE Features", "bthci_evt.le_features",
5409 FT_NONE
, BASE_NONE
, NULL
, 0x00,
5412 { &hf_bthci_evt_le_feature_00
,
5413 { "LE Encryption", "bthci_evt.le_features.encryption",
5414 FT_BOOLEAN
, 8, NULL
, 0x01,
5417 { &hf_bthci_evt_white_list_size
,
5418 { "White List Size", "bthci_evt.le_white_list_size",
5419 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
5420 "Max. total whitelist entries storable in controller", HFILL
}
5422 { &hf_bthci_evt_le_channel_map
,
5423 { "Channel Map", "bthci_evt.le_channel_map",
5424 FT_BYTES
, BASE_NONE
, NULL
, 0x0,
5427 { &hf_bthci_evt_encrypted_data
,
5428 { "Plaintext", "bthci_evt.le_encrypted_data",
5429 FT_BYTES
, BASE_NONE
, NULL
, 0x0,
5432 { &hf_bthci_evt_random_number
,
5433 { "Random Number", "bthci_evt.le_random_number",
5434 FT_BYTES
, BASE_NONE
, NULL
, 0x0,
5437 { &hf_bthci_evt_le_num_packets
,
5438 { "Number of Packets", "bthci_evt.le_num_packets",
5439 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
5442 { &hf_bthci_evt_le_meta_subevent
,
5443 { "Sub Event", "bthci_evt.le_meta_subevent",
5444 FT_UINT8
, BASE_HEX
, VALS(evt_le_meta_subevent
), 0x00,
5447 { &hf_bthci_evt_le_peer_address_type
,
5448 { "Peer Address Type", "bthci_evt.le_peer_address_type",
5449 FT_UINT8
, BASE_HEX
, VALS(bthci_cmd_address_types_vals
), 0x0,
5452 { &hf_bthci_evt_le_con_interval
,
5453 { "Connection Interval", "bthci_evt.le_con_interval",
5454 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
5457 { &hf_bthci_evt_le_con_latency
,
5458 { "Connection Latency", "bthci_evt.le_con_latency",
5459 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
5462 { &hf_bthci_evt_le_supervision_timeout
,
5463 { "Supervision Timeout", "bthci_evt.le_supv_timeout",
5464 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
5467 { &hf_bthci_evt_encrypted_diversifier
,
5468 { "Encrypted Diversifier", "bthci_evt.le_encrypted_diversifier",
5469 FT_UINT16
, BASE_HEX
, NULL
, 0x0,
5472 { &hf_bthci_evt_le_master_clock_accuracy
,
5473 { "Master Clock Accuracy", "bthci_evt.le_master_clock_accuracy",
5474 FT_UINT8
, BASE_HEX
, VALS(evt_master_clock_accuray
), 0x0,
5477 { &hf_bthci_evt_num_reports
,
5478 { "Num Reports", "bthci_evt.le_num_reports",
5479 FT_UINT8
, BASE_DEC
, NULL
, 0x0,
5482 { &hf_bthci_evt_advts_event_type
,
5483 { "Event Type", "bthci_evt.le_advts_event_type",
5484 FT_UINT8
, BASE_HEX
, VALS(evt_le_advertising_evt_types
), 0x0,
5487 { &hf_bthci_evt_appearance
,
5488 { "Appearance", "bthci_evt.le_appearance",
5489 FT_UINT16
, BASE_HEX
|BASE_EXT_STRING
, &bthci_cmd_appearance_vals_ext
, 0x0,
5492 { &hf_bthci_evt_flags_limited_disc_mode
,
5493 { "LE Limited Discoverable Mode", "bthci_evt.le_flags.limit_disc_mode",
5494 FT_BOOLEAN
, 8, NULL
, 0x01,
5497 { &hf_bthci_evt_flags_general_disc_mode
,
5498 { "LE General Discoverable Mode", "bthci_evt.le_flags.general_disc_mode",
5499 FT_BOOLEAN
, 8, NULL
, 0x02,
5502 { &hf_bthci_evt_flags_bredr_not_support
,
5503 { "BR/EDR Not Supported", "bthci_evt.le_flags.bredr_not_supported",
5504 FT_BOOLEAN
, 8, NULL
, 0x04,
5507 { &hf_bthci_evt_flags_le_bredr_support_ctrl
,
5508 { "Simultaneous LE and BR/EDR to Same Device Capable (Controller)", "bthci_evt.le_flags.bredr_support_ctrl",
5509 FT_BOOLEAN
, 8, NULL
, 0x08,
5512 { &hf_bthci_evt_flags_le_bredr_support_host
,
5513 { "Simultaneous LE and BR/EDR to Same Device Capable (Host)", "bthci_evt.le_flags.bredr_support_host",
5514 FT_BOOLEAN
, 8, NULL
, 0x10,
5517 { &hf_bthci_evt_flags_reserved
,
5518 { "Reserved", "bthci_evt.le_flags.reserved",
5519 FT_BOOLEAN
, 8, NULL
, 0xE0,
5522 { &hf_bthci_evt_oob_flags_oob_data_present
,
5523 { "OOB Data Present", "bthci_evt.oob_flags.oob_data_present",
5524 FT_BOOLEAN
, 8, NULL
, 0x01,
5527 { &hf_bthci_evt_oob_flags_le_supported_host
,
5528 { "LE Supported By Host", "bthci_evt.oob_flags.le_supported_host",
5529 FT_BOOLEAN
, 8, NULL
, 0x02,
5532 { &hf_bthci_evt_oob_flags_simultaneous_le_and_br_edr_host
,
5533 { "Simultaneous LE and BR/EDR to Same Device Capable (Host)", "bthci_evt.oob_flags.simultaneous_le_and_br_edr_host",
5534 FT_BOOLEAN
, 8, NULL
, 0x04,
5537 { &hf_bthci_evt_oob_flags_address_type
,
5538 { "Address Type", "bthci_evt.oob_flags.address_type",
5539 FT_UINT8
, BASE_HEX
, VALS(bthci_cmd_address_types_vals
), 0x08,
5542 { &hf_bthci_evt_le_states
,
5543 { "Supported LE States", "bthci_evt.le_states",
5544 FT_NONE
, BASE_NONE
, NULL
, 0x00,
5547 { &hf_bthci_evt_le_states_00
,
5548 { "Non-connectable Advertising State", "bthci_evt.le_states_00",
5549 FT_BOOLEAN
, 8, NULL
, 0x01,
5552 { &hf_bthci_evt_le_states_01
,
5553 { "Scannable Advertising State", "bthci_evt.le_states_01",
5554 FT_BOOLEAN
, 8, NULL
, 0x02,
5557 { &hf_bthci_evt_le_states_02
,
5558 { "Connectable Advertising State", "bthci_evt.le_states_02",
5559 FT_BOOLEAN
, 8, NULL
, 0x04,
5562 { &hf_bthci_evt_le_states_03
,
5563 { "Directed Advertising State", "bthci_evt.le_states_03",
5564 FT_BOOLEAN
, 8, NULL
, 0x08,
5567 { &hf_bthci_evt_le_states_04
,
5568 { "Passive Scanning State", "bthci_evt.le_states_04",
5569 FT_BOOLEAN
, 8, NULL
, 0x10,
5572 { &hf_bthci_evt_le_states_05
,
5573 { "Active Scanning State", "bthci_evt.le_states_05",
5574 FT_BOOLEAN
, 8, NULL
, 0x20,
5577 { &hf_bthci_evt_le_states_06
,
5578 { "Initiating State. Connection State in Master Role", "bthci_evt.le_states_06",
5579 FT_BOOLEAN
, 8, NULL
, 0x40,
5582 { &hf_bthci_evt_le_states_07
,
5583 { "Connection State in Slave Role", "bthci_evt.le_states_07",
5584 FT_BOOLEAN
, 8, NULL
, 0x80,
5587 { &hf_bthci_evt_le_states_10
,
5588 { "Non-connectable Advertising State and Passive Scanning State combination", "bthci_evt.le_states_10",
5589 FT_BOOLEAN
, 8, NULL
, 0x01,
5592 { &hf_bthci_evt_le_states_11
,
5593 { "Scannable Advertising State and Passive Scanning State combination", "bthci_evt.le_states_11",
5594 FT_BOOLEAN
, 8, NULL
, 0x02,
5597 { &hf_bthci_evt_le_states_12
,
5598 { "Connectable Advertising State and Passive Scanning State combination", "bthci_evt.le_states_12",
5599 FT_BOOLEAN
, 8, NULL
, 0x04,
5602 { &hf_bthci_evt_le_states_13
,
5603 { "Directed Advertising State and Passive Scanning State combination", "bthci_evt.le_states_13",
5604 FT_BOOLEAN
, 8, NULL
, 0x08,
5607 { &hf_bthci_evt_le_states_14
,
5608 { "Non-connectable Advertising State and Active Scanning State combination", "bthci_evt.le_states_14",
5609 FT_BOOLEAN
, 8, NULL
, 0x10,
5612 { &hf_bthci_evt_le_states_15
,
5613 { "Scannable Advertising State and Active Scanning State combination", "bthci_evt.le_states_15",
5614 FT_BOOLEAN
, 8, NULL
, 0x20,
5617 { &hf_bthci_evt_le_states_16
,
5618 { "Connectable Advertising State and Active Scanning State combination", "bthci_evt.le_states_16",
5619 FT_BOOLEAN
, 8, NULL
, 0x40,
5622 { &hf_bthci_evt_le_states_17
,
5623 { "Directed Advertising State and Active Scanning State combination", "bthci_evt.le_states_17",
5624 FT_BOOLEAN
, 8, NULL
, 0x80,
5627 { &hf_bthci_evt_le_states_20
,
5628 { "Non-connectable Advertising State and Initiating State combination", "bthci_evt.le_states_20",
5629 FT_BOOLEAN
, 8, NULL
, 0x01,
5632 { &hf_bthci_evt_le_states_21
,
5633 { "Scannable Advertising State and Initiating State combination", "bthci_evt.le_states_21",
5634 FT_BOOLEAN
, 8, NULL
, 0x02,
5637 { &hf_bthci_evt_le_states_22
,
5638 { "Non-connectable Advertising State and Master Role combination", "bthci_evt.le_states_22",
5639 FT_BOOLEAN
, 8, NULL
, 0x04,
5642 { &hf_bthci_evt_le_states_23
,
5643 { "Scannable Advertising State and Master Role combination", "bthci_evt.le_states_23",
5644 FT_BOOLEAN
, 8, NULL
, 0x08,
5647 { &hf_bthci_evt_le_states_24
,
5648 { "Non-connectable Advertising State and Slave Role combination", "bthci_evt.le_states_24",
5649 FT_BOOLEAN
, 8, NULL
, 0x10,
5652 { &hf_bthci_evt_le_states_25
,
5653 { "Scannable Advertising State and Slave Role combination", "bthci_evt.le_states_25",
5654 FT_BOOLEAN
, 8, NULL
, 0x20,
5657 { &hf_bthci_evt_le_states_26
,
5658 { "Passive Scanning State and Initiating State combination", "bthci_evt.le_states_26",
5659 FT_BOOLEAN
, 8, NULL
, 0x40,
5662 { &hf_bthci_evt_le_states_27
,
5663 { "Active Scanning State and Initiating State combination", "bthci_evt.le_states_27",
5664 FT_BOOLEAN
, 8, NULL
, 0x80,
5667 { &hf_bthci_evt_le_states_30
,
5668 { "Passive Scanning State and Master Role combination", "bthci_evt.le_states_30",
5669 FT_BOOLEAN
, 8, NULL
, 0x01,
5672 { &hf_bthci_evt_le_states_31
,
5673 { "Active Scanning State and Master Role combination", "bthci_evt.le_states_31",
5674 FT_BOOLEAN
, 8, NULL
, 0x02,
5677 { &hf_bthci_evt_le_states_32
,
5678 { "Passive Scanning state and Slave Role combination", "bthci_evt.le_states_32",
5679 FT_BOOLEAN
, 8, NULL
, 0x04,
5682 { &hf_bthci_evt_le_states_33
,
5683 { "Active Scanning state and Slave Role combination", "bthci_evt.le_states_33",
5684 FT_BOOLEAN
, 8, NULL
, 0x08,
5687 { &hf_bthci_evt_le_states_34
,
5688 { "Initiating State and Master Role combination. Master Role and Master Role combination", "bthci_evt.le_states_34",
5689 FT_BOOLEAN
, 8, NULL
, 0x10,
5692 { &hf_bthci_evt_eir_ad_ssp_oob_length
,
5693 { "SSP OOB Length", "bthci_evt.eir_ad.ssp_oob_length",
5694 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
5697 { &hf_bthci_evt_eir_ad_advertising_interval
,
5698 { "Advertising Interval", "bthci_evt.eir_ad.advertising_interval",
5699 FT_UINT16
, BASE_DEC
, NULL
, 0x0,
5702 { &hf_bthci_evt_eir_ad_company_id
,
5703 { "Company ID", "bthci_evt.eir_ad.company_id",
5704 FT_UINT16
, BASE_HEX
| BASE_EXT_STRING
, &bthci_evt_comp_id_ext
, 0x0,
5708 { "Item", "bthci_evt.eir_ad",
5709 FT_NONE
, BASE_NONE
, NULL
, 0x0,
5712 { &hf_extended_inquiry_response_data
,
5713 { "Extended Inquiry Response Data", "bthci_evt.extended_inquiry_response_data",
5714 FT_NONE
, BASE_NONE
, NULL
, 0x0,
5717 { &hf_advertising_data
,
5718 { "Advertising Data", "bthci_evt.advertising_data",
5719 FT_NONE
, BASE_NONE
, NULL
, 0x0,
5722 { &hf_usable_packet_types
,
5723 { "Usable Packet Types", "bthci_evt.usable_packet_types",
5724 FT_NONE
, BASE_NONE
, NULL
, 0x0,
5727 { &hf_3ds_association_notification
,
5728 { "3DS Association Notification", "bthci_evt.eir_ad.3ds.association_notification",
5729 FT_BOOLEAN
, 8, NULL
, 0x01,
5732 { &hf_3ds_battery_level_reporting
,
5733 { "3DS Battery Level Reporting", "bthci_evt.eir_ad.3ds.battery_level_reporting",
5734 FT_BOOLEAN
, 8, NULL
, 0x02,
5737 { &hf_3ds_send_battery_level_report_on_startup
,
5738 { "3DS Send Battery Level Report on Startup", "bthci_evt.eir_ad.3ds.send_battery_level_report_on_startup",
5739 FT_BOOLEAN
, 8, NULL
, 0x04,
5743 { "Reserved", "bthci_evt.eir_ad.3ds.reserved",
5744 FT_BOOLEAN
, 8, NULL
, 0x78,
5747 { &hf_3ds_factory_test_mode
,
5748 { "3DS Factory Test Mode", "bthci_evt.eir_ad.3ds.factory_test_mode",
5749 FT_BOOLEAN
, 8, NULL
, 0x80,
5752 { &hf_3ds_path_loss_threshold
,
5753 { "3DS Path Loss Threshold", "bthci_evt.eir_ad.3ds.path_loss_threshold",
5754 FT_UINT8
, BASE_DEC
, NULL
, 0x00,
5757 { &hf_3ds_legacy_fixed
,
5758 { "3DS Legacy Fixed", "bthci_evt.eir_ad.3ds_legacy.fixed_byte",
5759 FT_UINT8
, BASE_DEC
, NULL
, 0x00,
5762 { &hf_3ds_legacy_3d_capable_tv
,
5763 { "3DS Legacy Capable TV", "bthci_evt.eir_ad.3ds_legacy.capable_tv",
5764 FT_BOOLEAN
, 8, NULL
, 0x01,
5767 { &hf_3ds_legacy_ignored_1_3
,
5768 { "3DS Legacy Ignored", "bthci_evt.eir_ad.3ds_legacy.ignored.1_3",
5769 FT_BOOLEAN
, 8, NULL
, 0x0E,
5772 { &hf_3ds_legacy_fixed_4
,
5773 { "3DS Legacy Fixed", "bthci_evt.eir_ad.3ds_legacy.fixed.4",
5774 FT_BOOLEAN
, 8, NULL
, 0x10,
5777 { &hf_3ds_legacy_ignored_5
,
5778 { "3DS Legacy Ignored", "bthci_evt.eir_ad.3ds_legacy.ignored.5",
5779 FT_BOOLEAN
, 8, NULL
, 0x20,
5782 { &hf_3ds_legacy_fixed_6
,
5783 { "3DS Legacy Fixed", "bthci_evt.eir_ad.3ds_legacy.fixed.4",
5784 FT_BOOLEAN
, 8, NULL
, 0x40,
5787 { &hf_3ds_legacy_test_mode
,
5788 { "3DS Legacy Test Mode", "bthci_evt.eir_ad.3ds_legacy.test_mode",
5789 FT_BOOLEAN
, 8, NULL
, 0x80,
5792 { &hf_3ds_legacy_path_loss_threshold
,
5793 { "3DS Legacy Path Loss Threshold", "bthci_evt.eir_ad.3ds_legacy.path_loss_threshold",
5794 FT_UINT8
, BASE_DEC
, NULL
, 0x00,
5797 { &hf_did_vendor_id_source
,
5798 { "Vendor ID Source", "bthci_evt.eir_ad.did.vendor_id_source",
5799 FT_UINT16
, BASE_HEX
| BASE_EXT_STRING
, &did_vendor_id_source_vals_ext
, 0,
5802 { &hf_did_vendor_id
,
5803 { "Vendor ID", "bthci_evt.eir_ad.did.vendor_id",
5804 FT_UINT16
, BASE_HEX
, NULL
, 0,
5807 { &hf_did_vendor_id_bluetooth_sig
,
5808 { "Vendor ID", "bthci_evt.eir_ad.did.vendor_id",
5809 FT_UINT16
, BASE_HEX
| BASE_EXT_STRING
, &bthci_evt_comp_id_ext
, 0,
5812 { &hf_did_vendor_id_usb_forum
,
5813 { "Vendor ID", "bthci_evt.eir_ad.did.vendor_id",
5814 FT_UINT16
, BASE_HEX
| BASE_EXT_STRING
, &ext_usb_vendors_vals
, 0,
5817 { &hf_did_product_id
,
5818 { "Product ID", "bthci_evt.eir_ad.did.product_id",
5819 FT_UINT16
, BASE_HEX
, NULL
, 0,
5823 { "Version", "bthci_evt.eir_ad.did.version",
5824 FT_UINT16
, BASE_HEX
, NULL
, 0,
5829 static ei_register_info ei
[] = {
5830 { &ei_eir_undecoded
, { "bthci_evt.expert.eir.undecoded", PI_PROTOCOL
, PI_UNDECODED
, "Undecoded", EXPFILL
}},
5831 { &ei_eir_unknown
, { "bthci_evt.expert.eir.unknown", PI_PROTOCOL
, PI_WARN
, "Undown data", EXPFILL
}},
5832 { &ei_event_undecoded
, { "bthci_evt.expert.event.undecoded", PI_PROTOCOL
, PI_UNDECODED
, "Event undecoded", EXPFILL
}},
5833 { &ei_event_unknown
, { "bthci_evt.expert.event.unknown", PI_PROTOCOL
, PI_WARN
, "Unknown event", EXPFILL
}}
5836 /* Setup protocol subtree array */
5837 static gint
*ett
[] = {
5844 &ett_eir_struct_subtree
,
5845 &ett_le_state_subtree
5848 /* Register the protocol name and description */
5849 proto_bthci_evt
= proto_register_protocol("Bluetooth HCI Event",
5850 "HCI_EVT", "bthci_evt");
5851 new_register_dissector("bthci_evt", dissect_bthci_evt
, proto_bthci_evt
);
5853 /* Required function calls to register the header fields and subtrees used */
5854 proto_register_field_array(proto_bthci_evt
, hf
, array_length(hf
));
5855 proto_register_subtree_array(ett
, array_length(ett
));
5857 expert_bthci_evt
= expert_register_protocol(proto_bthci_evt
);
5858 expert_register_field_array(expert_bthci_evt
, ei
, array_length(ei
));
5860 module
= prefs_register_protocol(proto_bthci_evt
, NULL
);
5861 prefs_register_static_text_preference(module
, "hci_evt.version",
5862 "Bluetooth HCI version: 4.0 (Core)",
5863 "Version of protocol supported by this dissector.");
5867 /* If this dissector uses sub-dissector registration add a registration routine.
5868 This format is required because a script is used to find these routines and
5869 create the code that calls these routines.
5872 proto_reg_handoff_bthci_evt(void)
5874 dissector_handle_t bthci_evt_handle
;
5876 bthci_evt_handle
= find_dissector("bthci_evt");
5877 dissector_add_uint("hci_h4.type", HCI_H4_TYPE_EVT
, bthci_evt_handle
);
5878 dissector_add_uint("hci_h1.type", BTHCI_CHANNEL_EVENT
, bthci_evt_handle
);
5880 bthci_cmd_handle
= find_dissector("bthci_cmd");
5884 * Editor modelines - http://www.wireshark.org/tools/modelines.html
5889 * indent-tabs-mode: nil
5892 * vi: set shiftwidth=4 tabstop=8 expandtab:
5893 * :indentSize=4:tabSize=8:noTabs=true: