aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-bthci_evt.c
AgeCommit message (Collapse)AuthorFilesLines
2015-06-19Bluetooth: Coverity fixesMichal Labedzki1-12/+12
Try to fix Coverity issues in Bluetooth HCI and androiddump. Change-Id: Id2ed35130eb4dbb0698b7a54afccdba56af62bfd Reviewed-on: https://code.wireshark.org/review/8983 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2015-06-18Bluetooth: ensure to give bluetooth_data structure to dissect_eir_ad_data()Pascal Quantin1-3/+3
Bug: 11285 Change-Id: I1d3a4900fe3daec6f8d7596a9925322063f2c4eb Reviewed-on: https://code.wireshark.org/review/8976 Reviewed-by: Evan Huus <eapache@gmail.com> Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2015-06-15Qt/Bluetooth: Add Devices dialogueMichal Labedzki1-80/+270
Please found it under Bluetooth menu. It shows all devices found in logs, not only connected, all that its address can be found in logs. Show if device is local (in most cases: capturing on it side) and manufacturer and LMP version what should answer the question what version of Bluetooth is used by Bluetooth device chip. Also firmware version. Change-Id: I32e3b7100cdebcaa850b6541de0ab89dff41c0e1 Reviewed-on: https://code.wireshark.org/review/8901 Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Tested-by: Michal Labedzki <michal.labedzki@tieto.com> Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2015-06-12Bluetooth: Device name is UTF-8, not ASCIIMichal Labedzki1-5/+5
Change-Id: I14578ea9e23dcc3431176b119fa4bbc4eea907c8 Reviewed-on: https://code.wireshark.org/review/8897 Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2015-05-18Bluetooth: HCI: Add command-event trackingMichal Labedzki1-76/+306
HCI Commands in most cases generate response in Event queue, so try to map event to command and give user response time information. Change-Id: Ib4956829b7d0064ab528aa3202f8f959d8d371b7 Reviewed-on: https://code.wireshark.org/review/8514 Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2015-05-18Bluetooth: HCI: Add new LE Event numbersMichal Labedzki1-0/+13
New event will be added later, for now all number are useful. Change-Id: I83b77627dfb0c511710c3080aaac0f6857f76137 Reviewed-on: https://code.wireshark.org/review/8513 Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2015-05-18Bluetooth: SCO: Add Stream Number generated fieldMichal Labedzki1-7/+33
It is used to distinguish SCO streams. Stream Number increase any time when new SCO connection is created. Change-Id: I6cf68914112980cdbad345e52469bf2baf214551 Reviewed-on: https://code.wireshark.org/review/8510 Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2015-05-18Bluetooth: SCO: Add Connect/Disconnect trackingMichal Labedzki1-6/+12
Change-Id: I4db44628d60ec8ae22b625649e971b344f450ed9 Reviewed-on: https://code.wireshark.org/review/8509 Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2015-03-05bthci-evt: added reservedDario Lombardo1-1/+7
Change-Id: I66b93fa35d14b4674fcd897dfb2b1f8810642977 Reviewed-on: https://code.wireshark.org/review/7517 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-02Bluetooth: Fix tools/checkAPI issuesMichal Labedzki1-5/+5
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-02-02Bluetooth: HCI: Improve detecting of undecoded and unknown commandsMichal Labedzki1-5/+8
Undecoded command - command does exist in specification, but not fully implemented in Wireshark yet Unknown command - command does not exist in specification or it is quite new and opcode number is not added yet Unexpected parameter - is now working correctly that means if there is known command but too many parameters so user should know about this issue Change-Id: If3ee24f617f7e6683049558f7a6d68e346e7c92f Reviewed-on: https://code.wireshark.org/review/6898 Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2015-01-10Bluetooth: HCI: Detect Vendor by "Read Local Version Information"Michal Labedzki1-9/+160
There is information about manufacturer of Bluetooth chip. Also try to detect if that "permament" info is not changed, if so informs user about this rare event (probably there is an issue) Change-Id: I1fa748a67ad7943e61d4445d240f0578b94560fc Reviewed-on: https://code.wireshark.org/review/6408 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-10Bluetooth: Add HCI Vendor Broadcom dissectorMichal Labedzki1-4/+4
Since those command/events are vendor specific and proprietary not all commands/events are implemented. All implemented commands can be found in Open Source implementations for Broadcom chip. If you found more, please let me know. Change-Id: Ie68d3737c88a8cef39260a9d93192cfc81871d6c Reviewed-on: https://code.wireshark.org/review/6406 Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com> Tested-by: Michal Labedzki <michal.labedzki@tieto.com>
2015-01-08Bluetooth: Update to latest Assigned Numbers (up to 4.2)Michal Labedzki1-0/+2
Also start decoding next two profile attribute groups in SDP (MPS and CTN) and add new two fields in EIR/AD. Change-Id: I4dc13df2b3b13e8c2a2a5c4af2cabae9ee83d539 Reviewed-on: https://code.wireshark.org/review/6409 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: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-12-30Test suite: Start testing our output for valid UTF-8.Gerald Combs1-1/+4
Feed the output of `tshark -G <glossary>` to `iconv -f UTF-8`. Adjust a couple of the Bluetooth dissectors and X11 keysyms accordingly. Change-Id: I5b04dc3fa4734c8f0a795daf44bd398fe5ebc1bd Reviewed-on: https://code.wireshark.org/review/6146 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Gerald Combs <gerald@wireshark.org>
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-314/+240
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-18Bluetooth: BTLE: Add src/dst addresses when they are knownMichal Labedzki1-62/+40
Generally where it is not connection then on LinkLayer protocol level addresses for Source and Destination device are known. Change-Id: Id67703edc08df73d4c7a2f66ee8f4d6810a867c9 Reviewed-on: https://code.wireshark.org/review/5776 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-12-15Revert "Bluetooth: BTLE: Add src/dst addresses when they are known"Pascal Quantin1-40/+62
This reverts commit a89c17fb52ec1270076abd82e6e5cd56d94fa682. Change-Id: I99029d72b82aaec1b398dffee0beec30829a3939 Reviewed-on: https://code.wireshark.org/review/5775 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-12-15Bluetooth: BTLE: Add src/dst addresses when they are knownMichal Labedzki1-62/+40
Generally where it is not connection then on LinkLayer protocol level addresses for Source and Destination device are known. Change-Id: I28da88381a26826ad4897b56da993909130683d3 Reviewed-on: https://code.wireshark.org/review/5768 Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2014-12-13Use ENC_LITTLE_ENDIAN when fetching FT_U?INT8 fields ...Bill Meier1-1/+1
(for some dissectors which fetch all other integral fields using ENC_LITTLE_ENDIAN). Change-Id: Ica72a68ac560f2920d61e0769de83130557c46fd Reviewed-on: https://code.wireshark.org/review/5752 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2014-10-30Fix a typo: Unidirected -> UndirectedJeff Morriss1-3/+3
As reported in https://ask.wireshark.org/questions/37462/possible-mistake-in-bluetooth-low-energy-hci-event-type Change-Id: Ia6217531208b00c52c89bcb279cbbe67b5163e96 Reviewed-on: https://code.wireshark.org/review/5004 Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-09-22Bluetooth: Handle LE ACL sessionMichal Labedzki1-5/+56
Low Energy use LE Meta event for creating connection so add session when it occur. Change-Id: I6fad42651a3dc6a45cfb1cf679660de5955e76b0 Reviewed-on: https://code.wireshark.org/review/4168 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-20Bluetooth: HCI: Add support for user/vendor commandsMichal Labedzki1-11/+59
Some Vendors can provide own subset of HCI commands/events, so provide them possibility to write own dissectors and use them by "Decode As". Change-Id: I87ff60ae12ac63ddd4b12b26951aa9f5143eabc6 Reviewed-on: https://code.wireshark.org/review/4166 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> Reviewed-by: Evan Huus <eapache@gmail.com>
2014-09-18Bluetooth: Fix packet types additional descriptionMichal Labedzki1-17/+20
Change-Id: Idddd491da8b6c1d5d2824121f9c334d864aafb8c Reviewed-on: https://code.wireshark.org/review/4169 Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2014-08-21Bluetooth: HCI_EVT fix fuzz failtureMichal Labedzki1-1/+3
Fix possible "Conditional jump or move depends on uninitialised value" Bug: 10396 Change-Id: I2c57f8310f88c68ae921d7e5bd1c060d0df27b8e Reviewed-on: https://code.wireshark.org/review/3769 Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2014-06-30Bluetooth: Add missing connection_handleMichal Labedzki1-0/+1
This initialize previously uninitialized variable (and nice fixing everything) Change-Id: I943102510fc45735f40db7899884d2c0fe6ffb40 Reviewed-on: https://code.wireshark.org/review/2717 Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2014-06-22Bluetooth: Complete sessionsMichal Labedzki1-8/+44
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-19Revert "Fixup: tvb_* -> tvb_captured"Michael Mann1-5/+5
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-5/+5
Change-Id: I9209c1271967405c34c1b6fa43e1726a4d3a5a3f Reviewed-on: https://code.wireshark.org/review/2377 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-18Fixup: tvb_get_string(z) -> tvb_get_string(z)_encDario Lombardo1-3/+3
Change-Id: I63a3704effe3fcab01a193dc39b6a22e9f1cf3fe Reviewed-on: https://code.wireshark.org/review/2376 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-07tvb_new_subset -> tvb_new_subset_length when length parameters are equal.Michael Mann1-8/+8
tvb_new_subset -> tvb_new_subset_remaining it appears that's what the intention is. Change-Id: I2334bbf3f10475b3c22391392fc8b6864454de2d Reviewed-on: https://code.wireshark.org/review/1999 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com>
2014-03-06Bluetooth: HCI_EVT: Fix empty advertising dataMichal Labedzki1-3/+5
LE Advertising Report with length 0 is valid, so check it before dissecting adverising data. Change-Id: I4937ec2de5d703b05c6e5f5bac7f81d153e49b40 Reviewed-on: https://code.wireshark.org/review/475 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-01-12Bluetooth/Ubertooth improvements. Bug 9606 ↵Michael Mann1-2/+15
(https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9606) From Michal Labedzki 1. Bluetooth: Implement the rest of fields in Low Energy Link Layer dissector 2. Bluetooth: Merge all UUIDs together 3. Bluetooth: Extract LE Channel MAP to separate dissector 4. Ubertooth: Dissect CC2400 registers svn path=/trunk/; revision=54700
2014-01-12Bluetooth/Ubertooth improvements. Bug 9606 ↵Michael Mann1-805/+72
(https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9606) From Michal Labedski 1. add support for new btsnoop "format" introduced by BlueZ team in "btmon" tool 2. Bluetooth: Make EIR, AD and COD more generic 3. Bluetooth: HCI/LL: Update Error Codes to Core 4.1 Specification 4. Ubertooth: Fix response command handling 5. Ubertooth: Update to support firmware version 6. Ubertooth: Dissect by Vendor Id/Product Id svn path=/trunk/; revision=54699
2013-12-07Bluetooth enhancements. Bug 9446 ↵Michael Mann1-3/+43
(https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9446) Bluetooth: SCO: Add Source/Destination addresses Bluetooth: HCRP: Use information from SDP to decoding PSM payload From Michal Labedzki svn path=/trunk/; revision=53816
2013-12-02eject the packet if data is NULL without doing anything else.Chris Maynard1-3/+5
svn path=/trunk/; revision=53733
2013-11-28Bluetooth improvements. Bug 9446 ↵Michael Mann1-4/+5
(https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9446) From Michal Labedzki. 1. Bluetooth: HFP: Fix recognizing roles. There is need to check which side SDP record is, then it is possible to recognize roles. 2. Bluetooth: RFCOMM/HFP: Fix recognizing services and roles. Direction bit means only that device is initiator of connection or not. But need information who is owner of connection (remote device or localhost), so use this information from L2CAP. 3. Bluetooth: HFP: Fix unexpected expert info 4. Bluetooth: HCI: Set addresses to host/controller. Also optimize a little handing of dissectors handles. svn path=/trunk/; revision=53628
2013-11-25Create/use an extended value_string;Bill Meier1-648/+641
Use 'offset += 1' instead of 'offset++' for consistency; Replace 32767 (as a mask) with 0x7FFF for clarity; Remove some unneeded boilerplate comments; Do whitespace changes. svn path=/trunk/; revision=53577
2013-11-02Bluetooth: Use dissector data instead of pinfo->private_data. Bug 7893 ↵Michael Mann1-34/+35
(https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7893) From Michal Labedzki svn path=/trunk/; revision=53051
2013-10-29From didier gautheron: remove redundant or use faster col_xxx functionsBill Meier1-3/+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-13/+46
(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-09-22emem -> wmem conversion:Pascal Quantin1-3/+3
- ep_tvb_get_bits() -> wmem_packet_tvb_get_bits() - tvb_g_memdup()/ep_tvb_memdup() -> tvb_memdup() - tvb_fake_unicode()/tvb_get_ephemeral_faked_unicode() -> tvb_get_faked_unicode() - tvb_get_g_string()/tvb_get_ephemeral_string()/tvb_get_seasonal_string() -> tvb_get_string() - tvb_get_g_unicode_string()/tvb_get_ephemeral_unicode_string() -> tvb_get_unicode_string() - tvb_get_ephemeral_string_enc() -> tvb_get_string_enc() - update docs accordingly svn path=/trunk/; revision=52172
2013-08-27From Michal Labedzki:Anders Broman1-77/+77
Full dissection of EIR/AD and little improve filtering, cd https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9050 svn path=/trunk/; revision=51527
2013-08-18Bluetooth: HCI: Synchronize and update Voice command. Bug 9050 ↵Michael Mann1-35/+36
(https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9050) From Michal Labedzki. svn path=/trunk/; revision=51411
2013-08-18HCI: Full dissection of EIR/AD and little improve filtering, bug 9050 ↵Michael Mann1-139/+334
(https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9050) From Michal Labedzki. From me: 1. Have boolean filters use tfs_true_false instead of NULL (because it appears previous functionality had "TRUE" and "FALSE"). Perhaps other tfs_ values could be used, but tfs_true_false makes a good placeholder. 2. Add FT_ETHER field as a proto_tree_add_item. svn path=/trunk/; revision=51410
2013-08-18Create individual filters for HCI LMP features. Bug 9050 ↵Michael Mann1-290/+388
(https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9050) From Michal Labedzki svn path=/trunk/; revision=51409