Commit graph

146 commits

Author SHA1 Message Date
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
Martin Kaiser
f155601d66 decode_as: remove the "title" member from decode_as_t
The title of a decode_as_t was used by the GTK UI. It's no
longer required for Qt.

Change-Id: Ibd9d4acbe9cad2c1af520340d04e550326a97ebe
Reviewed-on: https://code.wireshark.org/review/33557
Petri-Dish: Martin Kaiser <wireshark@kaiser.cx>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-06-11 18:50:32 +00:00
Piotr Winiarczyk
32aeca13ec BTMESH: Add dissector for Foundation models
Add dissector for all messages of Bluetooth Mesh Foundation models.

Bug: 15797
Change-Id: Ife831fe24bbbcaf2e99c9bff69b24c0d4fe2d1de
Reviewed-on: https://code.wireshark.org/review/33361
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Jonas Jonsson <jonas@ludd.ltu.se>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-06-03 15:40:58 +00:00
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
Piotr Winiarczyk
a8df0c0e13 Expanding Bluetooth Mesh Profile dissector
Added support for Bluetooth Mesh beacons
Added support for Bluetooth Mesh Provisioning protocol
Added support for Bluetooth Mesh Proxy protocol
Added support for Bluetooth Mesh PB-ADV provisioning bearer
Added support for Bluetooth Mesh PB-GATT provisioning bearer

Link to Bluetooth Mesh Profile specification
https://www.bluetooth.org/docman/handlers/downloaddoc.ashx?doc_id=457092

Bug: 15523
Change-Id: I408726c0bc7e1d81077539d451c2047f540dd865
Reviewed-on: https://code.wireshark.org/review/32076
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-02-20 06:10:52 +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
34a210de37 Bluetooth: ATT: Implement one FTMS/FTMP characteristic: Machine Status
Add support for "FiTness Machine Service" characteristics:
- 0x2ADA  Fitness Machine Status

Change-Id: Ifceae6aba9f1849d1b9f027e54953385c0d1a98c
Reviewed-on: https://code.wireshark.org/review/30042
Petri-Dish: Michal Labedzki <michal.labedzki@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2018-10-06 12:08:01 +00:00
Michał Łabędzki
3df8dc99d6 Bluetooth: ATT: Implement five FTMS/FTMP characteristics: Supported * Range
Add support for "FiTness Machine Service" characteristics:
- 0x2AD4  Supported Speed Range
- 0x2AD5  Supported Inclination Range
- 0x2AD6  Supported Resistance Level Range
- 0x2AD7  Supported Heart Rate Range
- 0x2AD8  Supported Power Range

Change-Id: I4b34be8c6655510218cdeb776c0e00a956b2afe9
Reviewed-on: https://code.wireshark.org/review/29391
Petri-Dish: Michal Labedzki <michal.labedzki@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-09-05 04:11:22 +00:00
Stig Bjørlykke
4236185275 btatt: Fix Temperature Measurement Value unit
Display correct temperature unit for the Temperature Measurement Value.

Bug: 15058
Change-Id: I310c2fabfb1a824cb84f6f4182e881d7a22495cb
Reviewed-on: https://code.wireshark.org/review/29139
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-08-14 14:19:05 +00:00
Michał Łabędzki
d98faff197 Bluetooth: ATT: Implement 0x2A1F-0x2A59 remaining characteristics
- 0x2A1F  Temperature Celsius
- 0x2A20  Temperature Fahrenheit
- 0x2A2F  Position 2D
- 0x2A30  Position 3D
- 0x2A3A  Removable
- 0x2A3B  Service Required
- 0x2A3C  Scientific Temperature Celsius
- 0x2A3D  String
- 0x2A3E  Network Availability
- 0x2A57  Digital Output
- 0x2A59  Analog Output

Change-Id: I0c5bc4ba368c26edd600730ed62990abc9f4f1f9
Reviewed-on: https://code.wireshark.org/review/28956
Petri-Dish: Michal Labedzki <michal.labedzki@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2018-08-06 08:12:09 +00:00
Guy Harris
e62a8bd5db In bgatt.uuid0xXXXX names, hex digits in XXXX are lower case.
The dissectors are registered using lower-case a through f; call them
that way.

XXX - why is this not just done with a dissector table with an unsigned
integer key?

