aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-hci_usb.c
AgeCommit message (Collapse)AuthorFilesLines
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-04-04epan: Convert our PROTO_ITEM_ macros to inline functions.Gerald Combs1-3/+3
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>
2018-12-27Try to squeeze some bytes out of the frame_data structure.Guy Harris1-1/+1
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-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>
2018-01-06bluetooth: Group Bluetooth dissector preferencesStig Bjørlykke1-1/+1
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>
2017-01-29Register reassembly tablesMichael Mann1-1/+1
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-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>
2016-02-19Don't call the hci_usb dissector through a dissector table.Guy Harris1-5/+0
It works the same regardless of what flavor of USB metadata there is, and there's no good reason for any Bluetooth code to know, or care, about particular flavors of USB metadata. Add some comments while we're at it. Change-Id: I6ea2063a015e424fc84a407231e80ef3e2a79c98 Reviewed-on: https://code.wireshark.org/review/14001 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-01-24Add the packet number to the packet_info structure, and use it.Guy Harris1-2/+2
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>
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-06-16Clean up handling of metadata in Bluetooth dissectors.Guy Harris1-0/+1
Make the "previous protocol data" union in bluetooth_data_t a discriminated union, and use the discriminator to decide whether to use a given member of the union or not (or to check whether the member you plan to use is valid). Have separate top-level dissectors depending on what the data type pointed to by the "data" argument is. Use that member to point to pseudo-header metadata, and, for now, set it to point to the appropriate pinfo->pseudo_header value; eventually, we plan to pass the pseudo-header pointer in as the "data" argument from the "frame" dissector. Don't overwrite the pseudo-header in the packetlogger dissector - construct a new one and pass it in. Change-Id: Ia1ef71e7082a964c5d92d47221f8c00e32f3f087 Reviewed-on: https://code.wireshark.org/review/8943 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-03-02Bluetooth: Fix tools/checkAPI issuesMichal Labedzki1-5/+6
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-1/+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>
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-57/+26
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-06-22Bluetooth: Complete sessionsMichal Labedzki1-0/+7
Some interfaces support multiple Bluetooth adapters with events like add/remove. We must support that to distinquish adapters streams in case that new adapter has the same id that old one. Next one is create session for "Connection Handle", so next layer will now when it is connected and disconnected. This is also used to distinguish streams. Change-Id: I9e062c8e4cc9c033b75f1a596e8351a215169843 Reviewed-on: https://code.wireshark.org/review/2548 Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2014-06-20Rename dissector_add_handle() to dissector_add_for_decode_as().Guy Harris1-1/+1
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-2/+2
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-19Revert "Fixup: tvb_ensure_length_remaining -> ↵Michael Mann1-2/+2
tvb_ensure_captured_length_remaining" See https://www.wireshark.org/lists/wireshark-dev/201406/msg00131.html This reverts commit 021e7afc9fcba09094d0e2143cc434a34e3b09dc. Change-Id: I0640eabce5ce8c4ff3a88ebf848b499f8bb8ed2f Reviewed-on: https://code.wireshark.org/review/2429 Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-06-18Fixup: tvb_ensure_length_remaining -> tvb_ensure_captured_length_remainingDario Lombardo1-2/+2
Change-Id: I0228f3b6b7067bc0ce51f9d359f99fd18feb2b66 Reviewed-on: https://code.wireshark.org/review/2378 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-18Fixup: tvb_* -> tvb_capturedDario Lombardo1-2/+2
Change-Id: I9209c1271967405c34c1b6fa43e1726a4d3a5a3f Reviewed-on: https://code.wireshark.org/review/2377 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-06Bluetooth: Fix interface_idMichal Labedzki1-5/+4
Interface ID should correspond to the Wireshark Interface Id to avoid mixing data from various interfaces in dissectors. Change-Id: Ibaa3ddab7f0ebd0985efea74439b94a5881145a7 Reviewed-on: https://code.wireshark.org/review/472 Reviewed-by: Evan Huus <eapache@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-20Add support for Bluetooth Linux MonitorMichal Labedzki1-2/+2
BlueZ 5/Linux Kernel introduced new way to sniffing Bluetooth interfaces. We are ready to use it. Libpcap provide new interface called "bluetooth-monior". Also fix trivial typos. Change-Id: Ic608a3d8553bbebbb21f2733ec92c758cbf8f707 Reviewed-on: https://code.wireshark.org/review/253 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2013-12-23From Michal Labedzki via ↵Alexis La Goutte1-5/+53
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9562 USB: Add support for Bluetooth Ubertooth with initial version of Low Energy Link Layer protocol and NFC ACR122 USB: Make setup request to be able decoding by next dissector Most devices use them as commands, so we can dissect this protocol (class, vendor). Also update "hci_usb" to decode these informations. svn path=/trunk/; revision=54401
2013-12-23From Michal Labedzki via ↵Alexis La Goutte1-4/+3
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9562 USB: Add support for Bluetooth Ubertooth with initial version of Low Energy Link Layer protocol and NFC ACR122 Bluetooth: HCI_USB seems to be compatible with AMP Controllers svn path=/trunk/; revision=54399
2013-12-09Reject the packet if data is NULL without doing anything else.Chris Maynard1-3/+6
Note: We *might* want to do _something_ but that _something_ should be well-defined and consistent across all dissectors. Previously, some dissectors called proto_tree_add_text() to add some error message text to the tree, while others called DISSECTOR_ASSERT(). svn path=/trunk/; revision=53895
2013-11-12Remove usb_conv_info_t from packet_info and pass the data directly into the ↵Michael Mann1-16/+24
subdissectors. Bug 9413 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9413) svn path=/trunk/; revision=53274
2013-11-02Bluetooth: minor improvements. Bug 7893 ↵Michael Mann1-5/+14
(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-13/+9
(https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7893) From Michal Labedzki svn path=/trunk/; revision=53051
2013-10-31USB/PN532: Fix dissector to use new dissector *data instead of ↵Michael Mann1-0/+1
private_data. Bug 9333 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9333) From Michal Labedzki svn path=/trunk/; revision=53003
2013-10-29From didier gautheron: remove redundant or use faster col_xxx functionsBill Meier1-4/+3
- when the text parameter is constant col_add_str() and col_set_str() are equivalent but col_set_str() is faster. - same for replace col_append_fstr and col_append_str - remove col_clear() when it's redundant: + before a col_set/col_add if the dissector can't throw an exception. - replace col_append() after a col_clear() with faster col_add... or col_set https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9344 svn path=/trunk/; revision=52948
2013-10-26Bluetooth: Use items for logical block objects. Bug 9327 ↵Michael Mann1-3/+21
(https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9327) Bluetooth protocols use items, so dissect it to improve filtering and better user experience - text object cannot be filterable or comparable. From Michal Labedzki svn path=/trunk/; revision=52863
2013-10-22Pass usb_data_t "private data" into subdissectors instead of using ↵Michael Mann1-2/+2
pinfo->private_data. svn path=/trunk/; revision=52750
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-06-20From Michal Labedzki viaEvan Huus1-12/+12
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8824 Convert bluetooth emem trees to wmem trees. Add modelines and fix indentation. Correct typo in wmem_tree.h that still referred to emem. svn path=/trunk/; revision=50076
2013-03-28From Michal Labedzki via ↵Evan Huus1-0/+1
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8530 Enable "Decode As" for Bluetooth over USB. svn path=/trunk/; revision=48605
2013-03-22Don't wire into the reassembly code the notion that reassemblies shouldGuy Harris1-6/+7
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-19From Michal Labedzki via ↵Pascal Quantin1-3/+6
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416 : Remove C++ incompatibilities from Bluetooth dissectors and switch to wmem API svn path=/trunk/; revision=48414
2013-03-18From Michal Labedzki:Anders Broman1-1/+1
Fix issues found by fix-encoding-args.pl https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8304 svn path=/trunk/; revision=48388
2013-02-11From: Michal Labedzki:Anders Broman1-0/+13
Subject: [PATCH 3/6] Bluetooth: Add modeline to hci_usb https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8304 svn path=/trunk/; revision=47633
2012-12-03From Michal Labedzki:Anders Broman1-51/+50
Bluetooth: Fix uninitialized fields on the USB side Also make indentation/spaces cleanup in hci_usb dissector. Part of: https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5032 svn path=/trunk/; revision=46341
2012-11-30From Michal Labedzki:Anders Broman1-0/+333
Bluetooth: Add support for HCI USB transport dissector Based on Bluetooth Core 4.0 specification Part of: https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5032 svn path=/trunk/; revision=46305