10 #ifndef __PACKET_BLUETOOTH_H__
11 #define __PACKET_BLUETOOTH_H__
15 #include "packet-usb.h"
16 #include "packet-ubertooth.h"
22 #define PROTO_DATA_BLUETOOTH_SERVICE_UUID 0
24 #define BLUETOOTH_DATA_SRC 0
25 #define BLUETOOTH_DATA_DST 1
27 #define HCI_H4_TYPE_CMD 0x01
28 #define HCI_H4_TYPE_ACL 0x02
29 #define HCI_H4_TYPE_SCO 0x03
30 #define HCI_H4_TYPE_EVT 0x04
31 #define HCI_H4_TYPE_ISO 0x05
33 #define HCI_OGF_LINK_CONTROL 0x01
34 #define HCI_OGF_LINK_POLICY 0x02
35 #define HCI_OGF_HOST_CONTROLLER 0x03
36 #define HCI_OGF_INFORMATIONAL 0x04
37 #define HCI_OGF_STATUS 0x05
38 #define HCI_OGF_TESTING 0x06
39 #define HCI_OGF_LOW_ENERGY 0x08
40 #define HCI_OGF_LOGO_TESTING 0x3e
41 #define HCI_OGF_VENDOR_SPECIFIC 0x3f
43 #define HCI_VENDOR_DEFAULT 0
45 #define DID_VENDOR_ID_SOURCE_BLUETOOTH_SIG 1
46 #define DID_VENDOR_ID_SOURCE_USB_FORUM 2
48 #define ACCESS_ADDRESS_ADVERTISING 0x8e89bed6
50 extern int proto_bluetooth;
54 #define STATUS_SUCCESS 0x00
56 #define UUID_GATT_PRIMARY_SERVICE_DECLARATION 0x2800
57 #define UUID_GATT_SECONDARY_SERVICE_DECLARATION 0x2801
58 #define UUID_GATT_INCLUDE_DECLARATION 0x2802
59 #define UUID_GATT_CHARACTERISTIC_DECLARATION 0x2803
77 #define HCI_INTERFACE_DEFAULT 0
78 #define HCI_ADAPTER_DEFAULT 0
86 } bt_protocol_data_type;
99 guint32 *adapter_disconnect_in_frame;
110 bt_protocol_data_type previous_protocol_data_type;
117 } previous_protocol_data;
121 #define BT_LINK_TYPE_UNKNOWN 0
122 #define BT_LINK_TYPE_ACL 1
123 #define BT_LINK_TYPE_SCO 2
124 #define BT_LINK_TYPE_LL 3
125 #define BT_LINK_TYPE_ISO 4
128 guint32 connect_in_frame;
129 guint32 disconnect_in_frame;
134 guint32 interface_id;
148 guint32 change_in_frame;
153 guint32 change_in_frame;
158 guint32 change_in_frame;
161 #define ROLE_UNKNOWN 0
162 #define ROLE_CENTRAL 1
163 #define ROLE_PERIPHERAL 2
166 guint32 interface_id;
172 guint32 interface_id;
178 guint32 interface_id;
183 guint16 manufacturer;
184 guint16 hci_revision;
185 guint16 lmp_subversion;
186 guint32 change_in_frame;
196 enum bluetooth_device_type {
197 BLUETOOTH_DEVICE_BD_ADDR,
198 BLUETOOTH_DEVICE_NAME,
199 BLUETOOTH_DEVICE_LOCAL_ADAPTER,
200 BLUETOOTH_DEVICE_LOCAL_VERSION,
201 BLUETOOTH_DEVICE_REMOTE_VERSION,
202 BLUETOOTH_DEVICE_RESET,
203 BLUETOOTH_DEVICE_SCAN,
204 BLUETOOTH_DEVICE_VOICE_SETTING,
205 BLUETOOTH_DEVICE_AUTHENTICATION,
206 BLUETOOTH_DEVICE_ENCRYPTION,
207 BLUETOOTH_DEVICE_CLASS_OF_DEVICE,
208 BLUETOOTH_DEVICE_SIMPLE_PAIRING_MODE,
209 BLUETOOTH_DEVICE_PAGE_TIMEOUT,
210 BLUETOOTH_DEVICE_INQUIRY_MODE,
211 BLUETOOTH_DEVICE_MTUS,
212 BLUETOOTH_DEVICE_LE_MTU
216 guint32 interface_id;
220 gboolean has_bd_addr;
222 enum bluetooth_device_type type;
227 guint16 hci_revision;
229 guint16 lmp_subversion;
230 guint16 manufacturer;
234 guint16 lmp_subversion;
235 guint16 manufacturer;
238 guint16 page_timeout;
239 guint8 authentication;
241 guint32 class_of_device;
242 guint16 voice_setting;
243 guint8 simple_pairing_mode;
260 enum bluetooth_hci_summary_type {
261 BLUETOOTH_HCI_SUMMARY_OPCODE,
262 BLUETOOTH_HCI_SUMMARY_EVENT_OPCODE,
263 BLUETOOTH_HCI_SUMMARY_EVENT,
264 BLUETOOTH_HCI_SUMMARY_SUBEVENT,
265 BLUETOOTH_HCI_SUMMARY_VENDOR_OPCODE,
266 BLUETOOTH_HCI_SUMMARY_VENDOR_EVENT_OPCODE,
267 BLUETOOTH_HCI_SUMMARY_VENDOR_EVENT,
268 BLUETOOTH_HCI_SUMMARY_STATUS,
269 BLUETOOTH_HCI_SUMMARY_STATUS_PENDING,
270 BLUETOOTH_HCI_SUMMARY_REASON,
271 BLUETOOTH_HCI_SUMMARY_HARDWARE_ERROR
275 guint32 interface_id;
284 guint8 hardware_error;
287 enum bluetooth_hci_summary_type type;
291 guint32 interface_id;
298 extern int bluetooth_device_tap;
299 extern int bluetooth_hci_summary_tap;
309 extern guint32 bluetooth_max_disconnect_in_frame;
312 tvbuff_t *tvb, gint offset, gboolean is_local_bd_addr,
313 guint32 interface_id, guint32 adapter_id, guint8 *bdaddr);
315 extern void bluetooth_unit_1p25_ms(gchar *buf, guint32 value);
316 extern void bluetooth_unit_0p125_ms(gchar *buf, guint32 value);
322 extern void save_local_device_name_from_eir_ad(
tvbuff_t *tvb, gint offset,
Definition: packet-bluetooth.h:96
Definition: packet-bluetooth.h:215
Definition: packet-bluetooth.h:290
Definition: packet-bluetooth.h:274
Definition: packet-bluetooth.h:177
Definition: packet-bluetooth.h:127
Definition: packet-bluetooth.h:151
Definition: packet-bluetooth.h:140
Definition: packet-bluetooth.h:146
Definition: packet-bluetooth.h:182
Definition: packet-bluetooth.h:165
Definition: packet-bluetooth.h:171
Definition: packet_info.h:44
Definition: packet-bluetooth.h:133
Definition: packet-bluetooth.h:156
Definition: packet-ubertooth.h:17
Definition: packet-usb.h:114
Definition: packet-bluetooth.h:190
Definition: value_string.h:170
Definition: value_string.h:26
Definition: wmem_allocator.h:27
Definition: wmem_tree-int.h:48
Definition: tvbuff-int.h:35