Bug: 14994
Change-Id: I73dbfe8ea0cc3545d67f5315d3cd8ac1eee3385f
Reviewed-on: https://code.wireshark.org/review/28818
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-07-22 19:26:33 +00:00
Guy Harris
954fe24e41 If the dissector isn't registered, you shouldn't be calling it.
Report a dissector bug, rather than calling the data dissector.

Change-Id: I7bde1001a48d2443acf2dc7caa83434e0972aab7
Reviewed-on: https://code.wireshark.org/review/28814
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-07-22 19:20:37 +00:00
Guy Harris
f98fbce64c Don't assume a given btgatt.uuid0xXXXX dissector exists.
They're not guaranteed to have been registered.

Bug: 14994
Change-Id: I11c2b2d4d8a7dd020a0ef3d700b29b0859bc68ca
Reviewed-on: https://code.wireshark.org/review/28805
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2018-07-22 17:19:10 +00:00
Alexis La Goutte
0664281df9 btatt: Fix Dead Store (Dead assignement/Dead increment) Warning found by Clang
Change-Id: I1be03f0cadfe1a62ee5136daf8f5b875a983e5be
Reviewed-on: https://code.wireshark.org/review/28607
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Dario Lombardo <lomato@gmail.com>
2018-07-10 15:17:18 +00:00
Michał Łabędzki
17a39db773 Bluetooth: ATT: Implement 0x2A0B-0x2A1B remaining characteristics
- 0x2A0B  Exact Time 100
- 0x2A10  Secondary Time Zone
- 0x2A15  Time Broadcast
- 0x2A1A  Battery Power State
- 0x2A1B  Battery Level State

Change-Id: I857a8ff6e38b0093d2d746c789d8f33ec59eb553
Reviewed-on: https://code.wireshark.org/review/28553
Petri-Dish: Michal Labedzki <michal.labedzki@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-07-01 13:31:32 +00:00
Michał Łabędzki
f7a660ec28 Bluetooth: ATT: Fix description of few fields
Copy-paste issue, fixed description names of:
btatt.weight_scale_feature
btatt.glucose_measurement.sequence_number
btatt.glucose_measurement.type_and_sample_location
btatt.record_access_control_point.response_code

Change-Id: Ifbda28ab86bda0e3dde824c24449d3ed90f8da8f
Reviewed-on: https://code.wireshark.org/review/27362
Petri-Dish: Michal Labedzki <michal.labedzki@wireshark.org>
Reviewed-by: Michal Labedzki <michal.labedzki@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-05-07 19:58:09 +00:00
Michał Łabędzki
d230b30610 Bluetooth: Assigned Numbers: Add Mesh Characteristics
Additional 65 characteristics to be done later.

Change-Id: Ic7d9a868619d26a49b8e322d1f9bde0ab3753319
Reviewed-on: https://code.wireshark.org/review/27361
Petri-Dish: Michal Labedzki <michal.labedzki@wireshark.org>
Reviewed-by: Michal Labedzki <michal.labedzki@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-05-07 19:57:39 +00:00
Michał Łabędzki
a87b5fc43f Bluetooth: GATT: Add prepare to implementing FTMS/FTMP
Implement "usage" of those chatacteristics.

Change-Id: I708537909b89f29df19e3bbac339ee37e890f2d0
Reviewed-on: https://code.wireshark.org/review/27360
Petri-Dish: Michal Labedzki <michal.labedzki@wireshark.org>
Reviewed-by: Michal Labedzki <michal.labedzki@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-05-07 19:56:07 +00:00
Peter Wu
ccff21854d Forbid leading, duplicated and trailing dots in field names
In order to simplify the display filter scanner, try to restrict the use
of dots ('.') in field names. Forbid leading dots, does not affect
current dissectors. Fix '..' typo in fpp dissector and forbid it. Forbid
trailing dots after fixing dissectors: some of them just have an excess
dot, others are missing a name after the dot.

Change-Id: I6e58a04ef0306ee8c16fbf6a3cabb076d7fc69c9
Reviewed-on: https://code.wireshark.org/review/26967
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-04-16 15:44:08 +00:00
Michał Łabędzki
8c1a61e7b1 Bluetooth: ATT: Fix cast-warnings
1. Use explicit cast from gint16 to gint then to gdouble
   - I can understand my compiler - implicit cast is not explicit cast
