Commit Graph

160 Commits

Author SHA1 Message Date
Gerald Combs 8d3ac3af86 epan: Convert our PROTO_ITEM_ macros to inline functions.
Convert our various PROTO_ITEM_ macros to inline functions and document
them.

Change-Id: I070b15d4f70d2189217a177ee8ba2740be36327c
Reviewed-on: https://code.wireshark.org/review/32706
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-04-04 04:03:38 +00:00
Allan Møller Madsen da5a160edf Bluetooth HCI: Rename LE Read Remote Used Features command
The command name was changed between core spec 4.2 and 5.0,
it is now: LE Read Remote Features

Bug: 14582
Change-Id: Ia64db822e680263d9e4fef9d6c466e128597a13f
Signed-off-by: Allan Møller Madsen <almomadk@gmail.com>
Reviewed-on: https://code.wireshark.org/review/32540
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-03-23 21:33:01 +00:00
Dario Lombardo f7705e859a bthci_evt: add BASE_UNIT_STRING to bthci_evt.max_encryption_key_size.
Required when using units.

Change-Id: Icd6ab5ac28b0766deca801ad00da895dc0dadfe4
Reviewed-on: https://code.wireshark.org/review/32518
Reviewed-by: Vasil Velichkov <vvvelichkov@gmail.com>
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Dario Lombardo <lomato@gmail.com>
2019-03-22 19:10:07 +00:00
Allan Møller Madsen 5f4cb69598 Bluetooth HCI: Core spec 5.1 support
Dissection added for HCI commands/events:
Read Local Simple Pairing Options
LE Receiver Test [v3]
LE Transmitter Test [v3]
LE Set Connectionless CTE Transmit Parameters
LE Set Connectionless CTE Transmit Enable
LE Set Connectionless IQ Sampling Enable
LE Set Connection CTE Receive Parameters
LE Set Connection CTE Transmit Parameters
LE Connection CTE Request Enable
LE Connection CTE Response Enable
LE Read Antenna Information
LE Set Periodic Advertising Receive Enable
LE Periodic Advertising Sync Transfer
LE Periodic Advertising Set Info Transfer
LE Set Periodic Advertising Sync Transfer Parameters
LE Set Default Periodic Advertising Sync Transfer Parameters
LE Generate DHKey [v2]
LE Modify Sleep Clock Accuracy
LE Connectionless IQ Report
LE Connection IQ Report
LE CTE Request Failed
LE Periodic Advertising Sync Transfer Received

The following HCI commands have been renamed:
LE Receiver Test -> LE Receiver Test [v1]
LE Transmitter Test -> LE Transmitter Test [v1]
LE Enhanced Receiver Test -> LE Receiver Test [v2]
LE Enhanced Transmitter Test -> LE Transmitter Test [v2]
LE Generate DHKey -> LE Generate DHKey [v1]

LE Periodic Advertising Create Sync command added CTE type field.

Version, feature bits and event mask fields updated.

Change-Id: I9ecf2749c718023e7f9a762ebfc0263da78e5c0d
Signed-off-by: Allan Møller Madsen <almomadk@gmail.com>
Reviewed-on: https://code.wireshark.org/review/32492
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-03-22 11:47:00 +00:00
Guy Harris 7eb3e47fa4 Try to squeeze some bytes out of the frame_data structure.
Make the time stamp precision a 4-bit bitfield, so, when combined with
the other bitfields, we have 32 bits.  That means we put the flags at
the same structure level as the time stamp precision, so they can be
combined; that gets rid of an extra "flags." for references to the flags.

Put the two pointers next to each other, and after a multiple of 8 bytes
worth of other fields, so that there's no padding before or between them.

It's still not down to 64 bytes, which is the next lower power of 2, so
there's more work to do.

