Commit Graph

28 Commits

Author SHA1 Message Date
Guy Harris 2820156fbd Move still *more* headers outside of extern "C".
If a header declares a function, or anything else requiring the extern
"C" decoration, have it wrap the declaration itself; don't rely on the
header itself being included inside extern "C".
2021-03-16 13:50:13 -07:00
Allan Møller Madsen 6d752876ef bthci_iso: full packet decode and reassembly added
Decode all Bluetooth HCI ISO packet fields and reassemble
fragmented packets.
2020-10-15 19:12:00 +00:00
Jakub Pawlowski 2364968cd6 Bluetooth: simple HCI ISO Data packet dissector
Change-Id: I2da85d4ebe069a566943896fddb31e9a095d67b5
Reviewed-on: https://code.wireshark.org/review/38007
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-08-10 10:29:09 +00:00
Allan Møller Madsen 1592679ed8 Bluetooth HCI: Add support for Bluetooth v5.2
Dissection of all new HCI commands and events added in
the newly released Bluetooth specification version 5.2.
Bluetooth Device Dialog updated to also show ISO buffer
size and amount.

Change-Id: I3a459760cbe5f6c4f985621cee40dbbe5e473d39
Signed-off-by: Allan Møller Madsen <almomadk@gmail.com>
Reviewed-on: https://code.wireshark.org/review/35957
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-01-31 05:13:15 +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
Michał Łabędzki 2947e03815 Bluetooth: HCI: Add more description about SCO Packet Types
Bluetooth specification says that some bits mean that packet type MAY BE used,
but some other bits meaning is "may NOT be used" what is suprising.
Follow specification by improving description of these fields.

Bug: 15156
Change-Id: Ie3cf11db420fff07b4833878d1131d56575ccc22
Reviewed-on: https://code.wireshark.org/review/30459
Petri-Dish: Michal Labedzki <michal.labedzki@wireshark.org>
Tested-by: Petri Dish Buildbot
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-11-01 22:41:23 +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 c799699040 Qt/Bluetooth: Split LE Meta Events
Add 3rd level subtree in Event->LE Meta, because of
existance of "Subevent" which is in similar thing to
Event or Opcode in CommandComplete.

Change-Id: Ib732ab417c5141251736b608de2e4e64b702c20a
Reviewed-on: https://code.wireshark.org/review/18667
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2016-11-04 09:23:05 +00:00
Michal Labedzki 237f2d4006 Qt/Bluetooth: Add Device dialog
Device dialog appears when user double clicks on device in
Devices dialog (Bluetooth->Devices). It provides
summary of device, like BD_ADDR, name, timeouts, etc.
Base on information from HCI layer, so this feature is more interesting
for local devices (capturing on its side). Each field has changes counter,
what mean that value at specified field changes in time, for example:
user change device name 3 times. Please note that initial change
is not counted. It means that you can see fielkd without any value
then change occur and counter is not increased. It will be increased
next time. Reason for that is in most cases field value is unknown
at start.

Change-Id: Ife0a6bd454eac00a28f8eb2906e1b395695b0307
Reviewed-on: https://code.wireshark.org/review/15793
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>
2016-06-10 13:50:35 +00:00
Michal Labedzki d51989e3ac Bluetooth: Add dissector table for EIR/AD Manufacturer content
Now it is possible to DecodeAs manufacturer specific content of
EIR or AD, so you are able to write custom plugin to dissect it.

New dissector table: btcommon.eir_ad.manufacturer_company_id

Change-Id: Iac458cd51f7b9bab51ccf7a4411984fb269a86ef
Reviewed-on: https://code.wireshark.org/review/13389
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>
2016-01-20 11:47:40 +00:00
Guy Harris 1c7b949290 Use try_val_to_str_ext() in print_uuid().
That's a much cleaner way of determining whether you found no matchin
bluetooth_uuid_vals_ext than checking whether val_to_str_ext_const()
returned the "use this if unknown" value.

It also lets us avoid a wmem_strdup().

Make print_numeric_uuid() and print_uuid() return const gchar *; there's
no reason for them *not* to be const, and that means we don't have to
throw away constness.

Change-Id: I62fb0b81c64c107dfea6c16ca8c5b9593f8f2a9d
Reviewed-on: https://code.wireshark.org/review/12126
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-11-25 06:21:40 +00:00
Michal Labedzki a90100631e Bluetooth: Add ability to add custom UUID description
Some vendors use UUID128 as own services/attributes.
Sometimes they use UUID16 for it too. Support both cases.

Change-Id: I001692b94fcc2f86eafa81012790e9134b0f2a36
Reviewed-on: https://code.wireshark.org/review/11976
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2015-11-20 16:00:15 +00:00
Pascal Quantin cbdd102343 Pacify Windows buildbots
Change-Id: I6e1db78ca42d7995e0309dd5d43e2abaf1e3b55e
Reviewed-on: https://code.wireshark.org/review/9691
Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-07-17 16:05:29 +00:00
Michal Labedzki 3faec795e9 Qt/Bluetooth: Add HCI Summary dialogue
HCI Summary dialogue collect HCI Opcodes, HCI Events, Hardware Errors,
Statuses and Reasons. Also show occurrence of them. The top level item
is group of items (by OGF or types), the second level item is in real
command, event, hardware error, status or reason. The third level items
are direct link to packet that contains second level item type.

Change-Id: I6b6bd02533c4605a2dd2c1f5dfee46f72a0f3fdc
Reviewed-on: https://code.wireshark.org/review/9676
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
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>
2015-07-17 13:54:43 +00:00
Michal Labedzki dac7cf9f8c Bluetooth: Add generic UUID table for DecodeBy
Replace L2CAP Service, RFCOMM Service and AVCTP PID dissector table
by shared Bluetooth Service UUID table. It also supports UUID16,
UUID32 and UUID128 by hex-string, like for AVRCP: "110e".