2. Fix const cast by remove "const" from one field but add it whenever
   possible in other places

Change-Id: Iab7401f972c40bca2df58f91b89e29cf2d7cf11b
Reviewed-on: https://code.wireshark.org/review/26917
Petri-Dish: Michal Labedzki <michal.labedzki@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michal Labedzki <michal.labedzki@wireshark.org>
2018-04-14 20:12:06 +00:00
Guy Harris
c7970d9356 Add, and use, "fetch signed value" for lengths < 40 bits.
Add 8-bit, 16-bit, 24-bit, and 32-bit "fetch signed value" routines, and
use them rather than casting the result of the 8/16/24/32-bit "fetch
unsigned value" routines to a signed type (which, BTW, isn't sufficient
for 24-bit values, so this appears to fix a bug
in epan/dissectors/packet-zbee-zcl.c).

Use numbers rather than sizeof()s in various tvb_get_ routines.

Change-Id: I0e48a57fac9f70fe42de815c3fa915f1592548bd
Reviewed-on: https://code.wireshark.org/review/26844
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-04-10 14:55:45 +00:00
Michał Łabędzki
746259e221 Bluetooth: Update Assigned Numbers
Updated on 31st March 2018:
- UUIDs
- Company Ids
- links to Assign Numbers
- change of "Bond Management Feature" to (..) Features seems to be mistake,
  so I ignore it, but fix btatt name of this characteristic

Change-Id: If76148c70276017647f5d3de000be112de102988
Reviewed-on: https://code.wireshark.org/review/26696
Petri-Dish: Michal Labedzki <michal.labedzki@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
2018-04-01 11:00:22 +00:00
Michał Łabędzki
a344e8fc92 Bluetooth: ATT: Appearance: Add new items
Items:
  Personal Mobility Device
  Continuous Glucose Monitor
  Insulin Pump
  Medication Delivery

Change-Id: If0e706506164883b34550a6c6865095c4dd1e816
Reviewed-on: https://code.wireshark.org/review/26626
Petri-Dish: Michal Labedzki <michal.labedzki@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2018-03-25 09:52:09 +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
Stig Bjørlykke
fb9abcf2d4 btatt: Avoid duplicate "Handle:" in COL_INFO
Do not add two "Handle:" in COL_INFO for opcode "Error Response".

Change-Id: I13dd5fc3bbef1762c2e868dfe885fa5d6437412e
Reviewed-on: https://code.wireshark.org/review/25152
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2018-01-05 09:18:43 +00:00
Stig Bjørlykke
5a9edf2a91 btatt: Support BBC micro:bit Bluetooth profile
Change-Id: I32e47e1eef57bb5f8e15e8d83219d6ab034bab73
Reviewed-on: https://code.wireshark.org/review/25135
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-01-04 12:51:44 +00:00
Stig Bjørlykke
3d846aceab btatt: Remove custom UUID dissectors from btatt.handle DecodeAs
Do not add custom UUID dissectors to the DecodeAs "btatt.handle"
table because it does not work to DecodeAs this attributes using
the "BT ATT Handle" field.

This removes some of the artificial protocols which is generated
from BT attributes, and avoids adding new ones when extending
the custom UUID dissection support.

Change-Id: I8384a56b49cac2ea64508470d67c67b6ec7cd13e
Reviewed-on: https://code.wireshark.org/review/25107
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-01-02 11:48:11 +00:00
Stig Bjørlykke
b60a60717f btatt: Skip Units and Members UUIDs in decode-as
Change-Id: I926c2abdfb6620236fabd6ae5aa1aa35d1fa79d2
Reviewed-on: https://code.wireshark.org/review/25050
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-12-29 07:53:47 +00:00
Michael Mann
4e3114d01d Eliminate #include <epan/oui.h> from dissectors that don't need it.
Correct include patch for packet-lldp.c

Change-Id: I5e2a267943ccd39616ef323848104fdba23c8f38
Reviewed-on: https://code.wireshark.org/review/24009
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-10-21 15:08:05 +00:00
Michael Mann
b289699ace Remove oui_vals value_string and epan/oui.c
oui.c is a very small subset of what comes from http://standards.ieee.org/regauth/oui/oui.txt,
so use the "full" OUI list (and more) out of the manuf file and convert
hf_ fields to just use BASE_OUI.

