aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-btavdtp.c
AgeCommit message (Collapse)AuthorFilesLines
2016-01-24Add the packet number to the packet_info structure, and use it.Guy Harris1-14/+14
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-23Add more fields to packet_info structure and use them.Guy Harris1-5/+5
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-08Fix a lot of typos and misspellingsmoshekaplan1-19/+19
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>
2015-12-09new_register_dissector -> register_dissector for dissector directory.Michael Mann1-6/+6
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-07btavdtp: fix An unconditional 'break' within a loop found by PVS Studio (V612)Alexis La Goutte1-5/+3
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-09-14Bluetooth: AVDTP: Add missing error codesMichal Labedzki1-0/+37
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-07-17Bluetooth: Add generic UUID table for DecodeByMichal Labedzki1-7/+9
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-03-02Bluetooth: Fix tools/checkAPI issuesMichal Labedzki1-13/+13
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-02-02Bluetooth: Simplify to "UnknownDirection" in Info column when direction is ↵Michal Labedzki1-2/+1
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-01-10Bluetooth: A2DP: APT-X: Unhardcode stream configurationMichal Labedzki1-42/+123
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-09Bluetooth: AVDTP: Fix other-side ReconfigureMichal Labedzki1-39/+63
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-09Bluetooth: AVDTP/VDP: Add link to first and last packet in the streamMichal Labedzki1-7/+119
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-08Bluetooth: AVDTP: Present bitfields for codec ad true/falseMichal Labedzki1-4/+4
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>
2014-12-22First batch of unincludes. Last attempt...Martin Mathieson1-1/+0
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-21Cleanup use of #includes in non-generated epan/dissector/*.cBill Meier1-1/+0
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-18Bluetooth: Add generic Bluetooth dissectorMichal Labedzki1-6/+5
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-11-16btavdtp: Add missing break;Alexis La Goutte1-0/+1
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-14Bluetooth: A2DP: Add AVRCP song position indicatorMichal Labedzki1-0/+39
"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-14Bluetooth: AVDTP: Add possibility to force decode as APT-XMichal Labedzki1-1/+5
Change-Id: Id99647846c9bc7666f33938c811358576353390d Reviewed-on: https://code.wireshark.org/review/5286 Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2014-10-22Bluetooth: A2DP: APT-X does not use RTP while there is no content protectionMichal Labedzki1-4/+6
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-09-22Try to fix some buildbot warningsMichal Labedzki1-1/+0
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-19Bluetooth: ACL/AVDTP: Fix ACL session handlingMichal Labedzki1-4/+18
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-06-22Bluetooth: A2DP: Fix fuzz failtureMichal Labedzki1-6/+19
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-20Rename dissector_add_handle() to dissector_add_for_decode_as().Guy Harris1-3/+3
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-19Revert "Fixup: tvb_* -> tvb_captured"Michael Mann1-13/+13
https://www.wireshark.org/lists/wireshark-dev/201406/msg00131.html This reverts commit 246fe2ca4c67d8c98caa84e2f57694f6322e2f96. Change-Id: Ib24bae0198c13a84bd7f731bf4af921212109a8f Reviewed-on: https://code.wireshark.org/review/2430 Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-18Fixup: tvb_* -> tvb_capturedDario Lombardo1-13/+13
Change-Id: I9209c1271967405c34c1b6fa43e1726a4d3a5a3f Reviewed-on: https://code.wireshark.org/review/2377 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-05-30fixMartin Kaiser1-0/+2
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-30Bluetooth: AVDTP: First step to fully support AVDTP sessionMichal Labedzki1-2/+10
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-30Bluetooth: AVDTP: Add support for APT-X configurationMichal Labedzki1-26/+405
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-30Bluetooth: Avoid using macro GPOINTER_TO_UINT()Michal Labedzki1-8/+8
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-30Bluetooth: L2CAP: Another fix for CIDsMichal Labedzki1-20/+18
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-30Bluetooth: AVDTP: Upgrade session logicMichal Labedzki1-3/+5
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-30Bluetooth AVDTP/RTP: Separate the streamsMichal Labedzki1-237/+300
The Stream is defined here as media stream that beginning on AVDTP Start (ResponseAccept). Also fix recognizing Channel streams by AVDTP according to the specification that says: 1. First channel is always Signaling. 2. Second may be Media. 3. Third may be Reporting. 4. Fourth may be Recovery. First and second will be supported right now. Change-Id: Id6d4dae6be1b9df68382288c2d520b7ed3661237 Reviewed-on: https://code.wireshark.org/review/1053 Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2014-05-30Bluetooth: Add music duration info for SBCMichal Labedzki1-15/+88
Music duration info can be used to detect underflow, what can decrease music quality. Change-Id: I8ea06655395d3e66473a09ee72b6833b894aa6e1 Reviewed-on: https://code.wireshark.org/review/1052 Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2014-05-09Initialize int_seid to 0 in btavdtp dissectorEvan Huus1-2/+3
Fixes uninitialized read in fuzzed capture. While I'm there, reorder the fields to reduce alignment-padding and shrink the size of the sep_entry_t struct slightly. Bug:10095 Change-Id: I3ace279e97874dbcfeb36f947c4c3428bd83e490 Reviewed-on: https://code.wireshark.org/review/1574 Reviewed-by: Evan Huus <eapache@gmail.com>
2014-03-25Bluetooth: AVDTP: Add option to disable Force Codec preferenceMichal Labedzki1-3/+5
In real option "SBC" was Default/Off, now user can choose between Default and Force SBC Codec. Change-Id: I605320d89fade11dc7172793bc0492bc4b319e9c Reviewed-on: https://code.wireshark.org/review/822 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-24Bluetooth: AVDTP: Use full name for MPF fieldMichal Labedzki1-1/+1
Change-Id: I25d359926fa5790383624378a6826c8fd5a9bd5c Reviewed-on: https://code.wireshark.org/review/805 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-24Bluetooth: AVDTP: Improve filteringMichal Labedzki1-8/+8
A few more filtering name separated by "." for convention. Change-Id: Ie1ceb0ba807e033085c43826c334933c6b178389 Reviewed-on: https://code.wireshark.org/review/804 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-07Bluetooth: A2DP/VDP: Display SEIDs used in conversationMichal Labedzki1-8/+58
Change-Id: I855ccbee2248cafcc9b1d32245894e2933ca745a Reviewed-on: https://code.wireshark.org/review/474 Reviewed-by: Evan Huus <eapache@gmail.com>
2014-03-07Bluetooth: AVDTP: Fix trees and distinguish local and remote SEPsMichal Labedzki1-133/+267
When there is more then one interface or adapter then AVDTP dissector incorrectly mixing it data together. Patch extends keys to support multiple interfaces/adapters. Also do little simplification on trees. There are two device, both use SEPs to configuration and it is possible to use the same SEID. SetConfiguration use remote "ACP" SEID and local "INT" SEID, so there is need to distinguish them and please remember then INT SEID types can be unknown in most case. Change-Id: I150f3625f532386a1078deb8d0ac70a1c05c3f04 Reviewed-on: https://code.wireshark.org/review/473 Reviewed-by: Evan Huus <eapache@gmail.com>
2014-03-06Bluetooth: Avoid using find_dissector()Michal Labedzki1-9/+3
Also remove SVN $Id$ lines. Change-Id: I4f2925e6ad8dcfe4a62d879a2cef44447f8ae916 Reviewed-on: https://code.wireshark.org/review/476 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-04Remove all $Id$ from top of fileAlexis La Goutte1-2/+0
(Using sed : sed -i '/^ \* \$Id\$/,+1 d') Fix manually some typo (in export_object_dicom.c and crc16-plain.c) Change-Id: I4c1ae68d1c4afeace8cb195b53c715cf9e1227a8 Reviewed-on: https://code.wireshark.org/review/497 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-02-16Bluetooth: AVDTP: Fix byte orderMichal Labedzki1-143/+142
AVDTP does not specify byte order of protocol, but define that at byte level (MSB/LSB). Moreover: Codec VendorId is in Little Endian and this patch fix that. Change-Id: I91d8e9321e9909cb07d92d3df348ab6e1e5b1e1b Reviewed-on: https://code.wireshark.org/review/222 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Evan Huus <eapache@gmail.com>
2014-02-04Bluetooth: AVDTP: Fix offset in case with Error CodeMichal Labedzki1-0/+13
Change-Id: I6e97781bfd1775dcc13c4488af11d615ef6594fb Reviewed-on: https://code.wireshark.org/review/102 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Evan Huus <eapache@gmail.com>
2013-11-04Revert r53073, by now the vast majority of dissector do declare theJörg Mayer1-0/+9
registration functions and if we want to standardize it makes more sense to fix the remaining ones. svn path=/trunk/; revision=53075
2013-11-03Remove forward declarations of registration functions.Jörg Mayer1-9/+0
svn path=/trunk/; revision=53073
2013-11-03Bluetooth: AVDTP: Add support for Content Protection type SCMS-T (and some ↵Michael Mann1-65/+278
minor cleanup). Bug 7893 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7893) From Michal Labedzki svn path=/trunk/; revision=53065
2013-11-02Partially revert r53052 because hf_ fields aren't defined (or used)Michael Mann1-1/+8
svn path=/trunk/; revision=53054
2013-11-02Bluetooth: minor improvements. Bug 7893 ↵Michael Mann1-4/+30
(https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7893) 1. AVDTP: Fix double decoded stream 2. AVDTP: Use items for logical block objects 3. HCI_USB use handoffed dissector handles instead of find_dissector() From Michal Labedzki svn path=/trunk/; revision=53052
2013-11-02Bluetooth: Use dissector data instead of pinfo->private_data. Bug 7893 ↵Michael Mann1-7/+9
(https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7893) From Michal Labedzki svn path=/trunk/; revision=53051