summaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-bluetooth.h
diff options
context:
space:
mode:
Diffstat (limited to 'epan/dissectors/packet-bluetooth.h')
-rw-r--r--epan/dissectors/packet-bluetooth.h185
1 files changed, 92 insertions, 93 deletions
diff --git a/epan/dissectors/packet-bluetooth.h b/epan/dissectors/packet-bluetooth.h
index 3f0be811..99361186 100644
--- a/epan/dissectors/packet-bluetooth.h
+++ b/epan/dissectors/packet-bluetooth.h
@@ -10,8 +10,7 @@
#ifndef __PACKET_BLUETOOTH_H__
#define __PACKET_BLUETOOTH_H__
-#include <epan/wmem_scopes.h>
-
+#include <epan/packet.h>
#include "packet-usb.h"
#include "packet-ubertooth.h"
@@ -81,7 +80,7 @@ typedef enum {
BT_PD_NONE, /* no protocol data */
BT_PD_BTHCI, /* struct bthci_phdr * */
BT_PD_BTMON, /* struct btmon_phdr * */
- BT_PD_USB_CONV_INFO, /* usb_conv_info_t * */
+ BT_PD_URB_INFO, /* urb_info_t * */
BT_PD_UBERTOOTH_DATA /* ubertooth_data_t * */
} bt_protocol_data_type;
@@ -94,9 +93,9 @@ typedef enum {
/* localhost_bdaddr: interface_id + adapter_id + frame_number -> bd_addr[6] */
/* localhost_name: interface_id + adapter_id + frame_number -> name */
typedef struct _bluetooth_data_t {
- guint32 interface_id;
- guint32 adapter_id;
- guint32 *adapter_disconnect_in_frame;
+ uint32_t interface_id;
+ uint32_t adapter_id;
+ uint32_t *adapter_disconnect_in_frame;
wmem_tree_t *chandle_sessions;
wmem_tree_t *chandle_to_bdaddr;
wmem_tree_t *chandle_to_mode;
@@ -112,7 +111,7 @@ typedef struct _bluetooth_data_t {
void *none;
struct bthci_phdr *bthci;
struct btmon_phdr *btmon;
- usb_conv_info_t *usb_conv_info;
+ urb_info_t *urb;
ubertooth_data_t *ubertooth_data;
} previous_protocol_data;
@@ -125,37 +124,37 @@ typedef struct _bluetooth_data_t {
#define BT_LINK_TYPE_ISO 4
typedef struct _chandle_session_t {
- guint32 connect_in_frame;
- guint32 disconnect_in_frame;
- guint32 link_type;
+ uint32_t connect_in_frame;
+ uint32_t disconnect_in_frame;
+ uint32_t link_type;
} chandle_session_t;
typedef struct _remote_bdaddr_t {
- guint32 interface_id;
- guint32 adapter_id;
- guint16 chandle;
- guint8 bd_addr[6];
+ uint32_t interface_id;
+ uint32_t adapter_id;
+ uint16_t chandle;
+ uint8_t bd_addr[6];
} remote_bdaddr_t;
typedef struct _device_name_t {
- guint32 bd_addr_oui;
- guint32 bd_addr_id;
- gchar *name;
+ uint32_t bd_addr_oui;
+ uint32_t bd_addr_id;
+ char *name;
} device_name_t;
typedef struct _device_role_t {
- guint32 role;
- guint32 change_in_frame;
+ uint32_t role;
+ uint32_t change_in_frame;
} device_role_t;
typedef struct _connection_mode_t {
- gint32 mode;
- guint32 change_in_frame;
+ int32_t mode;
+ uint32_t change_in_frame;
} connection_mode_t;
typedef struct _stream_connection_handle_pair_t {
- gint32 chandle;
- guint32 change_in_frame;
+ int32_t chandle;
+ uint32_t change_in_frame;
} stream_connection_handle_pair_t;
#define ROLE_UNKNOWN 0
@@ -163,34 +162,34 @@ typedef struct _stream_connection_handle_pair_t {
#define ROLE_PERIPHERAL 2
typedef struct _localhost_bdaddr_entry_t {
- guint32 interface_id;
- guint32 adapter_id;
- guint8 bd_addr[6];
+ uint32_t interface_id;
+ uint32_t adapter_id;
+ uint8_t bd_addr[6];
} localhost_bdaddr_entry_t;
typedef struct _localhost_name_entry_t {
- guint32 interface_id;
- guint32 adapter_id;
- gchar *name;
+ uint32_t interface_id;
+ uint32_t adapter_id;
+ char *name;
} localhost_name_entry_t;
typedef struct _bluetooth_tap_data_t {
- guint32 interface_id;
- guint32 adapter_id;
+ uint32_t interface_id;
+ uint32_t adapter_id;
} bluetooth_tap_data_t;
typedef struct _hci_vendor_data_t {
- guint16 manufacturer;
- guint16 hci_revision;
- guint16 lmp_subversion;
- guint32 change_in_frame;
+ uint16_t manufacturer;
+ uint16_t hci_revision;
+ uint16_t lmp_subversion;
+ uint32_t change_in_frame;
struct _hci_vendor_data_t *previous;
} hci_vendor_data_t;
typedef struct _uuid_t {
- guint16 bt_uuid;
- guint8 size;
- guint8 data[16];
+ uint16_t bt_uuid;
+ uint8_t size;
+ uint8_t data[16];
} bluetooth_uuid_t;
enum bluetooth_device_type {
@@ -213,46 +212,46 @@ enum bluetooth_device_type {
};
typedef struct _bluetooth_device_tap_t {
- guint32 interface_id;
- guint32 adapter_id;
+ uint32_t interface_id;
+ uint32_t adapter_id;
- gboolean is_local;
- gboolean has_bd_addr;
- guint8 bd_addr[6];
+ bool is_local;
+ bool has_bd_addr;
+ uint8_t bd_addr[6];
enum bluetooth_device_type type;
union {
char *name;
struct {
- guint8 hci_version;
- guint16 hci_revision;
- guint8 lmp_version;
- guint16 lmp_subversion;
- guint16 manufacturer;
+ uint8_t hci_version;
+ uint16_t hci_revision;
+ uint8_t lmp_version;
+ uint16_t lmp_subversion;
+ uint16_t manufacturer;
} local_version;
struct {
- guint8 lmp_version;
- guint16 lmp_subversion;
- guint16 manufacturer;
+ uint8_t lmp_version;
+ uint16_t lmp_subversion;
+ uint16_t manufacturer;
} remote_version;
- guint8 scan;
- guint16 page_timeout;
- guint8 authentication;
- guint8 encryption;
- guint32 class_of_device;
- guint16 voice_setting;
- guint8 simple_pairing_mode;
- guint8 inquiry_mode;
+ uint8_t scan;
+ uint16_t page_timeout;
+ uint8_t authentication;
+ uint8_t encryption;
+ uint32_t class_of_device;
+ uint16_t voice_setting;
+ uint8_t simple_pairing_mode;
+ uint8_t inquiry_mode;
struct {
- guint16 acl_mtu;
- guint8 sco_mtu;
- guint16 acl_packets;
- guint16 sco_packets;
+ uint16_t acl_mtu;
+ uint8_t sco_mtu;
+ uint16_t acl_packets;
+ uint16_t sco_packets;
} mtus;
struct {
- guint16 acl_mtu;
- guint16 iso_mtu;
- guint16 acl_packets;
- guint16 iso_packets;
+ uint16_t acl_mtu;
+ uint16_t iso_mtu;
+ uint16_t acl_packets;
+ uint16_t iso_packets;
} le_mtus;
} data;
} bluetooth_device_tap_t;
@@ -272,26 +271,26 @@ enum bluetooth_hci_summary_type {
};
typedef struct _bluetooth_hci_summary_tap_t {
- guint32 interface_id;
- guint32 adapter_id;
-
- guint16 ocf;
- guint8 ogf;
- guint8 event;
- guint8 subevent;
- guint8 status;
- guint8 reason;
- guint8 hardware_error;
-
- const gchar *name;
+ uint32_t interface_id;
+ uint32_t adapter_id;
+
+ uint16_t ocf;
+ uint8_t ogf;
+ uint8_t event;
+ uint8_t subevent;
+ uint8_t status;
+ uint8_t reason;
+ uint8_t hardware_error;
+
+ const char *name;
enum bluetooth_hci_summary_type type;
} bluetooth_hci_summary_tap_t;
typedef struct _bluetooth_eir_ad_data_t {
- guint32 interface_id;
- guint32 adapter_id;
+ uint32_t interface_id;
+ uint32_t adapter_id;
- guint8 *bd_addr;
+ uint8_t *bd_addr;
} bluetooth_eir_ad_data_t;
@@ -306,21 +305,21 @@ WS_DLL_PUBLIC wmem_tree_t *bluetooth_uuids;
WS_DLL_PUBLIC value_string_ext bluetooth_uuid_vals_ext;
WS_DLL_PUBLIC value_string_ext bluetooth_company_id_vals_ext;
-extern guint32 bluetooth_max_disconnect_in_frame;
+extern uint32_t bluetooth_max_disconnect_in_frame;
-extern gint dissect_bd_addr(gint hf_bd_addr, packet_info *pinfo, proto_tree *tree,
- tvbuff_t *tvb, gint offset, gboolean is_local_bd_addr,
- guint32 interface_id, guint32 adapter_id, guint8 *bdaddr);
+extern int dissect_bd_addr(int hf_bd_addr, packet_info *pinfo, proto_tree *tree,
+ tvbuff_t *tvb, int offset, bool is_local_bd_addr,
+ uint32_t interface_id, uint32_t adapter_id, uint8_t *bdaddr);
-extern void bluetooth_unit_1p25_ms(gchar *buf, guint32 value);
-extern void bluetooth_unit_0p125_ms(gchar *buf, guint32 value);
+extern void bluetooth_unit_1p25_ms(char *buf, uint32_t value);
+extern void bluetooth_unit_0p125_ms(char *buf, uint32_t value);
-extern bluetooth_uuid_t get_bluetooth_uuid(tvbuff_t *tvb, gint offset, gint size);
-WS_DLL_PUBLIC const gchar *print_bluetooth_uuid(wmem_allocator_t *pool, bluetooth_uuid_t *uuid);
-WS_DLL_PUBLIC const gchar *print_numeric_bluetooth_uuid(wmem_allocator_t *pool, bluetooth_uuid_t *uuid);
+extern bluetooth_uuid_t get_bluetooth_uuid(tvbuff_t *tvb, int offset, int size);
+WS_DLL_PUBLIC const char *print_bluetooth_uuid(wmem_allocator_t *pool, bluetooth_uuid_t *uuid);
+WS_DLL_PUBLIC const char *print_numeric_bluetooth_uuid(wmem_allocator_t *pool, bluetooth_uuid_t *uuid);
-extern void save_local_device_name_from_eir_ad(tvbuff_t *tvb, gint offset,
- packet_info *pinfo, guint8 size, bluetooth_data_t *bluetooth_data);
+extern void save_local_device_name_from_eir_ad(tvbuff_t *tvb, int offset,
+ packet_info *pinfo, uint8_t size, bluetooth_data_t *bluetooth_data);
WS_DLL_PUBLIC bluetooth_data_t *
dissect_bluetooth_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);