Change-Id: Ic0c2ff618d8a6212f498e3b7475e0a7856c22b5b
Reviewed-on: https://code.wireshark.org/review/24007
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-10-21 08:22:30 +00:00
Stig Bjørlykke
b96b145f58 epan: Fix misuse of comma operator
Change-Id: Ie088dea1239286cb413ddcfc2a82e4a5e3fb9e0f
Reviewed-on: https://code.wireshark.org/review/23551
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2017-09-15 13:16:52 +00:00
Pascal Quantin
3689dc1db3 BTATT: add curr_layer_num to key tracking request / response
Otherwise in case of frames containing multiple BTATT packets at
different levels of encapsulation, we can retrieve the wrong structure
and start using the union with a wrong opcode based type

Bug: 14049
Change-Id: Ica5d8af8e84161d6f9daebbb90334f20082c5fa4
Reviewed-on: https://code.wireshark.org/review/23470
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-09-11 05:12:36 +00:00
Stig Bjørlykke
4b6a26d952 btatt: Fix show handle with unknown service/characteristic/attribute
Show correct formatted handle item text when having unknown or
missing service, characteristic or attribute.

Change-Id: I4c5dec11b07956df3ee6f8dd1653835b8e4a42d7
Reviewed-on: https://code.wireshark.org/review/23337
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-09-01 03:43:30 +00:00
Dylan Ulis
a101aa9d99 btatt: Fix request response arrows
Change-Id: I40f61a8b8319605035f2a5c3685a3e8561d76921
Reviewed-on: https://code.wireshark.org/review/23196
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2017-08-25 04:39:14 +00:00
Alexis La Goutte
f4f252d4c4 btatt: failed assertion 'hf->bitmask != 0' (btatt.glucose_measurement.type_and_sample_location.type)
Fixes: v1.99.9rc0-246-ga50a49e527 ("Bluetooth: ATT: Add some remaining attributes")

Bug: 13590
Change-Id: I8e92ec80ee9e93a3e507f86c8354f1909070b0b9
Reviewed-on: https://code.wireshark.org/review/21041
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-04-16 14:33:31 +00:00
Alexis La Goutte
db9db90d54 btatt: fix conflicting entry in its value_string
Field 'Response Value' (btatt.user_control_point.response_value) has a conflicting entry in its value_string: 4 is at indices 3 (Operation Failed) and 4 (User not Authorized))

Change-Id: Idb1f023c3dde00f7dcfc8b16e91d0a15a24072dd
Reviewed-on: https://code.wireshark.org/review/20740
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-03-27 15:26:58 +00:00
Alexis La Goutte
576043944b bluetooth: fix this statement may fall through [-Werror=implicit-fallthrough=] found by gcc7
Change-Id: I4d8e6f32b08991f49ee22b320f02c1f65e22b6a0
Reviewed-on: https://code.wireshark.org/review/20400
Reviewed-by: Michal Labedzki <michal.tomasz.labedzki@gmail.com>
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>
2017-03-06 09:54:01 +00:00
Michal Labedzki
b774638092 Bluetooth: ATT: Implement "Resolvable Private Address"
"Resolvable Private Address" comes in Core 5.
Also fix expert infos (usage) for all GAP characteristics are
described in Core 5.

Change-Id: I8386f5908b64cb758e2a973fb6f92fabcb30885a
Reviewed-on: https://code.wireshark.org/review/19974
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-02-06 14:10:49 +00:00
Michael Mann
d8be254a51 packet-btatt.c: Use protocol information from dissector handle instead of pinfo data for attributes.
Instead of using a dissector function placed in a dissector table, just use the
protocol information registered with the dissector table to create the desired
dissector tree.

Change-Id: Ic32b15e3c05d73df6e8f69890c47172e991bda6f
Reviewed-on: https://code.wireshark.org/review/19509
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2017-01-11 12:55:30 +00:00
Guy Harris
7cd6906056 Rename tvb_new_subset() to tvb_new_subset_length_caplen().
This emphasizes that there is no such thing as *the* routine to
construct a subset tvbuff; you need to choose one of
tvb_new_subset_remaining() (if you want a new tvbuff that contains
everything past a certain point in an existing tvbuff),
tvb_new_subset_length() (if you want a subset that contains everything
past a certain point, for some number of bytes, in an existing tvbuff),
and tvb_new_subset_length_caplen() (for all other cases).

