aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-btobex.c
diff options
context:
space:
mode:
authorMichal Labedzki <michal.labedzki@tieto.com>2015-05-13 17:33:28 +0200
committerMichal Labedzki <michal.labedzki@tieto.com>2015-06-15 05:40:25 +0000
commit7102a06811ab63e0433ac91ad242e02c5668d259 (patch)
tree128482bd4b38cb6d4f56344261d94ea76db1c7e1 /epan/dissectors/packet-btobex.c
parent9fb6ec6c89631f2fbb5228d8f81a727f6d1fee27 (diff)
Qt/Bluetooth: Add Devices dialogue
Please found it under Bluetooth menu. It shows all devices found in logs, not only connected, all that its address can be found in logs. Show if device is local (in most cases: capturing on it side) and manufacturer and LMP version what should answer the question what version of Bluetooth is used by Bluetooth device chip. Also firmware version. Change-Id: I32e3b7100cdebcaa850b6541de0ab89dff41c0e1 Reviewed-on: https://code.wireshark.org/review/8901 Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Tested-by: Michal Labedzki <michal.labedzki@tieto.com> Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
Diffstat (limited to 'epan/dissectors/packet-btobex.c')
-rw-r--r--epan/dissectors/packet-btobex.c47
1 files changed, 24 insertions, 23 deletions
diff --git a/epan/dissectors/packet-btobex.c b/epan/dissectors/packet-btobex.c
index 79bb01461c..f8ea016a41 100644
--- a/epan/dissectors/packet-btobex.c
+++ b/epan/dissectors/packet-btobex.c
@@ -1778,6 +1778,28 @@ dissect_headers(proto_tree *tree, tvbuff_t *tvb, int offset, packet_info *pinfo,
guint32 value;
guint8 tag;
gchar *str = NULL;
+ guint32 interface_id;
+ guint32 adapter_id;
+ guint32 chandle;
+ guint32 channel;
+
+ if (is_obex_over_l2cap) {
+ btl2cap_data_t *l2cap_data;
+
+ l2cap_data = (btl2cap_data_t *) data;
+ interface_id = l2cap_data->interface_id;
+ adapter_id = l2cap_data->adapter_id;
+ chandle = l2cap_data->chandle;
+ channel = l2cap_data->cid;
+ } else {
+ btrfcomm_data_t *rfcomm_data;
+
+ rfcomm_data = (btrfcomm_data_t *) data;
+ interface_id = rfcomm_data->interface_id;
+ adapter_id = rfcomm_data->adapter_id;
+ chandle = rfcomm_data->chandle;
+ channel = rfcomm_data->dlci >> 1;
+ }
if (tvb_reported_length_remaining(tvb, offset) > 0) {
proto_item *hdrs;
@@ -2017,10 +2039,7 @@ dissect_headers(proto_tree *tree, tvbuff_t *tvb, int offset, packet_info *pinfo,
col_append_fstr(pinfo->cinfo, COL_INFO, " - %s", target_vals[i].strptr);
if (!pinfo->fd->flags.visited) {
obex_profile_data_t *obex_profile_data;
- guint32 interface_id;
- guint32 adapter_id;
- guint32 chandle;
- guint32 channel;
+
wmem_tree_key_t key[6];
guint32 k_interface_id;
guint32 k_adapter_id;
@@ -2028,24 +2047,6 @@ dissect_headers(proto_tree *tree, tvbuff_t *tvb, int offset, packet_info *pinfo,
guint32 k_chandle;
guint32 k_channel;
- if (is_obex_over_l2cap) {
- btl2cap_data_t *l2cap_data;
-
- l2cap_data = (btl2cap_data_t *) data;
- interface_id = l2cap_data->interface_id;
- adapter_id = l2cap_data->adapter_id;
- chandle = l2cap_data->chandle;
- channel = l2cap_data->cid;
- } else {
- btrfcomm_data_t *rfcomm_data;
-
- rfcomm_data = (btrfcomm_data_t *) data;
- interface_id = rfcomm_data->interface_id;
- adapter_id = rfcomm_data->adapter_id;
- chandle = rfcomm_data->chandle;
- channel = rfcomm_data->dlci >> 1;
- }
-
k_interface_id = interface_id;
k_adapter_id = adapter_id;
k_chandle = chandle;
@@ -2129,7 +2130,7 @@ dissect_headers(proto_tree *tree, tvbuff_t *tvb, int offset, packet_info *pinfo,
switch (tag) {
case 0x00: /* Device Address */
if (sub_parameter_length == 6) {
- offset = dissect_bd_addr(hf_sender_bd_addr, parameter_tree, tvb, offset, NULL);
+ offset = dissect_bd_addr(hf_sender_bd_addr, pinfo, parameter_tree, tvb, offset, FALSE, interface_id, adapter_id, NULL);
} else {
proto_tree_add_item(parameter_tree, hf_session_parameter_data, tvb, offset, sub_parameter_length, ENC_NA);