Change-Id: I6f3e9d9f6f48137bbee8f100c152d2c42adb8fbe
Reviewed-on: https://code.wireshark.org/review/31213
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-12-27 04:34:29 +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
Allan Møller Madsen 5f67f27424 Bluetooth HCI update
Add dissection of commands:
- LE Periodic Advertising Create Sync
- LE Periodic Advertising Terminate Sync
- LE Add Device To Periodic Advertiser List
- LE Remove Device From Periodic Advertiser List
- LE Write RF Path Compensation
- LE Set Privacy Mode

Add dissection of command complete events:
- LE Read Periodic Advertiser List Size
- LE Read Transmit Power
- LE Read RF Path Compensation

Misc:
- Corrected identity address type decoding in privacy
  related commands
- Corrected PHY decoding in LE Set Ext Scan Parameter
  and LE Ext Create Connection commands
- Added decoding of missing LE scan filter policy values
- Units added for time parameters where missing

Change-Id: I8d3fa4571f511df2e128877078609c8d112821dd
Signed-off-by: Allan Møller Madsen <almomadk@gmail.com>
Reviewed-on: https://code.wireshark.org/review/28302
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-06-18 04:09:36 +00:00
Allan Møller Madsen 3f54f88fba Bluetooth HCI evt: dissect last remaining BT5 events
Add dissection of events:
LE Periodic Advertising Sync Established
LE Periodic Advertising Report
LE Periodic Advertising Sync Lost
LE Advertising Set Terminated
LE Scan Request Received
LE Channel Selection Algorithm
SAM Status Change

Add missing extended LMP feature bits

Change-Id: I6aed69ff70674950507a7f4730f4136077c00357
Signed-off-by: Allan Møller Madsen <almomadk@gmail.com>
Reviewed-on: https://code.wireshark.org/review/26631
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-03-25 17:35:11 +00:00
Jakub Pawlowski b96eba436b Bluetooth: HCI_EVT: implement LE Extended Advertising Report
Change-Id: I2d316e671a8342b040899e4e3674cca055e4d1a6
Reviewed-on: https://code.wireshark.org/review/25930
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2018-02-21 08:27:30 +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
Stig Bjørlykke 29798bb8c9 bluetooth: Group Bluetooth dissector preferences
Change-Id: Ib5360fcbfd8f6b2aee6b33ec7d9dc77362feb50e
Reviewed-on: https://code.wireshark.org/review/25162
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-01-06 14:30:10 +00:00
Michael Mann 69250aa51e Add support for dissector tables of type FT_NONE.
This is for dissectors that have "payloads" that don't have
a unique identifier to determine a sub dissector.

For the command line parameter -d, specifying a selector is no longer
required for dissector tables of type FT_NONE.

Change-Id: I3370d9e0dc147deeca4f26b842fe35dc3bda876e
Reviewed-on: https://code.wireshark.org/review/22574
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-09-16 11:12:52 +00:00
Dario Lombardo 4552933408 bthci-evt: decrement number_of_loops to avoid hang (CID 1399639).
Change-Id: Ib8af835a331582677a391c59d145530cf0590122
Reviewed-on: https://code.wireshark.org/review/22644
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-07-16 16:11:50 +00:00
Michael Mann 9b3c8d4515 Expand register_decode_as_next_proto to include prompt string.
Many dissectors don't have an identifier to pass to a dissector table.
When using Decode As they all have a "value" function that returns 0
just so something is returned.

A first step to a cleaner refactor of the functionality is to allow
dissectors to provide a "prompt" function when registering Decode As
with register_decode_as_next_proto() so that the text exposed in
the GUI can vary, but the function that returns 0 (nothing) can be
consolidated under decode as registration functionality.  This casts
a wider net for register_decode_as_next_proto() use.

