aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-usb-com.c
AgeCommit message (Collapse)AuthorFilesLines
2020-06-19Fix the type of arrays of pointers to hf_ values for bitfield routines.Guy Harris1-3/+3
The static arrays are supposed to be arrays of const pointers to int, not arrays of non-const pointers to const int. Fixing that means some bugs (scribbling on what's *supposed* to be a const array) will be caught (see packet-ieee80211-radiotap.c for examples, the first of which inspired this change and the second of which was discovered while testing compiles with this change), and removes the need for some annoying casts. Also make some of those arrays static while we're at it. Update documentation and dissector-generator tools. Change-Id: I789da5fc60aadc15797cefecfd9a9fbe9a130ccc Reviewed-on: https://code.wireshark.org/review/37517 Petri-Dish: Guy Harris <gharris@sonic.net> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-05-16USB: fix redundant assignments or tests flagged by PVS-StudioMartin Mathieson1-1/+0
Bug: 16335 Change-Id: I19ea32fb607bf4132c1690f46dca5ed055009b84 Reviewed-on: https://code.wireshark.org/review/37211 Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2019-12-24USB CDC: Match subordinate interfaces with masterTomasz Moń1-14/+115
CDC Data interfaces are linked with Communications and CDC Control interfaces via Union Functional Descriptors. Store subordinate to master interface connection during descriptor dissection and use that information to determine if CDC Data is Ethernet or not. Bug: 14587 Change-Id: I442262186319969303af9ac3a7c17aad19cecab8 Reviewed-on: https://code.wireshark.org/review/35496 Petri-Dish: Tomasz Moń <desowin@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Pascal Quantin <pascal@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2019-07-26HTTPS (almost) everywhere.Guy Harris1-1/+1
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-06-18MBIM: remove USBPcap / usbmon specific codePascal Quantin1-6/+5
This is no more required. Change-Id: Ib88066eaa0cb7f8b30cfe93bbdc797882802b992 Reviewed-on: https://code.wireshark.org/review/33642 Petri-Dish: Pascal Quantin <pascal@wireshark.org> Tested-by: Petri Dish Buildbot Reviewed-by: Pascal Quantin <pascal@wireshark.org>
2019-04-04epan: Convert our PROTO_ITEM_ macros to inline functions.Gerald Combs1-2/+2
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-02-01Switch my contact addressPascal Quantin1-1/+1
Change-Id: Iec5e4951873d6a2f1cacd655b490643c55e4f17e Reviewed-on: https://code.wireshark.org/review/31853 Petri-Dish: Pascal Quantin <pascal@wireshark.org> Tested-by: Petri Dish Buildbot Reviewed-by: Pascal Quantin <pascal@wireshark.org>
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-02-23USB COM: highlight the bytes of the communications descriptorMartin Kaiser1-1/+1
Change-Id: Ia3aa1f5e35945ff8bf500508a67731b6ad3e28e3 Reviewed-on: https://code.wireshark.org/review/20252 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-12-16Remove proto_item_append_text calls in favor of BASE_UNIT_STRING.Michael Mann1-8/+6
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-03-20Manually add protocol dependencies derived from find_dissector.Michael Mann1-4/+4
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>
2015-12-09new_create_dissector_handle -> create_dissector_handle for dissector directory.Michael Mann1-4/+4
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-10-16USB COM: revert ga618f1c change now that g5e8c629 is mergedPascal Quantin1-3/+2
Change-Id: I8a71173b88368f791e9476c2b059d36c57a3b935 Reviewed-on: https://code.wireshark.org/review/11088 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-05-14USB COM: add dissection of Ethernet Networking Functional DescriptorPascal Quantin1-3/+216
Change-Id: Id5023090b5b80ca12695fc9e012a59f53b30479c Reviewed-on: https://code.wireshark.org/review/8461 Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-05-12MBIM: fix dissection of captures taken on a Linux hostPascal Quantin1-0/+4
- ensure that MBIM tree is not below URB setup one - do not try to dissect an empty tvb Change-Id: I8c6655727eec7df84882fd861d5581848340e0f3 Reviewed-on: https://code.wireshark.org/review/8410 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com> Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-05-12USB COM: add dissection of ECM Management Element NotificationsPascal Quantin1-21/+146
Change-Id: I9395c5e7974526d9be5cceca479e840dca5ff71e Reviewed-on: https://code.wireshark.org/review/8409 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-02-10USB: put back interface class when dissecting URB_CONTROLPascal Quantin1-2/+3
Also ensure that USB COM dissection is done with the parent tree and not setup one Change-Id: Iae9f933ff29b3854879375df320a23e623ea785f Reviewed-on: https://code.wireshark.org/review/7051 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com> Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Martin Kaiser <wireshark@kaiser.cx> Tested-by: Martin Kaiser <wireshark@kaiser.cx>
2015-01-28Make the USB header information an enumerated type.Guy Harris1-1/+1
It's not really a bitset, it's a choice of one of four types of USB pseudo-header. Make it an enum. Change-Id: I4ea994e1606c23e0a0f08b1b61357eea40a2535e Reviewed-on: https://code.wireshark.org/review/6830 Reviewed-by: Guy Harris <guy@alum.mit.edu>
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-07-07convert to proto_tree_add_subtree[_format]Michael Mann1-3/+1
Change-Id: Ie10ac4f5f04a23344d183e095bbafb23c6409144 Reviewed-on: https://code.wireshark.org/review/2904 Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-03-25MBIM: fix dissection of control packets when capturing with usbmonPascal Quantin1-2/+8
Change-Id: Ie20fcb8d393a85d47ba78f6cb70de77fedda2587 Reviewed-on: https://code.wireshark.org/review/829 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-03-06Ue TFS & VALS macros for certain 'fieldconvert' fields.Bill Meier1-6/+6
Change-Id: I8d7468e62d5de99eb68b554134be71b17d1b87c8 Reviewed-on: https://code.wireshark.org/review/525 Reviewed-by: Bill Meier <wmeier@newsguy.com> Tested-by: Bill Meier <wmeier@newsguy.com>
2014-02-23Remove deprecated TVB APIsPascal Quantin1-6/+4
Change-Id: I87216c3bd2061c12ce486c752d4381ab722db95e Reviewed-on: https://code.wireshark.org/review/328 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2013-12-10Remove _U_ from dissect_usb_com_bulk()'s data parameter; it is used.Chris Maynard1-1/+1
svn path=/trunk/; revision=53916
2013-11-15Dissect USB Com Network Control Model requestsPascal Quantin1-5/+399
svn path=/trunk/; revision=53349
2013-11-12Remove usb_conv_info_t from packet_info and pass the data directly into the ↵Michael Mann1-8/+4
subdissectors. Bug 9413 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9413) svn path=/trunk/; revision=53274
2013-10-27From Michal Labedzki via ↵Pascal Quantin1-3/+89
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9333 : USB: CDC: Decode ACM, CM and Union Functional Descriptors svn path=/trunk/; revision=52902
2013-10-27From Michal Labedzki via ↵Pascal Quantin1-0/+1
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9333 : USB: Decode CDC subclasses and protocols svn path=/trunk/; revision=52901
2013-10-24fix offset calculationMartin Kaiser1-5/+7
highlight the correct payload bytes for unknown sub-descriptors svn path=/trunk/; revision=52822
2013-10-14Add dissection of NCM/MBIM data traffic based on data interface class ↵Pascal Quantin1-1/+30
protocol code svn path=/trunk/; revision=52602
2013-10-07MBIM data is transferred over CDC-Data interface class. Remove useless code.Pascal Quantin1-50/+1
svn path=/trunk/; revision=52436
2013-10-07Dissect MBIM traffic over USB bulkPascal Quantin1-1/+50
svn path=/trunk/; revision=52435
2013-10-03Add dissection of MBIM (extended) functional descriptorPascal Quantin1-15/+115
svn path=/trunk/; revision=52345
2013-10-02Add dissection of GSM/CDMA SMS in PDU modePascal Quantin1-2/+5
svn path=/trunk/; revision=52337
2013-09-30Plug MBIM dissector to USB onePascal Quantin1-0/+151
With this change and the use of USBPcap, it becomes possible to dissect MBIM messages on Windows 8.1 svn path=/trunk/; revision=52308