Change-Id: I473bc73d10939e8ed6dd55a6a92387c7a1ec125a
Reviewed-on: https://code.wireshark.org/review/9678
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2015-07-17 08:06:40 +00:00
Guy Harris 3d176c901c Clean up whitespace.
Change-Id: I5db2f0cdb2e5339d4f0fa1f8d1ce9b3866d640fb
Reviewed-on: https://code.wireshark.org/review/8944
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-06-16 03:24:58 +00:00
Guy Harris 68e65021e0 Clean up handling of metadata in Bluetooth dissectors.
Make the "previous protocol data" union in bluetooth_data_t a
discriminated union, and use the discriminator to decide whether to use
a given member of the union or not (or to check whether the member you
plan to use is valid).

Have separate top-level dissectors depending on what the data type
pointed to by the "data" argument is.

Use that member to point to pseudo-header metadata, and, for now, set it
to point to the appropriate pinfo->pseudo_header value; eventually, we
plan to pass the pseudo-header pointer in as the "data" argument from
the "frame" dissector.

Don't overwrite the pseudo-header in the packetlogger dissector -
construct a new one and pass it in.

Change-Id: Ia1ef71e7082a964c5d92d47221f8c00e32f3f087
Reviewed-on: https://code.wireshark.org/review/8943
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-06-16 03:23:51 +00:00
Michal Labedzki 7102a06811 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>
2015-06-15 05:40:25 +00:00
Michal Labedzki f837dab1b2 Bluetooth: HCI: Add command-event tracking
HCI Commands in most cases generate response in Event queue, so try
to map event to command and give user response time information.

Change-Id: Ib4956829b7d0064ab528aa3202f8f959d8d371b7
Reviewed-on: https://code.wireshark.org/review/8514
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2015-05-18 07:10:37 +00:00
Guy Harris 3066d6b29f Don't call the Bluetooth code's UUID type "uuid_t".
uuid_t is a data type provided by a number of environments, thanks to
the Open Software Fuundation; calling the Bluetooth code's data type,
which includes an actual OSF-style UUID as a member, "uuid_t" can lead
to confusion and *does* lead to compile errors on platforms where, for
better or worse, system headers such as <unistd.h> define uuid_t (and
are included by, for example, Qt headers).

Just rename it "bluetooth_uuid_t".

Change-Id: Ic742723913ba4105cd3269dd24fc821147285176
Reviewed-on: https://code.wireshark.org/review/7017
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-02-07 22:52:06 +00:00
Michal Labedzki fb00452b30 Bluetooth/GUI: ATT: Add Server Attribute Table
It is a GUI+QT feature that introduce Bluetooth menu and
"ATT Server Attributes" that present all handle+UUID pairs
as table. User may copy cell value, row, selected rows or whole
table within header. On activate user will go to packet that
introduce UUID for specified handle.

Change-Id: If17e53aff5feb89ededc740a595ba5882b90be5e
Reviewed-on: https://code.wireshark.org/review/6911
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2015-02-07 16:35:39 +00:00
Michal Labedzki ca3fe281f5 Bluetooth: ATT: Dissect almost all attributes
Change-Id: Ia388c07150d9664327daf2d1990b4465b5f4ae28
Reviewed-on: https://code.wireshark.org/review/6910
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>
2015-02-03 06:45:56 +00:00
Michal Labedzki 8ba3d6fbe6 Bluetooth: ATT: Dissect GATT level
ATT dissector is now able to decode GATT level fields.
This is results of added request-response tracking/share information.

Change-Id: I41ac622a38916a7a20f625fa30ac72d7812446c6
Reviewed-on: https://code.wireshark.org/review/6904
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2015-02-03 06:45:07 +00:00
Michal Labedzki f343710ee2 Bluetooth: HCI: Detect Vendor by "Read Local Version Information"
There is information about manufacturer of Bluetooth chip.
Also try to detect if that "permament" info is not changed,
if so informs user about this rare event (probably there is an issue)

Change-Id: I1fa748a67ad7943e61d4445d240f0578b94560fc
Reviewed-on: https://code.wireshark.org/review/6408
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-10 15:36:22 +00:00
Michal Labedzki 55df238efd Bluetooth: SMP: Add missing opcode for "Identity Address Information"
Also fix tvb_length, tvb_length_remaining warnings.

Bug: 10299

Change-Id: Ib8b55ea9f2220394a5896d13e5cc4e2cefff1e13
Reviewed-on: https://code.wireshark.org/review/6407
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
Tested-by: Michal Labedzki <michal.labedzki@tieto.com>
2015-01-10 15:36:02 +00:00
Michal Labedzki d6e0409892 Bluetooth: Add HCI Vendor Broadcom dissector
Since those command/events are vendor specific and proprietary
not all commands/events are implemented. All implemented commands can be
found in Open Source implementations for Broadcom chip. If you found more,
please let me know.

Change-Id: Ie68d3737c88a8cef39260a9d93192cfc81871d6c
Reviewed-on: https://code.wireshark.org/review/6406
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
Tested-by: Michal Labedzki <michal.labedzki@tieto.com>
2015-01-10 15:35:39 +00:00
Guy Harris 210aaf11ba Use "" rather than <> for includes; that might fix ABI check failures.
Change-Id: I80e291031e4e8e347422e4a1e636d2ce40efc5c2
Reviewed-on: https://code.wireshark.org/review/5931
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-12-20 23:01:53 +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