Change-Id: I2995b3c251dae70f5f529b672473d25c6288ed5c
Reviewed-on: https://code.wireshark.org/review/22562
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-07-11 08:41:49 +00:00
Michal Labedzki 7f32349815 Bluetooth: HCI_CMD: Implement a lot of remaining commands
Commands:
  Enhanced Setup Synchronous Connection
  Enhanced Accept Synchronous Connection Request
  Truncated Page
  Truncated Page Cancel
  Set Connectionless Slave Broadcast
  Set Connectionless Slave Broadcast Receive
  Start Synchronization Train
  Receive Synchronization Train
  Remote OOB Extended Data Request Reply
  Set MWS Channel Parameters
  Set External Frame Configuration
  Set MWS Signaling
  Set MWS Transport Layer
  Set MWS Scan Frequency Table
  Set MWS Pattern Configuration
  Set Reserved LT_ADDR
  Delete Reserved LT_ADDR
  Set Triggered Clock Capture
  AMP Test
  Write Secure Connections Test Mode

Fix copy-paste issue:
Implementation for "Get MWS Transport Layer Configuration"
was in: "Set Triggered Clock Capture"

Change-Id: I4a2119278b1f3a7e1a3ec87f499d9aa43e8b8a96
Reviewed-on: https://code.wireshark.org/review/20890
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-04-04 15:05:10 +00:00
Michal Labedzki 34fa55cbb2 Bluetooth: HCI: Fix tracking for "Read Clock Offset"
Fix missing information about command-event(response) tracking.

Change-Id: I060ae71f8efb774d4d04693e58f750dec442c046
Reviewed-on: https://code.wireshark.org/review/20896
Petri-Dish: Michal Labedzki <michal.labedzki@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-04-04 11:32:17 +00:00
Michael Mann 08e4d57ec4 Bluetooth: fix conflicting entries in its value_string.
Change-Id: Ie0f9bc800b5d86effa18a8ae333bbf8da18d0c3b
Reviewed-on: https://code.wireshark.org/review/20775
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Michal Labedzki <michal.tomasz.labedzki@gmail.com>
2017-03-29 10:24:37 +00:00
Michal Labedzki 59bbe6b0cd Bluetooth: HCI: A few minor improvements
1. According to ESR05 there is no event called "Bluetooth Logo Testing".
2. According to ESR09 error code 0x23 is also "LL Procedure Collision"
3. Add some HCI status for event for HCI Summary

bthci_evt is now up-to-date with Bluetooth Core 4 + CSA4 + CSS6 and ERS09
- nothing to implementing...

Change-Id: Ief9e2de61be91942ab2211de6bc44a8f15d12426
Reviewed-on: https://code.wireshark.org/review/20355
Petri-Dish: Michal Labedzki <michal.tomasz.labedzki@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-03-04 01:02:38 +00:00
Michal Labedzki f5ed7a5cb8 Bluetooth: HCI_EVT: Implement all remaining events/commands
Event:
  Authenticated Payload Timeout Expired
Commands:
  Set Connectionless Slave Broadcast
  Set Connectionless Slave Broadcast Receive
  Set MWS Signaling
  Read Synchronization Train Parameters
  Write Synchronization Train Parameters
  Read Secure Connections Host Support
  Read Authenticated Payload Timeout
  Read Local OOB Extended Data
  Read Extended Page Timeout
  Read Extended Inquiry Length
  LE Read Suggested Default Data Length
  LE Write Suggested Default Data Length
  LE Read Resolving List Size
  LE Read Peer Resolvable Address
  LE Read Local Resolvable Address
  LE Read Maximum Data Length

Change-Id: Id57693b284151b054b7e06237744629a6af98057
Reviewed-on: https://code.wireshark.org/review/20354
Petri-Dish: Michal Labedzki <michal.tomasz.labedzki@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-03-03 19:58:54 +00:00
Michal Labedzki 88fbd72f21 Bluetooth: HCI_EVT: Implement "Read Local Supported Codecs"
Implement event reponse for command "Read Local Supported Codecs".

Change-Id: I38946f4744b2d2d586384125700e937db698038c
Reviewed-on: https://code.wireshark.org/review/20353
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-03-03 11:35:56 +00:00
Michal Labedzki 35592f94ec Bluetooth: HCI_EVT: Add missing unit for generated field
Add missing unit [ms] for "Command-Response Delta"

