aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-usb-audio.c
AgeCommit message (Collapse)AuthorFilesLines
2018-02-12dissectors: use SPDX identifiers.Dario Lombardo1-13/+1
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>
2017-01-29Register reassembly tablesMichael Mann1-15/+2
Register all reassembly tables with a central unit, allowing the central unit to have the callback that initializes and destroys the reassembly tables, rather than have dissectors do it individually. Change-Id: Ic92619c06fb5ba6f1c3012f613cae14982e101d4 Reviewed-on: https://code.wireshark.org/review/19834 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-12-31Dissectors don't need a journey of self discovery.Michael Mann1-3/+3
They already know who they are when they register themselves. Saving the handle then to avoid finding it later. Not sure if this will increase unnecessary register_dissector functions (instead of using create_dissector_handle in proto_reg_handoff function) when other dissectors copy/paste, but it should make startup time a few microseconds better. Change-Id: I3839be791b32b84887ac51a6a65fb5733e9f1f43 Reviewed-on: https://code.wireshark.org/review/19481 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>
2016-11-03USB Audio: Fix dissection of unit descriptors missing the iFeature fieldAlexis La Goutte1-4/+6
Issue reported by Vladimir Vysotsky Bug: 13085 Change-Id: Ibdc1bf662f852818777cfb44fa19d798972390ca Reviewed-on: https://code.wireshark.org/review/18651 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-10-28usb-audio: fix fix spelling typo found by lintianAlexis La Goutte1-1/+1
Change-Id: I853bc068cfca477c2ec5968d8b9a17873ec8011c Reviewed-on: https://code.wireshark.org/review/18533 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-05-05USB Audio: add dissect of ChannelConfig bitmapAlexis La Goutte1-4/+150
Bug: 11858 Change-Id: I4a4a557f4f217c3dec5285fbc9d152c9df52ccb0 Reviewed-on: https://code.wireshark.org/review/15267 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-05-02USB Audio: Add Mixed UnitAlexis La Goutte1-0/+74
Ping-Bug: 11858 Change-Id: I53a223f1b46b513e693b40dc8754837eee5cfec0 Reviewed-on: https://code.wireshark.org/review/15242 Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-05-01Make class "type" for USB conversations.Michael Mann1-0/+4
USB dissectors can't assume that only their class type has been passed around in the conversation. Make explicit check that class type expected matches the dissector and stop/prevent dissection if there isn't a match. Bug: 12356 Change-Id: Ib23973a4ebd0fbb51952ffc118daf95e3389a209 Reviewed-on: https://code.wireshark.org/review/15212 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Martin Kaiser <wireshark@kaiser.cx> Petri-Dish: Martin Kaiser <wireshark@kaiser.cx> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-04-27USB Audio: Add feature UnitAlexis La Goutte1-1/+134
Change-Id: Id23d1c945df3c0b7392b5c807ef04c85309999de Ping-Bug: 11858 Reviewed-on: https://code.wireshark.org/review/15118 Petri-Dish: Jaap Keuter <jaap.keuter@xs4all.nl> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-04-25USB Audio: Add Input/Output TerminalAlexis La Goutte1-0/+178
Change-Id: Id71015673d8ad0d40afdf926a3610a7544f4e1b8 Ping-Bug:11858 Reviewed-on: https://code.wireshark.org/review/15045 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-04-22USB Audio: Add dissection of Format Type DescriptorAlexis La Goutte1-0/+123
Only support Type 1 and 2 Change-Id: I0d2f5b9bc59063cb77d81667fe68c37133985568 Ping-Bug:11858 Reviewed-on: https://code.wireshark.org/review/15039 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-04-22USB Audio: Add expert info about undecoded Audio Control/Streaming Interface ↵Alexis La Goutte1-0/+2
Descriptor Ping-Bug: 11858 Change-Id: I9779ab089862c62f4f248e9b6694888368934214 Reviewed-on: https://code.wireshark.org/review/15040 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2016-03-20Manually add protocol dependencies derived from find_dissector.Michael Mann1-1/+1
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-02-11USB Audio: Fix cannot optimize loop, the loop counter may overflow ↵Alexis La Goutte1-6/+8
[-Wunsafe-loop-optimizations] Change-Id: Ie50ecb88ad1ea5f95b5772d71a6a4b02f06c4e2f Reviewed-on: https://code.wireshark.org/review/13817 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: João Valverde <j@v6e.pt> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2015-12-09new_register_dissector -> register_dissector for dissector directory.Michael Mann1-1/+1
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-09new_create_dissector_handle -> create_dissector_handle for dissector directory.Michael Mann1-1/+1
Some of the ASN.1 dissectors still generate a new_create_dissector_handle from the tool itself, so leave those for now. Change-Id: Ic6e5803b1444d7ac24070949f5fd557909a5641f Reviewed-on: https://code.wireshark.org/review/12484 Petri-Dish: Anders Broman <a.broman58@gmail.com> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-07-03Call reassembly_table_destroy for some dissectorsPeter Wu1-0/+7
This patch adds reassembly_table_destroy calls as cleanup function for dissectors which have a simple init routine that just calls reassembly_table_init (comments are ignored). The changes were automatically generated using https://git.lekensteyn.nl/peter/wireshark-notes/diff/one-off/cleanup-rewrite.py?id=4cc0aec05dc67a51926a045e1955b7a956757b5e (with the if and assignment parsers disabled). The only difference from the autogenerated output is that the XXX comments from the init routines in smb-pipe and tds dissectors are kept. Change-Id: I64aedf7189877247282b30b0e0f83757be6199e7 Reviewed-on: https://code.wireshark.org/review/9222 Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-04-01USB Audio : fix fix Found soft-deprecated APIs (tvb_length)Alexis La Goutte1-3/+3
Change-Id: I727f0b0853920967b88a95e1708b535e8b1e4d9e Reviewed-on: https://code.wireshark.org/review/7875 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-03-31USB Audio: fix Logically dead code (CID: 1247681)Alexis La Goutte1-6/+4
Change-Id: I8a32b1aff45376246ea092459594fcae2f423755 Reviewed-on: https://code.wireshark.org/review/7867 Reviewed-by: Pascal Quantin <pascal.quantin@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: Michael Mann <mmann78@netscape.net>
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-10-21no need for if(tree)Martin Kaiser1-8/+4
Change-Id: I529a601ce83c446247cee1e87386622462f24f56 Reviewed-on: https://code.wireshark.org/review/4896 Reviewed-by: Martin Kaiser <wireshark@kaiser.cx> Tested-by: Martin Kaiser <wireshark@kaiser.cx>
2014-09-22Try to fix some buildbot warningsMichal Labedzki1-2/+2
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-08-19Revert "Revert "create audio-specific part of the usb conversation""Martin Kaiser1-3/+59
This reverts commit 22e10bea0cbd2b29d6e7b82a3ead3910d71988a2. Now that the fuzz failures are fixed, we can re-enable the audio-specific extensions. Change-Id: Id788e10aaa3dbf289df364f7da9ef01e24ba47f9 Reviewed-on: https://code.wireshark.org/review/3728 Reviewed-by: Martin Kaiser <wireshark@kaiser.cx> Tested-by: Martin Kaiser <wireshark@kaiser.cx>
2014-08-16Revert "create audio-specific part of the usb conversation"Evan Huus1-59/+3
Also revert "dissect as interface general descr for v1.00" This reverts commit 7cd4e8930454b3afa8e73eacd62bafc6f029022b and commit 152c6b06f1bb8193b6d2682ae40c61a1d642b7c1 to fix the fuzz failures while we work out a proper solution. Ping-Bug:10386 Change-Id: I6302b95c103f17bb2b48d43f8fc06352587b9e95 Reviewed-on: https://code.wireshark.org/review/3662 Reviewed-by: Evan Huus <eapache@gmail.com>
2014-08-15packet-usb-audio.c: Trivial changesBill Meier1-5/+4
- Remove unneeded #include; - Remove some trailing whitespace; Change-Id: Iddf137d1d507dea4e3e892831fe6a05b80d2fa50 Reviewed-on: https://code.wireshark.org/review/3620 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-08-13dissect as interface general descr for v1.00Martin Kaiser1-0/+44
Change-Id: I338ce8d6eb0865af9d0f5669c44389ade2bf0f49 Reviewed-on: https://code.wireshark.org/review/3582 Reviewed-by: Martin Kaiser <wireshark@kaiser.cx> Tested-by: Martin Kaiser <wireshark@kaiser.cx>
2014-08-13create audio-specific part of the usb conversationMartin Kaiser1-3/+15
store the major spec version there Change-Id: I55564cbca7fb9faa307f1a684858d2e5d2393fc9 Reviewed-on: https://code.wireshark.org/review/3581 Reviewed-by: Martin Kaiser <wireshark@kaiser.cx> Tested-by: Martin Kaiser <wireshark@kaiser.cx>
2014-08-13distinguish between different audio descriptor types and subtypesMartin Kaiser1-17/+200
dissect the AC interface header descriptor Change-Id: I10f81e5cbf3837d958b255b5a3405ac2465b171f Reviewed-on: https://code.wireshark.org/review/3580 Reviewed-by: Martin Kaiser <wireshark@kaiser.cx> Tested-by: Martin Kaiser <wireshark@kaiser.cx>
2014-08-13get conversation info when we parse audio class-specific descriptorsMartin Kaiser1-5/+10
reject the descriptor if the class is not audio Change-Id: Ie07f0fb711884e63cbe86d9417570108edd6b5ab Reviewed-on: https://code.wireshark.org/review/3578 Reviewed-by: Martin Kaiser <wireshark@kaiser.cx> Tested-by: Martin Kaiser <wireshark@kaiser.cx>
2014-08-13rename the defines to make it clear that these are interface subclassesMartin Kaiser1-9/+9
Change-Id: I0ad2168f89f8c4fbb2d2324f60de1276d023b41c Reviewed-on: https://code.wireshark.org/review/3579 Reviewed-by: Martin Kaiser <wireshark@kaiser.cx> Tested-by: Martin Kaiser <wireshark@kaiser.cx>
2014-07-07convert to proto_tree_add_subtree[_format]Michael Mann1-7/+4
Change-Id: Ie10ac4f5f04a23344d183e095bbafb23c6409144 Reviewed-on: https://code.wireshark.org/review/2904 Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-19Revert "Fixup: tvb_* -> tvb_captured"Michael Mann1-3/+3
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-3/+3
Change-Id: I9209c1271967405c34c1b6fa43e1726a4d3a5a3f Reviewed-on: https://code.wireshark.org/review/2377 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>
2013-12-14Fix some trivial warnings.Jakub Zawadzki1-0/+3
svn path=/trunk/; revision=54085
2013-12-12In one or more of the files:Bill Meier1-21/+21
- Create/use some extended value-strings; - Remove some unneeded initializers; - 'offset++' --> 'offset += 1' for consistency; - Set editor modelines 'tab-width' to 8 (not 4); - tabs --> spaces (to match editor modelines); - Rework/add whitespace. svn path=/trunk/; revision=53998
2013-12-09Reject the packet if data is NULL.Chris Maynard1-1/+7
svn path=/trunk/; revision=53889
2013-11-12Remove usb_conv_info_t from packet_info and pass the data directly into the ↵Michael Mann1-6/+6
subdissectors. Bug 9413 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9413) svn path=/trunk/; revision=53274
2013-10-23#if 0 numerous "unused const variables" (mostly value-string-arrays);Bill Meier1-0/+2
Also; fix a few "set but not used" warnings. svn path=/trunk/; revision=52780
2013-10-13whitespace fixes; mostly: remove trailing blanksBill Meier1-1/+1
svn path=/trunk/; revision=52591
2013-09-02dissect len and type for audio class descriptorsMartin Kaiser1-6/+22
svn path=/trunk/; revision=51646
2013-09-02register a dissector for audio class specific descriptorsMartin Kaiser1-1/+37
recognize audio control interface and endpoint descriptors svn path=/trunk/; revision=51638
2013-09-01Remove expert_add_undecoded_item in favor of proto_tree_add_expert.Michael Mann1-1/+11
svn path=/trunk/; revision=51632
2013-07-31Convert the USB dissectors to wmem.Evan Huus1-1/+0
svn path=/trunk/; revision=51042
2013-07-17Remove fragment_data, add fragment_head, fragment_item - for now alias it to ↵Jakub Zawadzki1-1/+1
the same structure. This is begin of work to split fragment head and fragments items. svn path=/trunk/; revision=50708
2013-03-22Don't wire into the reassembly code the notion that reassemblies shouldGuy Harris1-10/+11
be done on flows from one address to another; reassembly for protocols running atop TCP should be done on flows from one TCP endpoint to another. We do this by: adding "reassembly table" as a data structure; associating hash tables for both in-progress reassemblies and completed reassemblies with that data structure (currently, not all reassemblies use the latter; they might keep completed reassemblies in the first table); having functions to create and destroy keys in that table; offering standard routines for doing address-based and address-and-port-based flow processing, so that dissectors not needing their own specialized flow processing can just use them. This fixes some mis-reassemblies of NIS YPSERV YPALL responses (where the second YPALL response is processed as if it were a continuation of a previous response between different endpoints, even though said response is already reassembled), and also allows the DCE RPC-specific stuff to be moved out of epan/reassembly.c into the DCE RPC dissector. svn path=/trunk/; revision=48491
2013-03-17From beroset:Anders Broman1-1/+1
remove C++ incompatibilities https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416 svn path=/trunk/; revision=48356
2012-11-02From Tomasz Mon via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7809 ↵Alexis La Goutte1-0/+358
Add USBAudio and MIDI System Exclusive dissectors. USBAudio dissector can reassemble SysEx commands. MIDI SysEx dissector can (partially) dissect DigiTech protocol. From me : Fix a wrong encoding type found by fix-encoding-args tools Add Modelines info svn path=/trunk/; revision=45873