aboutsummaryrefslogtreecommitdiffstats
path: root/epan
diff options
context:
space:
mode:
authorChris Maynard <Christopher.Maynard@GTECH.COM>2013-02-14 15:29:25 +0000
committerChris Maynard <Christopher.Maynard@GTECH.COM>2013-02-14 15:29:25 +0000
commitc3c6ebe6c0f1a9b4ebc33b19509895abc88178d1 (patch)
tree2f33f4e688019a9f38f7549440f45e0b769027e2 /epan
parent203e7e0301350f83c585bef7c900fa1e33565d6e (diff)
From Michael Labedzki via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8304: Fix potential inconsistency with interfaces introduced with r47651.
svn path=/trunk/; revision=47655
Diffstat (limited to 'epan')
-rw-r--r--epan/dissectors/packet-bluetooth-hci.h10
-rw-r--r--epan/dissectors/packet-btl2cap.c5
2 files changed, 13 insertions, 2 deletions
diff --git a/epan/dissectors/packet-bluetooth-hci.h b/epan/dissectors/packet-bluetooth-hci.h
index c9af53f412..44bc90b500 100644
--- a/epan/dissectors/packet-bluetooth-hci.h
+++ b/epan/dissectors/packet-bluetooth-hci.h
@@ -60,9 +60,19 @@ extern const value_string bthci_cmd_page_scan_period_modes[];
extern const value_string bthci_cmd_notification_types[];
+/* 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
+ interfaces. Each interface has Y adapter. Each adapter has ACL handle or
+ L2CAP CID. ACL handle has L2CAP CID and/or L2CAP PSM. L2CAP CID or
+ L2CAP PSM has RFCOMM channel or other end-protocol like OBEX, AVRCP, HID,
+ AVDTP, BNEP etc. RFCOMM channel has end-protocol like OBEX, HFP, etc.
+ Important note: correct payload decoding should store needed data using
+ key contain interface_id, adapter_id, ..., last_channel_type (for example
+ RFCOMM channel, transaction_id, frame number etc. ) */
#define HCI_INTERFACE_H1 0
#define HCI_INTERFACE_H4 1
#define HCI_INTERFACE_USB 2
+#define HCI_INTERFACE_AMP 3
#define HCI_ADAPTER_DEFAULT 0
diff --git a/epan/dissectors/packet-btl2cap.c b/epan/dissectors/packet-btl2cap.c
index 4fc0ca093f..20e154c8d9 100644
--- a/epan/dissectors/packet-btl2cap.c
+++ b/epan/dissectors/packet-btl2cap.c
@@ -33,6 +33,7 @@
#include <epan/expert.h>
#include <epan/tap.h>
+#include "packet-bluetooth-hci.h"
#include "packet-bthci_acl.h"
#include "packet-btsdp.h"
#include "packet-btl2cap.h"
@@ -1293,8 +1294,8 @@ dissect_btl2cap(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
acl_data = (bthci_acl_data_t *)pinfo->private_data;
l2cap_data = ep_alloc(sizeof(btl2cap_data_t));
- l2cap_data->interface_id = (acl_data)? acl_data->interface_id : 0;
- l2cap_data->adapter_id = (acl_data)? acl_data->adapter_id : 0;
+ l2cap_data->interface_id = (acl_data)? acl_data->interface_id : HCI_INTERFACE_AMP;
+ l2cap_data->adapter_id = (acl_data)? acl_data->adapter_id : HCI_ADAPTER_DEFAULT;
l2cap_data->chandle = (acl_data)? acl_data->chandle : 0;
l2cap_data->cid = cid;
l2cap_data->psm = 0;