Change-Id: I7ba31fc6bf3baae161608432ea5fcd1015414604
Reviewed-on: https://code.wireshark.org/review/20356
Petri-Dish: Michal Labedzki <michal.tomasz.labedzki@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-03-03 11:33:13 +00:00
Allan Møller Madsen 6e761f0ac0 Add dissection of Bluetooth 5.0 AE related HCI commands
Added the following batch of HCI commands:
LE Read Maximum Advertising Data Length
LE Read Number of Supported Advertising Sets
LE Remove Advertising Set
LE Set Periodic Advertising Data
LE Set Periodic Advertising Enable
LE Set Extended Scan Parameters
LE Set Extended Scan Enable
LE Extended Create Connection

Corrected min/max interval field sizes of LE Set Extended
Advertising Parameters command and updated LE Set Extended
Advertising Enable command to use subtree for each set.

Change-Id: Id9c08189a76a0a4adc89b669b50d832f68a929aa
Signed-off-by: Allan Møller Madsen <almomadk@gmail.com>
Reviewed-on: https://code.wireshark.org/review/19958
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-02-07 05:28:22 +00:00
Michal Labedzki 1ec2a69c8a Bluetooth: EIR/AD: Add support for LE Features and Channel Map
Based on CSS7 specification.

Change-Id: Ibf00e3add7fcb1a2b3a22574bb63b0fddaf4adcb
Reviewed-on: https://code.wireshark.org/review/19972
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-02-07 05:22:51 +00:00
Allan Møller Madsen 275594231d Bluetooth 5.0, HCI command/event PHY update dissection
Dissection of all new HCI command/events related with
Bluetooh 5.0 feature 'PHY update - LE 2M and LE Coded'

Change-Id: I212cb368d3295ba36eb0ca34329df566cae1611b
Signed-off-by: Allan Møller Madsen <almomadk@gmail.com>
Reviewed-on: https://code.wireshark.org/review/19849
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michal Labedzki <michal.tomasz.labedzki@gmail.com>
2017-02-01 07:36:24 +00:00
Michal Labedzki 6bf8e5bf9e Bluetooth: HCI_EVT: Implement "LE Direct Advertising Report"
It is part of Bluetooth Core 4 specification.

Change-Id: I7a1e542285d65452d99f753b27777fff80ad1c59
Reviewed-on: https://code.wireshark.org/review/19646
Petri-Dish: Michal Labedzki <michal.tomasz.labedzki@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-01-20 02:36:52 +00:00
Michal Labedzki ae03fc7353 Bluetooth: HCI_EVT: Implement some commands from Core 4
Now all unimplemented commands are in /* TODO */

Change-Id: I53c8dd0a660b62403214a3c75297e627337ed5fb
Reviewed-on: https://code.wireshark.org/review/19645
Petri-Dish: Michal Labedzki <michal.tomasz.labedzki@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-01-17 21:04:22 +00:00
Alexis La Goutte 5aac1e7776 bthci_evt: Fix Dead Store (Dead assignement/Dead increment) Warning found by Clang
Change-Id: Ic9962a1824b9f9d137177c81cb15d7ef4bc7bfc2
Reviewed-on: https://code.wireshark.org/review/19411
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-12-24 19:33:21 +00:00
Michael Mann 232cb9a2dd Remove proto_item_append_text calls in favor of BASE_UNIT_STRING.
Many proto_item_append_text calls were just adding a unit string to a field.
There's a better way to do that now.

Change-Id: Id18d5ac1ea4d8ecdc4cbe7ebaec07fbd2eab6e78
Reviewed-on: https://code.wireshark.org/review/19289
Petri-Dish: Michael Mann <mmann78@netscape.net>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-12-16 03:04:11 +00:00
Jakub Pawlowski 8d59678483 Bluetooth: BTLE: Add new commands parsing
Add "LE Set Extended Advertising Parameters" and
"LE Set Extended Advertising Parameters" commands parsing.

