Commit Graph

91 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
Alexis La Goutte fb1c33ed24 btavdtp: Fix Dead Store (Dead assignement/Dead increment) Warning found by Clang
Change-Id: I2736c770c3deaffecd686814c25de29ae5097bad
Reviewed-on: https://code.wireshark.org/review/32131
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Jakub Pawlowski <jpawlowski@google.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-02-21 12:16:55 +00:00
Jakub Pawlowski 8b0e851d4e Bluetooth: LDAC dissector
Change-Id: I22baf475b3d11dd23fae4c917b27c7aaa13654b4
Reviewed-on: https://code.wireshark.org/review/31799
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:09:39 +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
ValdikSS 01784a5946 Bluetooth LDAC codec dissection support
Change-Id: I99550324760d71a0fde725f0d5d3a9b9de059211
Reviewed-on: https://code.wireshark.org/review/28977
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michael Mann <mmann78@netscape.net>
2018-11-01 00:25:11 +00:00
ValdikSS 6a45b1692c Add aptX HD dissector support
Change-Id: I12551435e828d84abac47d0d38822e93ee5adb51
Reviewed-on: https://code.wireshark.org/review/28973
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot
Reviewed-by: Dario Lombardo <lomato@gmail.com>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-10-27 19:36:17 +00:00
ValdikSS 53089029c1 APT-X is changed to aptX, this is how it's spelled on Qualcomm website.
Change-Id: I8fcec0762936f57e6d5ffc7dc1a0f0537a1aec73
Reviewed-on: https://code.wireshark.org/review/30315
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Michal Labedzki <michal.labedzki@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-10-24 03:43:11 +00:00
ValdikSS 712b2df7c9 Fix SBC packet Loudness/SNR information wrong byte compatison
Change-Id: I05b551ccdbc0630a1d24862e6121d2385c33550e
Reviewed-on: https://code.wireshark.org/review/29198
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-08-21 04:05:58 +00:00
Pascal Quantin c48d6a6d60 BT A2DP: fully initialize sep_entry_t structure
Bug: 14884
Change-Id: Id409563d5e8869596db7b479132045bf8cf88f16
Reviewed-on: https://code.wireshark.org/review/29128
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-08-14 12:19:13 +00:00
ValdikSS 4a7e301bff Fix typo ACC → AAC
Change-Id: I1e869efc62e042cbebea2aac2759bb9bf4215b17
Reviewed-on: https://code.wireshark.org/review/28974
Reviewed-by: Michal Labedzki <michal.labedzki@wireshark.org>
Petri-Dish: Michal Labedzki <michal.labedzki@wireshark.org>
Tested-by: Petri Dish Buildbot
2018-08-05 18:41:01 +00:00
Alexis La Goutte 4ae76081d5 btavdtp: fix issue found by PVS Studio (V519)
The 'key[2].key' variable is assigned values twice successively.

Change-Id: I420bcde791eb2ebfab68a5c69bccc195e211de01
Reviewed-on: https://code.wireshark.org/review/27593
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-05-17 07:40:59 +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
Robert Jongbloed 94d7500a7d SDP/RTP: Support for "bundled" media.
Modern SDP usage (e.g. SIP, WebRTC) can "bundle" multiple RTP media streams on
a single port. Thus the RTP dissector has to be able to handle audio and video
at the same time, so the gboolean flag in _rtp_info was changed to a bit mask.
The SDP parsing was then changed to detect multiple "m=" lines using the same
port, and combine their audio/video bit masks, and the rtp_dyn_payload used
has all the audio and video payload descriptions.

Change-Id: Ifa3c034260f892ed005fe28647d28f3b0b1b05cf
Reviewed-on: https://code.wireshark.org/review/25431
Petri-Dish: Jaap Keuter <jaap.keuter@xs4all.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-01-30 05:43:54 +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 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
Alexis La Goutte bdf99169cc btavdtp: fix fix spelling typo found by lintian
Change-Id: I15d4343787a7c6b1c16ca8aa77ef2ddd159e6ef0
Reviewed-on: https://code.wireshark.org/review/18543
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2016-10-28 07:42:04 +00:00
AndersBroman 0b3d679368 Don't call proto_register_field_array() or expert_register_protocol() with
proto = -1

