aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-hci_h1.c
AgeCommit message (Collapse)AuthorFilesLines
2016-08-31Don't do any Decode As stuff for dissector tables not used with Decode As.Guy Harris1-1/+1
Have all dissector tables have a "supports Decode As" flag, which defaults to FALSE, and which is set to TRUE if a register_decode_as() refers to it. When adding a dissector to a dissector table with a given key, only add it for Decode As if the dissector table supports it. For non-FT_STRING dissector tables, always check for multiple entries for the same protocol with different dissectors, and report an error if we found them. This means there's no need for the creator of a dissector table to specify whether duplicates of that sort should be allowed - we always do the check when registering something for "Decode As" (in a non-FT_STRING dissector table), and just don't bother registering anything for "Decode As" if the dissector table doesn't support "Decode As", so there's no check done for those dissector tables. Change-Id: I4a1fdea3bddc2af27a65cfbca23edc99b26c0eed Reviewed-on: https://code.wireshark.org/review/17402 Petri-Dish: Guy Harris <guy@alum.mit.edu> Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-03-20Create call_data_dissector() to call data dissector.Michael Mann1-4/+1
This saves many dissectors the need to find the data dissector and store a handle to it. There were also some that were finding it, but not using it. For others this was the only reason for their handoff function, so it could be eliminated. Change-Id: I5d3f951ee1daa3d30c060d21bd12bbc881a8027b Reviewed-on: https://code.wireshark.org/review/14530 Petri-Dish: Michael Mann <mmann78@netscape.net> Reviewed-by: Michael Mann <mmann78@netscape.net>
2016-03-17Associate dissector tables and heuristic subdissector lists with a protocol.Michael Mann1-1/+1
This will make it easier to determine protocol dependencies. Some LLC OUI dissector tables didn't have an associated protocol, so they were left without one (-1 used) Change-Id: I6339f16476510ef3f393d6fb5d8946419bfb4b7d Reviewed-on: https://code.wireshark.org/review/14446 Reviewed-by: Michael Mann <mmann78@netscape.net>
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-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-06-16Clean up handling of metadata in Bluetooth dissectors.Guy Harris1-1/+2
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-1/+1
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>
2014-12-23Deleting unneccessary #includes from dissectors.Martin Mathieson1-1/+0
Second batch (packet-eth.c -> packet-icmpv6.d). Will look at cleaning up and committing script afterwards. Change-Id: I14295758b81a59115d8c88899f166cc3d5d17594 Reviewed-on: https://code.wireshark.org/review/6013 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-39/+11
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-19Revert "Fixup: tvb_* -> tvb_captured"Michael Mann1-1/+1
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-1/+1
Change-Id: I9209c1271967405c34c1b6fa43e1726a4d3a5a3f Reviewed-on: https://code.wireshark.org/review/2377 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-06Bluetooth: Avoid using find_dissector()Michal Labedzki1-5/+5
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: Fix interface_idMichal Labedzki1-1/+5
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-11-29Avoid including <wiretap/wtap.h> in dissectors.Jakub Zawadzki1-0/+1
svn path=/trunk/; revision=53655
2013-11-03Bluetooth: AVDTP: Add support for Content Protection type SCMS-T (and some ↵Michael Mann1-0/+2
minor cleanup). Bug 7893 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7893) From Michal Labedzki svn path=/trunk/; revision=53065
2013-11-02Bluetooth: Use dissector data instead of pinfo->private_data. Bug 7893 ↵Michael Mann1-9/+6
(https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7893) From Michal Labedzki svn path=/trunk/; revision=53051
2013-06-20From Michal Labedzki viaEvan Huus1-110/+114
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-14Removed check_col() and the occasional tree.Michael Mann1-12/+10
svn path=/trunk/; revision=49938
2013-03-19From Michal Labedzki via ↵Pascal Quantin1-6/+10
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-01-31Comment out unused hf[] entries & etc.Bill Meier1-1/+3
(found by checkhf) svn path=/trunk/; revision=47389
2012-11-29From Michal Labedzki:Anders Broman1-4/+27
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-09-20We always HAVE_CONFIG_H so don't bother checking whether we have it or not.Jeff Morriss1-2/+0
svn path=/trunk/; revision=45017
2012-06-28Update FSF address - part II.Jakub Zawadzki1-1/+1
svn path=/trunk/; revision=43538
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-05-17As suggested by Chris: use val_to_str_const() instead of match_strval() plus aJeff Morriss1-5/+5
NULL-return check. Use val_to_str_const instead of val_to_str() in a couple places where the string is constant. Use val_to_str() instead of blindly passing the return value from match_strval() into a format routine (to ensure a non-NULL string pointer). A couple of these were cases where it could not actually return NULL, but I changed it for consistency. Store the return value of match_strval() rather than calling it repeatedly. svn path=/trunk/; revision=37204
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
2009-08-16Switch a bunch of dissectors over to using tvb_new_subset_remaining()Kovarththanan Rajaratnam1-1/+1
svn path=/trunk/; revision=29446
2009-08-09Don't guard col_clear with col_checkKovarththanan Rajaratnam1-2/+1
svn path=/trunk/; revision=29344
2009-08-09Don't guard col_set_str (COL_PROTOCOL) with col_checkKovarththanan Rajaratnam1-2/+1
svn path=/trunk/; revision=29340
2009-06-18From Kovarththanan Rajaratnam via bug 3548:Stig Bjørlykke1-1/+1
(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
2009-04-24The dissector does not use any bytes.Stig Bjørlykke1-1/+1
svn path=/trunk/; revision=28142
2009-02-16Add support for reading Apple's Bluetooth PacketLogger capture files toStephen Fisher1-5/+30
wiretap. Modify various other locations to accommodate the fact that PacketLogger files do not specify the direction of packets. svn path=/trunk/; revision=27463
2009-02-03Remove "empty" header fileStephen Fisher1-1/+0
svn path=/trunk/; revision=27361
2008-02-03From Shane Kearns (bug 2237):Stig Bjørlykke1-0/+134
Added support for Symbian OS btsnoop. The bluetooth HCI layer in Symbian OS can be configured to log all packets to a file. The log format, "btsnoop" is based on the RFC1761 "snoop" format - but differences in the header make it incompatible. The btsnoop format supports logging of these formats: "H1" (raw HCI packets without framing) "H4" (HCI UART packets including packet type header) "H5" (HCI 3 wire UART packets including framing) "BCSP" (HCI bluecore serial protocol including framing) "H1" and "H4" are section numbers in the original v1 bluetooth specifications, but still used colloquially - wireshark's existing support for Linux bluez HCI logs uses the "H4" name. In practice, the "H1" format is used for H5,BCSP and USB HCI logs, as the HCI packet logs are mainly useful for debugging higher layers, bluetooth profiles and bluetooth applications. From me: Deleted some unused prototypes. Mark an unused parameter. svn path=/trunk/; revision=24263