Many of the calls to tvb_new_subset_length_caplen() should really be
calling one of the other routines; that's the next step.  (This also
makes it easier to find the calls that need fixing.)

Change-Id: Ieb3d676d8cda535451c119487d7cd3b559221f2b
Reviewed-on: https://code.wireshark.org/review/19597
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-01-10 06:19:37 +00:00
Alexis La Goutte
dbd762ab1d btatt: fix spelling typo found by lintian
Change-Id: I3fdc71e927bdb0d5408db46656c23b23dc31489a
Reviewed-on: https://code.wireshark.org/review/18621
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2016-11-02 14:02:46 +00:00
Alexis La Goutte
9f564e69a2 btatt: fix fix spelling typo found by lintian
Change-Id: I405e73d15badfa98c311391f22c57314e83bb9d0
Reviewed-on: https://code.wireshark.org/review/18542
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2016-10-28 07:41:56 +00:00
Michal Labedzki
9672913350 Bluetooth: ATT: Add missing expert info for Regulatory Certification
Add missed expert info for IEEE 11073-20601
Regulatory Certification Data List.

Change-Id: Id9520e1c604ee38bf11ce42248357ca007bffcfd
Reviewed-on: https://code.wireshark.org/review/18233
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-10-19 07:53:40 +00:00
Guy Harris
a4c8ebc18b Don't do any Decode As stuff for dissector tables not used with Decode As.
Have all dissector tables have a "supports Decode As" flag, which
defaults to FALSE, and which is set to TRUE if a register_decode_as()
refers to it.

When adding a dissector to a dissector table with a given key, only add
it for Decode As if the dissector table supports it.

For non-FT_STRING dissector tables, always check for multiple entries
for the same protocol with different dissectors, and report an error if
we found them.

This means there's no need for the creator of a dissector table to
specify whether duplicates of that sort should be allowed - we always do
the check when registering something for "Decode As" (in a non-FT_STRING
dissector table), and just don't bother registering anything for "Decode
As" if the dissector table doesn't support "Decode As", so there's no
check done for those dissector tables.

Change-Id: I4a1fdea3bddc2af27a65cfbca23edc99b26c0eed
Reviewed-on: https://code.wireshark.org/review/17402
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-08-31 00:08:01 +00:00
Alexis La Goutte
6d023626c9 btatt: Fix Dead Store (Dead assignement/Dead increment) Warning found by Clang
Change-Id: I4c8d2fc74a84e4fe4a85efeb75f666f5402c6030
Reviewed-on: https://code.wireshark.org/review/17137
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-08-18 12:48:35 +00:00
Michal Labedzki
4a2e89bff2 Bluetooth: ATT: Implement attribute Regulatory Certification Data List
It is described in Personal Health Devices Transcoding White Paper v1.6
at Bluetooth.org. It is not detailed implementation, because
white paper is not specification for this, but it is really
"giant leap for mankind".

Change-Id: I476b242a67c7c0b24e450ad347216c708cc12879
Reviewed-on: https://code.wireshark.org/review/17079
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>
2016-08-16 13:07:07 +00:00
Michael Mann
ad6fc87d64 Add proto_tree_add_checksum.
This is an attempt to standardize display/handling of checksum fields for all dissectors.
The main target is for dissectors that do validation, but dissectors that just report the
checksum were also included just to make them easier to find in the future.

Bug: 10620
Bug: 12058
Ping-Bug: 8859
Change-Id: Ia8abd86e42eaf8ed50de6b173409e914b17993bf
Reviewed-on: https://code.wireshark.org/review/16380
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-07-21 12:35:22 +00:00
Michal Labedzki
e0242a7fd3 Bluetooth: GATT: Add services error codes
GATT Service may define own error code. Add them.

Change-Id: I9e5c0d38b2dd01c16cfd47578f151cefdc9393fe
Reviewed-on: https://code.wireshark.org/review/16467
Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-07-15 12:34:01 +00:00
Michal Labedzki
508e0f4b63 Bluetooth: ATT: Fix Object List Control Point response
Fix CID 1355646.

Bug: 12496

Change-Id: Ia6c95c8f31a19b5e8fc21182658147ed4208d635
Reviewed-on: https://code.wireshark.org/review/15790
Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Jaap Keuter <jaap.keuter@xs4all.nl>
2016-06-09 08:48:09 +00:00