Change-Id: I60f899ad748b5d3e17f237552af7d2dbc8f27bd2
Reviewed-on: https://code.wireshark.org/review/17864
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-09-22 14:13:12 +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
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
moshekaplan cd7026951b Fix a lot of typos and misspellings
Change-Id: I8512cfa1d424f82a873a0e0e1d22c7b075fdd7f3
Reviewed-on: https://code.wireshark.org/review/13069
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: Michael Mann <mmann78@netscape.net>
2016-01-08 20:04:56 +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
Alexis La Goutte 032c33e998 btavdtp: fix An unconditional 'break' within a loop found by PVS Studio (V612)
Change-Id: Ic96f670bd4b039e12cdd467b8cc59470dd1553f3
Reviewed-on: https://code.wireshark.org/review/12331
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>
2015-12-07 07:15:58 +00:00
Michal Labedzki 9ff68f3ab5 Bluetooth: AVDTP: Add missing error codes
Add error codes from AVDTP, GAVDTP and A2DP 1.3.1.

Change-Id: Ida7c8041bafcd954d9939c165808347f16c542a8
Reviewed-on: https://code.wireshark.org/review/10523
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-09-14 12:17:20 +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
Michal Labedzki 768e37b792 Bluetooth: Fix tools/checkAPI issues
Change-Id: I8ffbd4a0da800594d9888f6a30612d4fc5273119
Reviewed-on: https://code.wireshark.org/review/7474
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-03-02 18:28:17 +00:00
Michal Labedzki 6521771124 Bluetooth: Simplify to "UnknownDirection" in Info column when direction is unknown
Change-Id: Ibad679c0b6c95d65389ce087f65b8f31cf3acd68
Reviewed-on: https://code.wireshark.org/review/6903
Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com>
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2015-02-02 10:48:56 +00:00
Michal Labedzki 1a30c9767a Bluetooth: A2DP: APT-X: Unhardcode stream configuration
Change-Id: I16cfb4d014020a7fb2c67fef3128021c9901719a
Reviewed-on: https://code.wireshark.org/review/6442
Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com>
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
Tested-by: Michal Labedzki <michal.labedzki@tieto.com>
2015-01-10 15:36:39 +00:00
Michal Labedzki 17f1a44168 Bluetooth: AVDTP: Fix other-side Reconfigure
It is used to properly configure internal SEP data using to
properly decode music stream.

Change-Id: If8a15267ce072eaedfac947d7558be2d3e796483
Reviewed-on: https://code.wireshark.org/review/6404
Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
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 07:00:41 +00:00
Michal Labedzki 5be440f1cb Bluetooth: AVDTP/VDP: Add link to first and last packet in the stream
Useful for analyzing stream issues.

Change-Id: I1c9f43807dc3abc050cf17c971fbd270b812faa5
Reviewed-on: https://code.wireshark.org/review/6402
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 07:00:21 +00:00
Michal Labedzki e63e77169c Bluetooth: AVDTP: Present bitfields for codec ad true/false
Previously they are present as hex value.

Change-Id: Ia30ba4da02e6bd4b0d68987506245e0534feadb6
Reviewed-on: https://code.wireshark.org/review/6400
Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-01-08 14:45:48 +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
Bill Meier b5d7b7ab6e Cleanup use of #includes in non-generated epan/dissector/*.c
Specifically:
- Set packet.h to be the first wireshark #include after
   config.h and "system" #includes.
   packet.h added as an #include in some cases when missing.
- Remove some #includes included (directly/indirectly) in
   packet.h. E.g., glib.h.
   (Done only for those files including packet.h).
- As needed, move "system" #includes to be after config.h and
   before wireshark #includes.
