aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-btrfcomm.c
AgeCommit message (Collapse)AuthorFilesLines
2016-01-25Move the proto data stuff out of frame_data.[ch].Guy Harris1-0/+1
It's not tied to the frame_data structure any more, so it belongs by itself. Clean up some #includes while we're at it; in particular, frame_data.h doesn't use anything related to tvbuffs, so don't have it gratuitiously include tvbuff.h. Change-Id: Ic32922d4a3840bac47007c5d4c546b8842245e0c Reviewed-on: https://code.wireshark.org/review/13518 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-01-24Add the packet number to the packet_info structure, and use it.Guy Harris1-1/+1
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-4/+4
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-11-04Don't allow multiple registrations of a protocol in dissector tables.Michael Mann1-1/+1
The target here is the Decode As dialog where protocols have multiple registrations into a dissector table and that shows up as multiple entries in the Decode As dialog list with the same name so users are unsure which "dissector" they are choosing. The "default" behavior (done in this commit) is to not allow duplicates for a dissector table, whether its part of Decode As or not. It's just ENFORCED for Decode As. Bug: 3949 Change-Id: Ibe14fa61aaeca0881f9cc39b78799e314b5e8127 Reviewed-on: https://code.wireshark.org/review/11405 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-10-17Bluetooth: Make dissectors independent of passed dataMichal Labedzki1-1/+1
If Bluetooth dissectors has additional data from previous layer - good. But if do not... try to decode as much as possible - probably using some "force" dissector preferences you can decode payload correctly. Change-Id: I6427afafb987ed3b9b751fd91616e670802b3542 Reviewed-on: https://code.wireshark.org/review/11021 Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2015-09-20Don't hand zero-length UUIDs to print_numeric_uuid().Guy Harris1-1/+2
It returns a null pointer if you do. Change-Id: I3bc934a576dba261d1e71767978e3789a892e728 Reviewed-on: https://code.wireshark.org/review/10590 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-08-07More casting issues with older versions of GLib.Gerald Combs1-1/+1
Try to fix packet-btl2cap.c: In function 'btl2cap_cid_value': packet-btl2cap.c:425: warning: cast to pointer from integer of different size packet-btl2cap.c: In function 'btl2cap_psm_value': packet-btl2cap.c:448: warning: cast to pointer from integer of different size packet-btrfcomm.c: In function 'btrfcomm_directed_channel_value': packet-btrfcomm.c:287: warning: cast to pointer from integer of different size packet-btobex.c: In function 'btobex_profile_value': packet-btobex.c:1134: warning: cast to pointer from integer of different size on the 32-bit OS X builder. Change-Id: Ieb2fe6c31fdad0cf776c24bada7a6a83e8aa91ec Reviewed-on: https://code.wireshark.org/review/9915 Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-08-06Bluetooth: Fix some MSVC2015 warnings/errorsMichal Labedzki1-7/+7
packet-btobex.c(1134): error C2220: warning treated as error - no 'object' file generated packet-btobex.c(1134): warning C4312: 'type cast': conversion from 'gulong' to ' gpointer' of greater size packet-btatt.c(1420): error C2220: warning treated as error - no 'object' file generated packet-btatt.c(1420): warning C4312: 'type cast': conversion from 'gulong' to 'gpointer' of greater size packet-btatt.c(1443): warning C4312: 'type cast': conversion from 'gulong' to 'gpointer' of greater size packet-btl2cap.c(425): error C2220: warning treated as error - no 'object' file generated packet-btl2cap.c(425): warning C4312: 'type cast': conversion from 'gulong' to 'gpointer' of greater size packet-btl2cap.c(448): warning C4312: 'type cast': conversion from 'gulong' to 'gpointer' of greater size packet-btrfcomm.c(287): error C2220: warning treated as error - no 'object' file generated packet-btrfcomm.c(287): warning C4312: 'type cast': conversion from 'gulong' to 'gpointer' of greater size Change-Id: Ie5b4fd1c47725b966f9b98d9480c1858b553efff Reviewed-on: https://code.wireshark.org/review/9894 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-08-05Revert "[MSVC 2015] Fix errors seen with the released version by reverting ↵Michal Labedzki1-1/+6
the code to what failed on the RC version *sigh*" Reverted commit break DecodeAs for Bluetooth, also caused crashes. This reverts commit 2221153a9cc083a50248a72a4b4009908d84e38b. Change-Id: Idb91747b986f110fffa3444f8c52d800c128e141 Reviewed-on: https://code.wireshark.org/review/9877 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-08-05[MSVC 2015] Fix errors seen with the released version by reverting theAndersBroman1-6/+1
code to what failed on the RC version *sigh* Change-Id: I1b7f6d57da4cb71473a074291da7e5a0d5242c95 Reviewed-on: https://code.wireshark.org/review/9874 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-07-17Bluetooth: RFCOMM: Replace Decode by Channel by DLCIMichal Labedzki1-19/+19
Channel is not enough to decode streams over RFCOMM. DLCI is. DLCI is Channel and Direction bit that can be used to recognize which side RFCOMM service (channel) is - remote or local side. Direction bit is first bit in DLCI so: DLCI = Channel < 1 | Direction. Change-Id: I56a641cfd2d4495d119f08ded1aab5cead458e17 Reviewed-on: https://code.wireshark.org/review/9679 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-07-17Bluetooth: Add generic UUID table for DecodeByMichal Labedzki1-58/+32
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-07-12Revert "[MSVC2015] TRy to fix Warnings turned errors."Anders Broman1-2/+12
This reverts commit 8d78077d0d931c6afee6d0e27b5df7c5477e21e5. Reverted as requested. Change-Id: I99461820d28215a52cc6bae6792f2892018d28b8 Reviewed-on: https://code.wireshark.org/review/9609 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-06-04[MSVC2015] TRy to fix Warnings turned errors.Anders1-12/+2
Change-Id: I1156e66daad84004f4f7acae0175fcbb475db71a Reviewed-on: https://code.wireshark.org/review/8760 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-03-02Bluetooth: Fix tools/checkAPI issuesMichal Labedzki1-15/+16
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>
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-4/+4
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-08-21Bluetooth: RFCOMM: Fix recognizing servicesMichal Labedzki1-3/+8
Add support for missing direction flag in dlci. Change-Id: I1429eb65374014e7b840bb31ca1d6f2ab1959160 Reviewed-on: https://code.wireshark.org/review/3766 Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2014-07-29Bluetooth: Fix OBEX over L2CAP detectionMichal Labedzki1-1/+1
There are two cases: 1. btl2cap -> btrfcomm -> btobex 2. btl2cap -> btobex Case 2 is rare, so according to its name and to avoid confusion I based on it. Bug:10316 Change-Id: Ibeabeaf2f8376425460c56bad8fb980b460dd940 Reviewed-on: https://code.wireshark.org/review/3225 Reviewed-by: Evan Huus <eapache@gmail.com>
2014-06-20Rename dissector_add_handle() to dissector_add_for_decode_as().Guy Harris1-4/+4
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-7/+7
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-7/+7
Change-Id: I9209c1271967405c34c1b6fa43e1726a4d3a5a3f Reviewed-on: https://code.wireshark.org/review/2377 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-06-07tvb_new_subset -> tvb_new_subset_length when length parameters are equal.Michael Mann1-1/+1
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-05-30Bluetooth: Avoid using macro GPOINTER_TO_UINT()Michal Labedzki1-9/+43
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-03-25Bluetooth: Fix wrong recognized RFCOMM servicesMichal Labedzki1-23/+79
It seems that RFCOMM service can be dynamically changed while connection is still alive. In other words: host can connect to remote device and set one RFCOMM service (remote service), but later remote device can change service to one of host service without any disconnection. This patch add support for this case. Also improve searching for useful UUID service through SDP. Change-Id: I9e03b9b965d6b0d9761b4a451cdeb4a1a33ca017 Reviewed-on: https://code.wireshark.org/review/808 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-06Bluetooth: Avoid using find_dissector()Michal Labedzki1-20/+11
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-03Fix all -fstrict-alias warnings found by gcc 4.1.2Gilbert Ramirez1-1/+1
The majority of the fixes are for calls to uat_new(). Instead of having each caller cast its private data to (void**), we use void* in the uat_new() API itself. Inside uat_new(), we cast the void* to void**. Some dissectors use val64_string arrays, so a VALS64() macro was added for those, to avoid using VALS(), which is useful only for value_string arrays. packet-mq.c was changed because dissect_nt_sid() requires a char**, not a guint**. All other callers of dissect_nt_sid() use char*'s (and take the address of it) for their local storage. So, this was changed to follow the other practices. A confusion between gint and absolute_time_display_e in packet-time.c was cleared up. The ugliest fix is the addition of ip6_guint8_to_str(), for exactly one caller. The caller uses one type of ip6 address byte array, while ip6_to_str() expects another. This new function is in place until the various address implementations can be consolidated. Add VALS64() to the developer documentation. Change-Id: If93ff5c6c8c7cc3c9510d7fb78fa9108e4552805 Reviewed-on: https://code.wireshark.org/review/48 Reviewed-by: Evan Huus <eapache@gmail.com> Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2014-01-12Bluetooth/Ubertooth improvements. Bug 9606 ↵Michael Mann1-1/+2
(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
2013-12-07Bluetooth enhancements. Bug 9446 ↵Michael Mann1-1/+0
(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-02Reject the packet if data is NULL without doing anything else.Chris Maynard1-3/+5
svn path=/trunk/; revision=53735
2013-11-30Replace "btsdp" tap with function to query service_infos tree, since that's ↵Michael Mann1-22/+2
all dissectors were doing with it. Not used outside of dissectors and cuts down on a few redundant global variables. svn path=/trunk/; revision=53677
2013-11-28Bluetooth improvements. Bug 9446 ↵Michael Mann1-1/+2
(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-23Create the ability to have packet scoped "proto" data. Bug 9470 ↵Michael Mann1-8/+8
(https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9470) I'm not sold on the name or module the proto_data functions live in, but I believe the function arguments are solid and gives us the most flexibility for the future. And search/replace of a function name is easy enough to do. The big driving force for getting this in sooner rather than later is the saved memory on ethernet packets (and IP packets soon), that used to have file_scope() proto data when all it needed was packet_scope() data (technically packet_info->pool scoped), strictly for Decode As. All dissectors that use p_add_proto_data() only for Decode As functionality have been converted to using packet_scope(). All other dissectors were converted to using file_scope() which was the original scope for "proto" data. svn path=/trunk/; revision=53520
2013-11-20Add explicit casts to please GCCPascal Quantin1-2/+2
svn path=/trunk/; revision=53449
2013-11-20Provide "Decode As" functionality through dissectors themselves instead of ↵Michael Mann1-4/+53
the GUI. Bug 9450 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9450) The basic idea behind this design is to have dissectors register with a "decode as list" with their name and dissector table. When "Decode As" dialog is launched, any "registered" dissector found in the packet will cause a tab to be created in the dialog. This patch includes just the dissector portion of the functionality (minus packet-dcerpc.[ch] because it has hooks to the current GUI) svn path=/trunk/; revision=53445
2013-11-05Replace pinfo->layer_names as a string with pinfo->layers as a wmem_list ofEvan Huus1-1/+1
protocol IDs. This is substantially more efficient, which means we can build it all the time rather than only if tree (in my benchmarks the extra time taken is not large enough to be statistically significant even over tens of thousands of packets). This fixes what was probably a bug in btobex that relied on layer_names for non-tree dissection. It also enables a much simpler fix for https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9303 svn path=/trunk/; revision=53089
2013-11-02Bluetooth: Use dissector data instead of pinfo->private_data. Bug 7893 ↵Michael Mann1-28/+32
(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-2/+2
- 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: SDP: Decode all types of UUIDs. Bug 9327 ↵Michael Mann1-2/+2
(https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9327). From Michal Labedzki svn path=/trunk/; revision=52864
2013-10-26Bluetooth: Use items for logical block objects. Bug 9327 ↵Michael Mann1-8/+60
(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-26Replace tabs by spaces. Bug 9327 ↵Michael Mann1-1/+1
(https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9327) From Michal Labedzki svn path=/trunk/; revision=52857
2013-09-12More dissector table name related changes (a continuation of r51904).Chris Maynard1-2/+2
svn path=/trunk/; revision=51982
2013-09-09expert_add_info_format_text -> expert_add_info_formatMichael Mann1-1/+1
svn path=/trunk/; revision=51852
2013-07-09Batch of filterable expert infos.Michael Mann1-1/+10
svn path=/trunk/; revision=50454
2013-06-22Only do a tree lookup if we have a tree to look up in.Evan Huus1-1/+3
Fixes https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8833 svn path=/trunk/; revision=50116
2013-06-20From Michal Labedzki viaEvan Huus1-3/+3
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-06-11From Michal Labedzki via ↵Evan Huus1-5/+7
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8740 Improve Bluetooth HFP dissection. svn path=/trunk/; revision=49886
2013-03-30Hopefully fix a false-positive warning in the Mac buildbot.Evan Huus1-1/+1
It complains that service_info may be used uninitialized, but my manual analysis agrees with GCC 4.7 that it can't, so just defaulting it to NULL will be fine. svn path=/trunk/; revision=48663