aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-bthci_acl.c
AgeCommit message (Collapse)AuthorFilesLines
2015-11-20Bluetooth: Fix remaining lengthsMichal Labedzki1-2/+11
ACL and L2CAP payload contain its length field. Of course it may be broken for many reasons, so there is need to check it and show expert info warning. Bug: 11677 Change-Id: I1988faec9faef70c95161513049ec16ceb8fcf45 Reviewed-on: https://code.wireshark.org/review/11982 Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2015-10-22Use address functions instead of ADDRESS macros in asn1 and epanGerald Combs1-6/+6
Replace CMP_ADDRESS, COPY_ADDRESS, et al with their lower-case equivalents in the asn1 and epan directories. Change-Id: I4043b0931d4353d60cffbd829e30269eb8d08cf4 Reviewed-on: https://code.wireshark.org/review/11200 Petri-Dish: Michal Labedzki <michal.labedzki@tieto.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>
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-16/+125
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-09-19Bluetooth: ACL/AVDTP: Fix ACL session handlingMichal Labedzki1-7/+22
In case like reusing "connection handle" number in next connection (2 -> 3 -> 2 again) AVDTP dissector does not properly dissected packets (it should be Signal, but dissect as Media). Add expert error to all packets that are not in ACL connection. This will show invalid packages (send after dissconnect), however incomplete (mostly beginning) connection will be marked too, but I think it have more pros than cons. Change-Id: I29cf706600cb12c8b93d0188dd2fba18dd5eba88 Reviewed-on: https://code.wireshark.org/review/4167 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>
2014-09-18Bluetooth: Fix some Clang Analyzer warningsMichal Labedzki1-0/+2
Logic error Dereference of null pointer epan/dissectors/packet-bthci_acl.c 379 Logic error Dereference of null pointer epan/dissectors/packet-bthci_acl.c 390 Logic error Dereference of null pointer epan/dissectors/packet-btsdp.c 3673 Logic error Dereference of null pointer epan/dissectors/packet-btsdp.c 1439 Logic error Dereference of null pointer epan/dissectors/packet-btsdp.c 1662 Thanks for Alexis La Goutte for pointing that. Change-Id: Ia646b33de9e368d32983efddfaa41edf7896d7fd Reviewed-on: https://code.wireshark.org/review/4165 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>
2014-06-22Bluetooth: Complete sessionsMichal Labedzki1-5/+43
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-03-06Bluetooth: Avoid using find_dissector()Michal Labedzki1-4/+2
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-06Bluetooth: Make Source/Destination BD_ADDRs and names filterableMichal Labedzki1-127/+139
Source/Destination BD_ADDRs and name are filterable. Also simplify code around wmem trees, and enable commented "data" field in unreassembled case and fix btl2cap offsets (discovered by enabling "data" field). Change-Id: Ic28c9bf19bcd6281b652be538b221da74df4bb76 Reviewed-on: https://code.wireshark.org/review/471 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>
2013-12-21Add missing includesJakub Zawadzki1-0/+1
svn path=/trunk/; revision=54332
2013-12-02eject the packet if data is NULL without doing anything else.Chris Maynard1-3/+5
svn path=/trunk/; revision=53733
2013-11-02Bluetooth: Use dissector data instead of pinfo->private_data. Bug 7893 ↵Michael Mann1-20/+17
(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-13whitespace fixes; mostly: remove trailing blanksBill Meier1-1/+1
svn path=/trunk/; revision=52591
2013-09-12Convert a few more dissectors to wmemPascal Quantin1-1/+1
svn path=/trunk/; revision=51991
2013-06-30Actually initialize the localhost ethernet address before settingJeff Morriss1-2/+7
dl_src/dl_dst to it. Fixes uninitialized-read warnings from Valgrind on the capture in https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8827 svn path=/trunk/; revision=50268
2013-06-20From Michal Labedzki viaEvan Huus1-14/+14
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-30From Michal Labedzki via ↵Evan Huus1-0/+13
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8509 Unify bluetooth direction handling (sent vs rcvd). svn path=/trunk/; revision=48661
2013-03-30From Michal Labedzki via ↵Evan Huus1-0/+5
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8509 Round 3 of Bluetooth SDP updates. Update the list of company IDs and fix service recognition. svn path=/trunk/; revision=48660
2013-03-19From Michal Labedzki via ↵Pascal Quantin1-3/+5
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 beroset:Anders Broman1-13/+13
remove C++ incompatibilities https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416 svn path=/trunk/; revision=48396
2013-02-21Fix AVCTP, AVRCP, HCI AVL and L2CP for multiple interfaces/adaptersMichael Mann1-11/+58
From Michal Labedzki, bug 8367 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8367) svn path=/trunk/; revision=47809
2013-02-11From: Michal Labedzki:Anders Broman1-4/+7
Bluetooth: Improve support of MAP, PBAP, BPP and BIP in OBEX Add support for recognize profiles using OBEX (by "Target"), then add all Application Parameters specific for MAP, PBAP, BPP, BIP. Also fix one FIXME, so now dissecting by OBEX does not cause malformed frames while jumping over dissected packets. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8304 svn path=/trunk/; revision=47632
2013-01-31Comment out unused hf[] entries & etc.Bill Meier1-1/+3
(found by checkhf) svn path=/trunk/; revision=47389
2012-12-26From Michal Labedzki: To ensure that names are correct copy NULL too This ↵Anders Broman1-14/+14
fixes unknown characters sometimes show in src/dst columns, etc. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7639 svn path=/trunk/; revision=46789
2012-12-02Create a wmem pool in pinfo and use it for some address allocations.Evan Huus1-2/+3
A (better?) fix for https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8030 See also thread starting at: http://www.wireshark.org/lists/wireshark-dev/201212/msg00001.html svn path=/trunk/; revision=46331
2012-12-02Fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8030 :Jeff Morriss1-2/+2
Don't store an AT_STRINGZ address in ep_ allocated memory: that memory is freed before the addresses may be used. Use se_ memory instead (no, that's not really ideal either). It would appear that several other dissectors have the same problem. svn path=/trunk/; revision=46320
2012-11-30From Michal Labedzki:Anders Broman1-44/+42
Couple of coding style changes and fixes for: warning: declaration of ‘k_frame_number’ shadows a previous local warning: assignment discards qualifiers from pointer target type Part of: https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5032 svn path=/trunk/; revision=46304
2012-11-29Another couple size_t-to-int warning fixes (I hope).Jeff Morriss1-4/+4
svn path=/trunk/; revision=46288
2012-11-29(Try to) fix some size_t-to-int warnings.Jeff Morriss1-10/+10
svn path=/trunk/; revision=46286
2012-11-29From Michal Labedzki:Anders Broman1-11/+147
Bluetooth: Add support for source/destination addresses Within resolving devices names. Also make header file more generic, packet-hci_h4.h renamed to packet-bluetooth-hci.h. Part of: https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5032 svn path=/trunk/; revision=46278
2012-10-09From Michal Labedzki:Anders Broman1-1/+12
[PATCH 15] Bluetooth: Add modelines https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7639 svn path=/trunk/; revision=45422
2012-09-21From Michal Labedzki:Anders Broman1-5/+3
Bluetooth: Cleanup headers Remove redundant headers and sort existing to chosen convention. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7639 svn path=/trunk/; revision=45039
2012-09-20We always HAVE_CONFIG_H so don't bother checking whether we have it or not.Jeff Morriss1-3/+1
svn path=/trunk/; revision=45017
2012-09-10From Michal Labedzki:Anders Broman1-44/+44
Bluetooth: Use correct names for ACL dissector Dissector name is "bthci_acl" so use it for convention. Also some cosmetic alignments https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7639 svn path=/trunk/; revision=44837
2012-06-28Update FSF address - part II.Jakub Zawadzki1-1/+1
svn path=/trunk/; revision=43538
2012-03-12Use consistent indentation;Bill Meier1-203/+207
Do minor reformatting. svn path=/trunk/; revision=41503
2011-10-21For proto_tree_add_item(..., proto_xxx, ...)use ENC_NA as the encoding arg.Bill Meier1-1/+1
Also: remove trailing whitespace for a number of files. svn path=/trunk/; revision=39503
2011-10-18Display filter name cleanup.Chris Maynard1-7/+7
svn path=/trunk/; revision=39452
2011-09-26Get rid of check_col, while at it set ENC.Anders Broman1-11/+7
svn path=/trunk/; revision=39146
2011-02-17Fix some Visual C++ analysis warnings.Gerald Combs1-3/+3
svn path=/trunk/; revision=35988
2010-12-20Rename the routines that handle dissector tables with unsigned integerGuy Harris1-2/+2
keys to have _uint in their names, to match the routines that handle dissector tables with string keys. (Using _port can confuse people into thinking they're intended solely for use with TCP/UDP/etc. ports when, in fact, they work better for things such as Ethernet types, where the binding of particular values to particular protocols are a lot stronger.) svn path=/trunk/; revision=35224
2010-12-03From Allan M. Madsen via ↵Jeff Morriss1-3/+4
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5446 : Bluetooth ACL packets are not defragmented when the packet boundary flags is set to 'flushable first fragment'. svn path=/trunk/; revision=35117
2010-10-30Rev 29427 added packet_add_new_data_source() with a comment indicating thatJeff Morriss1-1/+1
the data source does not need to be allocated if (!tree). Rev 30158 took the if (!tree) check out indicating that the check was invalid. So: (since packet_add_new_data_source() now only calls add_new_data_source()), remove packet_add_new_data_source(). svn path=/trunk/; revision=34717
2009-11-05Fix value strings in packet boundary lookup tableKovarththanan Rajaratnam1-2/+3
svn path=/trunk/; revision=30830
2009-08-15This patch introduces packet_add_new_data_source() which effectively ↵Kovarththanan Rajaratnam1-1/+1
deprecates add_new_data_source(). This is based on the following observation: 1) The tvb + name (aka. data_source) is only used when the protocol tree is visible The current implementation of add_new_data_source() doesn't take this into account and simply allocates a data_source regardless. This is what packet_add_new_data_source() tries to rectify. A couple of dissectors have already been switched over to the new packet_add_new_data_source(). Many are still missing. Help appreciated! svn path=/trunk/; revision=29427
2009-08-09Don't guard col_set_str (COL_INFO/COL_PROTOCOL) with col_checkKovarththanan Rajaratnam1-3/+1
svn path=/trunk/; revision=29345
2009-06-18From Kovarththanan Rajaratnam via bug 3548:Stig Bjørlykke1-3/+3
(1) Trailing/leading spaces are removed from 'name's/'blurb's (2) Duplicate 'blurb's are replaced with NULL (3) Empty ("") 'blurb's are replaced with NULL (4) BASE_NONE, NULL, 0x0 are used for 'display', 'strings' and 'bitmask' fields for FT_NONE, FT_BYTES, FT_IPv4, FT_IPv6, FT_ABSOLUTE_TIME, FT_RELATIVE_TIME, FT_PROTOCOL, FT_STRING and FT_STRINGZ field types (5) Only allow non-zero value for 'display' if 'bitmask' is non-zero svn path=/trunk/; revision=28770