- Rework various #include file specifications for consistency.
- Misc.

Change-Id: Ifaa1a14b50b69fbad38ea4838a49dfe595c54c95
Reviewed-on: https://code.wireshark.org/review/5923
Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-12-21 05:46:22 +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
Alexis La Goutte 7f7d566518 btavdtp: Add missing break;
Issue found by Clang Analyzer:
Value stored to 'codec_dissector' is never read

Change-Id: I7a9fc5e3ffd04c77cbbb8d5e5b885d8a29468cfd
Reviewed-on: https://code.wireshark.org/review/5330
Reviewed-by: Balint Reczey <balint@balintreczey.hu>
2014-11-16 14:56:25 +00:00
Michal Labedzki f1dee59d66 Bluetooth: A2DP: Add AVRCP song position indicator
"sbc.avrcp_song_position" can be used to determine time synchronization
between AVRCP and A2DP. It is updated on every
AVRCP PlaybackPositionChanged. Also provide version for aptx.

Change-Id: I48cd49f0fee54131a738290e2a70a24d33ba1d22
Reviewed-on: https://code.wireshark.org/review/5290
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2014-11-14 10:28:22 +00:00
Michal Labedzki 6e44997584 Bluetooth: AVDTP: Add possibility to force decode as APT-X
Change-Id: Id99647846c9bc7666f33938c811358576353390d
Reviewed-on: https://code.wireshark.org/review/5286
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2014-11-14 10:25:31 +00:00
Michal Labedzki fc4471f061 Bluetooth: A2DP: APT-X does not use RTP while there is no content protection
Change-Id: I5ff8ffdda827b08ee7e284c15e70dadc368b009e
Reviewed-on: https://code.wireshark.org/review/4906
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>
2014-10-22 13:07:57 +00:00
Michal Labedzki 56a09d24dc Try to fix some buildbot warnings
Most interesting are:
 warning: cannot optimize loop, the loop counter may overflow [-Wunsafe-loop-optimizations]
 warning: ISO C forbids zero-size array [-Wpedantic]
 warning: ISO C90 doesn't support unnamed structs/unions [-Wpedantic]
 warning: cast discards '__attribute__((const))' qualifier from pointer target type [-Wcast-qual
 warning: initializer element is not computable at load time [enabled by default]

Change-Id: I5573c6bdca856a304877d9bef643f8c0fa93cdaf
Reviewed-on: https://code.wireshark.org/review/3174
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>
2014-09-22 10:52:03 +00:00
Michal Labedzki 9fce9ba188 Bluetooth: ACL/AVDTP: Fix ACL session handling
In case like reusing "connection handle" number in next connection
(2 -> 3 -> 2 again) AVDTP dissector does not properly dissected packets
(it should be Signal, but dissect as Media).

Add expert error to all packets that are not in ACL connection. This will
show invalid packages (send after dissconnect), however incomplete
(mostly beginning) connection will be marked too, but I think it have more
pros than cons.

Change-Id: I29cf706600cb12c8b93d0188dd2fba18dd5eba88
Reviewed-on: https://code.wireshark.org/review/4167
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>
2014-09-19 20:13:18 +00:00
Michal Labedzki 10fc6e2531 Bluetooth: A2DP: Fix fuzz failture
Fix invalid structure casting by using defaults values,
this also fix DecodeAs for A2DP.

Do the same for VDP.

Change-Id: I360787af648ed65205eb54732ab6d88f8532cf15
Reviewed-on: https://code.wireshark.org/review/2551
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2014-06-22 16:56:48 +00:00
Guy Harris ce3d2ff3de Rename dissector_add_handle() to dissector_add_for_decode_as().
Hopefully that name makes it clear what the routiner's purpose is, and
will encourage people to use it rather than using dissector_add_uint()
with a bogus integer value.

Change-Id: Ic5be456d0ad40b176aab01712ab7b13aed5de2a8
Reviewed-on: https://code.wireshark.org/review/2483
Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-06-20 16:43:56 +00:00
Michael Mann 14824e6adf Revert "Fixup: tvb_* -> tvb_captured"
https://www.wireshark.org/lists/wireshark-dev/201406/msg00131.html

This reverts commit 246fe2ca4c.

Change-Id: Ib24bae0198c13a84bd7f731bf4af921212109a8f
Reviewed-on: https://code.wireshark.org/review/2430
Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-19 18:25:59 +00:00
Dario Lombardo 246fe2ca4c Fixup: tvb_* -> tvb_captured
Change-Id: I9209c1271967405c34c1b6fa43e1726a4d3a5a3f
Reviewed-on: https://code.wireshark.org/review/2377
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-18 14:14:58 +00:00
Martin Kaiser a1656bc421 fix
packet-btavdtp.c: In function 'dissect_bta2dp':
packet-btavdtp.c:2796:36: error: 'sep_data.vendor_codec' may be used uninitialized in this function [-Werror=maybe-uninitialized]
packet-btavdtp.c:2799:12: error: 'sep_data.vendor_id' may be used uninitialized in this function [-Werror=maybe-uninitialized]

Change-Id: I5b9e22e7ec787430ee25d2cd7dbe13f854f9eaa2
Reviewed-on: https://code.wireshark.org/review/1884
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>
2014-05-30 13:08:26 +00:00
Michal Labedzki 1258ce7bce Bluetooth: AVDTP: First step to fully support AVDTP session
Session should be finished too on HCI Disconnect and Adapter disappear.

Change-Id: I0823872e60ec932fc0831975e54dc33d49fb5dbc
Reviewed-on: https://code.wireshark.org/review/1882
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2014-05-30 11:27:33 +00:00
Michal Labedzki 49cc95784b Bluetooth: AVDTP: Add support for APT-X configuration
Also add Service informations to Info column and service item.

Change-Id: I0a565df94d7980432c524bd675b291f0e80704e5
Reviewed-on: https://code.wireshark.org/review/1881
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2014-05-30 11:26:42 +00:00
Michal Labedzki 53c66a9e08 Bluetooth: Avoid using macro GPOINTER_TO_UINT()
Fix warnings and try to inform user about unknown values in
"Decode As".

Also use define instead of magic number for Unknown L2CAP CIDs.

Change-Id: Ie6f26a9e3330b84cef14bbf8861ffbdbdb789225
Reviewed-on: https://code.wireshark.org/review/1880
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
Tested-by: Michal Labedzki <michal.labedzki@tieto.com>
2014-05-30 11:26:28 +00:00
Michal Labedzki 5742d2e145 Bluetooth: L2CAP: Another fix for CIDs
Example: if there is Connection Request than field with CID always
is called SCID. If we Sent this packet, it is okay, but if we Receive
it, then it is not SCID for us, but DCID. If we receive
Connection Request (DCID) and than we want to make disconnection,
so we send Disconnection Request with DCID that is SCID in
Connection Request... etc.

I try to clarify this, so rename stored SCID to Local CID
and DCID  to Remote CID.

Change-Id: Idde0939a03955d8f4a10d8c9f7c43fd364254460
Reviewed-on: https://code.wireshark.org/review/1879
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2014-05-30 11:25:50 +00:00
Michal Labedzki e3473c921f Bluetooth: AVDTP: Upgrade session logic
To correctly resolve connections single "ID" value
like L2CAP PSM, is not enough, because next connection may use
the same PSM value. Solution is save frame number of frame that
make disconnection.

Conclusion:
Any session key values should be updated to pair:
{ID_1, disconnect_in_frame}, {ID_2, disconnect_in_frame}...
then we should check if  "disconnect_in_frame" is greater then
current frame number, otherwise it is not valid session.

Change-Id: I3d760112b6e53358a93c994f4aae455ac1bf5de6
Reviewed-on: https://code.wireshark.org/review/1878
Tested-by: Michal Labedzki <michal.labedzki@tieto.com>
Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2014-05-30 11:25:35 +00:00