Change-Id: Ibcc9f145694e54710da3a11ade237f7132674366
Reviewed-on: https://code.wireshark.org/review/19234
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-12-13 08:56:32 +00:00
Jakub Pawlowski 809523433d Bluetooth: BTLE: Add BT5.0 command and event name parsing
Change-Id: I830551959965896451ddc08f3e843b61f22eed67
Reviewed-on: https://code.wireshark.org/review/19233
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-12-13 05:28:24 +00:00
Alexis La Goutte c3706a9226 bthci_evt: Fix conflict for hf fields
'bthci_evt.pending_response_delta' exists multiple times with NOT compatible types: FT_BOOLEAN and FT_DOUBLE

Change-Id: I7665ea0c007ef089c6986c102f2358d08d4628df
Reviewed-on: https://code.wireshark.org/review/18889
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>
2016-11-21 10:36:30 +00:00
Sharvil Nanavati 10dc31364b Bluetooth: HCI: LE: address review comments from review/18661.
Change-Id: Ibb97970e38d98f3564eb57995f3f31bebe88cc13
Reviewed-on: https://code.wireshark.org/review/18674
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2016-11-04 18:36:42 +00:00
Michal Labedzki 7f033b6806 Bluetooth: HCI: Add missing Core4's cmd/evt identifies
Add a lof of Command Opcodes.
Implement trivial Event: "Inquiry Response Notification"
and "Get MWS Transport Layer Configuration"

Change-Id: I4ca13878e2f972caae4320e9c0149dc3d75c45a5
Reviewed-on: https://code.wireshark.org/review/18668
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-11-04 09:23:59 +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 3eae603b73 Bluetooth: HCI: LE: Dissect all LE Features
The implementation is up to Core 4 specification.

Change-Id: I3fc3f06f8ec6bdd488cff109bdbca275cd0f0121
Reviewed-on: https://code.wireshark.org/review/18666
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2016-11-04 09:21:58 +00:00
Michal Labedzki cbd4a461dd Bluetooth: HCI: LE: Implement missing Meta Events
1. LE Remote Connection Parameter Request
2. LE Data Length Change
3. LE Read Local P-256 Public Key Complete
4. LE Generate DHKey Complete
5. LE Enhanced Connection Complete (implies more meta-info present)

Change-Id: I4aac5b66808cd15cc5b6825429b2bff848aa88b4
Reviewed-on: https://code.wireshark.org/review/18665
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2016-11-04 09:21:18 +00:00
Sharvil Nanavati 604fa3e2ea Implement dissector for the LE Enhanced Connection Complete event.
BLE connections that use this event cannot be fully decoded since the
connection handle is unknown to Wireshark.

Change-Id: I56eb6fc7c918b235fb1d68d89b6f1f2847e648e1
Reviewed-on: https://code.wireshark.org/review/18661
Reviewed-by: Sharvil Nanavati <sharvil@playground.global>
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2016-11-04 07:03:16 +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
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
Michal Labedzki d25bdd7c46 Qt/Bluetooth: HCI Summary: Miscellaneous fixes
1. Count vendor commands once
2. Fill Event column in case of Command Status/Command Complete
   types while displaying command
3. Add missing Status from Connect Complete event
4. Add missing Command Complete events opcodes

Change-Id: Ie5a0e373f92f62fcb890cef7ab54762df3bb8a35
Reviewed-on: https://code.wireshark.org/review/14315
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-03-03 10:47:35 +00:00
Michal Labedzki caf594bb3c Bluetooth: HCI: Vendor: Add expert info if not all is dissected
If vendor dissector does not decode all bytes - it seems to be
unexpected parameter.

Also move vendor dissection tree under root as it is done for HCI CMD.

>>>     CID 1247678:  Error handling issues  (CHECKED_RETURN)
>>>     No check of the return value of "dissector_try_uint_new(hci_vendor_table, hci_vendor_data->manufacturer, tvb, pinfo, tree, 1, bluetooth_data)".
>>>     CID 1247679:  Error handling issues  (CHECKED_RETURN)
>>>     No check of the return value of "dissector_try_uint_new(hci_vendor_table, hci_vendor_data->manufacturer, tvb, pinfo, main_tree, 1, bluetooth_data)".

