aboutsummaryrefslogtreecommitdiffstats
path: root/epan
diff options
context:
space:
mode:
Diffstat (limited to 'epan')
-rw-r--r--epan/dissectors/packet-bluetooth.c10
-rw-r--r--epan/dissectors/packet-bluetooth.h2
-rw-r--r--epan/dissectors/packet-bthci_vendor.c10
-rw-r--r--epan/dissectors/packet-btsmp.c24
4 files changed, 34 insertions, 12 deletions
diff --git a/epan/dissectors/packet-bluetooth.c b/epan/dissectors/packet-bluetooth.c
index b5cb9f0cf6..43bb695962 100644
--- a/epan/dissectors/packet-bluetooth.c
+++ b/epan/dissectors/packet-bluetooth.c
@@ -1002,6 +1002,12 @@ static const value_string bluetooth_company_id_vals[] = {
};
value_string_ext bluetooth_company_id_vals_ext = VALUE_STRING_EXT_INIT(bluetooth_company_id_vals);
+const value_string bluetooth_address_type_vals[] = {
+ { 0x00, "Public" },
+ { 0x01, "Random" },
+ { 0, NULL }
+};
+
guint32 max_disconnect_in_frame = G_MAXUINT32;
@@ -1192,7 +1198,7 @@ dissect_bluetooth(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *dat
pinfo->ptype = PT_BLUETOOTH;
get_conversation(pinfo, &pinfo->dl_src, &pinfo->dl_dst, pinfo->srcport, pinfo->destport);
- main_item = proto_tree_add_item(tree, proto_bluetooth, tvb, 0, tvb_length(tvb), ENC_NA);
+ main_item = proto_tree_add_item(tree, proto_bluetooth, tvb, 0, tvb_captured_length(tvb), ENC_NA);
main_tree = proto_item_add_subtree(main_item, ett_bluetooth);
bluetooth_data = (bluetooth_data_t *) wmem_new(wmem_packet_scope(), bluetooth_data_t);
@@ -1260,7 +1266,7 @@ dissect_bluetooth(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *dat
call_dissector(data_handle, tvb, pinfo, tree);
}
- return tvb_length(tvb);
+ return tvb_captured_length(tvb);
}
void
diff --git a/epan/dissectors/packet-bluetooth.h b/epan/dissectors/packet-bluetooth.h
index 29a737afd4..a2785bebc8 100644
--- a/epan/dissectors/packet-bluetooth.h
+++ b/epan/dissectors/packet-bluetooth.h
@@ -84,6 +84,8 @@ extern const value_string bthci_cmd_notification_types[];
extern value_string_ext bthci_evt_evt_code_vals_ext;
+extern const value_string bluetooth_address_type_vals[];
+
/* We support Bluetooth over various interfaces, interface_id and adapter_id
is used to decode further payload. Case: there is a host. Host has X
diff --git a/epan/dissectors/packet-bthci_vendor.c b/epan/dissectors/packet-bthci_vendor.c
index 259b2f1deb..7a42898cea 100644
--- a/epan/dissectors/packet-bthci_vendor.c
+++ b/epan/dissectors/packet-bthci_vendor.c
@@ -314,12 +314,6 @@ static const value_string batch_scan_mode_vals[] = {
{ 0, NULL }
};
-static const value_string address_type_vals[] = {
- { 0x00, "Public" },
- { 0x01, "Random" },
- { 0, NULL }
-};
-
static const value_string batch_scan_discard_rule_vals[] = {
{ 0x00, "Old Items" },
{ 0x01, "Lower RSSI Items" },
@@ -1270,7 +1264,7 @@ proto_register_bthci_vendor_broadcom(void)
},
{ &hf_le_batch_scan_address_type,
{ "Address Type", "bthci_vendor.broadcom.le.batch_scan.address_type",
- FT_UINT8, BASE_HEX, VALS(address_type_vals), 0x0,
+ FT_UINT8, BASE_HEX, VALS(bluetooth_address_type_vals), 0x0,
NULL, HFILL }
},
{ &hf_le_batch_scan_discard_rule,
@@ -1305,7 +1299,7 @@ proto_register_bthci_vendor_broadcom(void)
},
{ &hf_le_multi_advertising_address_type,
{ "Address Type", "bthci_vendor.broadcom.le.multi_advertising.address_type",
- FT_UINT8, BASE_HEX, VALS(address_type_vals), 0x0,
+ FT_UINT8, BASE_HEX, VALS(bluetooth_address_type_vals), 0x0,
NULL, HFILL }
},
{ &hf_le_multi_advertising_type,
diff --git a/epan/dissectors/packet-btsmp.c b/epan/dissectors/packet-btsmp.c
index 5ac91ac54f..d361272b05 100644
--- a/epan/dissectors/packet-btsmp.c
+++ b/epan/dissectors/packet-btsmp.c
@@ -29,6 +29,7 @@
#include "config.h"
#include <epan/packet.h>
+#include "packet-bluetooth.h"
#include "packet-btl2cap.h"
/* Initialize the protocol and registered fields */
@@ -53,6 +54,8 @@ static int hf_btsmp_ediv = -1;
static int hf_btsmp_authreq = -1;
static int hf_btsmp_initiator_key_distribution = -1;
static int hf_btsmp_responder_key_distribution = -1;
+static int hf_bd_addr = -1;
+static int hf_address_type = -1;
/* Initialize the subtree pointers */
static gint ett_btsmp = -1;
@@ -202,7 +205,7 @@ dissect_btsmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U
break;
}
- if (tvb_length_remaining(tvb, 0) < 1)
+ if (tvb_reported_length(tvb) < 1)
return FALSE;
proto_tree_add_item(st, hf_btsmp_opcode, tvb, 0, 1, ENC_LITTLE_ENDIAN);
@@ -265,7 +268,14 @@ dissect_btsmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U
offset += 16;
break;
- case 0x0a: /* Signing Informationn */
+ case 0x09: /* Identity Address Information */
+ proto_tree_add_item(st, hf_address_type, tvb, offset, 1, ENC_NA);
+ offset += 1;
+
+ offset = dissect_bd_addr(hf_bd_addr, st, tvb, offset, NULL);
+ break;
+
+ case 0x0a: /* Signing Information */
proto_tree_add_item(st, hf_btsmp_signature_key, tvb, offset, 16, ENC_NA);
offset += 16;
break;
@@ -380,6 +390,16 @@ proto_register_btsmp(void)
{"Responder Key Distribution", "btsmp.responder_key_distribution",
FT_NONE, BASE_NONE, NULL, 0x00,
NULL, HFILL}
+ },
+ {&hf_bd_addr,
+ { "BD_ADDR", "btsmp.bd_addr",
+ FT_ETHER, BASE_NONE, NULL, 0x0,
+ "Bluetooth Device Address", HFILL}
+ },
+ { &hf_address_type,
+ { "Address Type", "btsmp.address_type",
+ FT_UINT8, BASE_HEX, VALS(bluetooth_address_type_vals), 0x0,
+ NULL, HFILL }
}
};