Commit Graph

15 Commits

Author SHA1 Message Date
Thomas Sailer b5f2ed34b1 btle: decode new control PDUs and advertising info in 5.2
Decode control PDUs and advertising informationintroduced in
Bluetooth Core v5.2
2021-03-13 16:56:11 +00:00
Sultan Qasim Khan 2b6f38b37d Extend the BLUETOOTH_LE_LL_WITH_PHDR format
Introduce backwards compatible meanings to previously RFU flag bits.
This allows indicating packet direction and supporting BLE5 features.

0x0380 indicates the PDU type
0xC000 indicates the PHY mode

PDU types are:
0: Advertising or Data (Unspecified Direction)
1: Auxiliary Advertising
2: Data, Master to Slave
3: Data, Slave to Master
4: Connected Isochronous, Master to Slave
5: Connected Isochronous, Slave to Master
6: Broadcast Isochronous
7: Reserved

PHY modes are:
0: LE 1M
1: LE 2M
2: LE Coded
3: Reserved

For PDU type 1 (auxiliary advertising), MIC bits 0x3000 are repurposed
to indicate auxiliary advertisement type.

Auxiliary advertisement types are:
0: AUX_ADV_IND
1: AUX_CHAIN_IND
2: AUX_SYNC_IND
3: AUX_SCAN_RSP

Change-Id: I1e6ddc1488d4cf5c05af4a179c9ad362e94f42f6
Reviewed-on: https://code.wireshark.org/review/37142
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-07-13 05:16:03 +00:00
Guy Harris e1d9a226a2 Fix the type of arrays of pointers to hf_ values for bitfield routines.
The static arrays are supposed to be arrays of const pointers to int,
not arrays of non-const pointers to const int.

Fixing that means some bugs (scribbling on what's *supposed* to be a
const array) will be caught (see packet-ieee80211-radiotap.c for
examples, the first of which inspired this change and the second of
which was discovered while testing compiles with this change), and
removes the need for some annoying casts.

Also make some of those arrays static while we're at it.

Update documentation and dissector-generator tools.

Change-Id: I789da5fc60aadc15797cefecfd9a9fbe9a130ccc
Reviewed-on: https://code.wireshark.org/review/37517
Petri-Dish: Guy Harris <gharris@sonic.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-06-19 11:32:26 +00:00
Joakim Andersson 8b5236d470 Bluetooth: Provide BTLE physical channel pdu type from capture context.
Add BTLE physical channel pdu type from capture context. The dissector uses
the access address to determine if the packet is either an Advertising physical
channel PDU or a Data physical channel PDU.
This assupmtion is not valid for Periodic Advertising where the AUX_SYNC_IND
advertising packet will be sent with a non-advertising access address.
There is also the new Isochronous physical channel PDU which can be both
broadcasted or connection-oriented.

Change-Id: I7f0ad74b3e30ffecade59b6d0c5965bfc6345318
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Reviewed-on: https://code.wireshark.org/review/36782
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2020-04-13 11:09:41 +00:00
Joakim Andersson 21b4b3c83e Bluetooth: Add channel to bluetooth dissector context
Add channel index to the bluetooth dissector context.

Change-Id: I7f0ad74b3e30ffecade59b6d0c5965bfc6345312
Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
Reviewed-on: https://code.wireshark.org/review/36777
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-04-12 10:52:10 +00:00
Guy Harris 20800366dd HTTPS (almost) everywhere.
Change all wireshark.org URLs to use https.

Fix some broken links while we're at it.

Change-Id: I161bf8eeca43b8027605acea666032da86f5ea1c
Reviewed-on: https://code.wireshark.org/review/34089
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2019-07-26 18:44:40 +00:00
Dario Lombardo fe219637a6 dissectors: use SPDX identifiers.
Change-Id: I92c94448e6641716d03158a5f332c8b53709423a
Reviewed-on: https://code.wireshark.org/review/25756
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-02-12 16:49:58 +00:00
Michal Labedzki 75a5cf9fa0 Bluetooth: BTLE*: Initialize what initialized was not
Fix unexpected Direction flag pass to BTLE dissector
what caused reassemble of L2CAP not working correctly
(it based on Source/Destination addresses/columns).

Change-Id: I10fb17c29b020f6ca746f7bbccb7527e0ba04624
Reviewed-on: https://code.wireshark.org/review/19084
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-12-05 12:48:04 +00:00
Michael Mann 9bcac48403 Manually add protocol dependencies derived from find_dissector.
Started by grepping call_dissector_with_data, call_dissector_only and call_dissector and traced the handles passed into them to a find_dissector within the dissector.  Then replaced find_dissector with find_dissector_add_dependency and added the protocol id from the dissector.
"data" dissector was not considered to be a dependency.

Change-Id: I15d0d77301306587ef8e7af5876e74231816890d
Reviewed-on: https://code.wireshark.org/review/14509
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-03-20 12:48:48 +00:00
Michael Mann 31a54708f4 new_register_dissector -> register_dissector for dissector directory.
Change-Id: Ie39ef054a4a942687bd079f3a4d8c2cc55d5f22c
Reviewed-on: https://code.wireshark.org/review/12485
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-12-09 12:38:06 +00:00
Michal Labedzki 578c2beeb2 Bluetooth: btle_rf: Use proto_tree_add_bitmask
Change-Id: I79143cb788a13bd67ce2bd515b2b90d427dbcfcb
Reviewed-on: https://code.wireshark.org/review/6901
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2015-02-02 10:48:22 +00:00
Michal Labedzki 879a221db4 Bluetooth: BTLE RF: Remove tree and reduce indentation level
Useless check for tree avoid setting Bluetooth addresses.

Change-Id: If38465679370c5ea74f6d916e409e337d60cf7db
Reviewed-on: https://code.wireshark.org/review/6403
Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
Tested-by: Michal Labedzki <michal.labedzki@tieto.com>
2015-01-09 06:59:29 +00:00
Martin Mathieson 596669f921 First batch of unincludes. Last attempt...
Change-Id: I3681462aeb98ca62ed3ec5eb226b2553317391a9
Reviewed-on: https://code.wireshark.org/review/5997
Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com>
Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2014-12-22 21:03:13 +00:00
Michal Labedzki f5cd21543d Bluetooth: Add generic Bluetooth dissector
Bluetooth dissector is used to add ability to filter all bluetooth
payload from capture files (there are many transport like:
hci_h4, hci_h1, hci_usb, hci_mon, btle). Also it is used to placeholder for
all data tree used to store additional informations like bd_addrs, names, etc.
Finally it is used to be one point for Bluetooth
Endpoints/Conversation filtering what is enabled now.

Also add Master/Slave Role and Connection Mode tracking.

Change-Id: I67048080fb8ee16fa0f4ec429c1257de81ddd737
Reviewed-on: https://code.wireshark.org/review/5771
Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2014-12-18 11:03:05 +00:00
Christopher Kilgour ef94a80bfa Introduces two new Bluetooth DLTs for RF-based captures.
Adds support for BLUETOOTH_LE_LL_WITH_PHDR, dissector integrates with existing
BTLE dissector.

Fixes BTLE dissector to correctly extract packet CRC.

Adds CRC checking to BTLE dissector.

Provides optional context to BTLE dissector that allows RF captures to provide
link-layer hints for dissection details.  Significantly, parameters for
determining CRC correctness are provided, as well as Access Address validity
information.

Change-Id: I7d4936b053353a7f9c524021c01f67f5828253fb
Reviewed-on: https://code.wireshark.org/review/310
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-07 05:20:17 +00:00