Change-Id: Icdb8c1f166d5bc33cfc79c62d384ae416dfbf0cf
Reviewed-on: https://code.wireshark.org/review/13737
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-02-06 11:09:48 +00:00
Michal Labedzki c09d894f74 Fix some Coverity issue
>>>     CID 1349726:  Incorrect expression  (COPY_PASTE_ERROR)
>>>     "tvb_reported_length_remaining" in "tvb_reported_length_remaining(tvb, offset)" looks like a copy-paste error.
>>>     CID 1349727:  Incorrect expression  (COPY_PASTE_ERROR)
>>>     "tree" in "dissector_try_uint_new(bluetooth_eir_ad_manufacturer_company_id, company_id, new_tvb, pinfo,
>>>     CID 1349728:    (DEADCODE)
>>>     Execution cannot reach this expression "0" inside statement "(0 && ((__s1_len = __builti...".
>>>     CID 1306904:  Logically dead code (DEADCODE)
>>>     Execution cannot reach this statement "tap_hci_summary->interface_...".

Change-Id: I5f99e37e6d5fac39da7082649caa8373d06bb808
Reviewed-on: https://code.wireshark.org/review/13739
Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-02-05 18:57:29 +00:00
Guy Harris 099698445b Move the proto data stuff out of frame_data.[ch].
It's not tied to the frame_data structure any more, so it belongs by
itself.

Clean up some #includes while we're at it; in particular, frame_data.h
doesn't use anything related to tvbuffs, so don't have it gratuitiously
include tvbuff.h.

Change-Id: Ic32922d4a3840bac47007c5d4c546b8842245e0c
Reviewed-on: https://code.wireshark.org/review/13518
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-01-25 02:24:34 +00:00
Guy Harris bc5a0374bf Add the packet number to the packet_info structure, and use it.
That removes most of the uses of the frame number field in the
frame_data structure.

Change-Id: Ie22e4533e87f8360d7c0a61ca6ffb796cc233f22
Reviewed-on: https://code.wireshark.org/review/13509
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-01-24 03:41:28 +00:00
Guy Harris 9141bd9700 Add more fields to packet_info structure and use them.
Add fields for the absolute time stamp (and another field for a presence
flag for the absolute time stamp) and the packet encapsulation for the
packet.

This lets us remove the field for the packet encapsulation in the
frame_data structure; do so.

Change-Id: Ifb910a9a192414e2a53086f3f7b97f39ed36aa39
Reviewed-on: https://code.wireshark.org/review/13499
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-01-23 03:50:58 +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
João Valverde b87a5af633 Fix build [-Werror=maybe-uninitialized]
Found building with GCC 5.3.0 and CFLAGS="-g -Og".

Change-Id: I5bc29b6e91cc98332a513c9d03b02d2f6906608d
Reviewed-on: https://code.wireshark.org/review/13362
Reviewed-by: João Valverde <j@v6e.pt>
Petri-Dish: João Valverde <j@v6e.pt>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2016-01-17 19:12:45 +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
Gerald Combs 86fe2be4dc Use address functions instead of ADDRESS macros in asn1 and epan
Replace CMP_ADDRESS, COPY_ADDRESS, et al with their lower-case
equivalents in the asn1 and epan directories.

Change-Id: I4043b0931d4353d60cffbd829e30269eb8d08cf4
Reviewed-on: https://code.wireshark.org/review/11200
Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com>
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-10-22 11:45:56 +00:00
Michal Labedzki b271537c24 Bluetooth: Fix expert info for undecoded data
Swap PI_* values avoid crashes (assert...) of expert info.

Change-Id: I5f5188c9358a4ac93565fc079a3a0e8ea4b7f965
Reviewed-on: https://code.wireshark.org/review/11019
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2015-10-17 10:21:45 +00:00