diff --git a/.gitignore b/.gitignore index b1bd130..c19eedc 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,6 @@ firmware/.pio/ -libs/__pycache__/ +*__pycache__* -*__pycache__* \ No newline at end of file +dissectors/build/ diff --git a/BTSnifferBREDR.py b/BTSnifferBREDR.py index 594d77b..4647770 100755 --- a/BTSnifferBREDR.py +++ b/BTSnifferBREDR.py @@ -1,4 +1,5 @@ #!/usr/bin/python3 + import os import sys import _ctypes diff --git a/dissectors/AUTHORS b/dissectors/AUTHORS new file mode 100644 index 0000000..bde8539 --- /dev/null +++ b/dissectors/AUTHORS @@ -0,0 +1,3 @@ +Authors: +Jiska Classen / Secure Mobile Networking Lab +Michael Ossmann diff --git a/dissectors/CMakeLists.txt b/dissectors/CMakeLists.txt new file mode 100644 index 0000000..0236e3a --- /dev/null +++ b/dissectors/CMakeLists.txt @@ -0,0 +1,58 @@ +# CMakeLists.txt +# +# Wireshark - Network traffic analyzer By Gerald Combs +# Copyright 1998 Gerald Combs +# +# SPDX-License-Identifier: GPL-2.0-or-later +# + +include(WiresharkPlugin) +include(UseMakePluginReg) + +# Plugin name and version info (major minor micro extra) +set_module_info(h4bcm 1 1 0 0) + +set(DISSECTOR_SRC packet-h4bcm.c packet-btbrlmp.c) + +set(PLUGIN_FILES plugin.c ${DISSECTOR_SRC}) + +set_source_files_properties(${PLUGIN_FILES} PROPERTIES COMPILE_FLAGS + "${WERROR_COMMON_FLAGS}") + +include_directories(${CMAKE_CURRENT_SOURCE_DIR}) + +register_plugin_files(plugin.c plugin ${DISSECTOR_SRC}) + +add_plugin_library(h4bcm epan) + +target_link_libraries(h4bcm epan) + +target_compile_options(h4bcm PRIVATE -w) + +install_plugin(h4bcm epan) + +file( + GLOB DISSECTOR_HEADERS + RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" + "*.h") +checkapi( + NAME + h4bcm + SWITCHES + -g + abort + -g + termoutput + -build + SOURCES + ${DISSECTOR_SRC} + ${DISSECTOR_HEADERS}) + +# +# Editor modelines - https://www.wireshark.org/tools/modelines.html +# +# Local variables: c-basic-offset: 8 tab-width: 8 indent-tabs-mode: t End: +# +# vi: set shiftwidth=8 tabstop=8 noexpandtab: +# :indentSize=8:tabSize=8:noTabs=false: +# diff --git a/dissectors/COPYING b/dissectors/COPYING new file mode 100644 index 0000000..aa0aea5 --- /dev/null +++ b/dissectors/COPYING @@ -0,0 +1,340 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) 19yy + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) 19yy name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General +Public License instead of this License. diff --git a/dissectors/README.md b/dissectors/README.md new file mode 100644 index 0000000..7f920bd --- /dev/null +++ b/dissectors/README.md @@ -0,0 +1,40 @@ +Bluetooth H4 Broadcom Wireshark plugin from the InternalBlue project +==================================================================== + +This dissector contains vendor specific additions to the serial protocol +H4, which is used by the operating system's driver to interact with +Bluetooth chips. Broadcom not only supports sending standard messages +such as HCI commands and events but also has an undocumented +diagnostic protocol using the H4 serial data type 0x07. + +Subprotocols inside Broadcom's diagnostic protocol include the Link Management +Protocol (LMP) and Bluetooth Baseband (BB). The dissectors for LMP and BB were +updated to be compatible with Wireshark 3.0. Credit for most of the LMP and BB +dissector goes to the original authors of libbtbb. + +About this repository +--------------------- + +This repository contains only the Wireshark dissector without the rest of +Internalblue. All credit goes to the original authors of InternalBlue. For +additional information see the original repository: + +https://github.com/seemoo-lab/internalblue + +Build and Install +----------------- + +To build this on Debian/Ubuntu/BackTrack linux distributions: + + sudo apt-get install wireshark-dev wireshark cmake + + mkdir build + cd build + cmake .. + make + make install + +This will install to the ~/.local/lib/wireshark/plugins/3.0/epan/ in your home +directory. To override this set the DESTDIR environment variable when running +cmake. + diff --git a/dissectors/build.sh b/dissectors/build.sh new file mode 100755 index 0000000..1caaf83 --- /dev/null +++ b/dissectors/build.sh @@ -0,0 +1,38 @@ +#!/usr/bin/env bash + +PLUGIN_VERSION=2.0.0 +WIRESHARK_INCLUDES=$(pkg-config wireshark --cflags-only-I) + +mkdir -p build + +clang-11 -DG_DISABLE_DEPRECATED -DG_DISABLE_SINGLE_INCLUDES -DHAVE_PLUGINS -DPLUGIN_VERSION=\"$PLUGIN_VERSION\" \ +-Dh4bcm_EXPORTS $WIRESHARK_INCLUDES -I. -fvisibility=hidden -Qunused-arguments \ +-Wall -Wextra -Wendif-labels -Wpointer-arith -Wformat-security -fwrapv -fno-strict-overflow -Wvla -Waddress \ +-Wattributes -Wdiv-by-zero -Wignored-qualifiers -Wpragmas -Wno-overlength-strings -Wno-long-long -Wheader-guard \ +-Wcomma -Wshorten-64-to-32 -Wframe-larger-than=32768 -Wc++-compat -Wunused-const-variable -Wshadow -Wold-style-definition \ +-Wstrict-prototypes -Werror=implicit -Wno-pointer-sign -std=gnu99 -fno-stack-protector -fpic -Wall -Wno-braced-scalar-init \ +-Wno-unused-variable -Wno-reorder -O2 -g -DNDEBUG -fPIC -fcolor-diagnostics -w -std=gnu11 -Werror \ +-o build/packet-h4bcm.c.o -c packet-h4bcm.c + +clang-11 -DG_DISABLE_DEPRECATED -DG_DISABLE_SINGLE_INCLUDES -DHAVE_PLUGINS -DPLUGIN_VERSION=\"$PLUGIN_VERSION\" \ +-Dh4bcm_EXPORTS $WIRESHARK_INCLUDES -I. -fvisibility=hidden -Qunused-arguments \ +-Wall -Wextra -Wendif-labels -Wpointer-arith -Wformat-security -fwrapv -fno-strict-overflow -Wvla -Waddress \ +-Wattributes -Wdiv-by-zero -Wignored-qualifiers -Wpragmas -Wno-overlength-strings -Wno-long-long -Wheader-guard \ +-Wcomma -Wshorten-64-to-32 -Wframe-larger-than=32768 -Wc++-compat -Wunused-const-variable -Wshadow -Wold-style-definition \ +-Wstrict-prototypes -Werror=implicit -Wno-pointer-sign -std=gnu99 -fno-stack-protector -fpic -Wall -Wno-braced-scalar-init \ +-Wno-unused-variable -Wno-reorder -O2 -g -DNDEBUG -fPIC -fcolor-diagnostics -w -std=gnu11 -Werror \ +-o build/packet-btbrlmp.c.o -c packet-btbrlmp.c + +clang-11 -DG_DISABLE_DEPRECATED -DG_DISABLE_SINGLE_INCLUDES -DHAVE_PLUGINS -DPLUGIN_VERSION=\"$PLUGIN_VERSION\" \ +-Dh4bcm_EXPORTS $WIRESHARK_INCLUDES -I. -fvisibility=hidden -Qunused-arguments \ +-Wall -Wextra -Wendif-labels -Wpointer-arith -Wformat-security -fwrapv -fno-strict-overflow -Wvla -Waddress \ +-Wattributes -Wdiv-by-zero -Wignored-qualifiers -Wpragmas -Wno-overlength-strings -Wno-long-long -Wheader-guard \ +-Wcomma -Wshorten-64-to-32 -Wframe-larger-than=32768 -Wc++-compat -Wunused-const-variable -Wshadow -Wold-style-definition \ +-Wstrict-prototypes -Werror=implicit -Wno-pointer-sign -std=gnu99 -fno-stack-protector -fpic -Wall -Wno-braced-scalar-init \ +-Wno-unused-variable -Wno-reorder -O2 -g -DNDEBUG -fPIC -fcolor-diagnostics -w -std=gnu11 -Werror \ +-o build/plugin.c.o -c plugin.c + + +gcc --std=gnu11 -fPIC -w -O3 -shared -o h4bcm.so build/packet-btbrlmp.c.o build/packet-h4bcm.c.o build/plugin.c.o -lwireshark -lwiretap -lwsutil + +# sudo cp h4bcm.so /usr/local/lib/wireshark/plugins/3.4/epan/ diff --git a/dissectors/config.h b/dissectors/config.h new file mode 100644 index 0000000..4749de7 --- /dev/null +++ b/dissectors/config.h @@ -0,0 +1,381 @@ +/* cmakeconfig.h.in */ + +#ifndef __CONFIG_H__ +#define __CONFIG_H__ + +/* Note: You cannot use earlier #defines in later #cmakedefines (cmake 2.6.2). */ + +/* Name of package */ +#define PACKAGE "wireshark" + +#define VERSION_EXTRA "" + +/* Version number of package */ +#define VERSION "3.4.0" +#define VERSION_MAJOR 3 +#define VERSION_MINOR 4 +#define VERSION_MICRO 0 + +#define PLUGIN_PATH_ID "3.4" +#define VERSION_FLAVOR "Development Build" + +/* Build wsutil with SIMD optimization */ +#define HAVE_SSE4_2 1 + +/* Define to 1 if we want to enable plugins */ +#define HAVE_PLUGINS 1 + +/* Define to 1 if we check hf conflict */ +/* #undef ENABLE_CHECK_FILTER */ + +/* Link Wireshark libraries statically */ +/* #undef ENABLE_STATIC */ + +/* Enable AirPcap */ +/* #undef HAVE_AIRPCAP */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_ALLOCA_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_ARPA_INET_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_FCNTL_H 1 + +/* Define to use the MaxMind DB library */ +/* #undef HAVE_MAXMINDDB */ + +/* Define to 1 if you have the header file. */ +#define HAVE_IFADDRS_H 1 + +/* Define to 1 if yu have the `fseeko` function. */ +#define HAVE_FSEEKO 1 + +/* Define to 1 if you have the `getexecname' function. */ +/* #undef HAVE_GETEXECNAME */ + +/* Define to 1 if you have the `getifaddrs' function. */ +#define HAVE_GETIFADDRS 1 + +/* Define if LIBSSH support is enabled */ +/* #undef HAVE_LIBSSH */ + +/* Define if you have the 'dlget' function. */ +/* #undef HAVE_DLGET */ + +/* Define if you have the 'getexecname' function. */ +/* #undef HAVE_GETEXECNAME */ + +/* Define if you have the 'floorl' function. */ +#define HAVE_FLOORL 1 + +/* Define to 1 if you have the getopt_long function. */ +#define HAVE_GETOPT_LONG 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_GETOPT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_GRP_H 1 + +/* Define to use heimdal kerberos */ +/* #undef HAVE_HEIMDAL_KERBEROS */ + +/* Define to 1 if you have the `krb5_pac_verify' function. */ +#define HAVE_KRB5_PAC_VERIFY 1 + +/* Define to 1 if you have the `krb5_c_fx_cf2_simple' function. */ +#define HAVE_KRB5_C_FX_CF2_SIMPLE 1 + +/* Define to 1 if you have the `inflatePrime' function. */ +#define HAVE_INFLATEPRIME 1 + +/* Define to 1 if you have the `issetugid' function. */ +/* #undef HAVE_ISSETUGID */ + +/* Define to use kerberos */ +#define HAVE_KERBEROS 1 + +/* Define to use nghttp2 */ +#define HAVE_NGHTTP2 1 + +/* Define to use the libcap library */ +#define HAVE_LIBCAP 1 + +/* Define to use GnuTLS library */ +#define HAVE_LIBGNUTLS 1 + +/* Define to 1 if GnuTLS was built with pkcs11 support. */ +#define HAVE_GNUTLS_PKCS11 1 + +/* Enable libnl support */ +#define HAVE_LIBNL 1 + +/* libnl version 1 */ +/* #undef HAVE_LIBNL1 */ + +/* libnl version 2 */ +/* #undef HAVE_LIBNL2 */ + +/* libnl version 3 */ +#define HAVE_LIBNL3 1 + +/* Define to use libpcap library */ +#define HAVE_LIBPCAP 1 + +/* Define to 1 if you have the `smi' library (-lsmi). */ +#define HAVE_LIBSMI 1 + +/* Define to use zlib library */ +#define HAVE_ZLIB 1 + +/* Define to use the minizip library */ +/* #undef HAVE_MINIZIP */ + +/* Define to use brotli library */ +#define HAVE_BROTLI 1 + +/* Define to use lz4 library */ +#define HAVE_LZ4 1 + +/* Check for lz4frame */ +#define HAVE_LZ4FRAME_H 1 + +/* Define to use snappy library */ +#define HAVE_SNAPPY 1 + +/* Define to use zstd library */ +#define HAVE_ZSTD 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_LINUX_SOCKIOS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_LINUX_IF_BONDING_H 1 + +/* Define to use Lua */ +/* #undef HAVE_LUA */ + +/* Define to use MIT kerberos */ +#define HAVE_MIT_KERBEROS 1 + +/* Define to 1 if you have the `mkstemps' function. */ +#define HAVE_MKSTEMPS 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_NETDB_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_NETINET_IN_H 1 + +/* nl80211.h is new enough */ +#define HAVE_NL80211 1 + +/* SET_CHANNEL is supported */ +#define HAVE_NL80211_CMD_SET_CHANNEL 1 + +/* SPLIT_WIPHY_DUMP is supported */ +#define HAVE_NL80211_SPLIT_WIPHY_DUMP 1 + +/* VHT_CAPABILITY is supported */ +#define HAVE_NL80211_VHT_CAPABILITY 1 + +/* Define to 1 if you have macOS frameworks */ +/* #undef HAVE_MACOS_FRAMEWORKS */ + +/* Define to 1 if you have the macOS CFPropertyListCreateWithStream function */ +/* #undef HAVE_CFPROPERTYLISTCREATEWITHSTREAM */ + +/* Define to 1 if you have the `pcap_create' function. */ +/* #undef HAVE_PCAP_CREATE */ + +/* Define to 1 if the capture buffer size can be set. */ +#define CAN_SET_CAPTURE_BUFFER_SIZE 1 + +/* Define to 1 if you have the `pcap_freecode' function. */ +/* #undef HAVE_PCAP_FREECODE */ + +/* Define to 1 if you have the `pcap_free_datalinks' function. */ +/* #undef HAVE_PCAP_FREE_DATALINKS */ + +/* Define to 1 if you have the `pcap_open' function. */ +/* #undef HAVE_PCAP_OPEN */ + +/* Define to 1 if you have libpcap/WinPcap/Npcap remote capturing support. */ +/* #undef HAVE_PCAP_REMOTE */ + +/* Define to 1 if you have the `pcap_setsampling' function. */ +/* #undef HAVE_PCAP_SETSAMPLING */ + +/* Define to 1 if you have the `pcap_set_tstamp_precision' function. */ +/* #undef HAVE_PCAP_SET_TSTAMP_PRECISION */ + +/* Define to 1 if you have the `pcap_set_tstamp_type' function. */ +/* #undef HAVE_PCAP_SET_TSTAMP_TYPE */ + +/* Define to 1 if you have the header file. */ +#define HAVE_PWD_H 1 + +/* Define to 1 if you have the optreset variable */ +/* #undef HAVE_OPTRESET */ + +/* Define if sa_len field exists in struct sockaddr */ +/* #undef HAVE_STRUCT_SOCKADDR_SA_LEN */ + +/* Define to 1 if you want to playing SBC by standalone BlueZ SBC library */ +#define HAVE_SBC 1 + +/* Define to 1 if you have the SpanDSP library. */ +#define HAVE_SPANDSP 1 + +/* Define to 1 if you have the bcg729 library. */ +/* #undef HAVE_BCG729 */ + +/* Define to 1 if you have the ilbc library. */ +/* #undef HAVE_ILBC */ + +/* Define to 1 if you have the speexdsp library. */ +/* #undef HAVE_SPEEXDSP */ + +/* Define to 1 if you have the lixbml2 library. */ +#define HAVE_LIBXML2 1 + +/* Define to 1 if you have the `setresgid' function. */ +#define HAVE_SETRESGID 1 + +/* Define to 1 if you have the `setresuid' function. */ +#define HAVE_SETRESUID 1 + +/* Define to 1 if you have the Sparkle or WinSparkle library */ +/* #undef HAVE_SOFTWARE_UPDATE */ + +/* Define if you have the 'strptime' function. */ +#define HAVE_STRPTIME 1 + +/* Define to 1 if `st_birthtime' is a member of `struct stat'. */ +/* #undef HAVE_STRUCT_STAT_ST_BIRTHTIME */ + +/* Define if st_flags field exists in struct stat */ +/* #undef HAVE_STRUCT_STAT_ST_FLAGS */ + +/* Define if st_blksize field exists in struct stat */ +#define HAVE_STRUCT_STAT_ST_BLKSIZE 1 + +/* Define to 1 if `__st_birthtime' is a member of `struct stat'. */ +/* #undef HAVE_STRUCT_STAT___ST_BIRTHTIME */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_IOCTL_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_SOCKET_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_SOCKIO_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TIME_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_UTSNAME_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_WAIT_H 1 + +/* Define if tm_zone field exists in struct tm */ +#define HAVE_STRUCT_TM_TM_ZONE 1 + +/* Define if tzname array exists */ +#define HAVE_TZNAME 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_UNISTD_H 1 + +/* Name of package */ +/* #undef PACKAGE */ + +/* Define to the address where bug reports for this package should be sent. */ +/* #undef PACKAGE_BUGREPORT */ + +/* Define to the full name of this package. */ +/* #undef PACKAGE_NAME */ + +/* Define to the full name and version of this package. */ +/* #undef PACKAGE_STRING */ + +/* Define to the one symbol short name of this package. */ +/* #undef PACKAGE_TARNAME */ + +/* Define to the version of this package. */ +/* #undef PACKAGE_VERSION */ + +/* Define if we have QtMultimedia */ +#define QT_MULTIMEDIA_LIB 1 + +/* Define if we have QtMacExtras */ +/* #undef QT_MACEXTRAS_LIB */ + +/* Build androiddump with libpcap instead of wireshark stuff */ +/* #undef ANDROIDDUMP_USE_LIBPCAP */ + +/* Large file support */ +/* #undef _LARGEFILE_SOURCE */ +/* #undef _LARGEFILE64_SOURCE */ +/* #undef _LARGE_FILES */ +/* #undef _FILE_OFFSET_BITS */ + +/* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a + `char[]'. */ +/* Note: not use in the code */ +/* #undef YYTEXT_POINTER */ + +#if defined(_WIN32) + /* + * Make sure everyone is using the same API and that it's sufficient + * for our needs. + * This should match the following: + * - The section in image\wireshark.exe.manifest.in + * - The GetWindowsVersion parts of packaging\nsis\wireshark.nsi + * - The VersionNT parts of packaging\wix\Prerequisites.wxi + */ +# if defined(NTDDI_VERSION) +# error NTDDI_VERSION already defined. +# endif +# define NTDDI_VERSION NTDDI_WIN7 +# if defined(_WIN32_WINNT) +# error _WIN32_WINNT already defined. +# endif +# define _WIN32_WINNT _WIN32_WINNT_WIN7 + + /* WpdPack/INclude/pcap/pcap.h checks for "#if defined(WIN32)" */ +# ifndef WIN32 +# define WIN32 1 +# endif + +# if !defined(QT_VERSION) || !defined(_SSIZE_T_DEFINED) + typedef int ssize_t; +# endif + + /* + * Flex (v 2.5.35) uses this symbol to "exclude" unistd.h + */ +# define YY_NO_UNISTD_H + +# define strncasecmp strnicmp +# define popen _popen +# define pclose _pclose + +# ifndef __STDC__ +# define __STDC__ 0 +# endif + /* Use Unicode in Windows runtime functions. */ +# define UNICODE 1 +# define _UNICODE 1 + +# define NEED_STRPTIME_H 1 +#endif + +#include + +#endif /* __CONFIG_H__ */ diff --git a/dissectors/h4bcm.so b/dissectors/h4bcm.so new file mode 100755 index 0000000..11188a6 Binary files /dev/null and b/dissectors/h4bcm.so differ diff --git a/dissectors/packet-btbrlmp.c b/dissectors/packet-btbrlmp.c new file mode 100644 index 0000000..519aa2f --- /dev/null +++ b/dissectors/packet-btbrlmp.c @@ -0,0 +1,4987 @@ +/* packet-btbrlmp.c + * Routines for Bluetooth LMP dissection + * Copyright 2009, Michael Ossmann + * + * Wireshark - Network traffic analyzer + * By Gerald Combs + * Copyright 1998 Gerald Combs + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include "config.h" + +#include +#include + +/* LMP opcodes */ +#define LMP_VSC 0 +#define LMP_NAME_REQ 1 +#define LMP_NAME_RES 2 +#define LMP_ACCEPTED 3 +#define LMP_NOT_ACCEPTED 4 +#define LMP_CLKOFFSET_REQ 5 +#define LMP_CLKOFFSET_RES 6 +#define LMP_DETACH 7 +#define LMP_IN_RAND 8 +#define LMP_COMB_KEY 9 +#define LMP_UNIT_KEY 10 +#define LMP_AU_RAND 11 +#define LMP_SRES 12 +#define LMP_TEMP_RAND 13 +#define LMP_TEMP_KEY 14 +#define LMP_ENCRYPTION_MODE_REQ 15 +#define LMP_ENCRYPTION_KEY_SIZE_REQ 16 +#define LMP_START_ENCRYPTION_REQ 17 +#define LMP_STOP_ENCRYPTION_REQ 18 +#define LMP_SWITCH_REQ 19 +#define LMP_HOLD 20 +#define LMP_HOLD_REQ 21 +#define LMP_SNIFF_REQ 23 +#define LMP_UNSNIFF_REQ 24 +#define LMP_PARK_REQ 25 +#define LMP_SET_BROADCAST_SCAN_WINDOW 27 +#define LMP_MODIFY_BEACON 28 +#define LMP_UNPARK_BD_ADDR_REQ 29 +#define LMP_UNPARK_PM_ADDR_REQ 30 +#define LMP_INCR_POWER_REQ 31 +#define LMP_DECR_POWER_REQ 32 +#define LMP_MAX_POWER 33 +#define LMP_MIN_POWER 34 +#define LMP_AUTO_RATE 35 +#define LMP_PREFERRED_RATE 36 +#define LMP_VERSION_REQ 37 +#define LMP_VERSION_RES 38 +#define LMP_FEATURES_REQ 39 +#define LMP_FEATURES_RES 40 +#define LMP_QUALITY_OF_SERVICE 41 +#define LMP_QUALITY_OF_SERVICE_REQ 42 +#define LMP_SCO_LINK_REQ 43 +#define LMP_REMOVE_SCO_LINK_REQ 44 +#define LMP_MAX_SLOT 45 +#define LMP_MAX_SLOT_REQ 46 +#define LMP_TIMING_ACCURACY_REQ 47 +#define LMP_TIMING_ACCURACY_RES 48 +#define LMP_SETUP_COMPLETE 49 +#define LMP_USE_SEMI_PERMANENT_KEY 50 +#define LMP_HOST_CONNECTION_REQ 51 +#define LMP_SLOT_OFFSET 52 +#define LMP_PAGE_MODE_REQ 53 +#define LMP_PAGE_SCAN_MODE_REQ 54 +#define LMP_SUPERVISION_TIMEOUT 55 +#define LMP_TEST_ACTIVATE 56 +#define LMP_TEST_CONTROL 57 +#define LMP_ENCRYPTION_KEY_SIZE_MASK_REQ 58 +#define LMP_ENCRYPTION_KEY_SIZE_MASK_RES 59 +#define LMP_SET_AFH 60 +#define LMP_ENCAPSULATED_HEADER 61 +#define LMP_ENCAPSULATED_PAYLOAD 62 +#define LMP_SIMPLE_PAIRING_CONFIRM 63 +#define LMP_SIMPLE_PAIRING_NUMBER 64 +#define LMP_DHKEY_CHECK 65 +#define LMP_ESCAPE_1 124 +#define LMP_ESCAPE_2 125 +#define LMP_ESCAPE_3 126 +#define LMP_ESCAPE_4 127 + +/* LMP extended opcodes */ +#define LMP_ACCEPTED_EXT 1 +#define LMP_NOT_ACCEPTED_EXT 2 +#define LMP_FEATURES_REQ_EXT 3 +#define LMP_FEATURES_RES_EXT 4 +#define LMP_PACKET_TYPE_TABLE_REQ 11 +#define LMP_ESCO_LINK_REQ 12 +#define LMP_REMOVE_ESCO_LINK_REQ 13 +#define LMP_CHANNEL_CLASSIFICATION_REQ 16 +#define LMP_CHANNEL_CLASSIFICATION 17 +#define LMP_SNIFF_SUBRATING_REQ 21 +#define LMP_SNIFF_SUBRATING_RES 22 +#define LMP_PAUSE_ENCRYPTION_REQ 23 +#define LMP_RESUME_ENCRYPTION_REQ 24 +#define LMP_IO_CAPABILITY_REQ 25 +#define LMP_IO_CAPABILITY_RES 26 +#define LMP_NUMERIC_COMPARISON_FAILED 27 +#define LMP_PASSKEY_FAILED 28 +#define LMP_OOB_FAILED 29 +#define LMP_KEYPRESS_NOTIFICATION 30 +#define LMP_POWER_CONTROL_REQ 31 +#define LMP_POWER_CONTROL_RES 32 +#define LMP_PING_REQ 33 +#define LMP_PING_RES 34 + +/* initialize the protocol and registered fields */ +static int proto_btbrlmp = -1; +static int hf_lmp_accscheme = -1; +static int hf_lmp_afhchmap = -1; +static int hf_lmp_afhclass = -1; +static int hf_lmp_afhinst = -1; +static int hf_lmp_afhmaxintvl = -1; +static int hf_lmp_afhminintvl = -1; +static int hf_lmp_afhmode = -1; +static int hf_lmp_afhrptmode = -1; +static int hf_lmp_airmode = -1; +static int hf_lmp_araddr = -1; +static int hf_lmp_authreqs = -1; +static int hf_lmp_authres = -1; +static int hf_lmp_bdaddr = -1; +static int hf_lmp_bdaddr1 = -1; +static int hf_lmp_bdaddr2 = -1; +static int hf_lmp_bsw = -1; +static int hf_lmp_clkoffset = -1; +static int hf_lmp_commit = -1; +static int hf_lmp_confirm = -1; +static int hf_lmp_compid = -1; +static int hf_lmp_cryptmode = -1; +static int hf_lmp_daccess = -1; +static int hf_lmp_db = -1; +static int hf_lmp_dbsleep = -1; +static int hf_lmp_deltab = -1; +static int hf_lmp_desco = -1; +static int hf_lmp_drift = -1; +static int hf_lmp_dsco = -1; +static int hf_lmp_dsniff = -1; +static int hf_lmp_encdata = -1; +static int hf_lmp_enclen = -1; +static int hf_lmp_encmaj = -1; +static int hf_lmp_encmin = -1; +static int hf_lmp_eop = -1; +static int hf_lmp_eopinre = -1; +static int hf_lmp_escolenms = -1; +static int hf_lmp_escolensm = -1; +static int hf_lmp_escotypems = -1; +static int hf_lmp_escotypesm = -1; +static int hf_lmp_err = -1; +static int hf_lmp_escohdl = -1; +static int hf_lmp_escoltaddr = -1; +static int hf_lmp_features = -1; +static int hf_lmp_feat_3slot = -1; +static int hf_lmp_feat_5slot = -1; +static int hf_lmp_feat_enc = -1; +static int hf_lmp_feat_slotoff = -1; +static int hf_lmp_feat_timacc = -1; +static int hf_lmp_feat_rolesw = -1; +static int hf_lmp_feat_holdmo = -1; +static int hf_lmp_feat_sniffmo = -1; +static int hf_lmp_feat_res0 = -1; +static int hf_lmp_feat_pwrctlreq = -1; +static int hf_lmp_feat_cqddr = -1; +static int hf_lmp_feat_sco = -1; +static int hf_lmp_feat_hv2 = -1; +static int hf_lmp_feat_hv3 = -1; +static int hf_lmp_feat_mulaw = -1; +static int hf_lmp_feat_alaw = -1; +static int hf_lmp_feat_cvsd = -1; +static int hf_lmp_feat_pagneg = -1; +static int hf_lmp_feat_pwrctl = -1; +static int hf_lmp_feat_transsync = -1; +static int hf_lmp_feat_flowctl1 = -1; +static int hf_lmp_feat_flowctl2 = -1; +static int hf_lmp_feat_flowctl3 = -1; +static int hf_lmp_feat_bcenc = -1; +static int hf_lmp_feat_res1 = -1; +static int hf_lmp_feat_acl2 = -1; +static int hf_lmp_feat_acl3 = -1; +static int hf_lmp_feat_eninq = -1; +static int hf_lmp_feat_intinq = -1; +static int hf_lmp_feat_intpag = -1; +static int hf_lmp_feat_rssiinq = -1; +static int hf_lmp_feat_ev3 = -1; +static int hf_lmp_feat_ev4 = -1; +static int hf_lmp_feat_ev5 = -1; +static int hf_lmp_feat_res2 = -1; +static int hf_lmp_feat_afhcapsl = -1; +static int hf_lmp_feat_afhclasl = -1; +static int hf_lmp_feat_bredrnotsup = -1; +static int hf_lmp_feat_lesup = -1; +static int hf_lmp_feat_3slotenh = -1; +static int hf_lmp_feat_5slotenh = -1; +static int hf_lmp_feat_sniffsubr = -1; +static int hf_lmp_feat_pauseenc = -1; +static int hf_lmp_feat_afhcapma = -1; +static int hf_lmp_feat_afhclama = -1; +static int hf_lmp_feat_esco2 = -1; +static int hf_lmp_feat_esco3 = -1; +static int hf_lmp_feat_3slotenhesco = -1; +static int hf_lmp_feat_extinqres = -1; +static int hf_lmp_feat_simlebredr = -1; +static int hf_lmp_feat_res3 = -1; +static int hf_lmp_feat_ssp = -1; +static int hf_lmp_feat_enpdu = -1; +static int hf_lmp_feat_edr = -1; +static int hf_lmp_feat_nonflush = -1; +static int hf_lmp_feat_res4 = -1; +static int hf_lmp_feat_lstimche = -1; +static int hf_lmp_feat_inqtxpwr = -1; +static int hf_lmp_feat_enhpwr = -1; +static int hf_lmp_feat_res5 = -1; +static int hf_lmp_feat_res6 = -1; +static int hf_lmp_feat_res7 = -1; +static int hf_lmp_feat_res8 = -1; +static int hf_lmp_feat_extfeat = -1; +static int hf_lmp_featuresext = -1; +static int hf_lmp_efeat_ssp = -1; +static int hf_lmp_efeat_lesup = -1; +static int hf_lmp_efeat_lebredr = -1; +static int hf_lmp_efeat_sch = -1; +static int hf_lmp_efeat_csbma = -1; +static int hf_lmp_efeat_csbsl = -1; +static int hf_lmp_efeat_syntr = -1; +static int hf_lmp_efeat_synsc = -1; +static int hf_lmp_efeat_inqresnote = -1; +static int hf_lmp_efeat_genintsc = -1; +static int hf_lmp_efeat_ccadj = -1; +static int hf_lmp_efeat_res0 = -1; +static int hf_lmp_efeat_scc = -1; +static int hf_lmp_efeat_ping = -1; +static int hf_lmp_efeat_res1 = -1; +static int hf_lmp_efeat_trnud = -1; +static int hf_lmp_efeat_sam = -1; +static int hf_lmp_fpage = -1; +static int hf_lmp_htime = -1; +static int hf_lmp_hinst = -1; +static int hf_lmp_hopmode = -1; +static int hf_lmp_iocaps = -1; +static int hf_lmp_jitter = -1; +static int hf_lmp_key = -1; +static int hf_lmp_keysz = -1; +static int hf_lmp_ksmask = -1; +static int hf_lmp_ltaddr1 = -1; +static int hf_lmp_ltaddr2 = -1; +static int hf_lmp_ltaddr3 = -1; +static int hf_lmp_ltaddr4 = -1; +static int hf_lmp_ltaddr5 = -1; +static int hf_lmp_ltaddr6 = -1; +static int hf_lmp_ltaddr7 = -1; +static int hf_lmp_maccess = -1; +static int hf_lmp_maxslots = -1; +static int hf_lmp_maxsp = -1; +static int hf_lmp_maxss = -1; +static int hf_lmp_minsmt = -1; +static int hf_lmp_naccslots = -1; +static int hf_lmp_namefrag = -1; +static int hf_lmp_namelen = -1; +static int hf_lmp_nameoffset = -1; +static int hf_lmp_nb = -1; +static int hf_lmp_nbc = -1; +static int hf_lmp_nbsleep = -1; +static int hf_lmp_negstate = -1; +static int hf_lmp_nonce = -1; +static int hf_lmp_nottype = -1; +static int hf_lmp_npoll = -1; +static int hf_lmp_oobauthdata = -1; +static int hf_lmp_op = -1; +static int hf_lmp_opinre = -1; +static int hf_lmp_pagesch = -1; +static int hf_lmp_pcmode = -1; +static int hf_lmp_pkttype = -1; +static int hf_lmp_pkttypetbl = -1; +static int hf_lmp_pmaddr = -1; +static int hf_lmp_pmaddr1 = -1; +static int hf_lmp_pmaddr2 = -1; +static int hf_lmp_pmaddr3 = -1; +static int hf_lmp_pmaddr4 = -1; +static int hf_lmp_pmaddr5 = -1; +static int hf_lmp_pmaddr6 = -1; +static int hf_lmp_pmaddr7 = -1; +static int hf_lmp_pollintvl = -1; +static int hf_lmp_pollper = -1; +static int hf_lmp_pssettings = -1; +static int hf_lmp_pwradjreq = -1; +static int hf_lmp_pwradjres = -1; +static int hf_lmp_pwradj_8dpsk = -1; +static int hf_lmp_pwradj_dqpsk = -1; +static int hf_lmp_pwradj_gfsk = -1; +static int hf_lmp_rand = -1; +static int hf_lmp_rate = -1; +static int hf_lmp_rate_fec = -1; +static int hf_lmp_rate_size = -1; +static int hf_lmp_rate_type = -1; +static int hf_lmp_rate_edrsize = -1; +static int hf_lmp_rxfreq = -1; +static int hf_lmp_scohdl = -1; +static int hf_lmp_scopkt = -1; +static int hf_lmp_slotoffset = -1; +static int hf_lmp_sniffatt = -1; +static int hf_lmp_sniffsi = -1; +static int hf_lmp_sniffto = -1; +static int hf_lmp_subversnr = -1; +static int hf_lmp_suptimeout = -1; +static int hf_lmp_swinst = -1; +static int hf_lmp_taccess = -1; +static int hf_lmp_tb = -1; +static int hf_lmp_tesco = -1; +static int hf_lmp_testlen = -1; +static int hf_lmp_testscen = -1; +static int hf_lmp_tid = -1; +static int hf_lmp_timectrl = -1; +static int hf_lmp_time_change = -1; +static int hf_lmp_time_init = -1; +static int hf_lmp_time_accwin = -1; +static int hf_lmp_tsco = -1; +static int hf_lmp_tsniff = -1; +static int hf_lmp_txfreq = -1; +static int hf_lmp_versnr = -1; +static int hf_lmp_wesco = -1; + +/* supported features page 0 (standard p. 528) */ +static const int *features_fields[] = { + &hf_lmp_feat_3slot, + &hf_lmp_feat_5slot, + &hf_lmp_feat_enc, + &hf_lmp_feat_slotoff, + &hf_lmp_feat_timacc, + &hf_lmp_feat_rolesw, + &hf_lmp_feat_holdmo, + &hf_lmp_feat_sniffmo, + &hf_lmp_feat_res0, + &hf_lmp_feat_pwrctlreq, + &hf_lmp_feat_cqddr, + &hf_lmp_feat_sco, + &hf_lmp_feat_hv2, + &hf_lmp_feat_hv3, + &hf_lmp_feat_mulaw, + &hf_lmp_feat_alaw, + &hf_lmp_feat_cvsd, + &hf_lmp_feat_pagneg, + &hf_lmp_feat_pwrctl, + &hf_lmp_feat_transsync, + &hf_lmp_feat_flowctl1, + &hf_lmp_feat_flowctl2, + &hf_lmp_feat_flowctl3, + &hf_lmp_feat_bcenc, + &hf_lmp_feat_res1, + &hf_lmp_feat_acl2, + &hf_lmp_feat_acl3, + &hf_lmp_feat_eninq, + &hf_lmp_feat_intinq, + &hf_lmp_feat_intpag, + &hf_lmp_feat_rssiinq, + &hf_lmp_feat_ev3, + &hf_lmp_feat_ev4, + &hf_lmp_feat_ev5, + &hf_lmp_feat_res2, + &hf_lmp_feat_afhcapsl, + &hf_lmp_feat_afhclasl, + &hf_lmp_feat_bredrnotsup, + &hf_lmp_feat_lesup, + &hf_lmp_feat_3slotenh, + &hf_lmp_feat_5slotenh, + &hf_lmp_feat_sniffsubr, + &hf_lmp_feat_pauseenc, + &hf_lmp_feat_afhcapma, + &hf_lmp_feat_afhclama, + &hf_lmp_feat_esco2, + &hf_lmp_feat_esco3, + &hf_lmp_feat_3slotenhesco, + &hf_lmp_feat_extinqres, + &hf_lmp_feat_simlebredr, + &hf_lmp_feat_res3, + &hf_lmp_feat_ssp, + &hf_lmp_feat_enpdu, + &hf_lmp_feat_edr, + &hf_lmp_feat_nonflush, + &hf_lmp_feat_res4, + &hf_lmp_feat_lstimche, + &hf_lmp_feat_inqtxpwr, + &hf_lmp_feat_enhpwr, + &hf_lmp_feat_res5, + &hf_lmp_feat_res6, + &hf_lmp_feat_res7, + &hf_lmp_feat_res8, + &hf_lmp_feat_extfeat, + NULL}; + +/* supported features page 1+2 (standard p. 530) */ +static const int *extfeatures1_fields[] = { + + &hf_lmp_efeat_ssp, + &hf_lmp_efeat_lesup, + &hf_lmp_efeat_lebredr, + &hf_lmp_efeat_sch, + NULL}; + +static const int *extfeatures2_fields[] = { + &hf_lmp_efeat_csbma, + &hf_lmp_efeat_csbsl, + &hf_lmp_efeat_syntr, + &hf_lmp_efeat_synsc, + &hf_lmp_efeat_inqresnote, + &hf_lmp_efeat_genintsc, + &hf_lmp_efeat_ccadj, + &hf_lmp_efeat_res0, + &hf_lmp_efeat_scc, + &hf_lmp_efeat_ping, + &hf_lmp_efeat_res1, + &hf_lmp_efeat_trnud, + &hf_lmp_efeat_sam, + NULL}; + +/* timing control flags */ +static const int *timectrl_fields[] = { + &hf_lmp_time_change, + &hf_lmp_time_init, + &hf_lmp_time_accwin, + /* bits 3-7 reserved */ + NULL}; + +static const true_false_string time_change = { + "timing change", + "no timing change"}; + +static const true_false_string time_init = { + "use initialization 2", + "use initialization 1"}; + +static const true_false_string time_accwin = { + "no access window", + "access window"}; + +static const true_false_string fec = { + "do not use FEC", + "use FEC"}; + +static const true_false_string tid = { + "transaction initiated by slave", + "transaction initiated by master"}; + +/* short LMP opcodes */ +static const value_string opcode[] = { + {LMP_VSC, "LMP_Broadcom_BPCS"}, + {LMP_NAME_REQ, "LMP_name_req"}, + {LMP_NAME_RES, "LMP_name_res"}, + {LMP_ACCEPTED, "LMP_accepted"}, + {LMP_NOT_ACCEPTED, "LMP_not_accepted"}, + {LMP_CLKOFFSET_REQ, "LMP_clkoffset_req"}, + {LMP_CLKOFFSET_RES, "LMP_clkoffset_res"}, + {LMP_DETACH, "LMP_detach"}, + {LMP_IN_RAND, "LMP_in_rand"}, + {LMP_COMB_KEY, "LMP_comb_key"}, + {LMP_UNIT_KEY, "LMP_unit_key"}, + {LMP_AU_RAND, "LMP_au_rand"}, + {LMP_SRES, "LMP_sres"}, + {LMP_TEMP_RAND, "LMP_temp_rand"}, + {LMP_TEMP_KEY, "LMP_temp_key"}, + {LMP_ENCRYPTION_MODE_REQ, "LMP_encryption_mode_req"}, + {LMP_ENCRYPTION_KEY_SIZE_REQ, "LMP_encryption_key_size_req"}, + {LMP_START_ENCRYPTION_REQ, "LMP_start_encryption_req"}, + {LMP_STOP_ENCRYPTION_REQ, "LMP_stop_encryption_req"}, + {LMP_SWITCH_REQ, "LMP_switch_req"}, + {LMP_HOLD, "LMP_hold"}, + {LMP_HOLD_REQ, "LMP_hold_req"}, + {LMP_SNIFF_REQ, "LMP_sniff_req"}, + {LMP_UNSNIFF_REQ, "LMP_unsniff_req"}, + {LMP_PARK_REQ, "LMP_park_req"}, + {LMP_SET_BROADCAST_SCAN_WINDOW, "LMP_set_broadcast_scan_window"}, + {LMP_MODIFY_BEACON, "LMP_modify_beacon"}, + {LMP_UNPARK_BD_ADDR_REQ, "LMP_unpark_BD_ADDR_req"}, + {LMP_UNPARK_PM_ADDR_REQ, "LMP_unpark_PM_ADDR_req"}, + {LMP_INCR_POWER_REQ, "LMP_incr_power_req"}, + {LMP_DECR_POWER_REQ, "LMP_decr_power_req"}, + {LMP_MAX_POWER, "LMP_max_power"}, + {LMP_MIN_POWER, "LMP_min_power"}, + {LMP_AUTO_RATE, "LMP_auto_rate"}, + {LMP_PREFERRED_RATE, "LMP_preferred_rate"}, + {LMP_VERSION_REQ, "LMP_version_req"}, + {LMP_VERSION_RES, "LMP_version_res"}, + {LMP_FEATURES_REQ, "LMP_features_req"}, + {LMP_FEATURES_RES, "LMP_features_res"}, + {LMP_QUALITY_OF_SERVICE, "LMP_quality_of_service"}, + {LMP_QUALITY_OF_SERVICE_REQ, "LMP_quality_of_service_req"}, + {LMP_SCO_LINK_REQ, "LMP_SCO_link_req"}, + {LMP_REMOVE_SCO_LINK_REQ, "LMP_remove_SCO_link_req"}, + {LMP_MAX_SLOT, "LMP_max_slot"}, + {LMP_MAX_SLOT_REQ, "LMP_max_slot_req"}, + {LMP_TIMING_ACCURACY_REQ, "LMP_timing_accuracy_req"}, + {LMP_TIMING_ACCURACY_RES, "LMP_timing_accuracy_res"}, + {LMP_SETUP_COMPLETE, "LMP_setup_complete"}, + {LMP_USE_SEMI_PERMANENT_KEY, "LMP_use_semi_permanent_key"}, + {LMP_HOST_CONNECTION_REQ, "LMP_host_connection_req"}, + {LMP_SLOT_OFFSET, "LMP_slot_offset"}, + {LMP_PAGE_MODE_REQ, "LMP_page_mode_req"}, + {LMP_PAGE_SCAN_MODE_REQ, "LMP_page_scan_mode_req"}, + {LMP_SUPERVISION_TIMEOUT, "LMP_supervision_timeout"}, + {LMP_TEST_ACTIVATE, "LMP_test_activate"}, + {LMP_TEST_CONTROL, "LMP_test_control"}, + {LMP_ENCRYPTION_KEY_SIZE_MASK_REQ, "LMP_encryption_key_size_mask_req"}, + {LMP_ENCRYPTION_KEY_SIZE_MASK_RES, "LMP_encryption_key_size_mask_res"}, + {LMP_SET_AFH, "LMP_set_AFH"}, + {LMP_ENCAPSULATED_HEADER, "LMP_encapsulated_header"}, + {LMP_ENCAPSULATED_PAYLOAD, "LMP_encapsulated_payload"}, + {LMP_SIMPLE_PAIRING_CONFIRM, "LMP_Simple_Pairing_Confirm"}, + {LMP_SIMPLE_PAIRING_NUMBER, "LMP_Simple_Pairing_Number"}, + {LMP_DHKEY_CHECK, "LMP_DHkey_Check"}, + {LMP_ESCAPE_1, "Escape 1"}, + {LMP_ESCAPE_2, "Escape 2"}, + {LMP_ESCAPE_3, "Escape 3"}, + {LMP_ESCAPE_4, "Escape 4"}, + {0, NULL}}; + +/* extended LMP opcodes */ +static const value_string ext_opcode[] = { + {LMP_ACCEPTED_EXT, "LMP_accepted_ext"}, + {LMP_NOT_ACCEPTED_EXT, "LMP_not_accepted_ext"}, + {LMP_FEATURES_REQ_EXT, "LMP_features_req_ext"}, + {LMP_FEATURES_RES_EXT, "LMP_features_res_ext"}, + {LMP_PACKET_TYPE_TABLE_REQ, "LMP_packet_type_table_req"}, + {LMP_ESCO_LINK_REQ, "LMP_eSCO_link_req"}, + {LMP_REMOVE_ESCO_LINK_REQ, "LMP_remove_eSCO_link_req"}, + {LMP_CHANNEL_CLASSIFICATION_REQ, "LMP_channel_classification_req"}, + {LMP_CHANNEL_CLASSIFICATION, "LMP_channel_classification"}, + {LMP_SNIFF_SUBRATING_REQ, "LMP_sniff_subrating_req"}, + {LMP_SNIFF_SUBRATING_RES, "LMP_sniff_subrating_res"}, + {LMP_PAUSE_ENCRYPTION_REQ, "LMP_pause_encryption_req"}, + {LMP_RESUME_ENCRYPTION_REQ, "LMP_resume_encryption_req"}, + {LMP_IO_CAPABILITY_REQ, "LMP_IO_Capability_req"}, + {LMP_IO_CAPABILITY_RES, "LMP_IO_Capability_res"}, + {LMP_NUMERIC_COMPARISON_FAILED, "LMP_numeric_comparison_failed"}, + {LMP_PASSKEY_FAILED, "LMP_passkey_failed"}, + {LMP_OOB_FAILED, "LMP_oob_failed"}, + {LMP_KEYPRESS_NOTIFICATION, "LMP_keypress_notification"}, + {LMP_POWER_CONTROL_REQ, "LMP_power_control_req"}, + {LMP_POWER_CONTROL_RES, "LMP_power_control_res"}, + {LMP_PING_REQ, "LMP_ping_req"}, + {LMP_PING_RES, "LMP_ping_res"}, + {0, NULL}}; + +/* LMP error codes */ +static const value_string error_code[] = { + {0x00, "Success"}, + {0x01, "Unknown HCI Command"}, + {0x02, "Unknown Connection Identifier"}, + {0x03, "Hardware Failure"}, + {0x04, "Page Timeout"}, + {0x05, "Authentication Failure"}, + {0x06, "PIN or Key Missing"}, + {0x07, "Memory Capacity Exceeded"}, + {0x08, "Connection Timeout"}, + {0x09, "Connection Limit Exceeded"}, + {0x0A, "Synchronous Connection Limit To A Device Exceeded"}, + {0x0B, "ACL Connection Already Exists"}, + {0x0C, "Command Disallowed"}, + {0x0D, "Connection Rejected due to Limited Resources"}, + {0x0E, "Connection Rejected Due To Security Reasons"}, + {0x0F, "Connection Rejected due to Unacceptable BD_ADDR"}, + {0x10, "Connection Accept Timeout Exceeded"}, + {0x11, "Unsupported Feature or Parameter Value"}, + {0x12, "Invalid HCI Command Parameters"}, + {0x13, "Remote User Terminated Connection"}, + {0x14, "Remote Device Terminated Connection due to Low Resources"}, + {0x15, "Remote Device Terminated Connection due to Power Off"}, + {0x16, "Connection Terminated By Local Host"}, + {0x17, "Repeated Attempts"}, + {0x18, "Pairing Not Allowed"}, + {0x19, "Unknown LMP PDU"}, + {0x1A, "Unsupported Remote Feature / Unsupported LMP Feature"}, + {0x1B, "SCO Offset Rejected"}, + {0x1C, "SCO Interval Rejected"}, + {0x1D, "SCO Air Mode Rejected"}, + {0x1E, "Invalid LMP Parameters"}, + {0x1F, "Unspecified Error"}, + {0x20, "Unsupported LMP Parameter Value"}, + {0x21, "Role Change Not Allowed"}, + {0x22, "LMP Response Timeout"}, + {0x23, "LMP Error Transaction Collision"}, + {0x24, "LMP PDU Not Allowed"}, + {0x25, "Encryption Mode Not Acceptable"}, + {0x26, "Link Key Can Not be Changed"}, + {0x27, "Requested QoS Not Supported"}, + {0x28, "Instant Passed"}, + {0x29, "Pairing With Unit Key Not Supported"}, + {0x2A, "Different Transaction Collision"}, + {0x2B, "Reserved"}, + {0x2C, "QoS Unacceptable Parameter"}, + {0x2D, "QoS Rejected"}, + {0x2E, "Channel Classification Not Supported"}, + {0x2F, "Insufficient Security"}, + {0x30, "Parameter Out Of Mandatory Range"}, + {0x31, "Reserved"}, + {0x32, "Role Switch Pending"}, + {0x33, "Reserved"}, + {0x34, "Reserved Slot Violation"}, + {0x35, "Role Switch Failed"}, + {0x36, "Extended Inquiry Response Too Large"}, + {0x37, "Secure Simple Pairing Not Supported By Host."}, + {0x38, "Host Busy - Pairing"}, + {0x39, "Connection Rejected due to No Suitable Channel Found"}, + {0, NULL}}; + +static const value_string encryption_mode[] = { + {0, "no encryption"}, + {1, "encryption"}, + {2, "encryption"}, + /* 3 - 255 reserved */ + {0, NULL}}; + +static const value_string access_scheme[] = { + {0, "polling technique"}, + /* 1 - 15 reserved */ + {0, NULL}}; + +static const value_string packet_size[] = { + {0, "no packet-size preference available"}, + {1, "use 1-slot packets"}, + {2, "use 3-slot packets"}, + {3, "use 5-slot packets"}, + {0, NULL}}; + +static const value_string edr_type[] = { + {0, "use DM1 packets"}, + {1, "use 2 Mbps packets"}, + {2, "use 3 Mbps packets"}, + /* 3 reserved */ + {0, NULL}}; + +static const value_string versnr[] = { + {0, "Bluetooth Core Specification 1.0b"}, + {1, "Bluetooth Core Specification 1.1"}, + {2, "Bluetooth Core Specification 1.2"}, + {3, "Bluetooth Core Specification 2.0 + EDR"}, + {4, "Bluetooth Core Specification 2.1 + EDR"}, + {5, "Bluetooth Core Specification 3.0 + HS"}, + {6, "Bluetooth Core Specification 4.0"}, + {7, "Bluetooth Core Specification 4.1"}, + {8, "Bluetooth Core Specification 4.2"}, + {9, "Bluetooth Core Specification 5.0"}, + {10, "Bluetooth Core Specification 5.1"}, + {11, "Bluetooth Core Specification 5.2"}, + /* 12 - 255 reserved */ + {0, NULL}}; + +static const value_string compid[] = { + {0, "Ericsson Technology Licensing"}, + {1, "Nokia Mobile Phones"}, + {2, "Intel Corp."}, + {3, "IBM Corp."}, + {4, "Toshiba Corp."}, + {5, "3Com"}, + {6, "Microsoft"}, + {7, "Lucent"}, + {8, "Motorola"}, + {9, "Infineon Technologies AG"}, + {10, "Cambridge Silicon Radio"}, + {11, "Silicon Wave"}, + {12, "Digianswer A/S"}, + {13, "Texas Instruments Inc."}, + {14, "Parthus Technologies Inc."}, + {15, "Broadcom Corporation"}, + {16, "Mitel Semiconductor"}, + {17, "Widcomm, Inc."}, + {18, "Zeevo, Inc."}, + {19, "Atmel Corporation"}, + {20, "Mitsubishi Electric Corporation"}, + {21, "RTX Telecom A/S"}, + {22, "KC Technology Inc."}, + {23, "Newlogic"}, + {24, "Transilica, Inc."}, + {25, "Rohde & Schwarz GmbH & Co. KG"}, + {26, "TTPCom Limited"}, + {27, "Signia Technologies, Inc."}, + {28, "Conexant Systems Inc."}, + {29, "Qualcomm"}, + {30, "Inventel"}, + {31, "AVM Berlin"}, + {32, "BandSpeed, Inc."}, + {33, "Mansella Ltd"}, + {34, "NEC Corporation"}, + {35, "WavePlus Technology Co., Ltd."}, + {36, "Alcatel"}, + {37, "Philips Semiconductors"}, + {38, "C Technologies"}, + {39, "Open Interface"}, + {40, "R F Micro Devices"}, + {41, "Hitachi Ltd"}, + {42, "Symbol Technologies, Inc."}, + {43, "Tenovis"}, + {44, "Macronix International Co. Ltd."}, + {45, "GCT Semiconductor"}, + {46, "Norwood Systems"}, + {47, "MewTel Technology Inc."}, + {48, "ST Microelectronics"}, + {49, "Synopsys"}, + {50, "Red-M (Communications) Ltd"}, + {51, "Commil Ltd"}, + {52, "Computer Access Technology Corporation (CATC)"}, + {53, "Eclipse (HQ Espana) S.L."}, + {54, "Renesas Technology Corp."}, + {55, "Mobilian Corporation"}, + {56, "Terax"}, + {57, "Integrated System Solution Corp."}, + {58, "Matsushita Electric Industrial Co., Ltd."}, + {59, "Gennum Corporation"}, + {60, "Research In Motion"}, + {61, "IPextreme, Inc."}, + {62, "Systems and Chips, Inc"}, + {63, "Bluetooth SIG, Inc"}, + {64, "Seiko Epson Corporation"}, + {65, "Integrated Silicon Solution Taiwan, Inc."}, + {66, "CONWISE Technology Corporation Ltd"}, + {67, "PARROT SA"}, + {68, "Socket Mobile"}, + {69, "Atheros Communications, Inc."}, + {70, "MediaTek, Inc."}, + {71, "Bluegiga (tentative)"}, + {72, "Marvell Technology Group Ltd."}, + {73, "3DSP Corporation"}, + {74, "Accel Semiconductor Ltd."}, + {75, "Continental Automotive Systems"}, + {76, "Apple, Inc."}, + {77, "Staccato Communications, Inc."}, + {78, "Avago Technologies"}, + {79, "APT Ltd."}, + {80, "SiRF Technology, Inc."}, + {81, "Tzero Technologies, Inc."}, + {82, "J&M Corporation"}, + {83, "Free2move AB"}, + {84, "3DiJoyCorporation"}, + {85, "Plantronics,Inc."}, + {86, "SonyEricssonMobileCommunications"}, + {87, "HarmanInternationalIndustries,Inc."}, + {88, "Vizio,Inc."}, + {89, "NordicSemiconductorASA"}, + {90, "EMMicroelectronic-MarinSA"}, + {91, "RalinkTechnologyCorporation"}, + {92, "BelkinInternational,Inc."}, + {93, "RealtekSemiconductorCorporation"}, + {94, "StonestreetOne,LLC"}, + {95, "Wicentric,Inc."}, + {96, "RivieraWavesS.A.S"}, + {97, "RDAMicroelectronics"}, + {98, "GibsonGuitars"}, + {99, "MiCommandInc."}, + {100, "BandXIInternational,LLC"}, + {101, "Hewlett-PackardCompany"}, + {102, "9SolutionsOy"}, + {103, "GNNetcomA/S"}, + {104, "GeneralMotors"}, + {105, "A&DEngineering,Inc."}, + {106, "MindTreeLtd."}, + {107, "PolarElectroOY"}, + {108, "BeautifulEnterpriseCo.,Ltd."}, + {109, "BriarTek,Inc"}, + {110, "SummitDataCommunications,Inc."}, + {111, "SoundID"}, + {112, "Monster,LLC"}, + {113, "connectBlueAB"}, + {114, "ShangHaiSuperSmartElectronicsCo.Ltd."}, + {115, "GroupSenseLtd."}, + {116, "Zomm,LLC"}, + {117, "SamsungElectronicsCo.Ltd."}, + {118, "CreativeTechnologyLtd."}, + {119, "LairdTechnologies"}, + {120, "Nike,Inc."}, + {121, "lesswireAG"}, + {122, "MStarSemiconductor,Inc."}, + {123, "HanlynnTechnologies"}, + {124, "A&RCambridge"}, + {125, "SeersTechnologyCo.,Ltd."}, + {126, "SportsTrackingTechnologiesLtd."}, + {127, "AutonetMobile"}, + {128, "DeLormePublishingCompany,Inc."}, + {129, "WuXiVimicro"}, + {130, "SennheiserCommunicationsA/S"}, + {131, "TimeKeepingSystems,Inc."}, + {132, "LudusHelsinkiLtd."}, + {133, "BlueRadios,Inc."}, + {134, "EquinuxAG"}, + {135, "GarminInternational,Inc."}, + {136, "Ecotest"}, + {137, "GNReSoundA/S"}, + {138, "Jawbone"}, + {139, "TopconPositioningSystems,LLC"}, + {140, "GimbalInc.(formerlyQualcommLabs,Inc.andQualcommRetailSolutions,Inc.)"}, + {141, "ZscanSoftware"}, + {142, "QuinticCorp"}, + {143, "TelitWirelessSolutionsGmbH(formerlyStollmannE+VGmbH)"}, + {144, "FunaiElectricCo.,Ltd."}, + {145, "AdvancedPANMOBILsystemsGmbH&Co.KG"}, + {146, "ThinkOptics,Inc."}, + {147, "UniversalElectronics,Inc."}, + {148, "AirohaTechnologyCorp."}, + {149, "NECLighting,Ltd."}, + {150, "ODMTechnology,Inc."}, + {151, "ConnecteDeviceLtd."}, + {152, "zero1.tvGmbH"}, + {153, "i.TechDynamicGlobalDistributionLtd."}, + {154, "Alpwise"}, + {155, "JiangsuToppowerAutomotiveElectronicsCo.,Ltd."}, + {156, "Colorfy,Inc."}, + {157, "GeoforceInc."}, + {158, "BoseCorporation"}, + {159, "SuuntoOy"}, + {160, "KensingtonComputerProductsGroup"}, + {161, "SR-Medizinelektronik"}, + {162, "VertuCorporationLimited"}, + {163, "MetaWatchLtd."}, + {164, "LINAKA/S"}, + {165, "OTLDynamicsLLC"}, + {166, "PandaOceanInc."}, + {167, "VisteonCorporation"}, + {168, "ARPDevicesLimited"}, + {169, "MagnetiMarelliS.p.A"}, + {170, "CAENRFIDsrl"}, + {171, "Ingenieur-SystemgruppeZahnGmbH"}, + {172, "GreenThrottleGames"}, + {173, "PeterSystemtechnikGmbH"}, + {174, "OmegawaveOy"}, + {175, "Cinetix"}, + {176, "PassifSemiconductorCorp"}, + {177, "SarisCyclingGroup,Inc"}, + {178, "BekeyA/S"}, + {179, "ClarinoxTechnologiesPty.Ltd."}, + {180, "BDETechnologyCo.,Ltd."}, + {181, "SwirlNetworks"}, + {182, "Mesointernational"}, + {183, "TreLabLtd"}, + {184, "QualcommInnovationCenter,Inc.(QuIC)"}, + {185, "JohnsonControls,Inc."}, + {186, "StarkeyLaboratoriesInc."}, + {187, "S-PowerElectronicsLimited"}, + {188, "AceSensorInc"}, + {189, "AplixCorporation"}, + {190, "AAMPofAmerica"}, + {191, "StalmartTechnologyLimited"}, + {192, "AMICCOMElectronicsCorporation"}, + {193, "ShenzhenExcelsecuDataTechnologyCo.,Ltd"}, + {194, "GeneqInc."}, + {195, "adidasAG"}, + {196, "LGElectronics"}, + {197, "OnsetComputerCorporation"}, + {198, "SelflyBV"}, + {199, "QuuppaOy."}, + {200, "GeLoInc"}, + {201, "Evluma"}, + {202, "MC10"}, + {203, "BinauricSE"}, + {204, "BeatsElectronics"}, + {205, "MicrochipTechnologyInc."}, + {206, "ElgatoSystemsGmbH"}, + {207, "ARCHOSSA"}, + {208, "Dexcom,Inc."}, + {209, "PolarElectroEuropeB.V."}, + {210, "DialogSemiconductorB.V."}, + {211, "TaixingbangTechnology(HK)Co,.LTD."}, + {212, "Kawantech"}, + {213, "AustcoCommunicationSystems"}, + {214, "TimexGroupUSA,Inc."}, + {215, "QualcommTechnologies,Inc."}, + {216, "QualcommConnectedExperiences,Inc."}, + {217, "VoyetraTurtleBeach"}, + {218, "txtrGmbH"}, + {219, "Biosentronics"}, + {220, "Procter&Gamble"}, + {221, "HosidenCorporation"}, + {222, "MuzikLLC"}, + {223, "MisfitWearablesCorp"}, + {224, "Google"}, + {225, "DanlersLtd"}, + {226, "SemilinkInc"}, + {227, "inMusicBrands,Inc"}, + {228, "L.S.ResearchInc."}, + {229, "EdenSoftwareConsultantsLtd."}, + {230, "Freshtemp"}, + {231, "KSTechnologies"}, + {232, "ACTSTechnologies"}, + {233, "VtrackSystems"}, + {234, "Nielsen-KellermanCompany"}, + {235, "ServerTechnologyInc."}, + {236, "BioResearchAssociates"}, + {237, "JollyLogic,LLC"}, + {238, "AboveAverageOutcomes,Inc."}, + {239, "BitsplittersGmbH"}, + {240, "PayPal,Inc."}, + {241, "WitronTechnologyLimited"}, + {242, "MorseProjectInc."}, + {243, "KentDisplaysInc."}, + {244, "NautilusInc."}, + {245, "SmartifierOy"}, + {246, "ElcometerLimited"}, + {247, "VSNTechnologies,Inc."}, + {248, "AceUniCorp.,Ltd."}, + {249, "StickNFind"}, + {250, "CrystalCodeAB"}, + {251, "KOUKAAMa.s."}, + {252, "DelphiCorporation"}, + {253, "ValenceTechLimited"}, + {254, "StanleyBlackandDecker"}, + {255, "TypoProducts,LLC"}, + {256, "TomTomInternationalBV"}, + {257, "Fugoo,Inc."}, + {258, "KeiserCorporation"}, + {259, "Bang&OlufsenA/S"}, + {260, "PLUSLocationSystemsPtyLtd"}, + {261, "UbiquitousComputingTechnologyCorporation"}, + {262, "InnovativeYachtterSolutions"}, + {263, "WilliamDemantHoldingA/S"}, + {264, "ChiconyElectronicsCo.,Ltd."}, + {265, "AtusBV"}, + {266, "CodegateLtd"}, + {267, "ERi,Inc"}, + {268, "TransducersDirect,LLC"}, + {269, "FujitsuTenLImited"}, + {270, "AudiAG"}, + {271, "HiSiliconTechnologiesCol,Ltd."}, + {272, "NipponSeikiCo.,Ltd."}, + {273, "SteelseriesApS"}, + {274, "VisyblInc."}, + {275, "OpenbrainTechnologies,Co.,Ltd."}, + {276, "Xensr"}, + {277, "e.solutions"}, + {278, "10AKTechnologies"}, + {279, "WimotoTechnologiesInc"}, + {280, "RadiusNetworks,Inc."}, + {281, "WizeTechnologyCo.,Ltd."}, + {282, "QualcommLabs,Inc."}, + {283, "HewlettPackardEnterprise"}, + {284, "Baidu"}, + {285, "ArendiAG"}, + {286, "SkodaAutoa.s."}, + {287, "VolkswagenAG"}, + {288, "PorscheAG"}, + {289, "SinoWealthElectronicLtd."}, + {290, "AirTurn,Inc."}, + {291, "Kinsa,Inc"}, + {292, "HIDGlobal"}, + {293, "SEATes"}, + {294, "PrometheanLtd."}, + {295, "SaluticaAlliedSolutions"}, + {296, "GPSIGroupPtyLtd"}, + {297, "NimbleDevicesOy"}, + {298, "ChangzhouYongseInfotechCo.,Ltd."}, + {299, "SportIQ"}, + {300, "TEMECInstrumentsB.V."}, + {301, "SonyCorporation"}, + {302, "ASSAABLOY"}, + {303, "ClarionCo.Inc."}, + {304, "WarehouseInnovations"}, + {305, "CypressSemiconductor"}, + {306, "MADSInc"}, + {307, "BlueMaestroLimited"}, + {308, "ResolutionProducts,Ltd."}, + {309, "AirewareLLC"}, + {310, "Silvair,Inc."}, + {311, "PrestigioPlazaLtd."}, + {312, "NTEOInc."}, + {313, "FocusSystemsCorporation"}, + {314, "TencentHoldingsLtd."}, + {315, "Allegion"}, + {316, "MurataManufacturingCo.,Ltd."}, + {317, "WirelessWERX"}, + {318, "Nod,Inc."}, + {319, "B&BManufacturingCompany"}, + {320, "AlpineElectronics(China)Co.,Ltd"}, + {321, "FedExServices"}, + {322, "GrapeSystemsInc."}, + {323, "BkonConnect"}, + {324, "LintechGmbH"}, + {325, "NovatelWireless"}, + {326, "Ciright"}, + {327, "MightyCast,Inc."}, + {328, "AmbimatElectronics"}, + {329, "PerytonsLtd."}, + {330, "TivoliAudio,LLC"}, + {331, "MasterLock"}, + {332, "Mesh-NetLtd"}, + {333, "HUIZHOUDESAYSVAUTOMOTIVECO.,LTD."}, + {334, "Tangerine,Inc."}, + {335, "B&WGroupLtd."}, + {336, "PioneerCorporation"}, + {337, "OnBeep"}, + {338, "VernierSoftware&Technology"}, + {339, "ROLErgo"}, + {340, "PebbleTechnology"}, + {341, "NETATMO"}, + {342, "AccumulateAB"}, + {343, "AnhuiHuamiInformationTechnologyCo.,Ltd."}, + {344, "Inmites.r.o."}, + {345, "ChefSteps,Inc."}, + {346, "micasAG"}, + {347, "BiomedicalResearchLtd."}, + {348, "PitiusTecS.L."}, + {349, "Estimote,Inc."}, + {350, "UnikeyTechnologies,Inc."}, + {351, "TimerCapCo."}, + {352, "AwoX"}, + {353, "yikes"}, + {354, "MADSGlobalNZLtd."}, + {355, "PCHInternational"}, + {356, "QingdaoYeelinkInformationTechnologyCo.,Ltd."}, + {357, "MilwaukeeTool(FormallyMilwaukeeElectricTools)"}, + {358, "MISHIKPteLtd"}, + {359, "AscensiaDiabetesCareUSInc."}, + {360, "SpiceboxLLC"}, + {361, "emberlight"}, + {362, "Cooper-AtkinsCorporation"}, + {363, "Qblinks"}, + {364, "MYSPHERA"}, + {365, "LifeScanInc"}, + {366, "VolanticAB"}, + {367, "PodoLabs,Inc"}, + {368, "RocheDiabetesCareAG"}, + {369, "AmazonFulfillmentService"}, + {370, "ConnovateTechnologyPrivateLimited"}, + {371, "Kocomojo,LLC"}, + {372, "EverykeyInc."}, + {373, "DynamicControls"}, + {374, "SentriLock"}, + {375, "I-SYSTinc."}, + {376, "CASIOCOMPUTERCO.,LTD."}, + {377, "LAPISSemiconductorCo.,Ltd."}, + {378, "Telemonitor,Inc."}, + {379, "taskitGmbH"}, + {380, "DaimlerAG"}, + {381, "BatAndCat"}, + {382, "BluDotzLtd"}, + {383, "XTelWirelessApS"}, + {384, "GigasetCommunicationsGmbH"}, + {385, "GeckoHealthInnovations,Inc."}, + {386, "HOPUbiquitous"}, + {387, "WaltDisney"}, + {388, "Nectar"}, + {389, "bel'appsLLC"}, + {390, "CORELightingLtd"}, + {391, "SeraphimSenseLtd"}, + {392, "UnicoRBC"}, + {393, "PhysicalEnterprisesInc."}, + {394, "AbleTrendTechnologyLimited"}, + {395, "KonicaMinolta,Inc."}, + {396, "WiloSE"}, + {397, "ExtronDesignServices"}, + {398, "Fitbit,Inc."}, + {399, "FirefliesSystems"}, + {400, "IntellettoTechnologiesInc."}, + {401, "FDKCORPORATION"}, + {402, "Cloudleaf,Inc"}, + {403, "MavericAutomationLLC"}, + {404, "AcousticStreamCorporation"}, + {405, "Zuli"}, + {406, "PaxtonAccessLtd"}, + {407, "WiSilicaInc."}, + {408, "VENGITKorlatoltFelelosseguTarsasag"}, + {409, "SALTOSYSTEMSS.L."}, + {410, "TRONForum(formerlyT-EngineForum)"}, + {411, "CUBETECHs.r.o."}, + {412, "CokiyaIncorporated"}, + {413, "CVSHealth"}, + {414, "Ceruus"}, + {415, "StrainstallLtd"}, + {416, "ChannelEnterprises(HK)Ltd."}, + {417, "FIAMM"}, + {418, "GIGALANE.CO.,LTD"}, + {419, "EROAD"}, + {420, "MineSafetyAppliances"}, + {421, "IconHealthandFitness"}, + {422, "WilleEngineering(formelyasAsandooGmbH)"}, + {423, "ENERGOUSCORPORATION"}, + {424, "Taobao"}, + {425, "CanonInc."}, + {426, "GeophysicalTechnologyInc."}, + {427, "Facebook,Inc."}, + {428, "TrividiaHealth,Inc."}, + {429, "FlightSafetyInternational"}, + {430, "EarlensCorporation"}, + {431, "SunriseMicroDevices,Inc."}, + {432, "StarMicronicsCo.,Ltd."}, + {433, "NetizensSp.zo.o."}, + {434, "NymiInc."}, + {435, "Nytec,Inc."}, + {436, "TrineoSp.zo.o."}, + {437, "NestLabsInc."}, + {438, "LMTechnologiesLtd"}, + {439, "GeneralElectricCompany"}, + {440, "i+D3S.L."}, + {441, "HANAMicron"}, + {442, "StagesCyclingLLC"}, + {443, "CochlearBoneAnchoredSolutionsAB"}, + {444, "SenionLabAB"}, + {445, "SyszoneCo.,Ltd"}, + {446, "PulsateMobileLtd."}, + {447, "HongKongHunterSunElectronicLimited"}, + {448, "pironexGmbH"}, + {449, "BRADATECHCorp."}, + {450, "TransenergooilAG"}, + {451, "Bunch"}, + {452, "DMEMicroelectronics"}, + {453, "BitcrazeAB"}, + {454, "HASWAREInc."}, + {455, "AbiogenixInc."}, + {456, "Poly-ControlApS"}, + {457, "Avi-on"}, + {458, "LaerdalMedicalAS"}, + {459, "FetchMyPet"}, + {460, "SamLabsLtd."}, + {461, "ChengduSynwingTechnologyLtd"}, + {462, "HOUWASYSTEMDESIGN,k.k."}, + {463, "BSH"}, + {464, "PrimusInterParesLtd"}, + {465, "AugustHome,Inc"}, + {466, "GillElectronics"}, + {467, "SkyWaveDesign"}, + {468, "NewlabS.r.l."}, + {469, "ELADsrl"}, + {470, "G-wearablesinc."}, + {471, "SquadroneSystemsInc."}, + {472, "CodeCorporation"}, + {473, "SavantSystemsLLC"}, + {474, "LogitechInternationalSA"}, + {475, "InnblueConsulting"}, + {476, "iParkingLtd."}, + {477, "KoninklijkePhilipsElectronicsN.V."}, + {478, "MinelabElectronicsPtyLimited"}, + {479, "BisonGroupLtd."}, + {480, "WidexA/S"}, + {481, "JollaLtd"}, + {482, "Lectronix,Inc."}, + {483, "CaterpillarInc"}, + {484, "FreedomInnovations"}, + {485, "DynamicDevicesLtd"}, + {486, "TechnologySolutions(UK)Ltd"}, + {487, "IPSGroupInc."}, + {488, "STIR"}, + {489, "Sano,Inc."}, + {490, "AdvancedApplicationDesign,Inc."}, + {491, "AutoMapLLC"}, + {492, "SpreadtrumCommunicationsShanghaiLtd"}, + {493, "CuteCircuitLTD"}, + {494, "ValeoService"}, + {495, "FullpowerTechnologies,Inc."}, + {496, "KloudNation"}, + {497, "ZebraTechnologiesCorporation"}, + {498, "Itron,Inc."}, + {499, "TheUniversityofTokyo"}, + {500, "UTCFireandSecurity"}, + {501, "CoolWebthingsLimited"}, + {502, "DJOGlobal"}, + {503, "GellinerLimited"}, + {504, "Anyka(Guangzhou)MicroelectronicsTechnologyCo,LTD"}, + {505, "MedtronicInc."}, + {506, "GozioInc."}, + {507, "FormLifting,LLC"}, + {508, "WahooFitness,LLC"}, + {509, "KontaktMicro-LocationSp.zo.o."}, + {510, "RadioSystemsCorporation"}, + {511, "FreescaleSemiconductor,Inc."}, + {512, "VerifoneSystemsPteLtd.TaiwanBranch"}, + {513, "ARTiming"}, + {514, "RigadoLLC"}, + {515, "KemppiOy"}, + {516, "TapcentiveInc."}, + {517, "SmartboticsInc."}, + {518, "OtterProducts,LLC"}, + {519, "STEMPInc."}, + {520, "LumiGeekLLC"}, + {521, "InvisionHeartInc."}, + {522, "MacnicaInc."}, + {523, "JaguarLandRoverLimited"}, + {524, "CoroWareTechnologies,Inc"}, + {525, "SimploTechnologyCo.,LTD"}, + {526, "OmronHealthcareCo.,LTD"}, + {527, "ComoduleGMBH"}, + {528, "ikeGPS"}, + {529, "TelinkSemiconductorCo.Ltd"}, + {530, "InterplanCo.,Ltd"}, + {531, "WylerAG"}, + {532, "IKMultimediaProductionsrl"}, + {533, "LukotonExperienceOy"}, + {534, "MTILtd"}, + {535, "Tech4home,Lda"}, + {536, "HiotechAB"}, + {537, "DOTTLimited"}, + {538, "BlueSpeckLabs,LLC"}, + {539, "CiscoSystems,Inc"}, + {540, "MobicommInc"}, + {541, "Edamic"}, + {542, "Goodnet,Ltd"}, + {543, "LusterLeafProductsInc"}, + {544, "ManusMachinaBV"}, + {545, "MobiquityNetworksInc"}, + {546, "PraxisDynamics"}, + {547, "PhilipMorrisProductsS.A."}, + {548, "ComarchSA"}, + {549, "NestlNespressoS.A."}, + {550, "MerliniaA/S"}, + {551, "LifeBEAMTechnologies"}, + {552, "TwocanoesLabs,LLC"}, + {553, "MuovertiLimited"}, + {554, "StamerMusikanlagenGMBH"}, + {555, "TeslaMotors"}, + {556, "PharynksCorporation"}, + {557, "Lupine"}, + {558, "SiemensAG"}, + {559, "Huami(Shanghai)CultureCommunicationCO.,LTD"}, + {560, "FosterElectricCompany,Ltd"}, + {561, "ETASA"}, + {562, "x-SensoSolutionsKft"}, + {563, "ShenzhenSuLongCommunicationLtd"}, + {564, "FengFan(BeiJing)TechnologyCo,Ltd"}, + {565, "QrioInc"}, + {566, "PitpatpetLtd"}, + {567, "MSHelis.r.l."}, + {568, "Trakm8Ltd"}, + {569, "JINCO,Ltd"}, + {570, "AlatechTehnology"}, + {571, "BeijingCarePulseElectronicTechnologyCo,Ltd"}, + {572, "Awarepoint"}, + {573, "ViCentraB.V."}, + {574, "RavenIndustries"}, + {575, "WaveWareTechnologiesInc."}, + {576, "ArgenoxTechnologies"}, + {577, "BragiGmbH"}, + {578, "16LabInc"}, + {579, "MasimoCorp"}, + {580, "IoteraInc"}, + {581, "Endress+Hauser"}, + {582, "ACKmeNetworks,Inc."}, + {583, "FiftyThreeInc."}, + {584, "ParkerHannifinCorp"}, + {585, "TranscranialLtd"}, + {586, "UwatecAG"}, + {587, "OrlanLLC"}, + {588, "BlueCloverDevices"}, + {589, "M-WaySolutionsGmbH"}, + {590, "MicrotronicsEngineeringGmbH"}, + {591, "SchneiderSchreibgerteGmbH"}, + {592, "SapphireCircuitsLLC"}, + {593, "LumoBodytechInc."}, + {594, "UKCTechnosolution"}, + {595, "XicatoInc."}, + {596, "Playbrush"}, + {597, "DaiNipponPrintingCo.,Ltd."}, + {598, "G24PowerLimited"}, + {599, "AdBabbleLocalCommerceInc."}, + {600, "DevialetSA"}, + {601, "ALTYOR"}, + {602, "UniversityofAppliedSciencesValais/HauteEcoleValaisanne"}, + {603, "FiveInteractive,LLCdbaZendo"}, + {604, "NetEaseHangzhouNetworkco.Ltd."}, + {605, "LexmarkInternationalInc."}, + {606, "FlukeCorporation"}, + {607, "YardarmTechnologies"}, + {608, "SensaRx"}, + {609, "SECVREGmbH"}, + {610, "GlacialRidgeTechnologies"}, + {611, "Identiv,Inc."}, + {612, "DDS,Inc."}, + {613, "SMKCorporation"}, + {614, "SchawbelTechnologiesLLC"}, + {615, "XMISystemsSA"}, + {616, "Cerevo"}, + {617, "TorroxGmbH&CoKG"}, + {618, "Gemalto"}, + {619, "DEKAResearch&DevelopmentCorp."}, + {620, "DomsterTadeuszSzydlowski"}, + {621, "TechnogymSPA"}, + {622, "FLEURBAEYBVBA"}, + {623, "AptcodeSolutions"}, + {624, "LSIADLTechnology"}, + {625, "AnimasCorp"}, + {626, "AlpsElectricCo.,Ltd."}, + {627, "OCEASOFT"}, + {628, "MotsaiResearch"}, + {629, "Geotab"}, + {630, "E.G.O.Elektro-GertebauGmbH"}, + {631, "bewhereinc"}, + {632, "JohnsonOutdoorsInc"}, + {633, "steuteSchaltgerateGmbH&Co.KG"}, + {634, "Ekominiinc."}, + {635, "DEFAAS"}, + {636, "AseptikaLtd"}, + {637, "HUAWEITechnologiesCo.,Ltd.()"}, + {638, "HabitAware,LLC"}, + {639, "ruwidoaustriagmbh"}, + {640, "ITECcorporation"}, + {641, "StoneL"}, + {642, "SonovaAG"}, + {643, "MavenMachines,Inc."}, + {644, "SynapseElectronics"}, + {645, "StandardInnovationInc."}, + {646, "RFCode,Inc."}, + {647, "WallyVenturesS.L."}, + {648, "WillowbankElectronicsLtd"}, + {649, "SKTelecom"}, + {650, "JetroAS"}, + {651, "CodeGearsLTD"}, + {652, "NANOLINKAPS"}, + {653, "IF,LLC"}, + {654, "RFDigitalCorp"}, + {655, "Church&DwightCo.,Inc"}, + {656, "MultibitOy"}, + {657, "CliniCloudInc"}, + {658, "SwiftSensors"}, + {659, "BlueBite"}, + {660, "ELIASGmbH"}, + {661, "SivantosGmbH"}, + {662, "Petzl"}, + {663, "stormpowerltd"}, + {664, "EISSTLtd"}, + {665, "InexessTechnologySimmaKG"}, + {666, "Currant,Inc."}, + {667, "C2Development,Inc."}, + {668, "BlueSkyScientific,LLC"}, + {669, "ALOTTAZSLABS,LLC"}, + {670, "Kupsonspol.sr.o."}, + {671, "AreusEngineeringGmbH"}, + {672, "ImpossibleCameraGmbH"}, + {673, "InventureTrackSystems"}, + {674, "LockedUp"}, + {675, "Itude"}, + {676, "PacificLockCompany"}, + {677, "TendyronCorporation()"}, + {678, "RobertBoschGmbH"}, + {679, "IlluxtroninternationalB.V."}, + {680, "miSportLtd."}, + {681, "Chargelib"}, + {682, "DopplerLab"}, + {683, "BBPOSLimited"}, + {684, "RTBElektronikGmbH&Co.KG"}, + {685, "RxNetworks,Inc."}, + {686, "WeatherFlow,Inc."}, + {687, "TechnicolorUSAInc."}, + {688, "Bestechnic(Shanghai),Ltd"}, + {689, "RadenInc"}, + {690, "JouZenOy"}, + {691, "CLABERS.P.A."}, + {692, "Hyginex,Inc."}, + {693, "HANSHINELECTRICRAILWAYCO.,LTD."}, + {694, "SchneiderElectric"}, + {695, "OortTechnologiesLLC"}, + {696, "ChronoTherapeutics"}, + {697, "RinnaiCorporation"}, + {698, "SwissprimeTechnologiesAG"}, + {699, "Koha.,Co.Ltd"}, + {700, "GenevacLtd"}, + {701, "Chemtronics"}, + {702, "SeguroTechnologySp.zo.o."}, + {703, "RedbirdFlightSimulations"}, + {704, "DashRobotics"}, + {705, "LINECorporation"}, + {706, "GuillemotCorporation"}, + {707, "TechtronicPowerToolsTechnologyLimited"}, + {708, "WilsonSportingGoods"}, + {709, "Lenovo(Singapore)PteLtd.()"}, + {710, "AyatanSensors"}, + {711, "ElectronicsTomorrowLimited"}, + {712, "VASCODataSecurityInternational,Inc."}, + {713, "PayRangeInc."}, + {714, "ABOVSemiconductor"}, + {715, "AINA-WirelessInc."}, + {716, "EijkelkampSoil&Water"}, + {717, "BMAergonomicsb.v."}, + {718, "TevaBrandedPharmaceuticalProductsR&D,Inc."}, + {719, "Anima"}, + {720, "3M"}, + {721, "EmpaticaSrl"}, + {722, "Afero,Inc."}, + {723, "PowercastCorporation"}, + {724, "SecuyouApS"}, + {725, "OMRONCorporation"}, + {726, "SendSolutions"}, + {727, "NIPPONSYSTEMWARECO.,LTD."}, + {728, "Neosfar"}, + {729, "FlieglAgrartechnikGmbH"}, + {730, "Gilvader"}, + {731, "DigiInternationalInc(R)"}, + {732, "DeWalchTechnologies,Inc."}, + {733, "FlintRehabilitationDevices,LLC"}, + {734, "SamsungSDSCo.,Ltd."}, + {735, "BlurProductDevelopment"}, + {736, "UniversityofMichigan"}, + {737, "VictronEnergyBV"}, + {738, "NTTdocomo"}, + {739, "CarmanahTechnologiesCorp."}, + {740, "BytestormLtd."}, + {741, "EspressifIncorporated(())"}, + {742, "Unwire"}, + {743, "ConnectedYard,Inc."}, + {744, "AmericanMusicEnvironments"}, + {745, "SensogramTechnologies,Inc."}, + {746, "FujitsuLimited"}, + {747, "ArdicTechnology"}, + {748, "DeltaSystems,Inc"}, + {749, "HTCCorporation"}, + {750, "CitizenHoldingsCo.,Ltd."}, + {751, "SMART-INNOVATION.inc"}, + {752, "BlackratSoftware"}, + {753, "TheIdeaCave,LLC"}, + {754, "GoPro,Inc."}, + {755, "AuthAir,Inc"}, + {756, "Vensi,Inc."}, + {757, "IndagemTechLLC"}, + {758, "IntemoTechnologies"}, + {759, "DreamVisionsco.,Ltd."}, + {760, "RunteqOyLtd"}, + {761, "IMAGINATIONTECHNOLOGIESLTD"}, + {762, "CoSTARTEchnologies"}, + {763, "ClariusMobileHealthCorp."}, + {764, "ShanghaiFrequenMicroelectronicsCo.,Ltd."}, + {765, "Uwanna,Inc."}, + {766, "LierdaScience&TechnologyGroupCo.,Ltd."}, + {767, "SiliconLaboratories"}, + {768, "WorldMotoInc."}, + {769, "GiatecScientificInc."}, + {770, "LoopDevices,Inc"}, + {771, "IACAelectronique"}, + {772, "ProxyTechnologies,Inc."}, + {773, "SwippApS"}, + {774, "LifeLaboratoryInc."}, + {775, "FUJIINDUSTRIALCO.,LTD."}, + {776, "Surefire,LLC"}, + {777, "DolbyLabs"}, + {778, "Ellisys"}, + {779, "MagnitudeLightingConverters"}, + {780, "HiltiAG"}, + {781, "DevdataS.r.l."}, + {782, "Deviceworx"}, + {783, "ShortcutLabs"}, + {784, "SGLItaliaS.r.l."}, + {785, "PEEQDATA"}, + {786, "DucereTechnologiesPvtLtd"}, + {787, "DiveNav,Inc."}, + {788, "RIIGAISp.zo.o."}, + {789, "ThermoFisherScientific"}, + {790, "AGMeasurematicsPvt.Ltd."}, + {791, "CHUOElectronicsCO.,LTD."}, + {792, "AspentaInternational"}, + {793, "EugsterFrismagAG"}, + {794, "AmberwirelessGmbH"}, + {795, "HQInc"}, + {796, "LabSensorSolutions"}, + {797, "EnterlabApS"}, + {798, "Eyefi,Inc."}, + {799, "MetaSystemS.p.A."}, + {800, "SONOELECTRONICS.CO.,LTD"}, + {801, "Jewelbots"}, + {802, "CompumedicsLimited"}, + {803, "RotorBikeComponents"}, + {804, "Astro,Inc."}, + {805, "AmotusSolutions"}, + {806, "HealthwearTechnologies(Changzhou)Ltd"}, + {807, "EssexElectronics"}, + {808, "GrundfosA/S"}, + {809, "Eargo,Inc."}, + {810, "ElectronicDesignLab"}, + {811, "ESYLUX"}, + {812, "NIPPONSMT.CO.,Ltd"}, + {813, "BMinnovationsGmbH"}, + {814, "indoormap"}, + {815, "OttoQInc"}, + {816, "NorthPoleEngineering"}, + {817, "3flaresTechnologiesInc."}, + {818, "ElectrocompanietA.S."}, + {819, "Mul-T-Lock"}, + {820, "CorentiumAS"}, + {821, "EnlightedInc"}, + {822, "GISTIC"}, + {823, "AJP2Holdings,LLC"}, + {824, "COBIGmbH"}, + {825, "BlueSkyScientific,LLC"}, + {826, "Appception,Inc."}, + {827, "CourtneyThorneLimited"}, + {828, "Virtuosys"}, + {829, "TPVTechnologyLimited"}, + {830, "MonitraSA"}, + {831, "AutomationComponents,Inc."}, + {832, "Letsenses.r.l."}, + {833, "EtesianTechnologiesLLC"}, + {834, "GERTECBRASILLTDA."}, + {835, "DrekkerDevelopmentPty.Ltd."}, + {836, "WhirlInc"}, + {837, "LocusPositioning"}, + {838, "AcuityBrandsLighting,Inc"}, + {839, "PreventBiometrics"}, + {840, "Arioneo"}, + {841, "VersaMe"}, + {842, "Vaddio"}, + {843, "LibratoneA/S"}, + {844, "HMElectronics,Inc."}, + {845, "TASERInternational,Inc."}, + {846, "SafeTrustInc."}, + {847, "HeartlandPaymentSystems"}, + {848, "BitstrataSystemsInc."}, + {849, "PiepsGmbH"}, + {850, "iRiding(Xiamen)TechnologyCo.,Ltd."}, + {851, "AlphaAudiotronics,Inc."}, + {852, "TOPPANFORMSCO.,LTD."}, + {853, "SigmaDesigns,Inc."}, + {854, "SpectrumBrands,Inc."}, + {855, "PolymapWireless"}, + {856, "MagniWareLtd."}, + {857, "NovotecMedicalGmbH"}, + {858, "MedicomInnovationPartnera/s"}, + {859, "MatrixInc."}, + {860, "EatonCorporation"}, + {861, "KYS"}, + {862, "NayaHealth,Inc."}, + {863, "Acromag"}, + {864, "InsuletCorporation"}, + {865, "WellinksInc."}, + {866, "ONSemiconductor"}, + {867, "FREELAPSA"}, + {868, "FaveroElectronicsSrl"}, + {869, "BioMechSensorLLC"}, + {870, "BOLTTSportstechnologiesPrivatelimited"}, + {871, "SapheInternational"}, + {872, "MetormoteAB"}, + {873, "littleBits"}, + {874, "SetPointMedical"}, + {875, "BRControlsProductsBV"}, + {876, "Zipcar"}, + {877, "AirBoltPtyLtd"}, + {878, "KeepTruckinInc"}, + {879, "Motiv,Inc."}, + {880, "WazombiLabsO"}, + {881, "ORBCOMM"}, + {882, "NixieLabs,Inc."}, + {883, "AppNearMeLtd"}, + {884, "HolmanIndustries"}, + {885, "ExpainAS"}, + {886, "ElectronicTemperatureInstrumentsLtd"}, + {887, "PlejdAB"}, + {888, "PropellerHealth"}, + {889, "ShenzheniMCOElectronicTechnologyCo.,Ltd"}, + {890, "Algoria"}, + {891, "ApptionLabsInc."}, + {892, "CronologicsCorporation"}, + {893, "MICRODIALtd."}, + {894, "lulabytesS.L."}, + {895, "NestecS.A."}, + {896, "LLC\"MEGA-Fservice\""}, + {897, "SharpCorporation"}, + {898, "PrecisionOutcomesLtd"}, + {899, "KronosIncorporated"}, + {900, "OCOSMOSCo.,Ltd."}, + {901, "EmbeddedElectronicSolutionsLtd.dbae2Solutions"}, + {902, "AtericaInc."}, + {903, "BluStorPMC,Inc."}, + {904, "KapschTrafficComAB"}, + {905, "ActiveBluCorporation"}, + {906, "KohlerMiraLimited"}, + {907, "Noke"}, + {908, "AppionInc."}, + {909, "ResmedLtd"}, + {910, "CrownstoneB.V."}, + {911, "XiaomiInc."}, + {912, "INFOTECHs.r.o."}, + {913, "ThingsquareAB"}, + {914, "T&D"}, + {915, "LAVAZZAS.p.A."}, + {916, "NetclearanceSystems,Inc."}, + {917, "SDATAWAY"}, + {918, "BLOKSGmbH"}, + {919, "LEGOSystemA/S"}, + {920, "ThetatronicsLtd"}, + {921, "NikonCorporation"}, + {922, "NeST"}, + {923, "SouthSiliconValleyMicroelectronics"}, + {924, "ALEInternational"}, + {925, "CareViewCommunications,Inc."}, + {926, "SchoolBoardLimited"}, + {927, "MolexCorporation"}, + {928, "IVTWirelessLimited"}, + {929, "AlpineLabsLLC"}, + {930, "CanduraInstruments"}, + {931, "SmartMovtTechnologyCo.,Ltd"}, + {932, "TokenZeroLtd"}, + {933, "ACECADEnterpriseCo.,Ltd.(ACECAD)"}, + {934, "Medela,Inc"}, + {935, "AeroScout"}, + {936, "EsrilleInc."}, + {937, "THINKERLYSRL"}, + {938, "ExonSp.zo.o."}, + {939, "MeizuTechnologyCo.,Ltd."}, + {940, "SmabloLTD"}, + {941, "XiQ"}, + {942, "AllswellInc."}, + {943, "Comm-N-SenseCorpDBAVerigo"}, + {944, "VIBRADORMGmbH"}, + {945, "OtodataWirelessNetworkInc."}, + {946, "PropagationSystemsLimited"}, + {947, "MidwestInstruments&Controls"}, + {948, "AlphaNodus,inc."}, + {949, "petPOMM,Inc"}, + {950, "Mattel"}, + {951, "AirblyInc."}, + {952, "A-SafeLimited"}, + {953, "FREDERIQUECONSTANTSA"}, + {954, "MaxscendMicroelectronicsCompanyLimited"}, + {955, "AbbottDiabetesCare"}, + {956, "ASBBankLtd"}, + {957, "amadas"}, + {958, "AppliedScience,Inc."}, + {959, "iLumiSolutionsInc."}, + {960, "ArchSystemsInc."}, + {961, "EmberTechnologies,Inc."}, + {962, "SnapchatInc"}, + {963, "CasambiTechnologiesOy"}, + {964, "PicoTechnologyInc."}, + {965, "St.JudeMedical,Inc."}, + {966, "Intricon"}, + {967, "StructuralHealthSystems,Inc."}, + {968, "AvvelInternational"}, + {969, "GallagherGroup"}, + {970, "In2thingsAutomationPvt.Ltd."}, + {971, "SYSDEVSrl"}, + {972, "VonkilTechnologiesLtd"}, + {973, "WyndTechnologies,Inc."}, + {974, "CONTRINEXS.A."}, + {975, "MIRA,Inc."}, + {976, "WatteamLtd"}, + {977, "DensityInc."}, + {978, "IOTPotIndiaPrivateLimited"}, + {979, "SigmaConnectivityAB"}, + {980, "PEGPEREGOSPA"}, + {981, "WyzelinkSystemsInc."}, + {982, "YotaDevicesLTD"}, + {983, "FINSECUR"}, + {984, "Zen-MeLabsLtd"}, + {985, "3IWareCo.,Ltd."}, + {986, "EnOceanGmbH"}, + {987, "Instabeat,Inc"}, + {988, "NimaLabs"}, + {989, "AndreasStihlAG&Co.KG"}, + {990, "NathanRhoadesLLC"}, + {991, "GrobTechnologies,LLC"}, + {992, "Actions(Zhuhai)TechnologyCo.,Limited"}, + {993, "SPDDevelopmentCompanyLtd"}, + {994, "SensoanOy"}, + {995, "QualcommLifeInc"}, + {996, "Chip-ingAG"}, + {997, "ffly4u"}, + {998, "IoTInstrumentsOy"}, + {999, "TRUEFitnessTechnology"}, + {1000, "ReinerKartengeraeteGmbH&Co.KG."}, + {1001, "SHENZHENLEMONJOYTECHNOLOGYCO.,LTD."}, + {1002, "HelloInc."}, + {1003, "EvollveInc."}, + {1004, "JigowattsInc."}, + {1005, "BASICMICRO.COM,INC."}, + {1006, "CUBETECHNOLOGIES"}, + {1007, "foolographyGmbH"}, + {1008, "CLINK"}, + {1009, "HestanSmartCookingInc."}, + {1010, "WindowMasterA/S"}, + {1011, "FlowscapeAB"}, + {1012, "PALTechnologiesLtd"}, + {1013, "WHERE,Inc."}, + {1014, "ItonTechnologyCorp."}, + {1015, "OwlLabsInc."}, + {1016, "RockfordCorp."}, + {1017, "BeconTechnologiesCo.,Ltd."}, + {1018, "VyassoftTechnologiesInc"}, + {1019, "NoxMedical"}, + {1020, "Kimberly-Clark"}, + {1021, "TrimbleNavigationLtd."}, + {1022, "Littelfuse"}, + {1023, "Withings"}, + {1024, "i-developerITBeratungUG"}, + {1025, ""}, + {1026, "SearsHoldingsCorporation"}, + {1027, "GantnerElectronicGmbH"}, + {1028, "AuthomateInc"}, + {1029, "VertexInternational,Inc."}, + {1030, "Airtago"}, + {1031, "SwissAudioSA"}, + {1032, "ToGetHomeInc."}, + {1033, "AXIS"}, + {1034, "Openmatics"}, + {1035, "JanaCareInc."}, + {1036, "SenixCorporation"}, + {1037, "NorthStarBatteryCompany,LLC"}, + {1038, "SKF(U.K.)Limited"}, + {1039, "CO-AXTechnology,Inc."}, + {1040, "FenderMusicalInstruments"}, + {1041, "LuidiaInc"}, + {1042, "SEFAM"}, + {1043, "WirelessCablesInc"}, + {1044, "LightningProtectionInternationalPtyLtd"}, + {1045, "UberTechnologiesInc"}, + {1046, "SODAGmbH"}, + {1047, "FatigueScience"}, + {1048, "AlpineElectronicsInc."}, + {1049, "NovalogyLTD"}, + {1050, "FridayLabsLimited"}, + {1051, "OrthoAccelTechnologies"}, + {1052, "WaterGuru,Inc."}, + {1053, "BenningElektrotechnikundElektronikGmbH&Co.KG"}, + {1054, "DellComputerCorporation"}, + {1055, "KopinCorporation"}, + {1056, "TecBakeryGmbH"}, + {1057, "BackboneLabs,Inc."}, + {1058, "DELSEYSA"}, + {1059, "ChargifiLimited"}, + {1060, "TrainesenseLtd."}, + {1061, "UnifySoftwareandSolutionsGmbH&Co.KG"}, + {1062, "HusqvarnaAB"}, + {1063, "Focusfleetandfuelmanagementinc"}, + {1064, "SmallLoop,LLC"}, + {1065, "ProlonInc."}, + {1066, "BDMedical"}, + {1067, "iMicroMedIncorporated"}, + {1068, "TictoN.V."}, + {1069, "MeshtechAS"}, + {1070, "MemCachierInc."}, + {1071, "DanfossA/S"}, + {1072, "SnapStykInc."}, + {1073, "AmwayCorporation"}, + {1074, "SilkLabs,Inc."}, + {1075, "PillsyInc."}, + {1076, "HatchBaby,Inc."}, + {1077, "BlocksWearablesLtd."}, + {1078, "DraysonTechnologies(Europe)Limited"}, + {1079, "eBestIOTInc."}, + {1080, "HelvarLtd"}, + {1081, "RadianceTechnologies"}, + {1082, "NuhearaLimited"}, + {1083, "Appsideco.,ltd."}, + {1084, "DeLaval"}, + {1085, "CoilerCorporation"}, + {1086, "Thermomedics,Inc."}, + {1087, "TentacleSyncGmbH"}, + {1088, "Valencell,Inc."}, + {1089, "iProtoXiOy"}, + {1090, "SECOMCO.,LTD."}, + {1091, "TuckerInternationalLLC"}, + {1092, "MetanateLimited"}, + {1093, "KobianCanadaInc."}, + {1094, "NETGEAR,Inc."}, + {1095, "FabtronicsAustraliaPtyLtd"}, + {1096, "GrandCentrixGmbH"}, + {1097, "1UPUSA.comllc"}, + {1098, "SHIMANOINC."}, + {1099, "NainInc."}, + {1100, "LifeStyleLock,LLC"}, + {1101, "VEGAGrieshaberKG"}, + {1102, "XtravaInc."}, + {1103, "TTSTooltechnicSystemsAG&Co.KG"}, + {1104, "TeenageEngineeringAB"}, + {1105, "TunstallNordicAB"}, + {1106, "SvepDesignCenterAB"}, + {1107, "GreenPeakTechnologiesBV"}, + {1108, "SphinxElectronicsGmbH&CoKG"}, + {1109, "Atomation"}, + {1110, "NemikConsultingInc"}, + {1111, "RFINNOVATION"}, + {1112, "MiniSolutionCo.,Ltd."}, + {1113, "Lumenetix,Inc"}, + {1114, "2048450OntarioInc"}, + {1115, "SPACEEKLTD"}, + {1116, "DeltaTCorporation"}, + {1117, "BostonScientificCorporation"}, + {1118, "Nuviz,Inc."}, + {1119, "RealTimeAutomation,Inc."}, + {1120, "Kolibree"}, + {1121, "vhfelektronikGmbH"}, + {1122, "BonsaiSystemsGmbH"}, + {1123, "FathomSystemsInc."}, + {1124, "Bellman&Symfon"}, + {1125, "InternationalForteGroupLLC"}, + {1126, "CycleLabsSolutionsinc."}, + {1127, "CodenexOy"}, + {1128, "KynesimLtd"}, + {1129, "PalagoAB"}, + {1130, "INSIGMAINC."}, + {1131, "PMDSolutions"}, + {1132, "QingdaoRealtimeTechnologyCo.,Ltd."}, + {1133, "BEGAGantenbrink-LeuchtenKG"}, + {1134, "PamborLtd."}, + {1135, "DevelcoProductsA/S"}, + {1136, "iDesigns.r.l."}, + {1137, "TiVoCorp"}, + {1138, "Control-JPtyLtd"}, + {1139, "Steelcase,Inc."}, + {1140, "iApartmentco.,ltd."}, + {1141, "Icominc."}, + {1142, "OxstrenWearableTechnologiesPrivateLimited"}, + {1143, "BlueSparkTechnologies"}, + {1144, "FarSiteCommunicationsLimited"}, + {1145, "mywerksystemGmbH"}, + {1146, "SinosunTechnologyCo.,Ltd."}, + {1147, "MIYOSHIELECTRONICSCORPORATION"}, + {1148, "POWERMATLTD"}, + {1149, "OcclyLLC"}, + {1150, "OurHubDevIvS"}, + {1151, "Pro-Mark,Inc."}, + {1152, "DynometricsInc."}, + {1153, "QuintraxLimited"}, + {1154, "POSTuningUdoVosshenrichGmbH&Co.KG"}, + {1155, "MultiCareSystemsB.V."}, + {1156, "RevolTechnologiesInc"}, + {1157, "SKIDATAAG"}, + {1158, "DEVTECNOLOGIAINDUSTRIA,COMERCIOEMANUTENCAODEEQUIPAMENTOSLTDA.-ME"}, + {1159, "CentricaConnectedHome"}, + {1160, "AutomotiveDataSolutionsInc"}, + {1161, "IgarashiEngineering"}, + {1162, "TaelekOy"}, + {1163, "CPElectronicsLimited"}, + {1164, "VectronixAG"}, + {1165, "S-LabsSp.zo.o."}, + {1166, "CompanionMedical,Inc."}, + {1167, "BlueKitchenGmbH"}, + {1168, "MattingAB"}, + {1169, "SOREX-WirelessSolutionsGmbH"}, + {1170, "ADCTechnology,Inc."}, + {1171, "LynxemiPteLtd"}, + {1172, "SENNHEISERelectronicGmbH&Co.KG"}, + {1173, "LMTMercerGroup,Inc"}, + {1174, "PolymorphicLabsLLC"}, + {1175, "CochlearLimited"}, + {1176, "METERGroup,Inc.USA"}, + {1177, "RuuviInnovationsLtd."}, + {1178, "SituneAS"}, + {1179, "nVisti,LLC"}, + {1180, "DyOcean"}, + {1181, "Uhlmann&ZacherGmbH"}, + {1182, "AND!XORLLC"}, + {1183, "tictoteAB"}, + {1184, "Vypin,LLC"}, + {1185, "PNISensorCorporation"}, + {1186, "ovrEngineered,LLC"}, + {1187, "GT-tronicsHKLtd"}, + {1188, "HerbertWaldmannGmbH&Co.KG"}, + {1189, "GuangzhouFiiOElectronicsTechnologyCo.,Ltd"}, + {1190, "VinetechCo.,Ltd"}, + {1191, "DallasLogicCorporation"}, + {1192, "BioTex,Inc."}, + {1193, "DISCOVERYSOUNDTECHNOLOGY,LLC"}, + {1194, "LINKIOSAS"}, + {1195, "Harbortronics,Inc."}, + {1196, "UndagridB.V."}, + {1197, "ShureInc"}, + {1198, "ERMElectronicSystemsLTD"}, + {1199, "BIOROWERHandelsagenturGmbH"}, + {1200, "WebaSportundMed.ArtikelGmbH"}, + {1201, "KartographersTechnologiesPvt.Ltd."}, + {1202, "TheShadowontheMoon"}, + {1203, "mobike(HongKong)Limited"}, + {1204, "InuheatGroupAB"}, + {1205, "SwiftronixAB"}, + {1206, "DiagnopticsTechnologies"}, + {1207, "AnalogDevices,Inc."}, + {1208, "SoraaInc."}, + {1209, "CSRBuildingProductsLimited"}, + {1210, "CrestronElectronics,Inc."}, + {1211, "NeateboxLtd"}, + {1212, "DraegerwerkAG&Co.KGaA"}, + {1213, "AlbynMedical"}, + {1214, "AverosFZCO"}, + {1215, "VITInitiative,LLC"}, + {1216, "StatsportsInternational"}, + {1217, "Sospitas,s.r.o."}, + {1218, "DmetProductsCorp."}, + {1219, "MantracourtElectronicsLimited"}, + {1220, "TeAMHutchinsAB"}, + {1221, "SeibertWilliamsGlass,LLC"}, + {1222, "InstaGmbH"}, + {1223, "SvantekSp.zo.o."}, + {1224, "ShanghaiFlycoElectricalApplianceCo.,Ltd."}, + {1225, "ThornwaveLabsInc"}, + {1226, "Steiner-OptikGmbH"}, + {1227, "NovoNordiskA/S"}, + {1228, "EnfluxInc."}, + {1229, "SafetechProductsLLC"}, + {1230, "GOOOLEDS.R.L."}, + {1231, "DOMSicherheitstechnikGmbH&Co.KG"}, + {1232, "OlympusCorporation"}, + {1233, "KTSGmbH"}, + {1234, "AnloqTechnologiesInc."}, + {1235, "Queercon,Inc"}, + {1236, "5thElementLtd"}, + {1237, "GooeeLimited"}, + {1238, "LUGLOCLLC"}, + {1239, "Blincam,Inc."}, + {1240, "FUJIFILMCorporation"}, + {1241, "RandMcNally"}, + {1242, "FranceschiMarinasnc"}, + {1243, "EngineeredAudio,LLC."}, + {1244, "IOTTIVE(OPC)PRIVATELIMITED"}, + {1245, "4MODTechnology"}, + {1246, "LutronElectronicsCo.,Inc."}, + {1247, "Emerson"}, + {1248, "Guardtec,Inc."}, + {1249, "REACTECLIMITED"}, + {1250, "EllieGrid"}, + {1251, "UnderArmour"}, + {1252, "Woodenshark"}, + {1253, "AvackOy"}, + {1254, "SmartSolutionTechnology,Inc."}, + {1255, "REHABTRONICSINC."}, + {1256, "STABILOInternational"}, + {1257, "BuschJaegerElektroGmbH"}, + {1258, "PacificBioscienceLaboratories,Inc"}, + {1259, "BirdHomeAutomationGmbH"}, + {1260, "MotorolaSolutions"}, + {1261, "R9Technology,Inc."}, + {1262, "Auxivia"}, + {1263, "DaisyWorks,Inc"}, + {1264, "KosiLimited"}, + {1265, "ThebenAG"}, + {1266, "InDreamerTechsolPrivateLimited"}, + {1267, "CerevastMedical"}, + {1268, "ZanComputeInc."}, + {1269, "PirelliTyreS.P.A."}, + {1270, "McLearLimited"}, + {1271, "ShenzhenHuidingTechnologyCo.,Ltd."}, + {1272, "ConvergenceSystemsLimited"}, + {1273, "Interactio"}, + {1274, "AndrotecGmbH"}, + {1275, "BenchmarkDrivesGmbH&Co.KG"}, + {1276, "SwingLyncL.L.C."}, + {1277, "TapkeyGmbH"}, + {1278, "WoosimSystemsInc."}, + {1279, "MicrosemiCorporation"}, + {1280, "WiliotLTD."}, + {1281, "PolarisIND"}, + {1282, "Specifi-KaliLLC"}, + {1283, "Locoroll,Inc"}, + {1284, "PHYPLUSInc"}, + {1285, "InplayTechnologiesLLC"}, + {1286, "Hager"}, + {1287, "Yellowcog"}, + {1288, "AxesSystemsp.zo.o."}, + {1289, "myLIFTERInc."}, + {1290, "Shake-onB.V."}, + {1291, "VibrissaInc."}, + {1292, "OSRAMGmbH"}, + {1293, "TRSystemsGmbH"}, + {1294, "YichipMicroelectronics(Hangzhou)Co.,Ltd."}, + {1295, "FoundationEngineeringLLC"}, + {1296, "UNI-ELECTRONICS,INC."}, + {1297, "BrookfieldEquinoxLLC"}, + {1298, "SoprodSA"}, + {1299, "9974091CanadaInc."}, + {1300, "FIBROGmbH"}, + {1301, "RBControlsCo.,Ltd."}, + {1302, "Footmarks"}, + {1303, "AmtronicSverigeAB(formerlyAmcoreAB)"}, + {1304, "MAMORIO.inc"}, + {1305, "TytoLifeLLC"}, + {1306, "LeicaCameraAG"}, + {1307, "AngeeTechnologiesLtd."}, + {1308, "EDPS"}, + {1309, "OFFLineCo.,Ltd."}, + {1310, "DetectBlueLimited"}, + {1311, "SetecPtyLtd"}, + {1312, "TargetCorporation"}, + {1313, "IAICorporation"}, + {1314, "NSTech,Inc."}, + {1315, "MTGCo.,Ltd."}, + {1316, "HangzhouiMagicTechnologyCo.,Ltd"}, + {1317, "HONGKONGNANOICTECHNOLOGIESCO.,LIMITED"}, + {1318, "HoneywellInternationalInc."}, + {1319, "AlbrechtJUNG"}, + {1320, "LuneraLightingInc."}, + {1321, "LumenUAB"}, + {1322, "KeynesControlsLtd"}, + {1323, "NovartisAG"}, + {1324, "GeosatisSA"}, + {1325, "EXFO,Inc."}, + {1326, "LEDVANCEGmbH"}, + {1327, "CenterIDCorp."}, + {1328, "Adolene,Inc."}, + {1329, "D&MHoldingsInc."}, + {1330, "CRESCOWireless,Inc."}, + {1331, "NuraOperationsPtyLtd"}, + {1332, "Frontiergadget,Inc."}, + {1333, "SmartComponentTechnologiesLimited"}, + {1334, "ZTRControlSystemsLLC"}, + {1335, "MetaLogicsCorporation"}, + {1336, "MedelaAG"}, + {1337, "OPPLELightingCo.,Ltd"}, + {1338, "SavitechCorp.,"}, + {1339, "prodigy"}, + {1340, "ScreenovateTechnologiesLtd"}, + {1341, "TESASA"}, + {1342, "CLIM8LIMITED"}, + {1343, "SilergyCorp"}, + {1344, "SilverPlus,Inc"}, + {1345, "Sharknetsrl"}, + {1346, "MistSystems,Inc."}, + {1347, "MIWALOCKCO.,Ltd"}, + {1348, "OrthoSensor,Inc."}, + {1349, "CandyHooverGroups.r.l"}, + {1350, "ApexarTechnologiesS.A."}, + {1351, "LOGICDATAd.o.o."}, + {1352, "KnickElektronischeMessgeraeteGmbH&Co.KG"}, + {1353, "SmartTechnologiesandInvestmentLimited"}, + {1354, "LinoughInc."}, + {1355, "AdvancedElectronicDesigns,Inc."}, + {1356, "CarefreeScottFetzerCoInc"}, + {1357, "Sensome"}, + {1358, "FORTRONIKstoritved.o.o."}, + {1359, "Sinnoz"}, + {1360, "VersaNetworks,Inc."}, + {1361, "Sylero"}, + {1362, "AvempaceSARL"}, + {1363, "NintendoCo.,Ltd."}, + {1364, "NationalInstruments"}, + {1365, "KROHNEMesstechnikGmbH"}, + {1366, "OtodynamicsLtd"}, + {1367, "ArwinTechnologyLimited"}, + {1368, "benegear,inc."}, + {1369, "NewconOptik"}, + {1370, "CANDYHOUSE,Inc."}, + {1371, "FRANKLINTECHNOLOGYINC"}, + {1372, "Lely"}, + {1373, "ValveCorporation"}, + {1374, "HekatronVertriebsGmbH"}, + {1375, "PROTECHS.A.S.DIGIRARDIANDREA&C."}, + {1376, "SaritaCareTechAPS(formerlySaritaCareTechIVS)"}, + {1377, "FinderS.p.A."}, + {1378, "ThalmicLabsInc."}, + {1379, "SteinelVertriebGmbH"}, + {1380, "BeghelliSpa"}, + {1381, "BeijingSmartspaceTechnologiesInc."}, + {1382, "CORETRANSPORTTECHNOLOGIESNZLIMITED"}, + {1383, "XiamenEveresportsGoodsCo.,Ltd"}, + {1384, "BodyportInc."}, + {1385, "AudionicsSystem,INC."}, + {1386, "FlipnaviCo.,Ltd."}, + {1387, "RionCo.,Ltd."}, + {1388, "LongRangeSystems,LLC"}, + {1389, "RedmondIndustrialGroupLLC"}, + {1390, "VIZPININC."}, + {1391, "BikeFinderAS"}, + {1392, "ConsumerSleepSolutionsLLC"}, + {1393, "PSIKICK,INC."}, + {1394, "AntTail.com"}, + {1395, "LightingScienceGroupCorp."}, + {1396, "AFFORDABLEELECTRONICSINC"}, + {1397, "IntegralMemroyPlc"}, + {1398, "Globalstar,Inc."}, + {1399, "TrueWearables,Inc."}, + {1400, "WellingtonDriveTechnologiesLtd"}, + {1401, "EnsembleTechPrivateLimited"}, + {1402, "OMNIRemotes"}, + {1403, "DuracellU.S.OperationsInc."}, + {1404, "ToorTechnologiesLLC"}, + {1405, "InstinctPerformance"}, + {1406, "Beco,Inc"}, + {1407, "ScufGamingInternational,LLC"}, + {1408, "ARANZMedicalLimited"}, + {1409, "LYSTECHNOLOGIESLTD"}, + {1410, "BreakwallAnalytics,LLC"}, + {1411, "CodeBlueCommunications"}, + {1412, "GiraGiersiepenGmbH&Co.KG"}, + {1413, "HearingLabTechnology"}, + {1414, "LEGRAND"}, + {1415, "DerichsGmbH"}, + {1416, "ALT-TEKNIKLLC"}, + {1417, "StarTechnologies"}, + {1418, "STARTTODAYCO.,LTD."}, + {1419, "MaximIntegratedProducts"}, + {1420, "MERCKKommanditgesellschaftaufAktien"}, + {1421, "JungheinrichAktiengesellschaft"}, + {1422, "OculusVR,LLC"}, + {1423, "HENDONSEMICONDUCTORSPTYLTD"}, + {1424, "Pur3Ltd"}, + {1425, "ViasatGroupS.p.A."}, + {1426, "IZITHERM"}, + {1427, "SpauldingClinicalResearch"}, + {1428, "KohlerCompany"}, + {1429, "InorProcessAB"}, + {1430, "MySmartBlinds"}, + {1431, "RadioPulseInc"}, + {1432, "rapitagGmbH"}, + {1433, "Lazlo326,LLC."}, + {1434, "TeledyneLecroy,Inc."}, + {1435, "DataflowSystemsLimited"}, + {1436, "MacrogigaElectronics"}, + {1437, "TandemDiabetesCare"}, + {1438, "Polycom,Inc."}, + {1439, "Fisher&PaykelHealthcare"}, + {1440, "RCPSoftwareOy"}, + {1441, "ShanghaiXiaoyiTechnologyCo.,Ltd."}, + {1442, "ADHERIUM(NZ)LIMITED"}, + {1443, "AxiomwareSystemsIncorporated"}, + {1444, "O.E.M.Controls,Inc."}, + {1445, "KiirooBV"}, + {1446, "TeleconMobileLimited"}, + {1447, "SonosInc"}, + {1448, "TomAllebrandiConsulting"}, + {1449, "Monidor"}, + {1450, "TramexLimited"}, + {1451, "NofenceAS"}, + {1452, "GoerTekDynaudioCo.,Ltd."}, + {1453, "INIA"}, + {1454, "CARMATEMFG.CO.,LTD"}, + {1455, "ONvocal"}, + {1456, "NewTecGmbH"}, + {1457, "MedallionInstrumentationSystems"}, + {1458, "CARELINDUSTRIESS.P.A."}, + {1459, "ParabitSystems,Inc."}, + {1460, "WhiteHorseScientificltd"}, + {1461, "verisilicon"}, + {1462, "ElecsIndustryCo.,Ltd."}, + {1463, "BeijingPineconeElectronicsCo.,Ltd."}, + {1464, "AmbystomaLabsInc."}, + {1465, "SuzhouPairlinkNetworkTechnology"}, + {1466, "igloohome"}, + {1467, "OxfordMetricsplc"}, + {1468, "LevitonMfg.Co.,Inc."}, + {1469, "ULCRoboticsInc."}, + {1470, "RFIDGlobalbySoftworkSrL"}, + {1471, "Real-World-SystemsCorporation"}, + {1472, "NaluMedical,Inc."}, + {1473, "P.I.Engineering"}, + {1474, "GroteIndustries"}, + {1475, "Runtime,Inc."}, + {1476, "Codecoupsp.zo.o.sp.k."}, + {1477, "SELVEGmbH&Co.KG"}, + {1478, "SmartAnimalTrainingSystems,LLC"}, + {1479, "LippertComponents,INC"}, + {1480, "SOMFYSAS"}, + {1481, "TBSElectronicsB.V."}, + {1482, "MHLCustomInc"}, + {1483, "LucentWearLLC"}, + {1484, "WATTSELECTRONICS"}, + {1485, "RJBrandsLLC"}, + {1486, "V-ZUGLtd"}, + {1487, "BiowatchSA"}, + {1488, "AnovaAppliedElectronics"}, + {1489, "LindabAB"}, + {1490, "frogblueTECHNOLOGYGmbH"}, + {1491, "AcurableLimited"}, + {1492, "LAMPLIGHTCo.,Ltd."}, + {1493, "TEGAM,Inc."}, + {1494, "ZhuhaiJielitechnologyCo.,Ltd"}, + {1495, "modum.ioAG"}, + {1496, "FarmJennyLLC"}, + {1497, "ToyoElectronicsCorporation"}, + {1498, "AppliedNeuralResearchCorp"}, + {1499, "AvidIdentificationSystems,Inc."}, + {1500, "PetronicsInc."}, + {1501, "essentimGmbH"}, + {1502, "QTMedicalINC."}, + {1503, "VIRTUALCLINIC.DIRECTLIMITED"}, + {1504, "ViperDesignLLC"}, + {1505, "Human,Incorporated"}, + {1506, "stAPPtronicsGmbH"}, + {1507, "ElementalMachines,Inc."}, + {1508, "TaiyoYudenCo.,Ltd"}, + {1509, "INEOENERGY&SYSTEMS"}, + {1510, "MotionInstrumentsInc."}, + {1511, "PressurePro"}, + {1512, "COWBOY"}, + {1513, "iconmobileGmbH"}, + {1514, "ACS-Control-SystemGmbH"}, + {1515, "BayerischeMotorenWerkeAG"}, + {1516, "GycomSvenskaAB"}, + {1517, "FujiXeroxCo.,Ltd"}, + {1518, "GlideInc."}, + {1519, "SIKOMAS"}, + {1520, "beken"}, + {1521, "TheLinuxFoundation"}, + {1522, "TryandECO.,LTD."}, + {1523, "SeeScan"}, + {1524, "Clearity,LLC"}, + {1525, "GSTAG"}, + {1526, "DPTechnics"}, + {1527, "TRACMO,INC."}, + {1528, "AnkiInc."}, + {1529, "HagleitnerHygieneInternationalGmbH"}, + {1530, "KonamiSportsLifeCo.,Ltd."}, + {1531, "ArbletInc."}, + {1532, "MasbandoGmbH"}, + {1533, "Innoseis"}, + {1534, "Niko"}, + {1535, "WellnomicsLtd"}, + {1536, "iRobotCorporation"}, + {1537, "SchraderElectronics"}, + {1538, "GeberitInternationalAG"}, + {1539, "FourthEvolutionInc"}, + {1540, "Cell2JackLLC"}, + {1541, "FMWelectronicFuttereru.Maier-WolfOHG"}, + {1542, "JohnDeere"}, + {1543, "RookeryTechnologyLtd"}, + {1544, "KeySafe-Cloud"}, + {1545, "BUCHILabortechnikAG"}, + {1546, "IQAirAG"}, + {1547, "TriaxTechnologiesInc"}, + {1548, "VuzixCorporation"}, + {1549, "TDKCorporation"}, + {1550, "BlueairAB"}, + {1551, "SignifyNetherlands"}, + {1552, "ADHGUARDIANUSALLC"}, + {1553, "BeurerGmbH"}, + {1554, "PlayfinityAS"}, + {1555, "HansDinslageGmbH"}, + {1556, "OnAssetIntelligence,Inc."}, + {1557, "INTERACTIONCorporation"}, + {1558, "OS42UG(haftungsbeschraenkt)"}, + {1559, "WIZCONNECTEDCOMPANYLIMITED"}, + {1560, "Audio-TechnicaCorporation"}, + {1561, "SixGuysLabs,s.r.o."}, + {1562, "R.W.BeckettCorporation"}, + {1563, "silextechnology,inc."}, + {1564, "UnivationsLimited"}, + {1565, "SENSInnovationApS"}, + {1566, "DiamondKinetics,Inc."}, + {1567, "PhrameInc."}, + {1568, "ForciotOy"}, + {1569, "Noordungd.o.o."}, + {1570, "BeamLabs,LLC"}, + {1571, "PhiladelphiaScientific(U.K.)Limited"}, + {1572, "BiovotionAG"}, + {1573, "SquarePanda,Inc."}, + {1574, "Amplifico"}, + {1575, "WEGS.A."}, + {1576, "EnstoOy"}, + {1577, "PHONEPEPVTLTD"}, + {1578, "LunaticoAstronomiaSL"}, + {1579, "MinebeaMitsumiInc."}, + {1580, "ASPionGmbH"}, + {1581, "Vossloh-SchwabeDeutschlandGmbH"}, + {1582, "Procept"}, + {1583, "ONKYOCorporation"}, + {1584, "AsthreaD.O.O."}, + {1585, "FortioriDesignLLC"}, + {1586, "HugoMullerGmbH&CoKG"}, + {1587, "WangiLaiPLT"}, + {1588, "FanstelCorp"}, + {1589, "Crookwood"}, + {1590, "ELECTRONICAINTEGRALDESONIDOS.A."}, + {1591, "GiPInnovationToolsGmbH"}, + {1592, "LXSOLUTIONSPTYLIMITED"}, + {1593, "ShenzhenMinewTechnologiesCo.,Ltd."}, + {1594, "ProlojikLimited"}, + {1595, "KromekGroupPlc"}, + {1596, "ContecMedicalSystemsCo.,Ltd."}, + {1597, "XradioTechnologyCo.,Ltd."}, + {1598, "TheIndoorLab,LLC"}, + {1599, "LDLTECHNOLOGY"}, + {1600, "Parkifi"}, + {1601, "RevenueCollectionSystemsFRANCESAS"}, + {1602, "BluetrumTechnologyCo.,Ltd"}, + {1603, "makitacorporation"}, + {1604, "ApogeeInstruments"}, + {1605, "BM3"}, + {1606, "SGVGroupHoldingGmbH&Co.KG"}, + {1607, "MED-EL"}, + {1608, "UltuneTechnologies"}, + {1609, "RyeexTechnologyCo.,Ltd."}, + {1610, "OpenResearchInstitute,Inc."}, + {1611, "Scale-Tec,Ltd"}, + {1612, "ZumtobelGroupAG"}, + {1613, "iLOQOy"}, + {1614, "KRUXWorksTechnologiesPrivateLimited"}, + {1615, "DigitalMatterPtyLtd"}, + {1616, "Coravin,Inc."}, + {1617, "StasisLabs,Inc."}, + {1618, "ITZInnovations-undTechnologiezentrumGmbH"}, + {1619, "MeggittSA"}, + {1620, "LedlenserGmbH&Co.KG"}, + {1621, "RenishawPLC"}, + {1622, "ZhuHaiAdvanProTechnologyCompanyLimited"}, + {1623, "MeshtronixLimited"}, + {1624, "PayexNorgeAS"}, + {1625, "UnSeenTechnologiesOy"}, + {1626, "ZoundIndustriesInternationalAB"}, + {1627, "SesamSolutionsBV"}, + {1628, "PixArtImagingInc."}, + {1629, "PanduitCorp."}, + {1630, "AloAB"}, + {1631, "RicohCompanyLtd"}, + {1632, "RTCIndustries,Inc."}, + {1633, "ModeLightingLimited"}, + {1634, "ParticleIndustries,Inc."}, + {1635, "AdvancedTelemetrySystems,Inc."}, + {1636, "RHATECHNOLOGIESLTD"}, + {1637, "PureInternationalLimited"}, + {1638, "WTOWerkzeug-EinrichtungenGmbH"}, + {1639, "SparkTechnologyLabsInc."}, + {1640, "BlebTechnologysrl"}, + {1641, "LivanovaUSA,Inc."}, + {1642, "BradyWorldwideInc."}, + {1643, "DewertOkinGmbH"}, + {1644, "ZtoveApS"}, + {1645, "VensoEcoSolutionsAB"}, + {1646, "EurotronikKranjd.o.o."}, + {1647, "HugTechnologyLtd"}, + {1648, "GemaSwitzerlandGmbH"}, + {1649, "BuzzProductsLtd."}, + {1650, "Kopi"}, + {1651, "InnovaIdeasLimited"}, + {1652, "BeSpoon"}, + {1653, "DecoEnterprises,Inc."}, + {1654, "ExpaiSolutionsPrivateLimited"}, + {1655, "InnovationFirst,Inc."}, + {1656, "SABIKOffshoreGmbH"}, + {1657, "4iiiiInnovationsInc."}, + {1658, "TheEnergyConservatory,Inc."}, + {1659, "I.FARM,INC."}, + {1660, "Tile,Inc."}, + {1661, "FormAthleticaInc."}, + {1662, "MbientLabInc"}, + {1663, "NETGRIDS.N.C.DIBISSOLIMATTEO,CAMPOREALESIMONE,TOGNETTIFEDERICO"}, + {1664, "MannkindCorporation"}, + {1665, "TradeFIDESa.s."}, + {1666, "PhotronLimited"}, + {1667, "EltakoGmbH"}, + {1668, "Dermalapps,LLC"}, + {1669, "GreenwaldIndustries"}, + {1670, "inQsCo.,Ltd."}, + {1671, "CherryGmbH"}, + {1672, "AmstedDigitalSolutionsInc."}, + {1673, "Tacxb.v."}, + {1674, "RaytacCorporation"}, + {1675, "JiangsuTeranovoTechCo.,Ltd."}, + {1676, "ChangzhouSoundDragonElectronicsandAcousticsCo.,Ltd"}, + {1677, "JetBeepInc."}, + {1678, "RazerInc."}, + {1679, "JRMGroupLimited"}, + {1680, "EccrineSystems,Inc."}, + {1681, "CuriePointAB"}, + {1682, "GeorgFischerAG"}, + {1683, "Hach-Danaher"}, + {1684, "T&ALaboratoriesLLC"}, + {1685, "KokiHoldingsCo.,Ltd."}, + {1686, "GunakarPrivateLimited"}, + {1687, "StemcoProductsInc"}, + {1688, "WoodITSecurity,LLC"}, + {1689, "RandomLabSAS"}, + {1690, "Adero,Inc.(formerlyasTrackR,Inc.)"}, + {1691, "DragonchipLimited"}, + {1692, "NoomiAB"}, + {1693, "VakarosLLC"}, + {1694, "DeltaElectronics,Inc."}, + {1695, "FlowMotionTechnologiesAS"}, + {1696, "OBIQLocationTechnologyInc."}, + {1697, "CardoSystems,Ltd"}, + {1698, "GlobalworxGmbH"}, + {1699, "Nymbus,LLC"}, + {1700, "SanyoTechnoSolutionsTottoriCo.,Ltd."}, + {1701, "TEKZITELPTYLTD"}, + {1702, "RoambeeCorporation"}, + {1703, "ChipseaTechnologies(ShenZhen)Corp."}, + {1704, "GDMideaAir-ConditioningEquipmentCo.,Ltd."}, + {1705, "SoundmaxElectronicsLimited"}, + {1706, "ProdualOy"}, + {1707, "HMSIndustrialNetworksAB"}, + {1708, "IngchipsTechnologyCo.,Ltd."}, + {1709, "InnovaSeaSystemsInc."}, + {1710, "SenseQInc."}, + {1711, "ShoofTechnologies"}, + {1712, "BRKBrands,Inc."}, + {1713, "SimpliSafe,Inc."}, + {1714, "TussockInnovation2013Limited"}, + {1715, "TheHablabApS"}, + {1716, "SencilionOy"}, + {1717, "WabilogicLtd."}, + {1718, "SociometricSolutions,Inc."}, + {1719, "iCOGNIZEGmbH"}, + {1720, "ShadeCraft,Inc"}, + {1721, "BeflexInc."}, + {1722, "BeaconzoneLtd"}, + {1723, "LeaftronixAnalogicSolutionsPrivateLimited"}, + {1724, "TWSSrl"}, + {1725, "ABBOy"}, + {1726, "HitSeedOy"}, + {1727, "DelcomProductsInc."}, + {1728, "CAMES.p.A."}, + {1729, "Alarm.comHoldings,Inc"}, + {1730, "MeasurlogicInc."}, + {1731, "KingIElectronics.Co.,Ltd"}, + {1732, "DreamLabsGmbH"}, + {1733, "UrbanCompass,Inc"}, + {1734, "SimmTronicLimited"}, + {1735, "SomatixInc"}, + {1736, "Storz&BickelGmbH&Co.KG"}, + {1737, "MYLAPSB.V."}, + {1738, "ShenzhenZhongguangInfotechTechnologyDevelopmentCo.,Ltd"}, + {1739, "Dyeware,LLC"}, + {1740, "DongguanSmartActionTechnologyCo.,Ltd."}, + {1741, "DIGCorporation"}, + {1742, "FIOR&GENTZ"}, + {1743, "BelpartsN.V."}, + {1744, "EtekcityCorporation"}, + {1745, "MeyerSoundLaboratories,Incorporated"}, + {1746, "CeoTronicsAG"}, + {1747, "TriTeqLockandSecurity,LLC"}, + {1748, "DYNAKODETECHNOLOGYPRIVATELIMITED"}, + {1749, "SensirionAG"}, + {1750, "JCTHealthcarePtyLtd"}, + {1751, "FUBAAutomotiveElectronicsGmbH"}, + {1752, "AWCompany"}, + {1753, "ShanghaiMountainViewSiliconCo.,Ltd."}, + {1754, "ZliideTechnologiesApS"}, + {1755, "AutomaticLabs,Inc."}, + {1756, "IndustrialNetworkControls,LLC"}, + {1757, "IntellithingsLtd."}, + {1758, "Navcast,Inc."}, + {1759, "HubbellLighting,Inc."}, + {1760, "Avaya"}, + {1761, "MilestoneAVTechnologiesLLC"}, + {1762, "AlangoTechnologiesLtd"}, + {1763, "SpinlockLtd"}, + {1764, "Aluna"}, + {1765, "OPTEXCO.,LTD."}, + {1766, "NIHONDENGYOKOUSAKU"}, + {1767, "VELUXA/S"}, + {1768, "AlmendoTechnologiesGmbH"}, + {1769, "ZmartfunElectronics,Inc."}, + {1770, "SafeLineSwedenAB"}, + {1771, "HoustonRadarLLC"}, + {1772, "Sigur"}, + {1773, "JNeadesLtd"}, + {1774, "AvantisSystemsLimited"}, + {1775, "ALCARECo.,Ltd."}, + {1776, "ChargyTechnologies,SL"}, + {1777, "ShibutaniCo.,Ltd."}, + {1778, "TrapperDataAB"}, + {1779, "AlfredInternationalInc."}, + {1780, "NearFieldSolutionsLtd"}, + {1781, "VigilTechnologiesInc."}, + {1782, "VituloPlusBV"}, + {1783, "WILKASchliesstechnikGmbH"}, + {1784, "BodyPlusTechnologyCo.,Ltd"}, + {1785, "happybrushGmbH"}, + {1786, "EnequiAB"}, + {1787, "SartoriusAG"}, + {1788, "TomCommunicationIndustrialCo.,Ltd."}, + {1789, "ESSEmbeddedSystemSolutionsInc."}, + {1790, "MahrGmbH"}, + {1791, "RedpineSignalsInc"}, + {1792, "TraqFreqLLC"}, + {1793, "PAFERSTECH"}, + {1794, "Akcijusabiedriba\"SAFTEHNIKA\""}, + {1795, "BeijingJingdongCenturyTradingCo.,Ltd."}, + {1796, "JBXDesignsInc."}, + {1797, "ABElectrolux"}, + {1798, "WernhervonBraunCenterforASdvancedResearch"}, + {1799, "EssityHygieneandHealthAktiebolag"}, + {1800, "BeInteractiveCo.,Ltd"}, + {1801, "CarewearCorp."}, + {1802, "HufHlsbeck&FrstGmbH&Co.KG"}, + {1803, "ElementProducts,Inc."}, + {1804, "BeijingWinnerMicroelectronicsCo.,Ltd"}, + {1805, "SmartSnuggPtyLtd"}, + {1806, "FiveCoSarl"}, + {1807, "CaliforniaThingsInc."}, + {1808, "AudiodoAB"}, + {1809, "ABAXAS"}, + {1810, "BullGroupCompanyLimited"}, + {1811, "RespiriLimited"}, + {1812, "MindPeaceSafetyLLC"}, + {1813, "VgyanSolutions"}, + {1814, "Altonics"}, + {1815, "iQsquareBV"}, + {1816, "IDIBAIXenginneering"}, + {1817, "ECSG"}, + {1818, "REVSMARTWEARABLEHKCOLTD"}, + {1819, "Precor"}, + {1820, "F5Sports,Inc"}, + /* 1821 - 65534 reserved */ + {65535, "test"}, + {0, NULL}}; + +static const value_string sco_packet[] = { + {0, "HV1"}, + {1, "HV2"}, + {2, "HV3"}, + /* 3 - 255 reserved */ + {0, NULL}}; + +static const value_string air_mode[] = { + {0, "mu-law log"}, + {1, "A-law log"}, + {2, "CVSD"}, + {3, "transparent data"}, + /* 4 - 255 reserved */ + {0, NULL}}; + +static const value_string paging_scheme[] = { + {0, "mandatory scheme"}, + /* 1 - 255 reserved */ + {0, NULL}}; + +static const value_string paging_scheme_settings[] = { + /* for mandatory scheme: */ + {0, "R0"}, + {1, "R1"}, + {2, "R2"}, + /* 3 - 255 reserved */ + {0, NULL}}; + +static const value_string afh_mode[] = { + {0, "AFH disabled"}, + {1, "AFH enabled"}, + /* 2 - 255 reserved */ + {0, NULL}}; + +static const value_string features_page[] = { + {0, "standard features"}, + {1, "extended features 64-67"}, + {2, "extended features 128-140"}, + /* 3 - 255 other feature pages */ + {0, NULL}}; + +static const value_string packet_type_table[] = { + {0, "1 Mbps only"}, + {1, "2/3 Mbps"}, + /* 2 - 255 reserved */ + {0, NULL}}; + +static const value_string negotiation_state[] = { + {0, "Initiate negotiation"}, + {1, "The latest received set of negotiable parameters were possible but these parameters are preferred."}, + {2, "The latest received set of negotiable parameters would cause a reserved slot violation."}, + {3, "The latest received set of negotiable parameters would cause a latency violation."}, + {4, "The latest received set of negotiable parameters are not supported."}, + /* 5 - 255 reserved */ + {0, NULL}}; + +static const value_string afh_reporting_mode[] = { + {0, "AFH reporting disabled"}, + {1, "AFH reporting enabled"}, + /* 2 - 255 reserved */ + {0, NULL}}; + +static const value_string io_capabilities[] = { + {0, "Display Only"}, + {1, "Display Yes/No"}, + {2, "Keyboard Only"}, + {3, "No Input/No Output"}, + /* 4 - 255 reserved */ + {0, NULL}}; + +static const value_string oob_auth_data[] = { + {0, "No OOB Authentication Data received"}, + {1, "OOB Authentication Data received"}, + /* 2 - 255 reserved */ + {0, NULL}}; + +static const value_string auth_requirements[] = { + {0x00, "MITM Protection Not Required - No Bonding"}, + {0x01, "MITM Protection Required - No Bonding"}, + {0x02, "MITM Protection Not Required - Dedicated Bonding"}, + {0x03, "MITM Protection Required - Dedicated Bonding"}, + {0x04, "MITM Protection Not Required - General Bonding"}, + {0x05, "MITM Protection Required - General Bonding"}, + /* 0x06 - 0xff reserved */ + {0, NULL}}; + +static const value_string power_adjust_req[] = { + {0, "decrement power one step"}, + {1, "increment power one step"}, + {2, "increase to maximum power"}, + /* 3 - 255 reserved */ + {0, NULL}}; + +static const value_string power_adjust_res[] = { + {0, "not supported"}, + {1, "changed one step (not min or max)"}, + {2, "max power"}, + {3, "min power"}, + /* 4 - 255 reserved */ + {0, NULL}}; + +static const value_string test_scenario[] = { + {0, "Pause Test Mode"}, + {1, "Transmitter test - 0 pattern"}, + {2, "Transmitter test - 1 pattern"}, + {3, "Transmitter test - 1010 pattern"}, + {4, "Pseudorandom bit sequence"}, + {5, "Closed Loop Back - ACL packets"}, + {6, "Closed Loop Back - Synchronous packets"}, + {7, "ACL Packets without whitening"}, + {8, "Synchronous Packets without whitening"}, + {9, "Transmitter test - 1111 0000 pattern"}, + /* 10 - 254 reserved */ + {255, "Exit Test Mode"}, + {0, NULL}}; + +static const value_string hopping_mode[] = { + {0, "RX/TX on single frequency"}, + {1, "Normal hopping"}, + /* 2 - 255 reserved */ + {0, NULL}}; + +static const value_string power_control_mode[] = { + {0, "fixed TX output power"}, + {1, "adaptive power control"}, + /* 2 - 255 reserved */ + {0, NULL}}; + +static const value_string esco_packet_type[] = { + {0x00, "NULL/POLL"}, + {0x07, "EV3"}, + {0x0C, "EV4"}, + {0x0D, "EV5"}, + {0x26, "2-EV3"}, + {0x2C, "2-EV5"}, + {0x37, "3-EV3"}, + {0x3D, "3-EV5"}, + /* other values reserved */ + {0, NULL}}; + +static const value_string notification_value[] = { + {0, "passkey entry started"}, + {1, "passkey digit entered"}, + {2, "passkey digit erased"}, + {3, "passkey cleared"}, + {4, "passkey entry completed"}, + /* 5 - 255 reserved */ + {0, NULL}}; + +/* initialize the subtree pointers */ +static gint ett_lmp = -1; +static gint ett_lmp_pwradjres = -1; +static gint ett_lmp_rate = -1; +static gint ett_lmp_timectrl = -1; +static gint ett_lmp_features = -1; +static gint ett_lmp_featuresext = -1; + +/* LMP PDUs with short opcodes */ +void dissect_vsc(proto_tree *tree, tvbuff_t *tvb, int offset, int len) +{ + /* TODO implement Broadcom VSC opcodes here: + * 0: Features Request + * 1: Features Response + * 0 and 1: Features: 0x%02X%02X%02X%02X + * 2: Not Accept + * Rejection BPCS Opcode: 0x%02X + * Rejection Error Code: 0x%02X + * 3: BFC Suspend + * 4: BFC Resume Request + * if receive direction: + * BFC Resume Response (instead) + * BFC Link State: 0x%02X + * BFC Stack State: 0x%02X + * BFC Reserved: 0x%02X\ + * 5: BFC Accept + * BPCS Accepted Opcode: 0x%02X + * + */ +} + +void dissect_name_req(proto_tree *tree, tvbuff_t *tvb, int offset, int len) +{ + DISSECTOR_ASSERT(len == 2); + DISSECTOR_ASSERT(tvb_reported_length_remaining(tvb, offset) >= 1); + + proto_tree_add_item(tree, hf_lmp_nameoffset, tvb, offset, 1, ENC_NA); +} + +void dissect_name_res(proto_tree *tree, tvbuff_t *tvb, int offset, int len) +{ + DISSECTOR_ASSERT(len == 17); + + proto_tree_add_item(tree, hf_lmp_nameoffset, tvb, offset, 1, ENC_NA); + offset += 1; + + proto_tree_add_item(tree, hf_lmp_namelen, tvb, offset, 1, ENC_NA); + offset += 1; + + proto_tree_add_item(tree, hf_lmp_namefrag, tvb, offset, 14, ENC_ASCII | ENC_NA); +} + +void dissect_accepted(proto_tree *tree, tvbuff_t *tvb, int offset, int len) +{ + DISSECTOR_ASSERT(len == 2); + DISSECTOR_ASSERT(tvb_reported_length_remaining(tvb, offset) >= 1); + + proto_tree_add_item(tree, hf_lmp_opinre, tvb, offset, 1, ENC_NA); +} + +void dissect_not_accepted(proto_tree *tree, tvbuff_t *tvb, int offset, int len) +{ + DISSECTOR_ASSERT(len == 3); + DISSECTOR_ASSERT(tvb_reported_length_remaining(tvb, offset) >= 2); + + proto_tree_add_item(tree, hf_lmp_opinre, tvb, offset, 1, ENC_NA); + offset += 1; + + proto_tree_add_item(tree, hf_lmp_err, tvb, offset, 1, ENC_NA); +} + +void dissect_clkoffset_req(proto_tree *tree, tvbuff_t *tvb, int offset, int len) +{ + DISSECTOR_ASSERT(len == 1); +} + +void dissect_clkoffset_res(proto_tree *tree, tvbuff_t *tvb, int offset, int len) +{ + DISSECTOR_ASSERT(len == 3); + DISSECTOR_ASSERT(tvb_reported_length_remaining(tvb, offset) >= 2); + + proto_tree_add_item(tree, hf_lmp_clkoffset, tvb, offset, 2, ENC_LITTLE_ENDIAN); +} + +void dissect_detach(proto_tree *tree, tvbuff_t *tvb, int offset, int len) +{ + DISSECTOR_ASSERT(len == 2); + DISSECTOR_ASSERT(tvb_reported_length_remaining(tvb, offset) >= 1); + + proto_tree_add_item(tree, hf_lmp_err, tvb, offset, 1, ENC_NA); +} + +void dissect_in_rand(proto_tree *tree, tvbuff_t *tvb, int offset, int len) +{ + DISSECTOR_ASSERT(len == 17); + DISSECTOR_ASSERT(tvb_reported_length_remaining(tvb, offset) >= 16); + + proto_tree_add_item(tree, hf_lmp_rand, tvb, offset, 16, ENC_NA); +} + +void dissect_comb_key(proto_tree *tree, tvbuff_t *tvb, int offset, int len) +{ + DISSECTOR_ASSERT(len == 17); + DISSECTOR_ASSERT(tvb_reported_length_remaining(tvb, offset) >= 16); + + proto_tree_add_item(tree, hf_lmp_rand, tvb, offset, 16, ENC_NA); +} + +void dissect_unit_key(proto_tree *tree, tvbuff_t *tvb, int offset, int len) +{ + DISSECTOR_ASSERT(len == 17); + DISSECTOR_ASSERT(tvb_reported_length_remaining(tvb, offset) >= 16); + + proto_tree_add_item(tree, hf_lmp_key, tvb, offset, 16, ENC_NA); +} + +void dissect_au_rand(proto_tree *tree, tvbuff_t *tvb, int offset, int len) +{ + DISSECTOR_ASSERT(len == 17); + DISSECTOR_ASSERT(tvb_reported_length_remaining(tvb, offset) >= 16); + + proto_tree_add_item(tree, hf_lmp_rand, tvb, offset, 16, ENC_NA); +} + +void dissect_sres(proto_tree *tree, tvbuff_t *tvb, int offset, int len) +{ + DISSECTOR_ASSERT(len == 5); + DISSECTOR_ASSERT(tvb_reported_length_remaining(tvb, offset) >= 4); + + proto_tree_add_item(tree, hf_lmp_authres, tvb, offset, 4, ENC_NA); +} + +void dissect_temp_rand(proto_tree *tree, tvbuff_t *tvb, int offset, int len) +{ + DISSECTOR_ASSERT(len == 17); + DISSECTOR_ASSERT(tvb_reported_length_remaining(tvb, offset) >= 16); + + proto_tree_add_item(tree, hf_lmp_rand, tvb, offset, 16, ENC_NA); +} + +void dissect_temp_key(proto_tree *tree, tvbuff_t *tvb, int offset, int len) +{ + DISSECTOR_ASSERT(len == 17); + DISSECTOR_ASSERT(tvb_reported_length_remaining(tvb, offset) >= 16); + + proto_tree_add_item(tree, hf_lmp_key, tvb, offset, 16, ENC_NA); +} + +void dissect_encryption_mode_req(proto_tree *tree, tvbuff_t *tvb, int offset, int len) +{ + DISSECTOR_ASSERT(len == 2); + DISSECTOR_ASSERT(tvb_reported_length_remaining(tvb, offset) >= 1); + + proto_tree_add_item(tree, hf_lmp_cryptmode, tvb, offset, 1, ENC_LITTLE_ENDIAN); +} + +void dissect_encryption_key_size_req(proto_tree *tree, tvbuff_t *tvb, int offset, int len) +{ + DISSECTOR_ASSERT(len == 2); + DISSECTOR_ASSERT(tvb_reported_length_remaining(tvb, offset) >= 1); + proto_tree_add_item(tree, hf_lmp_keysz, tvb, offset, 1, ENC_LITTLE_ENDIAN); + int ret = tvb_get_guint8(tvb, offset); + DISSECTOR_ASSERT(ret >= 7); +} + +void dissect_start_encryption_req(proto_tree *tree, tvbuff_t *tvb, int offset, int len) +{ + DISSECTOR_ASSERT(len == 17); + DISSECTOR_ASSERT(tvb_reported_length_remaining(tvb, offset) >= 16); + + proto_tree_add_item(tree, hf_lmp_rand, tvb, offset, 16, ENC_NA); +} + +void dissect_stop_encryption_req(proto_tree *tree, tvbuff_t *tvb, int offset, int len) +{ + DISSECTOR_ASSERT(len == 1); +} + +void dissect_switch_req(proto_tree *tree, tvbuff_t *tvb, int offset, int len) +{ + DISSECTOR_ASSERT(len == 5); + DISSECTOR_ASSERT(tvb_reported_length_remaining(tvb, offset) >= 4); + + proto_tree_add_item(tree, hf_lmp_swinst, tvb, offset, 4, ENC_LITTLE_ENDIAN); +} + +void dissect_hold(proto_tree *tree, tvbuff_t *tvb, int offset, int len) +{ + DISSECTOR_ASSERT(len == 7); + DISSECTOR_ASSERT(tvb_reported_length_remaining(tvb, offset) >= 6); + + proto_tree_add_item(tree, hf_lmp_htime, tvb, offset, 2, ENC_LITTLE_ENDIAN); + offset += 2; + + proto_tree_add_item(tree, hf_lmp_hinst, tvb, offset, 4, ENC_LITTLE_ENDIAN); +} + +void dissect_hold_req(proto_tree *tree, tvbuff_t *tvb, int offset, int len) +{ + DISSECTOR_ASSERT(len == 7); + DISSECTOR_ASSERT(tvb_reported_length_remaining(tvb, offset) >= 6); + + proto_tree_add_item(tree, hf_lmp_htime, tvb, offset, 2, ENC_LITTLE_ENDIAN); + offset += 2; + + proto_tree_add_item(tree, hf_lmp_hinst, tvb, offset, 4, ENC_LITTLE_ENDIAN); +} + +void dissect_sniff_req(proto_tree *tree, tvbuff_t *tvb, int offset, int len) +{ + DISSECTOR_ASSERT(len == 10); + DISSECTOR_ASSERT(tvb_reported_length_remaining(tvb, offset) >= 9); + + proto_tree_add_bitmask(tree, tvb, offset, hf_lmp_timectrl, + ett_lmp_timectrl, timectrl_fields, ENC_LITTLE_ENDIAN); + offset += 1; + + proto_tree_add_item(tree, hf_lmp_dsniff, tvb, offset, 2, ENC_LITTLE_ENDIAN); + offset += 2; + + proto_tree_add_item(tree, hf_lmp_tsniff, tvb, offset, 2, ENC_LITTLE_ENDIAN); + offset += 2; + + proto_tree_add_item(tree, hf_lmp_sniffatt, tvb, offset, 2, ENC_LITTLE_ENDIAN); + offset += 2; + + proto_tree_add_item(tree, hf_lmp_sniffto, tvb, offset, 2, ENC_LITTLE_ENDIAN); +} + +void dissect_unsniff_req(proto_tree *tree, tvbuff_t *tvb, int offset, int len) +{ + DISSECTOR_ASSERT(len == 1); +} + +void dissect_park_req(proto_tree *tree, tvbuff_t *tvb, int offset, int len) +{ + DISSECTOR_ASSERT(len == 17); + DISSECTOR_ASSERT(tvb_reported_length_remaining(tvb, offset) >= 16); + + proto_tree_add_bitmask(tree, tvb, offset, hf_lmp_timectrl, + ett_lmp_timectrl, timectrl_fields, ENC_LITTLE_ENDIAN); + offset += 1; + + proto_tree_add_item(tree, hf_lmp_db, tvb, offset, 2, ENC_LITTLE_ENDIAN); + offset += 2; + + proto_tree_add_item(tree, hf_lmp_tb, tvb, offset, 2, ENC_LITTLE_ENDIAN); + offset += 2; + + proto_tree_add_item(tree, hf_lmp_nb, tvb, offset, 1, ENC_LITTLE_ENDIAN); + offset += 1; + + proto_tree_add_item(tree, hf_lmp_deltab, tvb, offset, 1, ENC_LITTLE_ENDIAN); + offset += 1; + + proto_tree_add_item(tree, hf_lmp_pmaddr, tvb, offset, 1, ENC_LITTLE_ENDIAN); + offset += 1; + + proto_tree_add_item(tree, hf_lmp_araddr, tvb, offset, 1, ENC_LITTLE_ENDIAN); + offset += 1; + + proto_tree_add_item(tree, hf_lmp_nbsleep, tvb, offset, 1, ENC_LITTLE_ENDIAN); + offset += 1; + + proto_tree_add_item(tree, hf_lmp_dbsleep, tvb, offset, 1, ENC_LITTLE_ENDIAN); + offset += 1; + + proto_tree_add_item(tree, hf_lmp_daccess, tvb, offset, 1, ENC_LITTLE_ENDIAN); + offset += 1; + + proto_tree_add_item(tree, hf_lmp_taccess, tvb, offset, 1, ENC_LITTLE_ENDIAN); + offset += 1; + + proto_tree_add_item(tree, hf_lmp_naccslots, tvb, offset, 1, ENC_LITTLE_ENDIAN); + offset += 1; + + proto_tree_add_item(tree, hf_lmp_npoll, tvb, offset, 1, ENC_LITTLE_ENDIAN); + offset += 1; + + proto_tree_add_item(tree, hf_lmp_maccess, tvb, offset, 1, ENC_LITTLE_ENDIAN); + proto_tree_add_item(tree, hf_lmp_accscheme, tvb, offset, 1, ENC_NA); +} + +void dissect_set_broadcast_scan_window(proto_tree *tree, tvbuff_t *tvb, int offset, int len) +{ + int db_present; + + DISSECTOR_ASSERT(tvb_reported_length_remaining(tvb, offset) >= 1); + + proto_tree_add_bitmask(tree, tvb, offset, hf_lmp_timectrl, + ett_lmp_timectrl, timectrl_fields, ENC_LITTLE_ENDIAN); + + /* bit0 of timing control flags indicates presence of db */ + db_present = tvb_get_guint8(tvb, offset) & 0x01; + offset += 1; + + if (db_present) + { + DISSECTOR_ASSERT(len == 6); + DISSECTOR_ASSERT(tvb_reported_length_remaining(tvb, offset) >= 4); + + proto_tree_add_item(tree, hf_lmp_db, tvb, offset, 2, ENC_LITTLE_ENDIAN); + offset += 2; + } + else + { + DISSECTOR_ASSERT(len == 4); + DISSECTOR_ASSERT(tvb_reported_length_remaining(tvb, offset) >= 2); + } + + proto_tree_add_item(tree, hf_lmp_bsw, tvb, offset, 2, ENC_LITTLE_ENDIAN); +} + +void dissect_modify_beacon(proto_tree *tree, tvbuff_t *tvb, int offset, int len) +{ + int db_present; + + DISSECTOR_ASSERT(tvb_reported_length_remaining(tvb, offset) >= 1); + + proto_tree_add_bitmask(tree, tvb, offset, hf_lmp_timectrl, + ett_lmp_timectrl, timectrl_fields, ENC_LITTLE_ENDIAN); + + /* bit0 of timing control flags indicates presence of db */ + db_present = tvb_get_guint8(tvb, offset) & 0x01; + offset += 1; + + if (db_present) + { + DISSECTOR_ASSERT(len == 13); + DISSECTOR_ASSERT(tvb_reported_length_remaining(tvb, offset) >= 11); + + proto_tree_add_item(tree, hf_lmp_db, tvb, offset, 2, ENC_LITTLE_ENDIAN); + offset += 2; + } + else + { + DISSECTOR_ASSERT(len == 11); + DISSECTOR_ASSERT(tvb_reported_length_remaining(tvb, offset) >= 9); + } + + proto_tree_add_item(tree, hf_lmp_tb, tvb, offset, 2, ENC_LITTLE_ENDIAN); + offset += 2; + + proto_tree_add_item(tree, hf_lmp_nb, tvb, offset, 1, ENC_LITTLE_ENDIAN); + offset += 1; + + proto_tree_add_item(tree, hf_lmp_deltab, tvb, offset, 1, ENC_LITTLE_ENDIAN); + offset += 1; + + proto_tree_add_item(tree, hf_lmp_daccess, tvb, offset, 1, ENC_LITTLE_ENDIAN); + offset += 1; + + proto_tree_add_item(tree, hf_lmp_taccess, tvb, offset, 1, ENC_LITTLE_ENDIAN); + offset += 1; + + proto_tree_add_item(tree, hf_lmp_naccslots, tvb, offset, 1, ENC_LITTLE_ENDIAN); + offset += 1; + + proto_tree_add_item(tree, hf_lmp_npoll, tvb, offset, 1, ENC_LITTLE_ENDIAN); + offset += 1; + + proto_tree_add_item(tree, hf_lmp_maccess, tvb, offset, 1, ENC_LITTLE_ENDIAN); + proto_tree_add_item(tree, hf_lmp_accscheme, tvb, offset, 1, ENC_NA); +} + +void dissect_unpark_bd_addr_req(proto_tree *tree, tvbuff_t *tvb, int offset, int len) +{ + int db_present; + proto_item; + + DISSECTOR_ASSERT(tvb_reported_length_remaining(tvb, offset) >= 1); + + proto_tree_add_bitmask(tree, tvb, offset, hf_lmp_timectrl, + ett_lmp_timectrl, timectrl_fields, ENC_LITTLE_ENDIAN); + + /* bit0 of timing control flags indicates presence of db */ + db_present = tvb_get_guint8(tvb, offset) & 0x01; + offset += 1; + + if (db_present) + { + DISSECTOR_ASSERT(len == 17); + DISSECTOR_ASSERT(tvb_reported_length_remaining(tvb, offset) >= 15); + + proto_tree_add_item(tree, hf_lmp_db, tvb, offset, 2, ENC_LITTLE_ENDIAN); + offset += 2; + } + else + { + DISSECTOR_ASSERT(len == 15); + DISSECTOR_ASSERT(tvb_reported_length_remaining(tvb, offset) >= 13); + } + + proto_tree_add_item(tree, hf_lmp_ltaddr1, tvb, offset, 1, ENC_LITTLE_ENDIAN); + proto_tree_add_item(tree, hf_lmp_ltaddr2, tvb, offset, 1, ENC_LITTLE_ENDIAN); + offset += 1; + + proto_tree_add_item(tree, hf_lmp_bdaddr1, tvb, offset, 6, ENC_LITTLE_ENDIAN); + offset += 6; + + proto_tree_add_item(tree, hf_lmp_bdaddr2, tvb, offset, 6, ENC_LITTLE_ENDIAN); + offset += 6; +} + +void dissect_unpark_pm_addr_req(proto_tree *tree, tvbuff_t *tvb, int offset, int len) +{ + int db_present; + + DISSECTOR_ASSERT(tvb_reported_length_remaining(tvb, offset) >= 1); + + proto_tree_add_bitmask(tree, tvb, offset, hf_lmp_timectrl, + ett_lmp_timectrl, timectrl_fields, ENC_LITTLE_ENDIAN); + + /* bit0 of timing control flags indicates presence of db */ + db_present = tvb_get_guint8(tvb, offset) & 0x01; + offset += 1; + + if (db_present) + { + DISSECTOR_ASSERT(len == 15); + DISSECTOR_ASSERT(tvb_reported_length_remaining(tvb, offset) >= 13); + + proto_tree_add_item(tree, hf_lmp_db, tvb, offset, 2, ENC_LITTLE_ENDIAN); + offset += 2; + } + else + { + DISSECTOR_ASSERT(len == 13); + DISSECTOR_ASSERT(tvb_reported_length_remaining(tvb, offset) >= 11); + } + + proto_tree_add_item(tree, hf_lmp_ltaddr1, tvb, offset, 1, ENC_LITTLE_ENDIAN); + proto_tree_add_item(tree, hf_lmp_ltaddr2, tvb, offset, 1, ENC_LITTLE_ENDIAN); + offset += 1; + + proto_tree_add_item(tree, hf_lmp_pmaddr1, tvb, offset, 1, ENC_LITTLE_ENDIAN); + offset += 1; + + proto_tree_add_item(tree, hf_lmp_pmaddr2, tvb, offset, 1, ENC_LITTLE_ENDIAN); + offset += 1; + + proto_tree_add_item(tree, hf_lmp_ltaddr3, tvb, offset, 1, ENC_LITTLE_ENDIAN); + proto_tree_add_item(tree, hf_lmp_ltaddr4, tvb, offset, 1, ENC_LITTLE_ENDIAN); + offset += 1; + + proto_tree_add_item(tree, hf_lmp_pmaddr3, tvb, offset, 1, ENC_LITTLE_ENDIAN); + offset += 1; + + proto_tree_add_item(tree, hf_lmp_pmaddr4, tvb, offset, 1, ENC_LITTLE_ENDIAN); + offset += 1; + + proto_tree_add_item(tree, hf_lmp_ltaddr5, tvb, offset, 1, ENC_LITTLE_ENDIAN); + proto_tree_add_item(tree, hf_lmp_ltaddr6, tvb, offset, 1, ENC_LITTLE_ENDIAN); + offset += 1; + + proto_tree_add_item(tree, hf_lmp_pmaddr5, tvb, offset, 1, ENC_LITTLE_ENDIAN); + offset += 1; + + proto_tree_add_item(tree, hf_lmp_pmaddr6, tvb, offset, 1, ENC_LITTLE_ENDIAN); + offset += 1; + + proto_tree_add_item(tree, hf_lmp_ltaddr7, tvb, offset, 1, ENC_LITTLE_ENDIAN); + offset += 1; + + proto_tree_add_item(tree, hf_lmp_pmaddr7, tvb, offset, 1, ENC_LITTLE_ENDIAN); +} + +void dissect_incr_power_req(proto_tree *tree, tvbuff_t *tvb, int offset, int len) +{ + DISSECTOR_ASSERT(len == 2); + + /* skipping one byte "for future use" */ +} + +void dissect_decr_power_req(proto_tree *tree, tvbuff_t *tvb, int offset, int len) +{ + DISSECTOR_ASSERT(len == 2); + + /* skipping one byte "for future use" */ +} + +void dissect_max_power(proto_tree *tree, tvbuff_t *tvb, int offset, int len) +{ + DISSECTOR_ASSERT(len == 1); +} + +void dissect_min_power(proto_tree *tree, tvbuff_t *tvb, int offset, int len) +{ + DISSECTOR_ASSERT(len == 1); +} + +void dissect_auto_rate(proto_tree *tree, tvbuff_t *tvb, int offset, int len) +{ + DISSECTOR_ASSERT(len == 1); +} + +void dissect_preferred_rate(proto_tree *tree, tvbuff_t *tvb, int offset, int len) +{ + proto_item *rate_item; + proto_tree *rate_tree; + + DISSECTOR_ASSERT(len == 2); + DISSECTOR_ASSERT(tvb_reported_length_remaining(tvb, offset) >= 1); + + rate_item = proto_tree_add_item(tree, hf_lmp_rate, tvb, offset, 1, ENC_LITTLE_ENDIAN); + rate_tree = proto_item_add_subtree(rate_item, ett_lmp_rate); + + proto_tree_add_item(rate_tree, hf_lmp_rate_fec, tvb, offset, 1, ENC_LITTLE_ENDIAN); + proto_tree_add_item(rate_tree, hf_lmp_rate_size, tvb, offset, 1, ENC_LITTLE_ENDIAN); + proto_tree_add_item(rate_tree, hf_lmp_rate_type, tvb, offset, 1, ENC_LITTLE_ENDIAN); + proto_tree_add_item(rate_tree, hf_lmp_rate_edrsize, tvb, offset, 1, ENC_LITTLE_ENDIAN); +} + +void dissect_version_req(proto_tree *tree, tvbuff_t *tvb, int offset, int len) +{ + DISSECTOR_ASSERT(len == 6); + DISSECTOR_ASSERT(tvb_reported_length_remaining(tvb, offset) >= 5); + + proto_tree_add_item(tree, hf_lmp_versnr, tvb, offset, 1, ENC_LITTLE_ENDIAN); + offset += 1; + + proto_tree_add_item(tree, hf_lmp_compid, tvb, offset, 2, ENC_LITTLE_ENDIAN); + offset += 2; + + proto_tree_add_item(tree, hf_lmp_subversnr, tvb, offset, 2, ENC_LITTLE_ENDIAN); +} + +void dissect_version_res(proto_tree *tree, tvbuff_t *tvb, int offset, int len) +{ + DISSECTOR_ASSERT(len == 6); + DISSECTOR_ASSERT(tvb_reported_length_remaining(tvb, offset) >= 5); + + proto_tree_add_item(tree, hf_lmp_versnr, tvb, offset, 1, ENC_LITTLE_ENDIAN); + offset += 1; + + proto_tree_add_item(tree, hf_lmp_compid, tvb, offset, 2, ENC_LITTLE_ENDIAN); + offset += 2; + + proto_tree_add_item(tree, hf_lmp_subversnr, tvb, offset, 2, ENC_LITTLE_ENDIAN); +} + +void dissect_features_req(proto_tree *tree, tvbuff_t *tvb, int offset, int len) +{ + DISSECTOR_ASSERT(len == 9); + DISSECTOR_ASSERT(tvb_reported_length_remaining(tvb, offset) >= 8); + + proto_tree_add_bitmask(tree, tvb, offset, hf_lmp_features, + ett_lmp_features, features_fields, ENC_LITTLE_ENDIAN); +} + +void dissect_features_res(proto_tree *tree, tvbuff_t *tvb, int offset, int len) +{ + DISSECTOR_ASSERT(len == 9); + DISSECTOR_ASSERT(tvb_reported_length_remaining(tvb, offset) >= 8); + + proto_tree_add_bitmask(tree, tvb, offset, hf_lmp_features, + ett_lmp_features, features_fields, ENC_LITTLE_ENDIAN); +} + +void dissect_quality_of_service(proto_tree *tree, tvbuff_t *tvb, int offset, int len) +{ + DISSECTOR_ASSERT(len == 4); + DISSECTOR_ASSERT(tvb_reported_length_remaining(tvb, offset) >= 3); + + proto_tree_add_item(tree, hf_lmp_pollintvl, tvb, offset, 2, ENC_LITTLE_ENDIAN); + offset += 2; + + proto_tree_add_item(tree, hf_lmp_nbc, tvb, offset, 1, ENC_LITTLE_ENDIAN); +} + +void dissect_quality_of_service_req(proto_tree *tree, tvbuff_t *tvb, int offset, int len) +{ + DISSECTOR_ASSERT(len == 4); + DISSECTOR_ASSERT(tvb_reported_length_remaining(tvb, offset) >= 3); + + proto_tree_add_item(tree, hf_lmp_pollintvl, tvb, offset, 2, ENC_LITTLE_ENDIAN); + offset += 2; + + proto_tree_add_item(tree, hf_lmp_nbc, tvb, offset, 1, ENC_LITTLE_ENDIAN); +} + +void dissect_sco_link_req(proto_tree *tree, tvbuff_t *tvb, int offset, int len) +{ + DISSECTOR_ASSERT(len == 7); + DISSECTOR_ASSERT(tvb_reported_length_remaining(tvb, offset) >= 6); + + proto_tree_add_item(tree, hf_lmp_scohdl, tvb, offset, 1, ENC_LITTLE_ENDIAN); + offset += 1; + + proto_tree_add_bitmask(tree, tvb, offset, hf_lmp_timectrl, + ett_lmp_timectrl, timectrl_fields, ENC_LITTLE_ENDIAN); + offset += 1; + + proto_tree_add_item(tree, hf_lmp_dsco, tvb, offset, 1, ENC_LITTLE_ENDIAN); + offset += 1; + + proto_tree_add_item(tree, hf_lmp_tsco, tvb, offset, 1, ENC_LITTLE_ENDIAN); + offset += 1; + + proto_tree_add_item(tree, hf_lmp_scopkt, tvb, offset, 1, ENC_LITTLE_ENDIAN); + offset += 1; + + proto_tree_add_item(tree, hf_lmp_airmode, tvb, offset, 1, ENC_LITTLE_ENDIAN); +} + +void dissect_remove_sco_link_req(proto_tree *tree, tvbuff_t *tvb, int offset, int len) +{ + DISSECTOR_ASSERT(len == 3); + DISSECTOR_ASSERT(tvb_reported_length_remaining(tvb, offset) >= 2); + + proto_tree_add_item(tree, hf_lmp_scohdl, tvb, offset, 1, ENC_LITTLE_ENDIAN); + offset += 1; + + proto_tree_add_item(tree, hf_lmp_err, tvb, offset, 1, ENC_NA); +} + +void dissect_max_slot(proto_tree *tree, tvbuff_t *tvb, int offset, int len) +{ + DISSECTOR_ASSERT(len == 2); + DISSECTOR_ASSERT(tvb_reported_length_remaining(tvb, offset) >= 1); + + proto_tree_add_item(tree, hf_lmp_maxslots, tvb, offset, 1, ENC_LITTLE_ENDIAN); +} + +void dissect_max_slot_req(proto_tree *tree, tvbuff_t *tvb, int offset, int len) +{ + DISSECTOR_ASSERT(len == 2); + DISSECTOR_ASSERT(tvb_reported_length_remaining(tvb, offset) >= 1); + + proto_tree_add_item(tree, hf_lmp_maxslots, tvb, offset, 1, ENC_LITTLE_ENDIAN); +} + +void dissect_timing_accuracy_req(proto_tree *tree, tvbuff_t *tvb, int offset, int len) +{ + DISSECTOR_ASSERT(len == 1); +} + +void dissect_timing_accuracy_res(proto_tree *tree, tvbuff_t *tvb, int offset, int len) +{ + DISSECTOR_ASSERT(len == 3); + DISSECTOR_ASSERT(tvb_reported_length_remaining(tvb, offset) >= 2); + + proto_tree_add_item(tree, hf_lmp_drift, tvb, offset, 1, ENC_LITTLE_ENDIAN); + offset += 1; + + proto_tree_add_item(tree, hf_lmp_jitter, tvb, offset, 1, ENC_LITTLE_ENDIAN); +} + +void dissect_setup_complete(proto_tree *tree, tvbuff_t *tvb, int offset, int len) +{ + DISSECTOR_ASSERT(len == 1); +} + +void dissect_use_semi_permanent_key(proto_tree *tree, tvbuff_t *tvb, int offset, int len) +{ + DISSECTOR_ASSERT(len == 1); +} + +void dissect_host_connection_req(proto_tree *tree, tvbuff_t *tvb, int offset, int len) +{ + DISSECTOR_ASSERT(len == 1); +} + +void dissect_slot_offset(proto_tree *tree, tvbuff_t *tvb, int offset, int len) +{ + DISSECTOR_ASSERT(len == 9); + DISSECTOR_ASSERT(tvb_reported_length_remaining(tvb, offset) >= 8); + + proto_tree_add_item(tree, hf_lmp_slotoffset, tvb, offset, 2, ENC_LITTLE_ENDIAN); + offset += 2; + + proto_tree_add_item(tree, hf_lmp_bdaddr, tvb, offset, 6, ENC_LITTLE_ENDIAN); +} + +void dissect_page_mode_req(proto_tree *tree, tvbuff_t *tvb, int offset, int len) +{ + DISSECTOR_ASSERT(len == 3); + DISSECTOR_ASSERT(tvb_reported_length_remaining(tvb, offset) >= 2); + + proto_tree_add_item(tree, hf_lmp_pagesch, tvb, offset, 1, ENC_LITTLE_ENDIAN); + offset += 1; + + proto_tree_add_item(tree, hf_lmp_pssettings, tvb, offset, 1, ENC_LITTLE_ENDIAN); +} + +void dissect_page_scan_mode_req(proto_tree *tree, tvbuff_t *tvb, int offset, int len) +{ + DISSECTOR_ASSERT(len == 3); + DISSECTOR_ASSERT(tvb_reported_length_remaining(tvb, offset) >= 2); + + proto_tree_add_item(tree, hf_lmp_pagesch, tvb, offset, 1, ENC_LITTLE_ENDIAN); + offset += 1; + + proto_tree_add_item(tree, hf_lmp_pssettings, tvb, offset, 1, ENC_LITTLE_ENDIAN); +} + +void dissect_supervision_timeout(proto_tree *tree, tvbuff_t *tvb, int offset, int len) +{ + DISSECTOR_ASSERT(len == 3); + DISSECTOR_ASSERT(tvb_reported_length_remaining(tvb, offset) >= 2); + + proto_tree_add_item(tree, hf_lmp_suptimeout, tvb, offset, 2, ENC_LITTLE_ENDIAN); +} + +void dissect_test_activate(proto_tree *tree, tvbuff_t *tvb, int offset, int len) +{ + DISSECTOR_ASSERT(len == 1); +} + +void dissect_test_control(proto_tree *tree, tvbuff_t *tvb, int offset, int len) +{ + DISSECTOR_ASSERT(len == 10); + DISSECTOR_ASSERT(tvb_reported_length_remaining(tvb, offset) >= 9); + + proto_tree_add_uint(tree, hf_lmp_testscen, tvb, offset, 1, tvb_get_guint8(tvb, offset) ^ 0x55); + offset += 1; + + proto_tree_add_uint(tree, hf_lmp_hopmode, tvb, offset, 1, tvb_get_guint8(tvb, offset) ^ 0x55); + offset += 1; + + proto_tree_add_uint(tree, hf_lmp_txfreq, tvb, offset, 1, (tvb_get_guint8(tvb, offset) ^ 0x55) + 2402); //MHz + offset += 1; + + proto_tree_add_uint(tree, hf_lmp_rxfreq, tvb, offset, 1, (tvb_get_guint8(tvb, offset) ^ 0x55) + 2402); + offset += 1; + + proto_tree_add_uint(tree, hf_lmp_pcmode, tvb, offset, 1, tvb_get_guint8(tvb, offset) ^ 0x55); + offset += 1; + + proto_tree_add_uint(tree, hf_lmp_pollper, tvb, offset, 1, (tvb_get_guint8(tvb, offset) ^ 0x55) * 1.25); //ms + offset += 1; + + proto_tree_add_uint(tree, hf_lmp_pkttype, tvb, offset, 1, tvb_get_guint8(tvb, offset) ^ 0x55); + offset += 1; + + proto_tree_add_uint(tree, hf_lmp_testlen, tvb, offset, 2, tvb_get_bits16(tvb, offset * 8, 16, ENC_LITTLE_ENDIAN) ^ 0x5555); +} + +void dissect_encryption_key_size_mask_req(proto_tree *tree, tvbuff_t *tvb, int offset, int len) +{ + DISSECTOR_ASSERT(len == 1); +} + +void dissect_encryption_key_size_mask_res(proto_tree *tree, tvbuff_t *tvb, int offset, int len) +{ + DISSECTOR_ASSERT(len == 3); + DISSECTOR_ASSERT(tvb_reported_length_remaining(tvb, offset) >= 2); + + proto_tree_add_item(tree, hf_lmp_ksmask, tvb, offset, 2, ENC_LITTLE_ENDIAN); +} + +void dissect_set_afh(proto_tree *tree, tvbuff_t *tvb, int offset, int len) +{ + DISSECTOR_ASSERT(len == 16); + DISSECTOR_ASSERT(tvb_reported_length_remaining(tvb, offset) >= 15); + + proto_tree_add_item(tree, hf_lmp_afhinst, tvb, offset, 4, ENC_LITTLE_ENDIAN); + offset += 4; + + proto_tree_add_item(tree, hf_lmp_afhmode, tvb, offset, 1, ENC_LITTLE_ENDIAN); + offset += 1; + + proto_tree_add_item(tree, hf_lmp_afhchmap, tvb, offset, 10, ENC_NA); +} + +void dissect_encapsulated_header(proto_tree *tree, tvbuff_t *tvb, int offset, int len) +{ + DISSECTOR_ASSERT(len == 4); + DISSECTOR_ASSERT(tvb_reported_length_remaining(tvb, offset) >= 3); + + proto_tree_add_item(tree, hf_lmp_encmaj, tvb, offset, 1, ENC_LITTLE_ENDIAN); + offset += 1; + + proto_tree_add_item(tree, hf_lmp_encmin, tvb, offset, 1, ENC_LITTLE_ENDIAN); + offset += 1; + + proto_tree_add_item(tree, hf_lmp_enclen, tvb, offset, 1, ENC_LITTLE_ENDIAN); +} + +void dissect_encapsulated_payload(proto_tree *tree, tvbuff_t *tvb, int offset, int len) +{ + DISSECTOR_ASSERT(len == 17); + DISSECTOR_ASSERT(tvb_reported_length_remaining(tvb, offset) >= 16); + + proto_tree_add_item(tree, hf_lmp_encdata, tvb, offset, 16, ENC_NA); +} + +void dissect_simple_pairing_confirm(proto_tree *tree, tvbuff_t *tvb, int offset, int len) +{ + DISSECTOR_ASSERT(len == 17); + DISSECTOR_ASSERT(tvb_reported_length_remaining(tvb, offset) >= 16); + + proto_tree_add_item(tree, hf_lmp_commit, tvb, offset, 16, ENC_NA); +} + +void dissect_simple_pairing_number(proto_tree *tree, tvbuff_t *tvb, int offset, int len) +{ + DISSECTOR_ASSERT(len == 17); + DISSECTOR_ASSERT(tvb_reported_length_remaining(tvb, offset) >= 16); + + proto_tree_add_item(tree, hf_lmp_nonce, tvb, offset, 16, ENC_NA); +} + +void dissect_dhkey_check(proto_tree *tree, tvbuff_t *tvb, int offset, int len) +{ + DISSECTOR_ASSERT(len == 17); + DISSECTOR_ASSERT(tvb_reported_length_remaining(tvb, offset) >= 16); + + proto_tree_add_item(tree, hf_lmp_confirm, tvb, offset, 16, ENC_NA); +} + +/* LMP PDUs with extended opcodes */ + +void dissect_accepted_ext(proto_tree *tree, tvbuff_t *tvb, int offset, int len) +{ + DISSECTOR_ASSERT(len == 4); + DISSECTOR_ASSERT(tvb_reported_length_remaining(tvb, offset) >= 2); + + proto_tree_add_item(tree, hf_lmp_opinre, tvb, offset, 1, ENC_LITTLE_ENDIAN); + offset += 1; + + proto_tree_add_item(tree, hf_lmp_eopinre, tvb, offset, 1, ENC_LITTLE_ENDIAN); +} + +void dissect_not_accepted_ext(proto_tree *tree, tvbuff_t *tvb, int offset, int len) +{ + DISSECTOR_ASSERT(len == 5); + DISSECTOR_ASSERT(tvb_reported_length_remaining(tvb, offset) >= 3); + + proto_tree_add_item(tree, hf_lmp_opinre, tvb, offset, 1, ENC_LITTLE_ENDIAN); + offset += 1; + + proto_tree_add_item(tree, hf_lmp_eopinre, tvb, offset, 1, ENC_LITTLE_ENDIAN); + offset += 1; + + proto_tree_add_item(tree, hf_lmp_err, tvb, offset, 1, ENC_NA); +} + +void dissect_features_req_ext(proto_tree *tree, tvbuff_t *tvb, int offset, int len) +{ + int feat_page = 0; + + DISSECTOR_ASSERT(len == 12); + DISSECTOR_ASSERT(tvb_reported_length_remaining(tvb, offset) >= 10); + + proto_tree_add_item(tree, hf_lmp_fpage, tvb, offset, 1, ENC_LITTLE_ENDIAN); + feat_page = tvb_get_guint8(tvb, offset); + offset += 1; + + proto_tree_add_item(tree, hf_lmp_maxsp, tvb, offset, 1, ENC_LITTLE_ENDIAN); + offset += 1; + + if (feat_page == 1) + { + proto_tree_add_bitmask(tree, tvb, offset, hf_lmp_featuresext, + ett_lmp_featuresext, extfeatures1_fields, ENC_LITTLE_ENDIAN); + } + else + { + proto_tree_add_bitmask(tree, tvb, offset, hf_lmp_featuresext, + ett_lmp_featuresext, extfeatures2_fields, ENC_LITTLE_ENDIAN); + } +} + +void dissect_features_res_ext(proto_tree *tree, tvbuff_t *tvb, int offset, int len) +{ + int feat_page = 0; + DISSECTOR_ASSERT(len == 12); + DISSECTOR_ASSERT(tvb_reported_length_remaining(tvb, offset) >= 10); + + proto_tree_add_item(tree, hf_lmp_fpage, tvb, offset, 1, ENC_LITTLE_ENDIAN); + feat_page = tvb_get_guint8(tvb, offset); + offset += 1; + + proto_tree_add_item(tree, hf_lmp_maxsp, tvb, offset, 1, ENC_LITTLE_ENDIAN); + offset += 1; + + if (feat_page == 1) + { + proto_tree_add_bitmask(tree, tvb, offset, hf_lmp_featuresext, + ett_lmp_featuresext, extfeatures1_fields, ENC_LITTLE_ENDIAN); + } + else + { + proto_tree_add_bitmask(tree, tvb, offset, hf_lmp_featuresext, + ett_lmp_featuresext, extfeatures2_fields, ENC_LITTLE_ENDIAN); + } +} + +void dissect_packet_type_table_req(proto_tree *tree, tvbuff_t *tvb, int offset, int len) +{ + DISSECTOR_ASSERT(len == 3); + DISSECTOR_ASSERT(tvb_reported_length_remaining(tvb, offset) >= 1); + + proto_tree_add_item(tree, hf_lmp_pkttypetbl, tvb, offset, 1, ENC_LITTLE_ENDIAN); +} + +void dissect_esco_link_req(proto_tree *tree, tvbuff_t *tvb, int offset, int len) +{ + DISSECTOR_ASSERT(len == 16); + DISSECTOR_ASSERT(tvb_reported_length_remaining(tvb, offset) >= 14); + + proto_tree_add_item(tree, hf_lmp_escohdl, tvb, offset, 1, ENC_LITTLE_ENDIAN); + offset += 1; + + proto_tree_add_item(tree, hf_lmp_escoltaddr, tvb, offset, 1, ENC_LITTLE_ENDIAN); + offset += 1; + + proto_tree_add_bitmask(tree, tvb, offset, hf_lmp_timectrl, + ett_lmp_timectrl, timectrl_fields, ENC_LITTLE_ENDIAN); + offset += 1; + + proto_tree_add_item(tree, hf_lmp_desco, tvb, offset, 1, ENC_LITTLE_ENDIAN); + offset += 1; + + proto_tree_add_item(tree, hf_lmp_tesco, tvb, offset, 1, ENC_LITTLE_ENDIAN); + offset += 1; + + proto_tree_add_item(tree, hf_lmp_wesco, tvb, offset, 1, ENC_LITTLE_ENDIAN); + offset += 1; + + proto_tree_add_item(tree, hf_lmp_escotypems, tvb, offset, 1, ENC_NA); + offset += 1; + + proto_tree_add_item(tree, hf_lmp_escotypesm, tvb, offset, 1, ENC_NA); + offset += 1; + + proto_tree_add_item(tree, hf_lmp_escolenms, tvb, offset, 2, ENC_LITTLE_ENDIAN); + offset += 2; + + proto_tree_add_item(tree, hf_lmp_escolensm, tvb, offset, 2, ENC_LITTLE_ENDIAN); + offset += 2; + + proto_tree_add_item(tree, hf_lmp_airmode, tvb, offset, 1, ENC_LITTLE_ENDIAN); + offset += 1; + + proto_tree_add_item(tree, hf_lmp_negstate, tvb, offset, 1, ENC_LITTLE_ENDIAN); +} + +void dissect_remove_esco_link_req(proto_tree *tree, tvbuff_t *tvb, int offset, int len) +{ + DISSECTOR_ASSERT(len == 4); + DISSECTOR_ASSERT(tvb_reported_length_remaining(tvb, offset) >= 2); + + proto_tree_add_item(tree, hf_lmp_escohdl, tvb, offset, 1, ENC_LITTLE_ENDIAN); + offset += 1; + + proto_tree_add_item(tree, hf_lmp_err, tvb, offset, 1, ENC_NA); +} + +void dissect_channel_classification_req(proto_tree *tree, tvbuff_t *tvb, int offset, int len) +{ + DISSECTOR_ASSERT(len == 7); + DISSECTOR_ASSERT(tvb_reported_length_remaining(tvb, offset) >= 5); + + proto_tree_add_item(tree, hf_lmp_afhrptmode, tvb, offset, 1, ENC_LITTLE_ENDIAN); + offset += 1; + + proto_tree_add_item(tree, hf_lmp_afhminintvl, tvb, offset, 2, ENC_LITTLE_ENDIAN); + offset += 2; + + proto_tree_add_item(tree, hf_lmp_afhmaxintvl, tvb, offset, 2, ENC_LITTLE_ENDIAN); +} + +void dissect_channel_classification(proto_tree *tree, tvbuff_t *tvb, int offset, int len) +{ + DISSECTOR_ASSERT(len == 12); + DISSECTOR_ASSERT(tvb_reported_length_remaining(tvb, offset) >= 10); + + proto_tree_add_item(tree, hf_lmp_afhclass, tvb, offset, 10, ENC_NA); +} + +void dissect_sniff_subrating_req(proto_tree *tree, tvbuff_t *tvb, int offset, int len) +{ + DISSECTOR_ASSERT(len == 9); + DISSECTOR_ASSERT(tvb_reported_length_remaining(tvb, offset) >= 7); + + proto_tree_add_item(tree, hf_lmp_maxss, tvb, offset, 1, ENC_LITTLE_ENDIAN); + offset += 1; + + proto_tree_add_item(tree, hf_lmp_minsmt, tvb, offset, 2, ENC_LITTLE_ENDIAN); + offset += 2; + + proto_tree_add_item(tree, hf_lmp_sniffsi, tvb, offset, 2, ENC_LITTLE_ENDIAN); +} + +void dissect_sniff_subrating_res(proto_tree *tree, tvbuff_t *tvb, int offset, int len) +{ + DISSECTOR_ASSERT(len == 9); + DISSECTOR_ASSERT(tvb_reported_length_remaining(tvb, offset) >= 7); + + proto_tree_add_item(tree, hf_lmp_maxss, tvb, offset, 1, ENC_LITTLE_ENDIAN); + offset += 1; + + proto_tree_add_item(tree, hf_lmp_minsmt, tvb, offset, 2, ENC_LITTLE_ENDIAN); + offset += 2; + + proto_tree_add_item(tree, hf_lmp_sniffsi, tvb, offset, 2, ENC_LITTLE_ENDIAN); +} + +void dissect_pause_encryption_req(proto_tree *tree, tvbuff_t *tvb, int offset, int len) +{ + DISSECTOR_ASSERT(len == 2); +} + +void dissect_resume_encryption_req(proto_tree *tree, tvbuff_t *tvb, int offset, int len) +{ + DISSECTOR_ASSERT(len == 2); +} + +void dissect_io_capability_req(proto_tree *tree, tvbuff_t *tvb, int offset, int len) +{ + DISSECTOR_ASSERT(len == 5); + DISSECTOR_ASSERT(tvb_reported_length_remaining(tvb, offset) >= 3); + + proto_tree_add_item(tree, hf_lmp_iocaps, tvb, offset, 1, ENC_LITTLE_ENDIAN); + offset += 1; + + proto_tree_add_item(tree, hf_lmp_oobauthdata, tvb, offset, 1, ENC_LITTLE_ENDIAN); + offset += 1; + + proto_tree_add_item(tree, hf_lmp_authreqs, tvb, offset, 1, ENC_LITTLE_ENDIAN); +} + +void dissect_io_capability_res(proto_tree *tree, tvbuff_t *tvb, int offset, int len) +{ + DISSECTOR_ASSERT(len == 5); + DISSECTOR_ASSERT(tvb_reported_length_remaining(tvb, offset) >= 3); + + proto_tree_add_item(tree, hf_lmp_iocaps, tvb, offset, 1, ENC_LITTLE_ENDIAN); + offset += 1; + + proto_tree_add_item(tree, hf_lmp_oobauthdata, tvb, offset, 1, ENC_LITTLE_ENDIAN); + offset += 1; + + proto_tree_add_item(tree, hf_lmp_authreqs, tvb, offset, 1, ENC_LITTLE_ENDIAN); +} + +void dissect_numeric_comparison_failed(proto_tree *tree, tvbuff_t *tvb, int offset, int len) +{ + DISSECTOR_ASSERT(len == 2); +} + +void dissect_passkey_failed(proto_tree *tree, tvbuff_t *tvb, int offset, int len) +{ + DISSECTOR_ASSERT(len == 2); +} + +void dissect_oob_failed(proto_tree *tree, tvbuff_t *tvb, int offset, int len) +{ + DISSECTOR_ASSERT(len == 2); +} + +void dissect_keypress_notification(proto_tree *tree, tvbuff_t *tvb, int offset, int len) +{ + DISSECTOR_ASSERT(len == 3); + DISSECTOR_ASSERT(tvb_reported_length_remaining(tvb, offset) >= 1); + + proto_tree_add_item(tree, hf_lmp_nottype, tvb, offset, 1, ENC_LITTLE_ENDIAN); +} + +void dissect_power_control_req(proto_tree *tree, tvbuff_t *tvb, int offset, int len) +{ + DISSECTOR_ASSERT(len == 3); + DISSECTOR_ASSERT(tvb_reported_length_remaining(tvb, offset) >= 1); + + proto_tree_add_item(tree, hf_lmp_pwradjreq, tvb, offset, 1, ENC_LITTLE_ENDIAN); +} + +void dissect_power_control_res(proto_tree *tree, tvbuff_t *tvb, int offset, int len) +{ + proto_item *pa_item; + proto_tree *pa_tree; + + DISSECTOR_ASSERT(len == 3); + DISSECTOR_ASSERT(tvb_reported_length_remaining(tvb, offset) >= 1); + + pa_item = proto_tree_add_item(tree, hf_lmp_pwradjres, tvb, offset, 1, ENC_LITTLE_ENDIAN); + pa_tree = proto_item_add_subtree(pa_item, ett_lmp_pwradjres); + + proto_tree_add_item(pa_tree, hf_lmp_pwradj_gfsk, tvb, offset, 1, ENC_LITTLE_ENDIAN); + proto_tree_add_item(pa_tree, hf_lmp_pwradj_dqpsk, tvb, offset, 1, ENC_LITTLE_ENDIAN); + proto_tree_add_item(pa_tree, hf_lmp_pwradj_8dpsk, tvb, offset, 1, ENC_LITTLE_ENDIAN); +} + +void dissect_ping_req(proto_tree *tree, tvbuff_t *tvb, int offset, int len) +{ + DISSECTOR_ASSERT(len == 2); +} + +void dissect_ping_res(proto_tree *tree, tvbuff_t *tvb, int offset, int len) +{ + DISSECTOR_ASSERT(len == 2); +} + +/* Link Manager Protocol */ +static int +dissect_btbrlmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) +{ + proto_item *lmp_item; + proto_tree *lmp_tree; + int offset; + int len; + int op; /* opcode */ + int eop; /* extended opcode */ + + // struct timespec start_time; + // struct timespec end_time; + // clock_gettime(CLOCK_MONOTONIC, &start_time); + + offset = 0; + len = tvb_reported_length(tvb); + + DISSECTOR_ASSERT(len >= 1); + + /* make entries in protocol column and info column on summary display */ + col_set_str(pinfo->cinfo, COL_PROTOCOL, "LMP"); + + /* clear the info column first just in case of type fetching failure. */ + col_clear(pinfo->cinfo, COL_INFO); + // printf("pinfo->p2p_dir:%d\n",pinfo->p2p_dir); + switch (pinfo->p2p_dir) + { + case P2P_DIR_SENT: + col_set_str(pinfo->cinfo, COL_INFO, "TX --> "); + break; + case P2P_DIR_RECV: + col_set_str(pinfo->cinfo, COL_INFO, "RX <-- "); + break; + default: + break; + } + + op = tvb_get_guint8(tvb, offset) >> 1; + + if (op == LMP_ESCAPE_4) + { + DISSECTOR_ASSERT(len >= 2); + + eop = tvb_get_guint8(tvb, offset + 1); + + col_append_str(pinfo->cinfo, COL_INFO, val_to_str(eop, ext_opcode, "Unknown Extended Opcode (%d)")); + } + else + { + col_append_str(pinfo->cinfo, COL_INFO, val_to_str(op, opcode, "Unknown Opcode (%d)")); + } + + /* see if we are being asked for details */ + if (!tree) + return tvb_reported_length(tvb); + + lmp_item = proto_tree_add_item(tree, proto_btbrlmp, tvb, offset, -1, ENC_NA); + lmp_tree = proto_item_add_subtree(lmp_item, ett_lmp); + + proto_tree_add_item(lmp_tree, hf_lmp_tid, tvb, offset, 1, ENC_LITTLE_ENDIAN); + + proto_tree_add_item(lmp_tree, hf_lmp_op, tvb, offset, 1, ENC_LITTLE_ENDIAN); + offset += 1; + + switch (op) + { + case LMP_NAME_REQ: + dissect_name_req(lmp_tree, tvb, offset, len); + break; + case LMP_NAME_RES: + dissect_name_res(lmp_tree, tvb, offset, len); + break; + case LMP_ACCEPTED: + dissect_accepted(lmp_tree, tvb, offset, len); + break; + case LMP_NOT_ACCEPTED: + dissect_not_accepted(lmp_tree, tvb, offset, len); + break; + case LMP_CLKOFFSET_REQ: + dissect_clkoffset_req(lmp_tree, tvb, offset, len); + break; + case LMP_CLKOFFSET_RES: + dissect_clkoffset_res(lmp_tree, tvb, offset, len); + break; + case LMP_DETACH: + dissect_detach(lmp_tree, tvb, offset, len); + break; + case LMP_IN_RAND: + dissect_in_rand(lmp_tree, tvb, offset, len); + break; + case LMP_COMB_KEY: + dissect_comb_key(lmp_tree, tvb, offset, len); + break; + case LMP_UNIT_KEY: + dissect_unit_key(lmp_tree, tvb, offset, len); + break; + case LMP_AU_RAND: + dissect_au_rand(lmp_tree, tvb, offset, len); + break; + case LMP_SRES: + dissect_sres(lmp_tree, tvb, offset, len); + break; + case LMP_TEMP_RAND: + dissect_temp_rand(lmp_tree, tvb, offset, len); + break; + case LMP_TEMP_KEY: + dissect_temp_key(lmp_tree, tvb, offset, len); + break; + case LMP_ENCRYPTION_MODE_REQ: + dissect_encryption_mode_req(lmp_tree, tvb, offset, len); + break; + case LMP_ENCRYPTION_KEY_SIZE_REQ: + dissect_encryption_key_size_req(lmp_tree, tvb, offset, len); + break; + case LMP_START_ENCRYPTION_REQ: + dissect_start_encryption_req(lmp_tree, tvb, offset, len); + break; + case LMP_STOP_ENCRYPTION_REQ: + dissect_stop_encryption_req(lmp_tree, tvb, offset, len); + break; + case LMP_SWITCH_REQ: + dissect_switch_req(lmp_tree, tvb, offset, len); + break; + case LMP_HOLD: + dissect_hold(lmp_tree, tvb, offset, len); + break; + case LMP_HOLD_REQ: + dissect_hold_req(lmp_tree, tvb, offset, len); + break; + case LMP_SNIFF_REQ: + dissect_sniff_req(lmp_tree, tvb, offset, len); + break; + case LMP_UNSNIFF_REQ: + dissect_unsniff_req(lmp_tree, tvb, offset, len); + break; + case LMP_PARK_REQ: + dissect_park_req(lmp_tree, tvb, offset, len); + break; + case LMP_SET_BROADCAST_SCAN_WINDOW: + dissect_set_broadcast_scan_window(lmp_tree, tvb, offset, len); + break; + case LMP_MODIFY_BEACON: + dissect_modify_beacon(lmp_tree, tvb, offset, len); + break; + case LMP_UNPARK_BD_ADDR_REQ: + dissect_unpark_bd_addr_req(lmp_tree, tvb, offset, len); + break; + case LMP_UNPARK_PM_ADDR_REQ: + dissect_unpark_pm_addr_req(lmp_tree, tvb, offset, len); + break; + case LMP_INCR_POWER_REQ: + dissect_incr_power_req(lmp_tree, tvb, offset, len); + break; + case LMP_DECR_POWER_REQ: + dissect_decr_power_req(lmp_tree, tvb, offset, len); + break; + case LMP_MAX_POWER: + dissect_max_power(lmp_tree, tvb, offset, len); + break; + case LMP_MIN_POWER: + dissect_min_power(lmp_tree, tvb, offset, len); + break; + case LMP_AUTO_RATE: + dissect_auto_rate(lmp_tree, tvb, offset, len); + break; + case LMP_PREFERRED_RATE: + dissect_preferred_rate(lmp_tree, tvb, offset, len); + break; + case LMP_VERSION_REQ: + dissect_version_req(lmp_tree, tvb, offset, len); + break; + case LMP_VERSION_RES: + dissect_version_res(lmp_tree, tvb, offset, len); + break; + case LMP_FEATURES_REQ: + dissect_features_req(lmp_tree, tvb, offset, len); + break; + case LMP_FEATURES_RES: + dissect_features_res(lmp_tree, tvb, offset, len); + break; + case LMP_QUALITY_OF_SERVICE: + dissect_quality_of_service(lmp_tree, tvb, offset, len); + break; + case LMP_QUALITY_OF_SERVICE_REQ: + dissect_quality_of_service_req(lmp_tree, tvb, offset, len); + break; + case LMP_SCO_LINK_REQ: + dissect_sco_link_req(lmp_tree, tvb, offset, len); + break; + case LMP_REMOVE_SCO_LINK_REQ: + dissect_remove_sco_link_req(lmp_tree, tvb, offset, len); + break; + case LMP_MAX_SLOT: + dissect_max_slot(lmp_tree, tvb, offset, len); + break; + case LMP_MAX_SLOT_REQ: + dissect_max_slot_req(lmp_tree, tvb, offset, len); + break; + case LMP_TIMING_ACCURACY_REQ: + dissect_timing_accuracy_req(lmp_tree, tvb, offset, len); + break; + case LMP_TIMING_ACCURACY_RES: + dissect_timing_accuracy_res(lmp_tree, tvb, offset, len); + break; + case LMP_SETUP_COMPLETE: + dissect_setup_complete(lmp_tree, tvb, offset, len); + break; + case LMP_USE_SEMI_PERMANENT_KEY: + dissect_use_semi_permanent_key(lmp_tree, tvb, offset, len); + break; + case LMP_HOST_CONNECTION_REQ: + dissect_host_connection_req(lmp_tree, tvb, offset, len); + break; + case LMP_SLOT_OFFSET: + dissect_slot_offset(lmp_tree, tvb, offset, len); + break; + case LMP_PAGE_MODE_REQ: + dissect_page_mode_req(lmp_tree, tvb, offset, len); + break; + case LMP_PAGE_SCAN_MODE_REQ: + dissect_page_scan_mode_req(lmp_tree, tvb, offset, len); + break; + case LMP_SUPERVISION_TIMEOUT: + dissect_supervision_timeout(lmp_tree, tvb, offset, len); + break; + case LMP_TEST_ACTIVATE: + dissect_test_activate(lmp_tree, tvb, offset, len); + break; + case LMP_TEST_CONTROL: + dissect_test_control(lmp_tree, tvb, offset, len); + break; + case LMP_ENCRYPTION_KEY_SIZE_MASK_REQ: + dissect_encryption_key_size_mask_req(lmp_tree, tvb, offset, len); + break; + case LMP_ENCRYPTION_KEY_SIZE_MASK_RES: + dissect_encryption_key_size_mask_res(lmp_tree, tvb, offset, len); + break; + case LMP_SET_AFH: + dissect_set_afh(lmp_tree, tvb, offset, len); + break; + case LMP_ENCAPSULATED_HEADER: + dissect_encapsulated_header(lmp_tree, tvb, offset, len); + break; + case LMP_ENCAPSULATED_PAYLOAD: + dissect_encapsulated_payload(lmp_tree, tvb, offset, len); + break; + case LMP_SIMPLE_PAIRING_CONFIRM: + dissect_simple_pairing_confirm(lmp_tree, tvb, offset, len); + break; + case LMP_SIMPLE_PAIRING_NUMBER: + dissect_simple_pairing_number(lmp_tree, tvb, offset, len); + break; + case LMP_DHKEY_CHECK: + dissect_dhkey_check(lmp_tree, tvb, offset, len); + break; + /* + If the initial 7 bits + of the opcode have one of the special escape values 124-127 then an + additional byte of opcode is located in the second byte of the payload + */ + case LMP_ESCAPE_1: + break; + case LMP_ESCAPE_2: + break; + case LMP_ESCAPE_3: + break; + case LMP_ESCAPE_4: + /* extended opcode */ + DISSECTOR_ASSERT(len >= 2); + proto_tree_add_item(lmp_tree, hf_lmp_eop, tvb, offset, 1, ENC_NA); + offset += 1; + + switch (eop) + { + case LMP_ACCEPTED_EXT: + dissect_accepted_ext(lmp_tree, tvb, offset, len); + break; + case LMP_NOT_ACCEPTED_EXT: + dissect_not_accepted_ext(lmp_tree, tvb, offset, len); + break; + case LMP_FEATURES_REQ_EXT: + dissect_features_req_ext(lmp_tree, tvb, offset, len); + break; + case LMP_FEATURES_RES_EXT: + dissect_features_res_ext(lmp_tree, tvb, offset, len); + break; + case LMP_PACKET_TYPE_TABLE_REQ: + dissect_packet_type_table_req(lmp_tree, tvb, offset, len); + break; + case LMP_ESCO_LINK_REQ: + dissect_esco_link_req(lmp_tree, tvb, offset, len); + break; + case LMP_REMOVE_ESCO_LINK_REQ: + dissect_remove_esco_link_req(lmp_tree, tvb, offset, len); + break; + case LMP_CHANNEL_CLASSIFICATION_REQ: + dissect_channel_classification_req(lmp_tree, tvb, offset, len); + break; + case LMP_CHANNEL_CLASSIFICATION: + dissect_channel_classification(lmp_tree, tvb, offset, len); + break; + case LMP_SNIFF_SUBRATING_REQ: + dissect_sniff_subrating_req(lmp_tree, tvb, offset, len); + break; + case LMP_SNIFF_SUBRATING_RES: + dissect_sniff_subrating_res(lmp_tree, tvb, offset, len); + break; + case LMP_PAUSE_ENCRYPTION_REQ: + dissect_pause_encryption_req(lmp_tree, tvb, offset, len); + break; + case LMP_RESUME_ENCRYPTION_REQ: + dissect_resume_encryption_req(lmp_tree, tvb, offset, len); + break; + case LMP_IO_CAPABILITY_REQ: + dissect_io_capability_req(lmp_tree, tvb, offset, len); + break; + case LMP_IO_CAPABILITY_RES: + dissect_io_capability_res(lmp_tree, tvb, offset, len); + break; + case LMP_NUMERIC_COMPARISON_FAILED: + dissect_numeric_comparison_failed(lmp_tree, tvb, offset, len); + break; + case LMP_PASSKEY_FAILED: + dissect_passkey_failed(lmp_tree, tvb, offset, len); + break; + case LMP_OOB_FAILED: + dissect_oob_failed(lmp_tree, tvb, offset, len); + break; + case LMP_KEYPRESS_NOTIFICATION: + dissect_keypress_notification(lmp_tree, tvb, offset, len); + break; + case LMP_POWER_CONTROL_REQ: + dissect_power_control_req(lmp_tree, tvb, offset, len); + break; + case LMP_POWER_CONTROL_RES: + dissect_power_control_res(lmp_tree, tvb, offset, len); + break; + case LMP_PING_REQ: + dissect_ping_req(lmp_tree, tvb, offset, len); + break; + case LMP_PING_RES: + dissect_ping_res(lmp_tree, tvb, offset, len); + break; + default: + break; + } + default: + break; + } + + // clock_gettime(CLOCK_MONOTONIC, &end_time); + // long measured_latency_ns = ((end_time.tv_sec - start_time.tv_sec) * 1000000000UL) + (end_time.tv_nsec - start_time.tv_nsec) / 1000; + // printf("lmp=%ld\n", measured_latency_ns); + + /* Return the amount of data this dissector was able to dissect */ + return tvb_reported_length(tvb); +}; + +/* register the protocol with Wireshark */ +void proto_register_btbrlmp(void) +{ + + /* list of fields */ + static hf_register_info hf[] = { + {&hf_lmp_accscheme, + {"Access Scheme", "btbrlmp.accscheme", + FT_UINT8, BASE_DEC, VALS(access_scheme), 0xf0, + NULL, HFILL}}, + {&hf_lmp_afhchmap, + {"AFH Channel Map", "btbrlmp.afhchmap", + /* could break out individual channels but long */ + FT_BYTES, BASE_NONE, NULL, 0x0, + "Adaptive Frequency Hopping Channel Map", HFILL}}, + {&hf_lmp_afhclass, + {"AFH Channel Classification", "btbrlmp.afhclass", + /* could break out individual channels but long */ + FT_BYTES, BASE_NONE, NULL, 0x0, + "Adaptive Frequency Hopping Channel Classification", HFILL}}, + {&hf_lmp_afhinst, + {"AFH Instant", "btbrlmp.afhinst", + FT_UINT32, BASE_HEX, NULL, 0x0, + "Adaptive Frequency Hopping Instant (slot)", HFILL}}, + {&hf_lmp_afhmaxintvl, + {"AFH Max Interval", "btbrlmp.maxintvl", + FT_UINT16, BASE_HEX, NULL, 0x0, + "Adaptive Maximum Interval in slots", HFILL}}, + {&hf_lmp_afhminintvl, + {"AFH Min Interval", "btbrlmp.minintvl", + FT_UINT16, BASE_HEX, NULL, 0x0, + "Adaptive Minimum Interval in slots", HFILL}}, + {&hf_lmp_afhmode, + {"AFH Mode", "btbrlmp.afhmode", + FT_UINT8, BASE_DEC, VALS(afh_mode), 0x0, + "Adaptive Frequency Hopping Mode", HFILL}}, + {&hf_lmp_afhrptmode, + {"AFH Reporting Mode", "btbrlmp.afhrptmode", + FT_UINT8, BASE_DEC, VALS(afh_reporting_mode), 0x0, + "Adaptive Frequency Hopping Reporting Mode", HFILL}}, + {&hf_lmp_airmode, + {"Air Mode", "btbrlmp.airmode", + FT_UINT8, BASE_HEX, VALS(air_mode), 0x0, + NULL, HFILL}}, + {&hf_lmp_araddr, + {"AR_ADDR", "btbrlmp.araddr", + FT_UINT8, BASE_HEX, NULL, 0xfe, + NULL, HFILL}}, + {&hf_lmp_authreqs, + {"Authentication Requirements", "btbrlmp.authreqs", + FT_UINT8, BASE_HEX, VALS(auth_requirements), 0x00, + NULL, HFILL}}, + {&hf_lmp_authres, + {"Authentication Response", "btbrlmp.authres", + FT_BYTES, BASE_NONE, NULL, 0x0, + NULL, HFILL}}, + {&hf_lmp_bdaddr, + {"BD_ADDR", "btbrlmp.bdaddr", + FT_UINT64, BASE_HEX, NULL, 0x0000ffffffffffff, + NULL, HFILL}}, + {&hf_lmp_bdaddr1, + {"BD_ADDR 1", "btbrlmp.bdaddr", + FT_UINT64, BASE_HEX, NULL, 0x0000ffffffffffff, + NULL, HFILL}}, + {&hf_lmp_bdaddr2, + {"BD_ADDR2", "btbrlmp.bdaddr", + FT_UINT64, BASE_HEX, NULL, 0x0000ffffffffffff, + "BD_ADDR 2", HFILL}}, + {&hf_lmp_bsw, + {"Broadcast Scan Window", "btbrlmp.bsw", + FT_UINT16, BASE_HEX, NULL, 0x0, + "Broadcast Scan Window in slots", HFILL}}, + {&hf_lmp_clkoffset, + {"Clock Offset", "btbrlmp.clkoffset", + FT_UINT16, BASE_DEC, NULL, 0x0, + "Clock Offset in units of 1.25 ms", HFILL}}, + {&hf_lmp_commit, + {"Commitment Value", "btbrlmp.commit", + FT_BYTES, BASE_NONE, NULL, 0x0, + NULL, HFILL}}, + {&hf_lmp_confirm, + {"Confirmation Value", "btbrlmp.confirm", + FT_BYTES, BASE_NONE, NULL, 0x0, + NULL, HFILL}}, + {&hf_lmp_compid, + {"Company ID", "btbrlmp.compid", + FT_UINT16, BASE_DEC, VALS(compid), 0x0, + NULL, HFILL}}, + {&hf_lmp_cryptmode, + {"Encryption Mode", "btbrlmp.cryptmode", + FT_UINT8, BASE_DEC, VALS(encryption_mode), 0x0, + NULL, HFILL}}, + {&hf_lmp_daccess, + {"Daccess", "btbrlmp.daccess", + FT_UINT8, BASE_HEX, NULL, 0x0, + "Daccess in slots", HFILL}}, + {&hf_lmp_db, + {"Db", "btbrlmp.db", + FT_UINT16, BASE_HEX, NULL, 0x0, + "Db in slots", HFILL}}, + {&hf_lmp_dbsleep, + {"Dbsleep", "btbrlmp.dbsleep", + FT_UINT8, BASE_HEX, NULL, 0x0, + NULL, HFILL}}, + {&hf_lmp_deltab, + {"Deltab", "btbrlmp.deltab", + FT_UINT8, BASE_HEX, NULL, 0x0, + "Deltab in slots", HFILL}}, + {&hf_lmp_desco, + {"Desco", "btbrlmp.desco", + FT_UINT8, BASE_HEX, NULL, 0x0, + "Desco in slots", HFILL}}, + {&hf_lmp_drift, + {"Drift", "btbrlmp.drift", + FT_UINT8, BASE_DEC, NULL, 0x0, + "Drift in ppm", HFILL}}, + {&hf_lmp_dsco, + {"Dsco", "btbrlmp.dsco", + FT_UINT8, BASE_HEX, NULL, 0x0, + "Dsco in slots", HFILL}}, + {&hf_lmp_dsniff, + {"Dsniff", "btbrlmp.dsniff", + FT_UINT16, BASE_HEX, NULL, 0x0, + "Dsniff in slots", HFILL}}, + {&hf_lmp_encdata, + {"Encapsulated Data", "btbrlmp.encdata", + FT_BYTES, BASE_NONE, NULL, 0x0, + NULL, HFILL}}, + {&hf_lmp_enclen, + {"Encapsulated Length", "btbrlmp.enclen", + FT_UINT8, BASE_DEC, NULL, 0x0, + NULL, HFILL}}, + {&hf_lmp_encmaj, + {"Encapsulated Major Type", "btbrlmp.encmaj", + FT_UINT8, BASE_DEC, NULL, 0x0, + NULL, HFILL}}, + {&hf_lmp_encmin, + {"Encapsulated Minor Type", "btbrlmp.encmin", + FT_UINT8, BASE_DEC, NULL, 0x0, + NULL, HFILL}}, + {&hf_lmp_eop, + {"Extended Opcode", "btbrlmp.eop", + FT_UINT8, BASE_DEC, VALS(ext_opcode), 0x0, + NULL, HFILL}}, + {&hf_lmp_eopinre, + {"In Response To", "btbrlmp.eopinre", + FT_UINT8, BASE_DEC, VALS(ext_opcode), 0x0, + "Extended Opcode this is in response to", HFILL}}, + {&hf_lmp_escolenms, + {"Packet Length M -> S", "btbrlmp.escolenms", + FT_UINT16, BASE_DEC, NULL, 0x0, + "Packet Length in bytes Master to Slave", HFILL}}, + {&hf_lmp_escolensm, + {"Packet Length S -> M", "btbrlmp.escolensm", + FT_UINT16, BASE_DEC, NULL, 0x0, + "Packet Length in bytes Slave to Master", HFILL}}, + {&hf_lmp_escotypems, + {"eSCO Packet Type M -> S", "btbrlmp.escotypems", + FT_UINT8, BASE_HEX, VALS(esco_packet_type), 0x0, + "eSCO Packet Type Master to Slave", HFILL}}, + {&hf_lmp_escotypesm, + {"eSCO Packet Type S -> M", "btbrlmp.escotypesm", + FT_UINT8, BASE_HEX, VALS(esco_packet_type), 0x0, + "eSCO Packet Type Slave to Master", HFILL}}, + {&hf_lmp_err, + {"Error Code", "btbrlmp.err", + FT_UINT8, BASE_HEX, VALS(error_code), 0x0, + NULL, HFILL}}, + {&hf_lmp_escohdl, + {"eSCO Handle", "btbrlmp.escohdl", + FT_UINT8, BASE_HEX, NULL, 0x0, + NULL, HFILL}}, + {&hf_lmp_escoltaddr, + {"eSCO LT_ADDR", "btbrlmp.escoltaddr", + FT_UINT8, BASE_HEX, NULL, 0x0, + "eSCO Logical Transport Address", HFILL}}, + {&hf_lmp_features, + {"Features", "btbrlmp.features", + FT_UINT64, BASE_HEX, NULL, 0x0, + "Feature Mask", HFILL}}, + {&hf_lmp_feat_3slot, + {"3 slot packets", "btbrlmp.feat.3slot", + FT_BOOLEAN, 64, NULL, 0x1, + NULL, HFILL}}, + {&hf_lmp_feat_5slot, + {"5 slot packets", "btbrlmp.feat.5slot", + FT_BOOLEAN, 64, NULL, 0x1 << 1, + NULL, HFILL}}, + {&hf_lmp_feat_enc, + {"Encryption", "btbrlmp.feat.enc", + FT_BOOLEAN, 64, NULL, 0x1 << 2, + NULL, HFILL}}, + {&hf_lmp_feat_slotoff, + {"Slot offset", "btbrlmp.feat.slotoff", + FT_BOOLEAN, 64, NULL, 0x1 << 3, + NULL, HFILL}}, + {&hf_lmp_feat_timacc, + {"Timing accuracy", "btbrlmp.feat.timacc", + FT_BOOLEAN, 64, NULL, 0x1 << 4, + NULL, HFILL}}, + {&hf_lmp_feat_rolesw, + {"Role switch", "btbrlmp.feat.rolesw", + FT_BOOLEAN, 64, NULL, 0x1 << 5, + NULL, HFILL}}, + {&hf_lmp_feat_holdmo, + {"Hold mode", "btbrlmp.feat.holdmo", + FT_BOOLEAN, 64, NULL, 0x1 << 6, + NULL, HFILL}}, + {&hf_lmp_feat_sniffmo, + {"Sniff mode", "btbrlmp.feat.sniffmo", + FT_BOOLEAN, 64, NULL, 0x1 << 7, + NULL, HFILL}}, + {&hf_lmp_feat_res0, + {"Reserved", "btbrlmp.feat.res0", + FT_BOOLEAN, 64, NULL, 0x1 << 8, + NULL, HFILL}}, + {&hf_lmp_feat_pwrctlreq, + {"Power control requests", "btbrlmp.feat.pwrctlreq", + FT_BOOLEAN, 64, NULL, 0x1 << 9, + NULL, HFILL}}, + {&hf_lmp_feat_cqddr, + {"Channel quality driven data rate (CQDDR)", "btbrlmp.feat.cqddr", + FT_BOOLEAN, 64, NULL, 0x1 << 10, + NULL, HFILL}}, + {&hf_lmp_feat_sco, + {"SCO link", "btbrlmp.feat.sco", + FT_BOOLEAN, 64, NULL, 0x1 << 11, + NULL, HFILL}}, + {&hf_lmp_feat_hv2, + {"HV2 packets", "btbrlmp.feat.hv2", + FT_BOOLEAN, 64, NULL, 0x1 << 12, + NULL, HFILL}}, + {&hf_lmp_feat_hv3, + {"HV3 packets", "btbrlmp.feat.hv3", + FT_BOOLEAN, 64, NULL, 0x1 << 13, + NULL, HFILL}}, + {&hf_lmp_feat_mulaw, + {"u-law log synchronous data", "btbrlmp.feat.mulaw", + FT_BOOLEAN, 64, NULL, 0x1 << 14, + NULL, HFILL}}, + {&hf_lmp_feat_alaw, + {"A-law log synchronous data", "btbrlmp.feat.alaw", + FT_BOOLEAN, 64, NULL, 0x1 << 15, + NULL, HFILL}}, + {&hf_lmp_feat_cvsd, + {"CVSD synchronous data", "btbrlmp.feat.cvsd", + FT_BOOLEAN, 64, NULL, 0x1 << 16, + NULL, HFILL}}, + {&hf_lmp_feat_pagneg, + {"Paging parameter negotiation", "btbrlmp.feat.pagneg", + FT_BOOLEAN, 64, NULL, 0x1 << 17, + NULL, HFILL}}, + {&hf_lmp_feat_pwrctl, + {"Power control", "btbrlmp.feat.pwrctl", + FT_BOOLEAN, 64, NULL, 0x1 << 18, + NULL, HFILL}}, + {&hf_lmp_feat_transsync, + {"Transparent synchronous data", "btbrlmp.feat.transsync", + FT_BOOLEAN, 64, NULL, 0x1 << 19, + NULL, HFILL}}, + {&hf_lmp_feat_flowctl1, + {"Flow control lag (least significant bit)", "btbrlmp.feat.flowctl1", + FT_BOOLEAN, 64, NULL, 0x1 << 20, + NULL, HFILL}}, + {&hf_lmp_feat_flowctl2, + {"Flow control lag (middle bit)", "btbrlmp.feat.flowctl2", + FT_BOOLEAN, 64, NULL, 0x1 << 21, + NULL, HFILL}}, + {&hf_lmp_feat_flowctl3, + {"Flow control lag (most significant bit)", "btbrlmp.feat.flowctl3", + FT_BOOLEAN, 64, NULL, 0x1 << 22, + NULL, HFILL}}, + {&hf_lmp_feat_bcenc, + {"Broadcast Encryption", "btbrlmp.feat.bcenc", + FT_BOOLEAN, 64, NULL, 0x1 << 23, + NULL, HFILL}}, + {&hf_lmp_feat_res1, + {"Reserved for future use", "btbrlmp.feat.res1", + FT_BOOLEAN, 64, NULL, 0x1 << 24, + NULL, HFILL}}, + {&hf_lmp_feat_acl2, + {"Enhanced Data Rate ACL 2 Mb/s mode", "btbrlmp.feat.acl2", + FT_BOOLEAN, 64, NULL, 0x1 << 25, + NULL, HFILL}}, + {&hf_lmp_feat_acl3, + {"Enhanced Data Rate ACL 3 Mb/s mode", "btbrlmp.feat.acl3", + FT_BOOLEAN, 64, NULL, 0x1 << 26, + NULL, HFILL}}, + {&hf_lmp_feat_eninq, + {"Enhanced inquiry scan", "btbrlmp.feat.eninq", + FT_BOOLEAN, 64, NULL, 0x1 << 27, + NULL, HFILL}}, + {&hf_lmp_feat_intinq, + {"Interlaced inquiry scan", "btbrlmp.feat.intinq", + FT_BOOLEAN, 64, NULL, 0x1 << 28, + NULL, HFILL}}, + {&hf_lmp_feat_intpag, + {"Interlaced page scan", "btbrlmp.feat.intpag", + FT_BOOLEAN, 64, NULL, 0x1 << 29, + NULL, HFILL}}, + {&hf_lmp_feat_rssiinq, + {"RSSI with inquiry results", "btbrlmp.feat.rssiinq", + FT_BOOLEAN, 64, NULL, 0x1 << 30, + NULL, HFILL}}, + {&hf_lmp_feat_ev3, + {"Extended SCO link (EV3 packets)", "btbrlmp.feat.ev3", + FT_BOOLEAN, 64, NULL, 0x80000000, + NULL, HFILL}}, + {&hf_lmp_feat_ev4, + {"EV4 packets", "btbrlmp.feat.ev4", + FT_BOOLEAN, 64, NULL, 0x100000000, + NULL, HFILL}}, + {&hf_lmp_feat_ev5, + {"EV5 packets", "btbrlmp.feat.ev5", + FT_BOOLEAN, 64, NULL, 0x100000000 << 1, + NULL, HFILL}}, + {&hf_lmp_feat_res2, + {"Reserved", "btbrlmp.feat.res2", + FT_BOOLEAN, 64, NULL, 0x100000000 << 2, + NULL, HFILL}}, + {&hf_lmp_feat_afhcapsl, + {"AFH capable slave", "btbrlmp.feat.afhcapsl", + FT_BOOLEAN, 64, NULL, 0x100000000 << 3, + NULL, HFILL}}, + {&hf_lmp_feat_afhclasl, + {"AFH classification slave", "btbrlmp.feat.afhclasl", + FT_BOOLEAN, 64, NULL, 0x100000000 << 4, + NULL, HFILL}}, + {&hf_lmp_feat_bredrnotsup, + {"BR/EDR Not Supported", "btbrlmp.feat.bredrnotsup", + FT_BOOLEAN, 64, NULL, 0x100000000 << 5, + NULL, HFILL}}, + {&hf_lmp_feat_lesup, + {"LE Supported (Controller)", "btbrlmp.feat.lesup", + FT_BOOLEAN, 64, NULL, 0x100000000 << 6, + NULL, HFILL}}, + {&hf_lmp_feat_3slotenh, + {"3-slot Enhanced Data Rate ACL packets", "btbrlmp.feat.3slotenh", + FT_BOOLEAN, 64, NULL, 0x100000000 << 7, + NULL, HFILL}}, + {&hf_lmp_feat_5slotenh, + {"5-slot Enhanced Data Rate ACL packets", "btbrlmp.feat.5slotenh", + FT_BOOLEAN, 64, NULL, 0x100000000 << 8, + NULL, HFILL}}, + {&hf_lmp_feat_sniffsubr, + {"Sniff subrating", "btbrlmp.feat.sniffsubr", + FT_BOOLEAN, 64, NULL, 0x100000000 << 9, + NULL, HFILL}}, + {&hf_lmp_feat_pauseenc, + {"Pause encryption", "btbrlmp.feat.pauseenc", + FT_BOOLEAN, 64, NULL, 0x100000000 << 10, + NULL, HFILL}}, + {&hf_lmp_feat_afhcapma, + {"AFH capable master", "btbrlmp.feat.afhcapma", + FT_BOOLEAN, 64, NULL, 0x100000000 << 11, + NULL, HFILL}}, + {&hf_lmp_feat_afhclama, + {"AFH classification master", "btbrlmp.feat.afhclama", + FT_BOOLEAN, 64, NULL, 0x100000000 << 12, + NULL, HFILL}}, + {&hf_lmp_feat_esco2, + {"Enhanced Data Rate eSCO 2 Mb/s mode", "btbrlmp.feat.esco2", + FT_BOOLEAN, 64, NULL, 0x100000000 << 13, + NULL, HFILL}}, + {&hf_lmp_feat_esco3, + {"Enhanced Data Rate eSCO 3 Mb/s mode", "btbrlmp.feat.esco3", + FT_BOOLEAN, 64, NULL, 0x100000000 << 14, + NULL, HFILL}}, + {&hf_lmp_feat_3slotenhesco, + {"3-slot Enhanced Data Rate eSCO packets", "btbrlmp.feat.3slotenhesco", + FT_BOOLEAN, 64, NULL, 0x100000000 << 15, + NULL, HFILL}}, + {&hf_lmp_feat_extinqres, + {"Extended Inquiry Response", "btbrlmp.feat.extinqres", + FT_BOOLEAN, 64, NULL, 0x100000000 << 16, + NULL, HFILL}}, + {&hf_lmp_feat_simlebredr, + {"Simultaneous LE and BR/EDR to Same Device Capable (Controller)", "btbrlmp.feat.simlebredr", + FT_BOOLEAN, 64, NULL, 0x100000000 << 17, + NULL, HFILL}}, + {&hf_lmp_feat_res3, + {"Reserved", "btbrlmp.feat.res3", + FT_BOOLEAN, 64, NULL, 0x100000000 << 18, + NULL, HFILL}}, + {&hf_lmp_feat_ssp, + {"Secure Simple Pairing", "btbrlmp.feat.ssp", + FT_BOOLEAN, 64, NULL, 0x100000000 << 19, + NULL, HFILL}}, + {&hf_lmp_feat_enpdu, + {"Encapsulated PDU", "btbrlmp.feat.enpdu", + FT_BOOLEAN, 64, NULL, 0x100000000 << 20, + NULL, HFILL}}, + {&hf_lmp_feat_edr, + {"Erroneous Data Reporting", "btbrlmp.feat.edr", + FT_BOOLEAN, 64, NULL, 0x100000000 << 21, + NULL, HFILL}}, + {&hf_lmp_feat_nonflush, + {"Non-flushable Packet Boundary Flag", "btbrlmp.feat.nonflush", + FT_BOOLEAN, 64, NULL, 0x100000000 << 22, + NULL, HFILL}}, + {&hf_lmp_feat_res4, + {"Reserved", "btbrlmp.feat.res4", + FT_BOOLEAN, 64, NULL, 0x100000000 << 23, + NULL, HFILL}}, + {&hf_lmp_feat_lstimche, + {"Link Supervision Timeout Changed Event", "btbrlmp.feat.lstimche", + FT_BOOLEAN, 64, NULL, 0x100000000 << 24, + NULL, HFILL}}, + {&hf_lmp_feat_inqtxpwr, + {"Inquiry TX Power Level", "btbrlmp.feat.inqtxpwr", + FT_BOOLEAN, 64, NULL, 0x100000000 << 25, + NULL, HFILL}}, + {&hf_lmp_feat_enhpwr, + {"Enhanced Power Control", "btbrlmp.feat.enhpwr", + FT_BOOLEAN, 64, NULL, 0x100000000 << 26, + NULL, HFILL}}, + {&hf_lmp_feat_res5, + {"Reserved", "btbrlmp.feat.res5", + FT_BOOLEAN, 64, NULL, 0x100000000 << 27, + NULL, HFILL}}, + {&hf_lmp_feat_res6, + {"Reserved", "btbrlmp.feat.res6", + FT_BOOLEAN, 64, NULL, 0x100000000 << 28, + NULL, HFILL}}, + {&hf_lmp_feat_res7, + {"Reserved", "btbrlmp.feat.res7", + FT_BOOLEAN, 64, NULL, 0x100000000 << 29, + NULL, HFILL}}, + {&hf_lmp_feat_res8, + {"Reserved", "btbrlmp.feat.res8", + FT_BOOLEAN, 64, NULL, 0x100000000 << 30, + NULL, HFILL}}, + {&hf_lmp_feat_extfeat, + {"Extended features", "btbrlmp.feat.extfeat", + FT_BOOLEAN, 64, NULL, 0x100000000 << 31, + NULL, HFILL}}, + {&hf_lmp_featuresext, + {"Extended Features", "btbrlmp.featuresext", + FT_UINT64, BASE_HEX, NULL, 0x0, + "Extended Feature Mask", HFILL}}, + /* extended features page 1 */ + {&hf_lmp_efeat_ssp, + {"Secure Simple Pairing (Host Support)", "btbrlmp.efeat.ssp", + FT_BOOLEAN, 64, NULL, 0x1 << 0, + NULL, HFILL}}, + {&hf_lmp_efeat_lesup, + {"LE Supported (Host)", "btbrlmp.efeat.lesup", + FT_BOOLEAN, 64, NULL, 0x1 << 1, + NULL, HFILL}}, + {&hf_lmp_efeat_lebredr, + {"Simultaneous LE and BR/EDR to Same Device Capable (Host)", "btbrlmp.efeat.lebredr", + FT_BOOLEAN, 64, NULL, 0x1 << 2, + NULL, HFILL}}, + {&hf_lmp_efeat_sch, + {"Secure Connections (Host Support)", "btbrlmp.efeat.sch", + FT_BOOLEAN, 64, NULL, 0x1 << 3, + NULL, HFILL}}, + /* extended features page 2 */ + {&hf_lmp_efeat_csbma, + {"Connectionless Slave Broadcast - Master Operation", "btbrlmp.efeat.csbma", + FT_BOOLEAN, 64, NULL, 0x1 << 0, + NULL, HFILL}}, + {&hf_lmp_efeat_csbsl, + {"Connectionless Slave Broadcast - Slave Operation", "btbrlmp.efeat.csbsl", + FT_BOOLEAN, 64, NULL, 0x1 << 1, + NULL, HFILL}}, + {&hf_lmp_efeat_syntr, + {"Synchronization Train", "btbrlmp.efeat.syntr", + FT_BOOLEAN, 64, NULL, 0x1 << 2, + NULL, HFILL}}, + {&hf_lmp_efeat_synsc, + {"Synchronization Scan", "btbrlmp.efeat.synsc", + FT_BOOLEAN, 64, NULL, 0x1 << 3, + NULL, HFILL}}, + {&hf_lmp_efeat_inqresnote, + {"Inquiry Response Notification Event", "btbrlmp.efeat.inqresnote", + FT_BOOLEAN, 64, NULL, 0x1 << 4, + NULL, HFILL}}, + {&hf_lmp_efeat_genintsc, + {"Generalized interlaced scan", "btbrlmp.efeat.genintsc", + FT_BOOLEAN, 64, NULL, 0x1 << 5, + NULL, HFILL}}, + {&hf_lmp_efeat_ccadj, + {"Coarse Clock Adjustment", "btbrlmp.efeat.ccadj", + FT_BOOLEAN, 64, NULL, 0x1 << 6, + NULL, HFILL}}, + {&hf_lmp_efeat_res0, + {"Reserved for future use", "btbrlmp.efeat.res0", + FT_BOOLEAN, 64, NULL, 0x1 << 7, + NULL, HFILL}}, + {&hf_lmp_efeat_scc, + {"Secure Connections (Controller Support)", "btbrlmp.efeat.scc", + FT_BOOLEAN, 64, NULL, 0x1 << 8, + NULL, HFILL}}, + {&hf_lmp_efeat_ping, + {"Ping", "btbrlmp.efeat.ping", + FT_BOOLEAN, 64, NULL, 0x1 << 9, + NULL, HFILL}}, + {&hf_lmp_efeat_res1, + {"Reserved for future use", "btbrlmp.efeat.res1", + FT_BOOLEAN, 64, NULL, 0x1 << 10, + NULL, HFILL}}, + {&hf_lmp_efeat_trnud, + {"Train nudging", "btbrlmp.efeat.trnud", + FT_BOOLEAN, 64, NULL, 0x1 << 11, + NULL, HFILL}}, + {&hf_lmp_efeat_sam, + {"Slot Availability Mask", "btbrlmp.efeat.sam", + FT_BOOLEAN, 64, NULL, 0x1 << 12, //typo in the BT standard defines this as >>10 ... + NULL, HFILL}}, + {&hf_lmp_fpage, + {"Features Page", "btbrlmp.fpage", + FT_UINT8, BASE_DEC, VALS(features_page), 0x0, + NULL, HFILL}}, + {&hf_lmp_htime, + {"Hold Time", "btbrlmp.htime", + FT_UINT16, BASE_HEX, NULL, 0x0, + "Hold Time in slots", HFILL}}, + {&hf_lmp_hinst, + {"Hold Instant", "btbrlmp.hinst", + FT_UINT32, BASE_HEX, NULL, 0x0, + "Hold Instant (slot)", HFILL}}, + {&hf_lmp_hopmode, + {"Hopping Mode", "btbrlmp.hopmode", + FT_UINT8, BASE_DEC, VALS(hopping_mode), 0x0, + NULL, HFILL}}, + {&hf_lmp_iocaps, + {"IO Capabilities", "btbrlmp.iocaps", + FT_UINT8, BASE_DEC, VALS(io_capabilities), 0x0, + "Input/Output Capabilities", HFILL}}, + {&hf_lmp_jitter, + {"Jitter", "btbrlmp.jitter", + FT_UINT8, BASE_DEC, NULL, 0x0, + "Jitter in microseconds", HFILL}}, + {&hf_lmp_key, + {"Key", "btbrlmp.key", + FT_BYTES, BASE_NONE, NULL, 0x0, + NULL, HFILL}}, + {&hf_lmp_keysz, + {"Key Size", "btbrlmp.keysz", + FT_UINT8, BASE_DEC, NULL, 0x0, + "Key Size in bytes", HFILL}}, + {&hf_lmp_ksmask, + {"Key Size Mask", "btbrlmp.ksmask", + FT_UINT16, BASE_HEX, NULL, 0x0, + NULL, HFILL}}, + {&hf_lmp_ltaddr1, + {"LT_ADDR 1", "btbrlmp.ltaddr", + FT_UINT8, BASE_HEX, NULL, 0x0f, + "Logical Transport Address 1", HFILL}}, + {&hf_lmp_ltaddr2, + {"LT_ADDR 2", "btbrlmp.ltaddr", + FT_UINT8, BASE_HEX, NULL, 0xf0, + "Logical Transport Address 2", HFILL}}, + {&hf_lmp_ltaddr3, + {"LT_ADDR 3", "btbrlmp.ltaddr", + FT_UINT8, BASE_HEX, NULL, 0x0f, + "Logical Transport Address 3", HFILL}}, + {&hf_lmp_ltaddr4, + {"LT_ADDR 4", "btbrlmp.ltaddr", + FT_UINT8, BASE_HEX, NULL, 0xf0, + "Logical Transport Address 4", HFILL}}, + {&hf_lmp_ltaddr5, + {"LT_ADDR 5", "btbrlmp.ltaddr", + FT_UINT8, BASE_HEX, NULL, 0x0f, + "Logical Transport Address 5", HFILL}}, + {&hf_lmp_ltaddr6, + {"LT_ADDR 6", "btbrlmp.ltaddr", + FT_UINT8, BASE_HEX, NULL, 0xf0, + "Logical Transport Address 6", HFILL}}, + {&hf_lmp_ltaddr7, + {"LT_ADDR 7", "btbrlmp.ltaddr", + FT_UINT8, BASE_HEX, NULL, 0x0f, + "Logical Transport Address 7", HFILL}}, + {&hf_lmp_maccess, + {"Maccess", "btbrlmp.maccess", + FT_UINT8, BASE_HEX, NULL, 0x0f, + "Number of access windows", HFILL}}, + {&hf_lmp_maxslots, + {"Max Slots", "btbrlmp.maxslots", + FT_UINT8, BASE_HEX, NULL, 0x0, + NULL, HFILL}}, + {&hf_lmp_maxsp, + {"Max Supported Page", "btbrlmp.maxsp", + FT_UINT8, BASE_DEC, NULL, 0x0, + "Highest extended features page with non-zero bit", HFILL}}, + {&hf_lmp_maxss, + {"Max Sniff Subrate", "btbrlmp.maxss", + FT_UINT8, BASE_DEC, NULL, 0x0, + NULL, HFILL}}, + {&hf_lmp_minsmt, + {"Min Sniff Mode Timeout", "btbrlmp.minsmt", + FT_UINT16, BASE_HEX, NULL, 0x0, + "Min Sniff Mode Timeout in slots", HFILL}}, + {&hf_lmp_naccslots, + {"Nacc-slots", "btbrlmp.naccslots", + FT_UINT8, BASE_HEX, NULL, 0x0, + NULL, HFILL}}, + {&hf_lmp_namefrag, + {"Name Fragment", "btbrlmp.namefrag", + FT_STRING, BASE_NONE, NULL, 0x0, + NULL, HFILL}}, + {&hf_lmp_namelen, + {"Name Length", "btbrlmp.namelen", + FT_UINT8, BASE_DEC, NULL, 0x0, + "Name Length in bytes", HFILL}}, + {&hf_lmp_nameoffset, + {"Name Offset", "btbrlmp.nameoffset", + FT_UINT8, BASE_DEC, NULL, 0x0, + "Name Offset in bytes", HFILL}}, + {&hf_lmp_nb, + {"Nb", "btbrlmp.nb", + FT_UINT8, BASE_HEX, NULL, 0x0, + NULL, HFILL}}, + {&hf_lmp_nbc, + {"Nbc", "btbrlmp.nbc", + FT_UINT8, BASE_HEX, NULL, 0x0, + NULL, HFILL}}, + {&hf_lmp_nbsleep, + {"Nbsleep", "btbrlmp.nbsleep", + FT_UINT8, BASE_HEX, NULL, 0x0, + NULL, HFILL}}, + {&hf_lmp_negstate, + {"Negotiation State", "btbrlmp.negstate", + FT_UINT8, BASE_DEC, VALS(negotiation_state), 0x0, + NULL, HFILL}}, + {&hf_lmp_nonce, + {"Nonce Value", "btbrlmp.nonce", + FT_BYTES, BASE_NONE, NULL, 0x0, + NULL, HFILL}}, + {&hf_lmp_nottype, + {"Notification Type", "btbrlmp.nottype", + FT_UINT8, BASE_DEC, VALS(notification_value), 0x0, + NULL, HFILL}}, + {&hf_lmp_npoll, + {"Npoll", "btbrlmp.npoll", + FT_UINT8, BASE_HEX, NULL, 0x0, + NULL, HFILL}}, + {&hf_lmp_oobauthdata, + {"OOB Authentication Data", "btbrlmp.oobauthdata", + FT_UINT8, BASE_DEC, VALS(oob_auth_data), 0x00, + NULL, HFILL}}, + {&hf_lmp_op, + {"Opcode", "btbrlmp.op", + FT_UINT8, BASE_DEC, VALS(opcode), 0xfe, + NULL, HFILL}}, + {&hf_lmp_opinre, + {"In Response To", "btbrlmp.opinre", + FT_UINT8, BASE_DEC, VALS(opcode), 0x7f, + "Opcode this is in response to", HFILL}}, + {&hf_lmp_pagesch, + {"Paging Scheme", "btbrlmp.pagesch", + FT_UINT8, BASE_DEC, VALS(paging_scheme), 0x0, + NULL, HFILL}}, + {&hf_lmp_pcmode, + {"Power Control Mode", "btbrlmp.pcmode", + FT_UINT8, BASE_DEC, VALS(power_control_mode), 0x0, + NULL, HFILL}}, + {&hf_lmp_pkttype, + {"Packet Type", "btbrlmp.pkttype", + /* FIXME break out further */ + FT_UINT8, BASE_HEX, NULL, 0x0, + "Packet Type", HFILL}}, + {&hf_lmp_pkttypetbl, + {"Packet Type Table", "btbrlmp.pkttypetbl", + FT_UINT8, BASE_DEC, VALS(packet_type_table), 0x0, + NULL, HFILL}}, + {&hf_lmp_pmaddr, + {"PM_ADDR", "btbrlmp.pmaddr", + FT_UINT8, BASE_HEX, NULL, 0x0, + NULL, HFILL}}, + {&hf_lmp_pmaddr1, + {"PM_ADDR 1", "btbrlmp.pmaddr1", + FT_UINT8, BASE_HEX, NULL, 0x0, + NULL, HFILL}}, + {&hf_lmp_pmaddr2, + {"PM_ADDR 2", "btbrlmp.pmaddr2", + FT_UINT8, BASE_HEX, NULL, 0x0, + NULL, HFILL}}, + {&hf_lmp_pmaddr3, + {"PM_ADDR 3", "btbrlmp.pmaddr3", + FT_UINT8, BASE_HEX, NULL, 0x0, + NULL, HFILL}}, + {&hf_lmp_pmaddr4, + {"PM_ADDR 4", "btbrlmp.pmaddr4", + FT_UINT8, BASE_HEX, NULL, 0x0, + NULL, HFILL}}, + {&hf_lmp_pmaddr5, + {"PM_ADDR 5", "btbrlmp.pmaddr5", + FT_UINT8, BASE_HEX, NULL, 0x0, + NULL, HFILL}}, + {&hf_lmp_pmaddr6, + {"PM_ADDR 6", "btbrlmp.pmaddr6", + FT_UINT8, BASE_HEX, NULL, 0x0, + NULL, HFILL}}, + {&hf_lmp_pmaddr7, + {"PM_ADDR 7", "btbrlmp.pmaddr7", + FT_UINT8, BASE_HEX, NULL, 0x0, + NULL, HFILL}}, + {&hf_lmp_pollintvl, + {"Poll Interval", "btbrlmp.pollintvl", + FT_UINT16, BASE_HEX, NULL, 0x0, + "Poll Interval in slots", HFILL}}, + {&hf_lmp_pollper, + {"Poll Period (ms)", "btbrlmp.pollper", + FT_UINT8, BASE_DEC, NULL, 0x0, + "Poll Period in units of 1.25 ms", HFILL}}, + {&hf_lmp_pssettings, + {"Paging Scheme Settings", "btbrlmp.pssettings", + FT_UINT8, BASE_DEC, VALS(paging_scheme_settings), 0x0, + NULL, HFILL}}, + {&hf_lmp_pwradjreq, + {"Power Adjustment Request", "btbrlmp.pwradjreq", + FT_UINT8, BASE_DEC, VALS(power_adjust_req), 0x0, + NULL, HFILL}}, + {&hf_lmp_pwradjres, + {"Power Adjustment Response", "btbrlmp.pwradjres", + FT_UINT8, BASE_HEX, NULL, 0x0, + NULL, HFILL}}, + {&hf_lmp_pwradj_8dpsk, + {"8DPSK", "btbrlmp.pwradj_8dpsk", + FT_UINT8, BASE_DEC, VALS(power_adjust_res), 0x30, + "8DPSK Power Adjustment Response", HFILL}}, + {&hf_lmp_pwradj_dqpsk, + {"DQPSK", "btbrlmp.pwradj_dqpsk", + FT_UINT8, BASE_DEC, VALS(power_adjust_res), 0x0C, + "DQPSK Power Adjustment Response", HFILL}}, + {&hf_lmp_pwradj_gfsk, + {"GFSK", "btbrlmp.pwradj_gfsk", + FT_UINT8, BASE_DEC, VALS(power_adjust_res), 0x03, + "GFSK Power Adjustment Response", HFILL}}, + {&hf_lmp_rand, + {"Random Number", "btbrlmp.rand", + FT_BYTES, BASE_NONE, NULL, 0x0, + NULL, HFILL}}, + {&hf_lmp_rate, + {"Data Rate", "btbrlmp.rate", + FT_UINT8, BASE_HEX, NULL, 0x0, + NULL, HFILL}}, + {&hf_lmp_rate_fec, + {"FEC", "btbrlmp.rate.fec", + FT_BOOLEAN, BASE_DEC, TFS(&fec), 0x01, + "Forward Error Correction", HFILL}}, + {&hf_lmp_rate_size, + {"Packet Size", "btbrlmp.rate.size", + FT_UINT8, BASE_HEX, VALS(packet_size), 0x06, + "Basic Rate Packet Size", HFILL}}, + {&hf_lmp_rate_type, + {"EDR Type", "btbrlmp.rate.type", + FT_UINT8, BASE_HEX, VALS(edr_type), 0x18, + "Enhanced Data Rate type", HFILL}}, + {&hf_lmp_rate_edrsize, + {"EDR Size", "btbrlmp.rate.edrsize", + FT_UINT8, BASE_HEX, VALS(packet_size), 0x60, + "Enhanced Data Rate packet size", HFILL}}, + {&hf_lmp_rxfreq, + {"RX Frequency (MHz)", "btbrlmp.rxfreq", + FT_UINT8, BASE_DEC, NULL, 0x0, + "Receive Frequency in MHz above 2402", HFILL}}, + {&hf_lmp_scohdl, + {"SCO Handle", "btbrlmp.scohdl", + FT_UINT8, BASE_HEX, NULL, 0x0, + NULL, HFILL}}, + {&hf_lmp_scopkt, + {"SCO Packet", "btbrlmp.scopkt", + FT_UINT8, BASE_DEC, VALS(sco_packet), 0x0, + NULL, HFILL}}, + {&hf_lmp_slotoffset, + {"Slot Offset", "btbrlmp.slotoffset", + FT_UINT16, BASE_DEC, NULL, 0x0, + "Slot Offset in microseconds", HFILL}}, + {&hf_lmp_sniffatt, + {"Sniff Attempt", "btbrlmp.sniffatt", + FT_UINT16, BASE_HEX, NULL, 0x0, + "Number of receive slots", HFILL}}, + {&hf_lmp_sniffsi, + {"Sniff Subrating Instant", "btbrlmp.sniffsi", + FT_UINT32, BASE_HEX, NULL, 0x0, + "Sniff Subrating Instant (slot)", HFILL}}, + {&hf_lmp_sniffto, + {"Sniff Timeout", "btbrlmp.sniffto", + FT_UINT16, BASE_HEX, NULL, 0x0, + "Number of receive slots", HFILL}}, + {&hf_lmp_subversnr, + {"SubVersNr", "btbrlmp.subversnr", + FT_UINT16, BASE_DEC, NULL, 0x0, + "SubVersion", HFILL}}, + {&hf_lmp_suptimeout, + {"Supervision Timeout", "btbrlmp.suptimeout", + FT_UINT16, BASE_HEX, NULL, 0x0, + "Supervision Timeout in slots", HFILL}}, + {&hf_lmp_swinst, + {"Switch Instant", "btbrlmp.swinst", + FT_UINT32, BASE_HEX, NULL, 0x0, + "Switch Instant (slot)", HFILL}}, + {&hf_lmp_taccess, + {"Taccess", "btbrlmp.taccess", + FT_UINT8, BASE_HEX, NULL, 0x0, + "Taccess in slots", HFILL}}, + {&hf_lmp_tb, + {"Tb", "btbrlmp.tb", + FT_UINT16, BASE_HEX, NULL, 0x0, + "Tb in slots", HFILL}}, + {&hf_lmp_tesco, + {"Tesco", "btbrlmp.tesco", + FT_UINT8, BASE_HEX, NULL, 0x0, + "Tesco in slots", HFILL}}, + {&hf_lmp_testlen, + {"Test Length", "btbrlmp.testlen", + FT_UINT16, BASE_DEC, NULL, 0x00, + "Length of test sequence in bytes", HFILL}}, + {&hf_lmp_testscen, + {"Test Scenario", "btbrlmp.testscen", + FT_UINT8, BASE_DEC, VALS(test_scenario), 0x00, + NULL, HFILL}}, + {&hf_lmp_tid, + {"TID", "btbrlmp.tid", + FT_BOOLEAN, BASE_DEC, TFS(&tid), 0x01, + "Transaction ID", HFILL}}, + {&hf_lmp_timectrl, + {"Timing Control Flags", "btbrlmp.timectrl", + FT_UINT8, BASE_HEX, NULL, 0x0, + NULL, HFILL}}, + {&hf_lmp_time_change, + {"Timing Change", "btbrlmp.time.change", + FT_BOOLEAN, 8, TFS(&time_change), 0x01, + NULL, HFILL}}, + {&hf_lmp_time_init, + {"Initialization", "btbrlmp.time.init", + FT_BOOLEAN, 8, TFS(&time_init), 0x02, + NULL, HFILL}}, + {&hf_lmp_time_accwin, + {"Access Window", "btbrlmp.time.accwin", + FT_BOOLEAN, 8, TFS(&time_accwin), 0x04, + NULL, HFILL}}, + {&hf_lmp_tsco, + {"Tsco", "btbrlmp.tsco", + FT_UINT8, BASE_HEX, NULL, 0x0, + "Tsco in slots", HFILL}}, + {&hf_lmp_tsniff, + {"Tsniff", "btbrlmp.tsniff", + FT_UINT16, BASE_HEX, NULL, 0x0, + "Tsniff in slots", HFILL}}, + {&hf_lmp_txfreq, + {"TX Frequency (MHz)", "btbrlmp.txfreq", + FT_UINT8, BASE_DEC, NULL, 0x0, + "Transmit Frequency in MHz above 2402", HFILL}}, + {&hf_lmp_versnr, + {"VersNr", "btbrlmp.versnr", + FT_UINT8, BASE_DEC, VALS(versnr), 0x0, + "Version", HFILL}}, + {&hf_lmp_wesco, + {"Wesco", "btbrlmp.wesco", + FT_UINT8, BASE_HEX, NULL, 0x0, + "Number of slots in retransmission window", HFILL}}, + }; + + /* protocol subtree arrays */ + static gint *ett[] = { + &ett_lmp, + &ett_lmp_pwradjres, + &ett_lmp_rate, + &ett_lmp_timectrl, + &ett_lmp_features, + &ett_lmp_featuresext, + }; + + /* register the protocol name and description */ + proto_btbrlmp = proto_register_protocol( + "Bluetooth Link Manager Protocol", /* full name */ + "btlmp", /* short name */ + "btlmp" /* abbreviation (e.g. for filters) */ + ); + + register_dissector("btlmp", dissect_btbrlmp, proto_btbrlmp); + + /* register the header fields and subtrees used */ + proto_register_field_array(proto_btbrlmp, hf, array_length(hf)); + proto_register_subtree_array(ett, array_length(ett)); +} + +void proto_reg_handoff_btbrlmp(void) +{ +} + +/* + * Editor modelines - http://www.wireshark.org/tools/modelines.html + * + * Local variables: + * c-basic-offset: 4 + * tab-width: 8 + * indent-tabs-mode: nil + * End: + * + * vi: set shiftwidth=4 tabstop=8 expandtab: + * :indentSize=4:tabSize=8:noTabs=true: + */ diff --git a/dissectors/packet-h4bcm.c b/dissectors/packet-h4bcm.c new file mode 100644 index 0000000..a158322 --- /dev/null +++ b/dissectors/packet-h4bcm.c @@ -0,0 +1,1570 @@ +/* packet-h4bcm.c + * Routines for Bluetooth H4 Broadcom vendor specific additions + * Copyright 2019, Jiska Classen / Secure Mobile Networking Lab + * + * $Id$ + * + * Wireshark - Network traffic analyzer + * By Gerald Combs + * Copyright 1998 Gerald Combs + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include "config.h" + +#include +#include +#include +#include +#include + +/* type definitions for Broadcom diagnostics */ +#define DIA_LM_SENT 0x00 +#define DIA_LM_RECV 0x01 +#define DIA_MEM_PEEK_RESP 0x03 +#define DIA_MEM_DUMP_RESP 0x04 +#define DIA_TEST_COMPL 0x0a +#define DIA_MEM_POKE_RESP 0x11 +#define DIA_CPU_LOAD_RESP 0x15 +#define DIA_ACL_BR_RESP 0x16 +#define DIA_ACL_EDR_RESP 0x17 +#define DIA_AUX_RESP 0x18 +#define DIA_ACL_UNKN1_RESP 0x1a +#define DIA_ACL_UNKN2_RESP 0x1b +#define DIA_CON_RESP 0x1f +#define DIA_LE_SENT 0x80 +#define DIA_LE_RECV 0x81 +#define DIA_ACL_BR_RESET 0xb9 +#define DIA_ACL_BR_GET 0xc1 +#define DIA_ACL_EDR_GET 0xc2 +#define DIA_AUX_GET 0xc3 +#define DIA_ACL_UNKN1_GET 0xc5 +#define DIA_ACL_UNKN2_GET 0xc6 +#define DIA_CON_GET 0xcf +#define DIA_LM_ENABLE 0xf0 +#define DIA_MEM_PEEK_GET 0xf1 +#define DIA_MEM_POKE_GET 0xf2 +#define DIA_MEM_DUMP_GET 0xf3 +#define DIA_PKT_TEST 0xf6 + +/* function prototypes */ +void proto_reg_handoff_h4bcm(void); + +/* initialize the protocol and registered fields */ +static int proto_h4bcm = -1; +static int hf_h4bcm_type = -1; +static int hf_h4bcm_clock = -1; +static int hf_h4bcm_maclow = -1; +static int hf_h4bcm_pldhdr = -1; +static int hf_h4bcm_aclhdr = -1; +static int hf_h4bcm_llid = -1; +static int hf_h4bcm_llid_acl = -1; +static int hf_h4bcm_acl_fragment = -1; +static int hf_h4bcm_pldflow = -1; +static int hf_h4bcm_pldflow_acl = -1; +static int hf_h4bcm_length = -1; +static int hf_h4bcm_length_acl = -1; +static int hf_h4bcm_rfu = -1; +static int hf_h4bcm_payload = -1; +static int hf_h4bcm_lm_toggle = -1; +static int hf_h4bcm_stats_null_rcvd = -1; +static int hf_h4bcm_stats_poll_rcvd = -1; +static int hf_h4bcm_stats_dm1_rcvd = -1; +static int hf_h4bcm_stats_dh1_rcvd = -1; +static int hf_h4bcm_stats_dv_rcvd = -1; +static int hf_h4bcm_stats_aux1_rcvd = -1; +static int hf_h4bcm_stats_dm3_rcvd = -1; +static int hf_h4bcm_stats_dh3_rcvd = -1; +static int hf_h4bcm_stats_dm5_rcvd = -1; +static int hf_h4bcm_stats_dh5_rcvd = -1; +static int hf_h4bcm_stats_null_tx = -1; +static int hf_h4bcm_stats_poll_tx = -1; +static int hf_h4bcm_stats_dm1_tx = -1; +static int hf_h4bcm_stats_dh1_tx = -1; +static int hf_h4bcm_stats_dv_tx = -1; +static int hf_h4bcm_stats_aux1_tx = -1; +static int hf_h4bcm_stats_dm3_tx = -1; +static int hf_h4bcm_stats_dh3_tx = -1; +static int hf_h4bcm_stats_dm5_tx = -1; +static int hf_h4bcm_stats_dh5_tx = -1; +static int hf_h4bcm_stats_acl_rx = -1; +static int hf_h4bcm_stats_acl_tx = -1; +static int hf_h4bcm_stats_hec_err = -1; +static int hf_h4bcm_stats_crc_err = -1; +static int hf_h4bcm_stats_seqn_rep = -1; +static int hf_h4bcm_stats_soft_rst = -1; +static int hf_h4bcm_stats_test_tx = -1; + +static int hf_h4bcm_stats_test_rx = -1; +static int hf_h4bcm_stats_test_err = -1; +static int hf_h4bcm_stats_2dh1_rcvd = -1; +static int hf_h4bcm_stats_3dh1_rcvd = -1; +static int hf_h4bcm_stats_2dh3_rcvd = -1; +static int hf_h4bcm_stats_3dh3_rcvd = -1; +static int hf_h4bcm_stats_2dh5_rcvd = -1; +static int hf_h4bcm_stats_3dh5_rcvd = -1; +static int hf_h4bcm_stats_2dh1_tx = -1; +static int hf_h4bcm_stats_3dh1_tx = -1; +static int hf_h4bcm_stats_2dh3_tx = -1; +static int hf_h4bcm_stats_3dh3_tx = -1; +static int hf_h4bcm_stats_2dh5_tx = -1; +static int hf_h4bcm_stats_3dh5_tx = -1; +static int hf_h4bcm_le_ether = -1; +static int hf_h4bcm_le_handle = -1; +static int hf_h4bcm_le_opcode = -1; +static int hf_h4bcm_le_opcode_ext = -1; +static int hf_h4bcm_ll_version_ind_versnr = -1; +static int hf_h4bcm_ll_version_ind_compid = -1; +static int hf_h4bcm_ll_version_ind_subversnr = -1; +// Baseband +static int hf_btbbd = -1; +// Baseband Metadata +static int hf_btbbd_meta = -1; +static int hf_btbbd_clk = -1; +static int hf_btbbd_channel = -1; +static int hf_btbbd_ptt = -1; +static int hf_btbbd_role = -1; +static int hf_btbbd_tx_encrypted = -1; +static int hf_btbbd_rx_encrypted = -1; +static int hf_btbbd_is_eir = -1; +// Baseband Packet Header +static int hf_btbbd_pkthdr = -1; +static int hf_btbbd_ltaddr = -1; +static int hf_btbbd_type = -1; +static int hf_btbbd_type_br = -1; +static int hf_btbbd_type_edr = -1; +static int hf_btbbd_flags = -1; +static int hf_btbbd_flow = -1; +static int hf_btbbd_arqn = -1; +static int hf_btbbd_seqn = -1; +static int hf_btbbd_hec = -1; +// FHS +static int hf_btbbd_fhs = -1; +static int hf_btbbd_fhs_parity = -1; +static int hf_btbbd_fhs_lap = -1; +static int hf_btbbd_fhs_eir = -1; +static int hf_btbbd_fhs_sr = -1; +static int hf_btbbd_fhs_uap = -1; +static int hf_btbbd_fhs_nap = -1; +static int hf_btbbd_fhs_class = -1; +static int hf_btbbd_fhs_ltaddr = -1; +static int hf_btbbd_fhs_clk = -1; +static int hf_btbbd_fhs_psmode = -1; + +/* initialize the subtree pointers */ +static gint ett_h4bcm = -1; +static gint ett_h4bcm_pldhdr = -1; +static gint ett_h4bcm_aclhdr = -1; +static gint ett_h4bcm_acl_br_stats = -1; +static gint ett_h4bcm_acl_edr_stats = -1; +static gint ett_btbbd = -1; +static gint ett_btbbd_meta = -1; +static gint ett_btbbd_pkthdr = -1; +static gint ett_btbbd_fhs = -1; + +/* subdissectors */ +static dissector_handle_t btlmp_handle = NULL; +static dissector_handle_t btl2cap_handle = NULL; +static dissector_handle_t packetlogger_handle = NULL; + +/* reversed Broadcom diagnostic types */ +static const value_string h4bcm_types[] = { + {DIA_LM_SENT, "LM Sent"}, + {DIA_LM_RECV, "LM Received"}, + {DIA_MEM_PEEK_RESP, "Memory Access Response to Peek"}, + {DIA_MEM_DUMP_RESP, "Memory Hex Dump Response"}, + {DIA_TEST_COMPL, "Reported Completed Test"}, + {DIA_MEM_POKE_RESP, "Memory Access Response to Poke"}, + {DIA_CPU_LOAD_RESP, "CPU Load"}, + {DIA_ACL_BR_RESP, "Basic Rate ACL Stats Data"}, + {DIA_ACL_EDR_RESP, "EDR ACL Stats Data"}, + {DIA_AUX_RESP, "Received Aux Response"}, + {DIA_ACL_UNKN1_RESP, "ACL Stats Data (Type 0x1A)"}, + {DIA_ACL_UNKN2_RESP, "ACL Stats Data (Type 0x1B)"}, + {DIA_CON_RESP, "Get Connection Response"}, + {DIA_LE_SENT, "LE LM Sent"}, // Low Energy LL Control PDU LMP Message + {DIA_LE_RECV, "LE LM Received"}, + {DIA_ACL_BR_RESET, "Reset Basic Rate ACL Stats"}, // memclr(DHM_ACLPktStats) + {DIA_ACL_BR_GET, "Get Basic Rate ACL Stats"}, + {DIA_ACL_EDR_GET, "Get EDR ACL Stats"}, + {DIA_ACL_UNKN1_GET, "Get ACL Stats (Type 0x1A)"}, // BTMUtil_Send_2045_ACL_Stats(0x1a, cmd) + {DIA_ACL_UNKN2_GET, "Get ACL Stats (Type 0x1B)"}, + {DIA_AUX_GET, "Get Aux Stats"}, // BTMUtil_SendAuxStats + {DIA_CON_GET, "Get Connection Stats"}, // ulp_send_connection_stats(0x1F) + {DIA_LM_ENABLE, "Toggle LMP Logging"}, + {DIA_MEM_PEEK_GET, "Memory Peek"}, + {DIA_MEM_POKE_GET, "Memory Poke"}, + {DIA_MEM_DUMP_GET, "Memory Hex Dump"}, + {DIA_PKT_TEST, "BTMMstr_BBPktTest"}, +}; + +static const value_string llid_codes[] = { + {0x0, "undefined"}, + {0x1, "Continuation fragment of an L2CAP message (ACL-U)"}, + {0x2, "Start of an L2CAP message or no fragmentation (ACL-U)"}, + {0x3, "LMP message (ACL-C)"}, + {0, NULL}}; + +/* This table is needed due to Brodcoms wrong LMP length passing... */ +static const int lmp_lengths[] = { + 0, /* LMP_VSC */ + 2, /* LMP_NAME_REQ */ + 17, /* LMP_NAME_RES */ + 2, /* LMP_ACCEPTED */ + 3, /* LMP_NOT_ACCEPTED */ + 1, /* LMP_CLKOFFSET_REQ */ + 3, /* LMP_CLKOFFSET_RES */ + 2, /* LMP_DETACH */ + 17, /* LMP_IN_RAND */ + 17, /* LMP_COMB_KEY */ + 17, /* LMP_UNIT_KEY */ + 17, /* LMP_AU_RAND */ + 5, /* LMP_SRES */ + 17, /* LMP_TEMP_RAND */ + 17, /* LMP_TEMP_KEY */ + 2, /* LMP_ENCRYPTION_MODE_REQ */ + 2, /* LMP_ENCRYPTION_KEY_SIZE_REQ */ + 17, /* LMP_START_ENCRYPTION_REQ */ + 1, /* LMP_STOP_ENCRYPTION_REQ */ + 5, /* LMP_SWITCH_REQ */ + 7, /* LMP_HOLD */ + 7, /* LMP_HOLD_REQ */ + 10, /* LMP_SNIFF_REQ */ + 0, + 1, /* LMP_UNSNIFF_REQ */ + 17, /* LMP_PARK_REQ */ + 0, + 4, /* LMP_SET_BROADCAST_SCAN_WINDOW */ + 11, /* LMP_MODIFY_BEACON */ + 15, /* LMP_UNPARK_BD_ADDR_REQ */ + 13, /* LMP_UNPARK_PM_ADDR_REQ */ + 2, /* LMP_INCR_POWER_REQ */ + 2, /* LMP_DECR_POWER_REQ */ + 1, /* LMP_MAX_POWER */ + 1, /* LMP_MIN_POWER */ + 1, /* LMP_AUTO_RATE */ + 2, /* LMP_PREFERRED_RATE */ + 6, /* LMP_VERSION_REQ */ + 6, /* LMP_VERSION_RES */ + 9, /* LMP_FEATURES_REQ */ + 9, /* LMP_FEATURES_RES */ + 4, /* LMP_QUALITY_OF_SERVICE */ + 4, /* LMP_QUALITY_OF_SERVICE_REQ */ + 7, /* LMP_SCO_LINK_REQ */ + 3, /* LMP_REMOVE_SCO_LINK_REQ */ + 2, /* LMP_MAX_SLOT */ + 2, /* LMP_MAX_SLOT_REQ */ + 1, /* LMP_TIMING_ACCURACY_REQ */ + 3, /* LMP_TIMING_ACCURACY_RES */ + 1, /* LMP_SETUP_COMPLETE */ + 1, /* LMP_USE_SEMI_PERMANENT_KEY */ + 1, /* LMP_HOST_CONNECTION_REQ */ + 9, /* LMP_SLOT_OFFSET */ + 3, /* LMP_PAGE_MODE_REQ */ + 3, /* LMP_PAGE_SCAN_MODE_REQ */ + 3, /* LMP_SUPERVISION_TIMEOUT */ + 1, /* LMP_TEST_ACTIVATE */ + 10, /* LMP_TEST_CONTROL */ + 1, /* LMP_ENCRYPTION_KEY_SIZE_MASK_REQ */ + 3, /* LMP_ENCRYPTION_KEY_SIZE_MASK_RES */ + 16, /* LMP_SET_AFH */ + 4, /* LMP_ENCAPSULATED_HEADER */ + 17, /* LMP_ENCAPSULATED_PAYLOAD */ + 17, /* LMP_SIMPLE_PAIRING_CONFIRM */ + 17, /* LMP_SIMPLE_PAIRING_NUMBER */ + 17, /* LMP_DHKEY_CHECK */ +}; + +static const int lmp_lengths_ext[] = { + 0, + 4, /* LMP_ACCEPTED_EXT */ + 5, /* LMP_NOT_ACCEPTED_EXT */ + 12, /* LMP_FEATURES_REQ_EXT */ + 12, /* LMP_FEATURES_RES_EXT */ + 0, + 0, + 0, + 0, + 0, + 0, + 3, /* LMP_PACKET_TYPE_TABLE_REQ */ + 16, /* LMP_ESCO_LINK_REQ */ + 4, /* LMP_REMOVE_ESCO_LINK_REQ */ + 0, + 0, + 7, /* LMP_CHANNEL_CLASSIFICATION_REQ */ + 12, /* LMP_CHANNEL_CLASSIFICATION */ + 0, + 0, + 0, + 9, /* LMP_SNIFF_SUBRATING_REQ */ + 9, /* LMP_SNIFF_SUBRATING_RES */ + 2, /* LMP_PAUSE_ENCRYPTION_REQ */ + 2, /* LMP_RESUME_ENCRYPTION_REQ */ + 5, /* LMP_IO_CAPABILITY_REQ */ + 5, /* LMP_IO_CAPABILITY_RES */ + 2, /* LMP_NUMERIC_COMPARISON_FAILED */ + 2, /* LMP_PASSKEY_FAILED */ + 2, /* LMP_OOB_FAILED */ + 3, /* LMP_KEYPRESS_NOTIFICATION */ + 3, /* LMP_POWER_CONTROL_REQ */ + 3, /* LMP_POWER_CONTROL_RES */ + 2, /* LMP_PING_REQ */ + 2, /* LMP_PING_RES */ +}; + +/* Bluetooth 5.0 specification p. 2589 */ +static const value_string lm_le_opcodes[] = { + {0x0, "LE LL Connection Update Request"}, + {0x1, "LE LL Channel Map Request"}, + {0x2, "LE LL Terminate Indication"}, + {0x3, "LE LL Encryption Request"}, + {0x4, "LE LL Encryption Response"}, + {0x5, "LE LL Start Encryption Request"}, + {0x6, "LE LL Start Encryption Response"}, + {0x7, "LE LL Unknown Response"}, + {0x8, "LE LL Feature Request"}, + {0x9, "LE LL Feature Response"}, + {0xa, "LE LL Pause Encryption Request"}, + {0xb, "LE LL Pause Encryption Response"}, + {0xc, "LE LL Version Indication"}, + {0xd, "LE LL Reject Indication"}, + {0xe, "LE LL Slave Feture Request"}, + {0xf, "LE LL Connection Parameter Request"}, + {0x10, "LE LL Connection Parameter Response"}, + {0x11, "LE LL Extended Reject Indication"}, + {0x12, "LE LL Ping Request"}, + {0x13, "LE LL Ping Response"}, + {0x14, "LE LL Length Request"}, + {0x15, "LE LL Length Response"}, + {0x16, "LE LL Update Indication"}, + {0x17, "LE LL Physical Layers Request"}, + {0x18, "LE LL Physical Layers Response"}, + {0x19, "LE LL Minimum Number of Used Channels Indication"}, + {0xff, "LE LL Broadcom Vendor Specific"}, + {0, NULL}}; + +static const value_string lm_le_opcodes_ext[] = { + {0x1, "LE LL Vendor Specific Feature Request"}, + {0x2, "LE LL Vendor Specific Feature Response"}, + {0x3, "LE LL Vendor Specific Enable Bcs Timeline"}, + {0x4, "LE LL Random Address Change"}, + {0, NULL}}; + +static const true_false_string lm_toggle = { + "true", + "false"}; + +static const true_false_string packet_table_type_bits = { + "EDR", // Enhanced Data Rate + "BR", // Basic Rate +}; + +static const true_false_string packet_role_bits = { + "Slave", + "Master", +}; + +static const value_string packet_types[] = { + /* generic names for unknown logical transport */ + {0x0, "NULL"}, + {0x1, "POLL"}, + {0x2, "FHS"}, + {0x3, "DM1"}, + {0x4, "DH1/2-DH1"}, + {0x5, "HV1"}, + {0x6, "HV2/2-EV3"}, + {0x7, "HV3/EV3/3-EV3"}, + {0x8, "DV/3-DH1"}, + {0x9, "AUX1"}, + {0xa, "DM3/2-DH3"}, + {0xb, "DH3/3-DH3"}, + {0xc, "EV4/2-EV5"}, + {0xd, "EV5/3-EV5"}, + {0xe, "DM5/2-DH5"}, + {0xf, "DH5/3-DH5"}, + {0, NULL}}; + +static const value_string packet_types_br[] = { + /* generic names for unknown logical transport */ + {0x0, "NULL"}, + {0x1, "POLL"}, + {0x2, "FHS"}, + {0x3, "DM1"}, + {0x4, "DH1"}, + {0x9, "AUX1"}, + {0xa, "DM3"}, + {0xb, "DH3"}, + {0xe, "DM5"}, + {0xf, "DH5"}, + {0, NULL}}; + +static const value_string packet_types_edr[] = { + /* generic names for unknown logical transport */ + {0x0, "NULL"}, + {0x1, "POLL"}, + {0x2, "FHS"}, + {0x3, "DM1"}, + {0x4, "2-DH1"}, + {0x8, "3-DH1"}, + {0x9, "AUX1"}, + {0xa, "2-DH3"}, + {0xb, "3-DH3"}, + {0xe, "2-DH5"}, + {0xf, "3-DH5"}, + {0, NULL}}; + +static const value_string sr_modes[] = { + {0x0, "R0"}, + {0x1, "R1"}, + {0x2, "R2"}, + {0x3, "Reserved"}, + {0, NULL}}; + +static const range_string ps_modes[] = { + {0x0, 0x0, "Mandatory scan mode"}, + {0x1, 0x7, "Reserved"}, + {0, 0, NULL}}; + +/* one byte payload header */ +static int dissect_payload_header1(proto_tree *tree, tvbuff_t *tvb, int offset) +{ + proto_item *hdr_item; + proto_tree *hdr_tree; + + hdr_item = proto_tree_add_item(tree, hf_h4bcm_pldhdr, tvb, offset, 1, ENC_NA); + hdr_tree = proto_item_add_subtree(hdr_item, ett_h4bcm_pldhdr); + + proto_tree_add_item(hdr_tree, hf_h4bcm_llid, tvb, offset, 1, ENC_NA); + proto_tree_add_item(hdr_tree, hf_h4bcm_pldflow, tvb, offset, 1, ENC_NA); + proto_tree_add_item(hdr_tree, hf_h4bcm_length, tvb, offset, 1, ENC_NA); + + /* payload length */ + return tvb_get_guint8(tvb, offset) >> 3; +} + +/* two byte payload header */ +static int dissect_payload_header_acl_edr(proto_tree *tree, tvbuff_t *tvb, int offset) +{ + proto_item *hdr_item; + proto_tree *hdr_tree; + + hdr_item = proto_tree_add_item(tree, hf_h4bcm_aclhdr, tvb, offset, 2, ENC_LITTLE_ENDIAN); + hdr_tree = proto_item_add_subtree(hdr_item, ett_h4bcm_aclhdr); + + proto_tree_add_item(hdr_tree, hf_h4bcm_llid_acl, tvb, offset, 1, ENC_LITTLE_ENDIAN); + proto_tree_add_item(hdr_tree, hf_h4bcm_pldflow_acl, tvb, offset, 1, ENC_LITTLE_ENDIAN); + proto_tree_add_item(hdr_tree, hf_h4bcm_length_acl, tvb, offset, 2, ENC_LITTLE_ENDIAN); + proto_tree_add_item(hdr_tree, hf_h4bcm_rfu, tvb, offset + 1, 1, ENC_LITTLE_ENDIAN); + + /* payload length */ + return (tvb_get_guint16(tvb, offset, ENC_LITTLE_ENDIAN) >> 3) & 0x3FF; +} + +/* Dissect common LM and LE LM header */ +static void dissect_lm_header(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset, int is_sent) +{ + guint32 mac; + gchar *mac_string = (gchar *)g_malloc(12); + + /* LMP and LCP are only transmitted within full diagnostic reports */ + DISSECTOR_ASSERT(tvb_reported_length(tvb) == 63); + + /* clock of the BT master */ + proto_tree_add_item(tree, hf_h4bcm_clock, tvb, offset, 4, ENC_BIG_ENDIAN); + offset += 4; + + /* decode and display MAC address in src/dst fields */ + mac = tvb_get_guint32(tvb, offset, ENC_BIG_ENDIAN); + g_snprintf(mac_string, 12, + "%02x:%02x:%02x:%02x", + (mac & 0xff000000) >> 24, + (mac & 0x00ff0000) >> 16, + (mac & 0x0000ff00) >> 8, + (mac & 0x000000ff)); + + proto_tree_add_item(tree, hf_h4bcm_maclow, tvb, offset, 4, ENC_LITTLE_ENDIAN); + + if (is_sent == 1) + { + col_set_str(pinfo->cinfo, COL_RES_DL_SRC, "controller"); + col_set_str(pinfo->cinfo, COL_RES_DL_DST, mac_string); + } + else + { + col_set_str(pinfo->cinfo, COL_RES_DL_SRC, mac_string); + col_set_str(pinfo->cinfo, COL_RES_DL_DST, "controller"); + } +} + +/* Pass LMP handling to existing dissector if available */ +static void dissect_lmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset) +{ + int len; + int opcode; + int dm1_hdr; + tvbuff_t *pld_tvb; + + /* LMP is only transmitted within full diagnostic reports */ + DISSECTOR_ASSERT(tvb_reported_length(tvb) == 63); + + /* DM1 header is common in both directions */ + dm1_hdr = tvb_get_guint8(tvb, offset); + len = dissect_payload_header1(tree, tvb, offset); + + /* Longest LMP packet is 17 bytes */ + DISSECTOR_ASSERT(len <= 17); + + offset += 1; + + /* In receive direction, diagnostic LMP always sends a packet length 17, + * which makes failed assertions inside the LMP decoder... + * The fixed length corresponds to a DM1 header of 0x8f in flow direction + * receive, so we can check this directly instead of maybe re-checking + * valid length 17 in sent direction. + * This fix is really ugly, but it makes the LMP decoders assertions pass. + */ + if (dm1_hdr == 0x8f) + { + /* Get normal / extended opcode length. Will be 0 if undefined. */ + len = 0; + opcode = tvb_get_guint8(tvb, offset) >> 1; + if (opcode <= 65) + { + len = lmp_lengths[opcode]; + } + else if (opcode == 127) + { + opcode = tvb_get_guint8(tvb, offset + 1); + if (opcode <= 32) + { + len = lmp_lengths_ext[opcode]; + } + } + } + + /* Check that we have a LMP dissector or else just display raw payload */ + if (btlmp_handle && len != 0) + { + pld_tvb = tvb_new_subset_length_caplen(tvb, offset, len, len); + call_dissector(btlmp_handle, pld_tvb, pinfo, tree); + } + else + { + /* Maximum (constant) LMP length is 17 */ + proto_tree_add_item(tree, hf_h4bcm_payload, tvb, offset, 17, ENC_LITTLE_ENDIAN); + } +} + +/* Pass ACL handling to existing dissector if available */ +static int dissect_acl(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_) +{ + tvbuff_t *pld_tvb; + int len; + int opcode; + int offset = 0; + int llid; + + // struct timespec start_time; + // struct timespec end_time; + // clock_gettime(CLOCK_MONOTONIC, &start_time); + + col_set_str(pinfo->cinfo, COL_PROTOCOL, "ACL"); + + len = dissect_payload_header_acl_edr(tree, tvb, offset); + llid = tvb_get_guint8(tvb, offset) & 0x03; + + offset += 2; + + if (len) + { + pld_tvb = tvb_new_subset_length(tvb, offset, len); + switch (llid) + { + case 1: + proto_tree_add_item(tree, hf_h4bcm_acl_fragment, tvb, offset, len, ENC_LITTLE_ENDIAN); + switch (pinfo->p2p_dir) + { + case P2P_DIR_SENT: + col_set_str(pinfo->cinfo, COL_INFO, "TX --> Fragment"); + break; + case P2P_DIR_RECV: + col_set_str(pinfo->cinfo, COL_INFO, "RX <-- Fragment"); + break; + default: + break; + } + break; + + case 2: + call_dissector(btl2cap_handle, pld_tvb, pinfo, tree); + break; + + case 3: + call_dissector(btlmp_handle, pld_tvb, pinfo, tree); + break; + + default: + proto_tree_add_item(tree, hf_h4bcm_payload, tvb, offset, len, ENC_LITTLE_ENDIAN); + break; + } + } + else + { + proto_tree_add_item(tree, hf_h4bcm_payload, tvb, offset, len, ENC_LITTLE_ENDIAN); + } + + return tvb_reported_length(tvb); +} + +static void dissect_fhs(proto_tree *tree, tvbuff_t *tvb, int offset) +{ + proto_item *fhs_item, *psmode_item; + proto_tree *fhs_tree; + const gchar *description; + guint8 psmode; + + fhs_item = proto_tree_add_item(tree, hf_btbbd_fhs, tvb, offset, -1, ENC_NA); + fhs_tree = proto_item_add_subtree(fhs_item, ett_btbbd_fhs); + + /* Use proto_tree_add_bits_item() to get around 32bit limit on bitmasks */ + proto_tree_add_bits_item(fhs_tree, hf_btbbd_fhs_parity, tvb, offset * 8, 34, ENC_LITTLE_ENDIAN); + /* proto_tree_add_item(fhs_tree, hf_btbb_fhs_parity, tvb, offset, 5, ENC_LITTLE_ENDIAN); */ + offset += 4; + + proto_tree_add_item(fhs_tree, hf_btbbd_fhs_lap, tvb, offset, 4, ENC_LITTLE_ENDIAN); + offset += 3; + + proto_tree_add_item(fhs_tree, hf_btbbd_fhs_eir, tvb, offset, 1, ENC_NA); + /* skipping 1 undefined bit */ + proto_tree_add_item(fhs_tree, hf_btbbd_fhs_sr, tvb, offset, 1, ENC_NA); + /* skipping 2 reserved bits */ + offset += 1; + + proto_tree_add_item(fhs_tree, hf_btbbd_fhs_uap, tvb, offset, 1, ENC_NA); + offset += 1; + + proto_tree_add_item(fhs_tree, hf_btbbd_fhs_nap, tvb, offset, 2, ENC_LITTLE_ENDIAN); + offset += 2; + + proto_tree_add_item(fhs_tree, hf_btbbd_fhs_class, tvb, offset, 3, ENC_LITTLE_ENDIAN); + offset += 3; + + proto_tree_add_item(fhs_tree, hf_btbbd_fhs_ltaddr, tvb, offset, 1, ENC_NA); + proto_tree_add_item(fhs_tree, hf_btbbd_fhs_clk, tvb, offset, 4, ENC_LITTLE_ENDIAN); + offset += 3; + + psmode = tvb_get_guint8(tvb, offset); + description = try_rval_to_str(psmode, ps_modes); + psmode_item = proto_tree_add_item(fhs_tree, hf_btbbd_fhs_psmode, tvb, offset, 1, ENC_NA); + if (description) + proto_item_append_text(psmode_item, " (%s)", description); + offset += 1; +} + +static int dissect_bt_baseband(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_) +{ + tvbuff_t *pld_tvb; + int offset = 0; + int bb_type; + int ptt; + + col_set_str(pinfo->cinfo, COL_PROTOCOL, "Baseband"); + + // // Baseband protocol + proto_item *btbb_item = proto_tree_add_item(tree, hf_btbbd, tvb, offset, 11, ENC_LITTLE_ENDIAN); + proto_tree *btbb_tree = proto_item_add_subtree(btbb_item, ett_btbbd); + // // Baseband Metadata + proto_item *btbb_meta_item = proto_tree_add_item(btbb_tree, hf_btbbd_meta, tvb, offset, 5, ENC_LITTLE_ENDIAN); + proto_tree *btbb_meta_tree = proto_item_add_subtree(btbb_meta_item, ett_btbbd_meta); + proto_tree_add_item(btbb_meta_tree, hf_btbbd_clk, tvb, offset, 4, ENC_LITTLE_ENDIAN); + offset += 4; + proto_tree_add_item(btbb_meta_tree, hf_btbbd_channel, tvb, offset, 1, ENC_LITTLE_ENDIAN); + offset += 1; + proto_tree_add_item(btbb_meta_tree, hf_btbbd_ptt, tvb, offset, 1, ENC_LITTLE_ENDIAN); + proto_tree_add_item(btbb_meta_tree, hf_btbbd_role, tvb, offset, 1, ENC_LITTLE_ENDIAN); + proto_tree_add_item(btbb_meta_tree, hf_btbbd_tx_encrypted, tvb, offset, 1, ENC_LITTLE_ENDIAN); + proto_tree_add_item(btbb_meta_tree, hf_btbbd_rx_encrypted, tvb, offset, 1, ENC_LITTLE_ENDIAN); + proto_tree_add_item(btbb_meta_tree, hf_btbbd_is_eir, tvb, offset, 1, ENC_LITTLE_ENDIAN); + // ptt = tvb_get_guint8(tvb, offset) & 0b1; + offset += 1; + // Baseband Packet Header + proto_item *btbb_pkthdr_item = proto_tree_add_item(btbb_tree, hf_btbbd_pkthdr, tvb, offset, 2, ENC_LITTLE_ENDIAN); + proto_tree *btbb_pkthdr_tree = proto_item_add_subtree(btbb_pkthdr_item, ett_btbbd_pkthdr); + proto_tree_add_item(btbb_pkthdr_tree, hf_btbbd_ltaddr, tvb, offset, 1, ENC_NA); + proto_tree_add_item_ret_uint(btbb_pkthdr_tree, hf_btbbd_type, tvb, offset, 1, ENC_NA, &bb_type); + // if (!ptt) + // proto_tree_add_item_ret_uint(btbb_pkthdr_tree, hf_btbbd_type_br, tvb, offset, 1, ENC_NA, &bb_type); + // else + // proto_tree_add_item_ret_uint(btbb_pkthdr_tree, hf_btbbd_type_edr, tvb, offset, 1, ENC_NA, &bb_type); + proto_tree_add_item(btbb_pkthdr_tree, hf_btbbd_flow, tvb, offset, 1, ENC_NA); + offset += 1; + proto_tree_add_item(btbb_pkthdr_tree, hf_btbbd_arqn, tvb, offset, 1, ENC_NA); + proto_tree_add_item(btbb_pkthdr_tree, hf_btbbd_seqn, tvb, offset, 1, ENC_NA); + proto_tree_add_item(btbb_pkthdr_tree, hf_btbbd_hec, tvb, offset, 1, ENC_NA); + offset += 1; + + switch (pinfo->p2p_dir) + { + case P2P_DIR_SENT: + col_set_str(pinfo->cinfo, COL_INFO, "TX --> "); + break; + case P2P_DIR_RECV: + col_set_str(pinfo->cinfo, COL_INFO, "RX <-- "); + break; + default: + break; + } + + /* payload */ + switch (bb_type) + { + case 0x0: /* NULL */ + col_append_str(pinfo->cinfo, COL_INFO, "NULL"); + break; + case 0x1: /* POLL */ + col_append_str(pinfo->cinfo, COL_INFO, "POLL"); + break; + case 0x2: /* FHS */ + col_append_str(pinfo->cinfo, COL_INFO, "FHS"); + dissect_fhs(tree, tvb, offset); + break; + case 0x3: /* DM1 */ + case 0x4: /* DH1/2-DH1 */ + case 0x5: /* HV1 */ + case 0x6: /* HV2/2-EV3 */ + case 0x7: /* HV3/EV3/3-EV3 */ + case 0x8: /* DV/3-DH1 */ + case 0x9: /* AUX1 */ + case 0xa: /* DM3/2-DH3 */ + case 0xb: /* DH3/3-DH3 */ + case 0xc: /* EV4/2-EV5 */ + case 0xd: /* EV5/3-EV5 */ + case 0xe: /* DM5/2-DH5 */ + case 0xf: /* DH5/3-DH5 */ + pld_tvb = tvb_new_subset_remaining(tvb, offset); + dissect_acl(pld_tvb, pinfo, tree, &ptt); + break; + default: + break; + } + + return tvb_reported_length(tvb); +} + +/* TODO placeholder for responses we don't know yet */ +static void dissect_unkn_resp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset) +{ + DISSECTOR_ASSERT(tvb_reported_length(tvb) == 63); + + proto_tree_add_item(tree, hf_h4bcm_type, tvb, offset - 1, 1, ENC_NA); + + /* Sent from chip to host */ + col_set_str(pinfo->cinfo, COL_RES_DL_SRC, "controller"); + col_set_str(pinfo->cinfo, COL_RES_DL_DST, "host"); +} + +/* TODO placeholder for commands with arguments that are none or unknown */ +static void dissect_unkn_get(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset) +{ + DISSECTOR_ASSERT(tvb_reported_length(tvb) >= 1); + + proto_tree_add_item(tree, hf_h4bcm_type, tvb, offset - 1, 1, ENC_NA); + + /* Sent from host to chip */ + col_set_str(pinfo->cinfo, COL_RES_DL_SRC, "host"); + col_set_str(pinfo->cinfo, COL_RES_DL_DST, "controller"); +} + +/* ACL BR stats */ +static void dissect_acl_br_stats(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset) + +{ + proto_item *stats_item; + proto_tree *stats_tree; + + DISSECTOR_ASSERT(tvb_reported_length(tvb) == 63); + + /* Sent from chip to host */ + col_set_str(pinfo->cinfo, COL_RES_DL_SRC, "controller"); + col_set_str(pinfo->cinfo, COL_RES_DL_DST, "host"); + + /* Display previous item as tree header */ + stats_item = proto_tree_add_item(tree, hf_h4bcm_type, tvb, offset - 1, 1, ENC_NA); + + /* Make stats subtree */ + stats_tree = proto_item_add_subtree(stats_item, ett_h4bcm_acl_br_stats); + + proto_tree_add_item(stats_tree, hf_h4bcm_stats_null_rcvd, tvb, offset, 2, ENC_LITTLE_ENDIAN); + offset += 2; + proto_tree_add_item(stats_tree, hf_h4bcm_stats_poll_rcvd, tvb, offset, 2, ENC_LITTLE_ENDIAN); + offset += 2; + proto_tree_add_item(stats_tree, hf_h4bcm_stats_dm1_rcvd, tvb, offset, 2, ENC_LITTLE_ENDIAN); + offset += 2; + proto_tree_add_item(stats_tree, hf_h4bcm_stats_dh1_rcvd, tvb, offset, 2, ENC_LITTLE_ENDIAN); + offset += 2; + proto_tree_add_item(stats_tree, hf_h4bcm_stats_dv_rcvd, tvb, offset, 2, ENC_LITTLE_ENDIAN); + offset += 2; + proto_tree_add_item(stats_tree, hf_h4bcm_stats_aux1_rcvd, tvb, offset, 2, ENC_LITTLE_ENDIAN); + offset += 2; + proto_tree_add_item(stats_tree, hf_h4bcm_stats_dm3_rcvd, tvb, offset, 2, ENC_LITTLE_ENDIAN); + offset += 2; + proto_tree_add_item(stats_tree, hf_h4bcm_stats_dh3_rcvd, tvb, offset, 2, ENC_LITTLE_ENDIAN); + offset += 2; + proto_tree_add_item(stats_tree, hf_h4bcm_stats_dm5_rcvd, tvb, offset, 2, ENC_LITTLE_ENDIAN); + offset += 2; + proto_tree_add_item(stats_tree, hf_h4bcm_stats_dh5_rcvd, tvb, offset, 2, ENC_LITTLE_ENDIAN); + offset += 2; + proto_tree_add_item(stats_tree, hf_h4bcm_stats_null_tx, tvb, offset, 2, ENC_LITTLE_ENDIAN); + offset += 2; + proto_tree_add_item(stats_tree, hf_h4bcm_stats_poll_tx, tvb, offset, 2, ENC_LITTLE_ENDIAN); + offset += 2; + proto_tree_add_item(stats_tree, hf_h4bcm_stats_dm1_tx, tvb, offset, 2, ENC_LITTLE_ENDIAN); + offset += 2; + proto_tree_add_item(stats_tree, hf_h4bcm_stats_dh1_tx, tvb, offset, 2, ENC_LITTLE_ENDIAN); + offset += 2; + proto_tree_add_item(stats_tree, hf_h4bcm_stats_dv_tx, tvb, offset, 2, ENC_LITTLE_ENDIAN); + offset += 2; + proto_tree_add_item(stats_tree, hf_h4bcm_stats_aux1_tx, tvb, offset, 2, ENC_LITTLE_ENDIAN); + offset += 2; + proto_tree_add_item(stats_tree, hf_h4bcm_stats_dm3_tx, tvb, offset, 2, ENC_LITTLE_ENDIAN); + offset += 2; + proto_tree_add_item(stats_tree, hf_h4bcm_stats_dh3_tx, tvb, offset, 2, ENC_LITTLE_ENDIAN); + offset += 2; + proto_tree_add_item(stats_tree, hf_h4bcm_stats_dm5_tx, tvb, offset, 2, ENC_LITTLE_ENDIAN); + offset += 2; + proto_tree_add_item(stats_tree, hf_h4bcm_stats_dh5_tx, tvb, offset, 2, ENC_LITTLE_ENDIAN); + offset += 2; + /* FIXME within the next 16 bytes, some are 4 bytes long ... not 100% sure which */ + proto_tree_add_item(stats_tree, hf_h4bcm_stats_acl_rx, tvb, offset, 4, ENC_LITTLE_ENDIAN); + offset += 4; + proto_tree_add_item(stats_tree, hf_h4bcm_stats_acl_tx, tvb, offset, 4, ENC_LITTLE_ENDIAN); + offset += 4; + proto_tree_add_item(stats_tree, hf_h4bcm_stats_hec_err, tvb, offset, 2, ENC_LITTLE_ENDIAN); + offset += 2; + proto_tree_add_item(stats_tree, hf_h4bcm_stats_crc_err, tvb, offset, 2, ENC_LITTLE_ENDIAN); + offset += 2; + proto_tree_add_item(stats_tree, hf_h4bcm_stats_seqn_rep, tvb, offset, 2, ENC_LITTLE_ENDIAN); + offset += 2; + proto_tree_add_item(stats_tree, hf_h4bcm_stats_soft_rst, tvb, offset, 2, ENC_LITTLE_ENDIAN); + offset += 2; + proto_tree_add_item(stats_tree, hf_h4bcm_stats_test_tx, tvb, offset, 2, ENC_LITTLE_ENDIAN); + offset += 2; + proto_tree_add_item(stats_tree, hf_h4bcm_stats_test_rx, tvb, offset, 2, ENC_LITTLE_ENDIAN); + offset += 2; + proto_tree_add_item(stats_tree, hf_h4bcm_stats_test_err, tvb, offset, 2, ENC_LITTLE_ENDIAN); + offset += 2; +} + +/* ACL EDR stats */ +static void dissect_acl_edr_stats(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset) +{ + proto_item *stats_item; + proto_tree *stats_tree; + + DISSECTOR_ASSERT(tvb_reported_length(tvb) == 63); + + /* Sent from chip to host */ + col_set_str(pinfo->cinfo, COL_RES_DL_SRC, "controller"); + col_set_str(pinfo->cinfo, COL_RES_DL_DST, "host"); + + /* Display previous item as tree header */ + stats_item = proto_tree_add_item(tree, hf_h4bcm_type, tvb, offset - 1, 1, ENC_NA); + + /* Make stats subtree */ + stats_tree = proto_item_add_subtree(stats_item, ett_h4bcm_acl_edr_stats); + + proto_tree_add_item(stats_tree, hf_h4bcm_stats_null_rcvd, tvb, offset, 2, ENC_LITTLE_ENDIAN); + offset += 2; + proto_tree_add_item(stats_tree, hf_h4bcm_stats_poll_rcvd, tvb, offset, 2, ENC_LITTLE_ENDIAN); + offset += 2; + proto_tree_add_item(stats_tree, hf_h4bcm_stats_dm1_rcvd, tvb, offset, 2, ENC_LITTLE_ENDIAN); + offset += 2; + proto_tree_add_item(stats_tree, hf_h4bcm_stats_2dh1_rcvd, tvb, offset, 2, ENC_LITTLE_ENDIAN); + offset += 2; + proto_tree_add_item(stats_tree, hf_h4bcm_stats_3dh1_rcvd, tvb, offset, 2, ENC_LITTLE_ENDIAN); + offset += 2; + proto_tree_add_item(stats_tree, hf_h4bcm_stats_2dh3_rcvd, tvb, offset, 2, ENC_LITTLE_ENDIAN); + offset += 2; + proto_tree_add_item(stats_tree, hf_h4bcm_stats_3dh3_rcvd, tvb, offset, 2, ENC_LITTLE_ENDIAN); + offset += 2; + proto_tree_add_item(stats_tree, hf_h4bcm_stats_2dh5_rcvd, tvb, offset, 2, ENC_LITTLE_ENDIAN); + offset += 2; + proto_tree_add_item(stats_tree, hf_h4bcm_stats_3dh5_rcvd, tvb, offset, 2, ENC_LITTLE_ENDIAN); + offset += 2; + offset += 2; /* with this offset, null packets match */ + proto_tree_add_item(stats_tree, hf_h4bcm_stats_null_tx, tvb, offset, 2, ENC_LITTLE_ENDIAN); + offset += 2; + proto_tree_add_item(stats_tree, hf_h4bcm_stats_poll_tx, tvb, offset, 2, ENC_LITTLE_ENDIAN); + offset += 2; + proto_tree_add_item(stats_tree, hf_h4bcm_stats_dm1_tx, tvb, offset, 2, ENC_LITTLE_ENDIAN); + offset += 2; + proto_tree_add_item(stats_tree, hf_h4bcm_stats_2dh1_tx, tvb, offset, 2, ENC_LITTLE_ENDIAN); + offset += 2; + proto_tree_add_item(stats_tree, hf_h4bcm_stats_3dh1_tx, tvb, offset, 2, ENC_LITTLE_ENDIAN); + offset += 2; + proto_tree_add_item(stats_tree, hf_h4bcm_stats_2dh3_tx, tvb, offset, 2, ENC_LITTLE_ENDIAN); + offset += 2; + proto_tree_add_item(stats_tree, hf_h4bcm_stats_3dh3_tx, tvb, offset, 2, ENC_LITTLE_ENDIAN); + offset += 2; + proto_tree_add_item(stats_tree, hf_h4bcm_stats_2dh5_tx, tvb, offset, 2, ENC_LITTLE_ENDIAN); + offset += 2; + proto_tree_add_item(stats_tree, hf_h4bcm_stats_3dh5_tx, tvb, offset, 2, ENC_LITTLE_ENDIAN); + offset += 2; + offset += 2; /* with this offset, acl bytes are correct */ + proto_tree_add_item(stats_tree, hf_h4bcm_stats_acl_rx, tvb, offset, 4, ENC_LITTLE_ENDIAN); + offset += 4; + proto_tree_add_item(stats_tree, hf_h4bcm_stats_acl_tx, tvb, offset, 4, ENC_LITTLE_ENDIAN); + offset += 4; + proto_tree_add_item(stats_tree, hf_h4bcm_stats_hec_err, tvb, offset, 2, ENC_LITTLE_ENDIAN); + offset += 2; + proto_tree_add_item(stats_tree, hf_h4bcm_stats_crc_err, tvb, offset, 2, ENC_LITTLE_ENDIAN); + offset += 2; + proto_tree_add_item(stats_tree, hf_h4bcm_stats_seqn_rep, tvb, offset, 2, ENC_LITTLE_ENDIAN); + offset += 2; + proto_tree_add_item(stats_tree, hf_h4bcm_stats_soft_rst, tvb, offset, 2, ENC_LITTLE_ENDIAN); + offset += 2; + proto_tree_add_item(stats_tree, hf_h4bcm_stats_test_tx, tvb, offset, 2, ENC_LITTLE_ENDIAN); + offset += 2; + proto_tree_add_item(stats_tree, hf_h4bcm_stats_test_rx, tvb, offset, 2, ENC_LITTLE_ENDIAN); + offset += 2; + proto_tree_add_item(stats_tree, hf_h4bcm_stats_test_err, tvb, offset, 2, ENC_LITTLE_ENDIAN); + offset += 2; +} + +/* LL_VERSION_IND p. 2594 + */ +static void dissect_ll_version_ind(proto_tree *tree, tvbuff_t *tvb, int offset) +{ + proto_tree_add_item(tree, hf_h4bcm_ll_version_ind_versnr, tvb, offset, 1, ENC_LITTLE_ENDIAN); + offset += 1; + + proto_tree_add_item(tree, hf_h4bcm_ll_version_ind_compid, tvb, offset, 2, ENC_LITTLE_ENDIAN); + offset += 2; + + proto_tree_add_item(tree, hf_h4bcm_ll_version_ind_subversnr, tvb, offset, 2, ENC_LITTLE_ENDIAN); +} + +/* LM LE + * Most of this is already implemented in "btle" in Wireshark... + * But somewhat different format :( So we do it here. + */ +static void dissect_lm_le(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset, int is_sent) +{ + int opcode; + int opcode_ext; + guint64 mac; + gchar *mac_string = (gchar *)g_malloc(18); + + /* LMP and LCP are only transmitted within full diagnostic reports */ + DISSECTOR_ASSERT(tvb_reported_length(tvb) == 63); + + /* clock of the BT master */ + proto_tree_add_item(tree, hf_h4bcm_clock, tvb, offset, 4, ENC_BIG_ENDIAN); + offset += 4; + + /* standard MAC address this time */ + mac = tvb_get_guint64(tvb, offset - 2, ENC_BIG_ENDIAN); + g_snprintf(mac_string, 18, + "%02x:%02x:%02x:%02x:%02x:%02x", + (unsigned int)((mac & 0xff0000000000) >> 40), + (unsigned int)((mac & 0x00ff00000000) >> 32), + (unsigned int)((mac & 0x0000ff000000) >> 24), + (unsigned int)((mac & 0x000000ff0000) >> 16), + (unsigned int)((mac & 0x00000000ff00) >> 8), + (unsigned int)((mac & 0x0000000000ff))); + proto_tree_add_item(tree, hf_h4bcm_le_ether, tvb, offset, 6, ENC_LITTLE_ENDIAN); + offset += 6; + + if (is_sent == 1) + { + col_set_str(pinfo->cinfo, COL_RES_DL_SRC, "controller"); + col_set_str(pinfo->cinfo, COL_RES_DL_DST, mac_string); + } + else + { + col_set_str(pinfo->cinfo, COL_RES_DL_SRC, mac_string); + col_set_str(pinfo->cinfo, COL_RES_DL_DST, "controller"); + } + + /* Handle (only 1 byte, even though it can be 2 bytes long?!) */ + proto_tree_add_item(tree, hf_h4bcm_le_handle, tvb, offset, 1, ENC_NA); + offset += 1; + + opcode = tvb_get_guint8(tvb, offset); + proto_tree_add_item(tree, hf_h4bcm_le_opcode, tvb, offset, 1, ENC_NA); + col_add_str(pinfo->cinfo, COL_INFO, val_to_str(opcode, lm_le_opcodes, "LE LL Unknown Opcode (%d)")); + offset += 1; + + switch (opcode) + { + case 0x0c: + dissect_ll_version_ind(tree, tvb, offset); + break; + /* Broadcom vendor specific stuff... */ + case 0xff: + opcode_ext = tvb_get_guint8(tvb, offset); + proto_tree_add_item(tree, hf_h4bcm_le_opcode_ext, tvb, offset, 1, ENC_NA); + col_add_str(pinfo->cinfo, COL_INFO, val_to_str(opcode_ext, lm_le_opcodes_ext, "LE LL Unknown VSC Opcode (%d)")); + offset += 1; + break; + default: + break; + } +} + +/* Show if LM + LM LE logging was enabled or disabled */ +static void dissect_lm_toggle(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, int offset) +{ + DISSECTOR_ASSERT(tvb_reported_length(tvb) >= 1); + + /* Sent from host UART to chip */ + col_set_str(pinfo->cinfo, COL_RES_DL_SRC, "host"); + col_set_str(pinfo->cinfo, COL_RES_DL_DST, "controller"); + + /* OFF and ON */ + proto_tree_add_item(tree, hf_h4bcm_lm_toggle, tvb, offset, 1, ENC_BIG_ENDIAN); + offset += 1; +} + +/* dissect a packet */ +static int +dissect_h4bcm(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *data _U_) +{ + proto_item *h4bcm_item; + proto_tree *h4bcm_tree; + int offset; + int h4bcm_type; + + /* sanity check: length */ + if (tvb_reported_length(tvb) < 1) + /* bad length: look for a different dissector */ + return 0; + + /* fprintf(stderr, "total len %d\n", tvb_reported_length(tvb)); */ + + /* make entries in protocol column and info column on summary display */ + col_set_str(pinfo->cinfo, COL_PROTOCOL, "HCI H4 Broadcom"); + + /* create display subtree for the protocol */ + offset = 0; + h4bcm_item = proto_tree_add_item(tree, proto_h4bcm, tvb, offset, -1, ENC_NA); + h4bcm_tree = proto_item_add_subtree(h4bcm_item, ett_h4bcm); + + h4bcm_type = tvb_get_guint8(tvb, offset); + col_add_str(pinfo->cinfo, COL_INFO, val_to_str(h4bcm_type, h4bcm_types, "Unknown Type (%d)")); + offset += 1; + + switch (h4bcm_type) + { + case DIA_LM_SENT: + dissect_lm_header(tvb, pinfo, h4bcm_tree, offset, 1); + offset += 8; + dissect_lmp(tvb, pinfo, h4bcm_tree, offset); + break; + case DIA_LM_RECV: + dissect_lm_header(tvb, pinfo, h4bcm_tree, offset, 0); + offset += 11; + dissect_lmp(tvb, pinfo, h4bcm_tree, offset); + break; + case DIA_ACL_BR_RESP: + dissect_acl_br_stats(tvb, pinfo, h4bcm_tree, offset); + break; + case DIA_ACL_EDR_RESP: + dissect_acl_edr_stats(tvb, pinfo, h4bcm_tree, offset); + break; + case DIA_LE_SENT: + dissect_lm_le(tvb, pinfo, h4bcm_tree, offset, 1); + break; + case DIA_LE_RECV: + dissect_lm_le(tvb, pinfo, h4bcm_tree, offset, 0); + break; + case DIA_LM_ENABLE: + dissect_lm_toggle(tvb, pinfo, h4bcm_tree, offset); + break; + case DIA_MEM_PEEK_RESP: + case DIA_MEM_DUMP_RESP: + case DIA_TEST_COMPL: + case DIA_MEM_POKE_RESP: + case DIA_CPU_LOAD_RESP: + case DIA_AUX_RESP: + case DIA_ACL_UNKN1_RESP: + case DIA_ACL_UNKN2_RESP: + dissect_unkn_resp(tvb, pinfo, h4bcm_tree, offset); + break; + case DIA_ACL_BR_RESET: + case DIA_ACL_BR_GET: + case DIA_ACL_EDR_GET: + case DIA_AUX_GET: + case DIA_ACL_UNKN1_GET: + case DIA_ACL_UNKN2_GET: + case DIA_CON_GET: + case DIA_MEM_PEEK_GET: + case DIA_MEM_POKE_GET: + case DIA_MEM_DUMP_GET: + case DIA_PKT_TEST: + dissect_unkn_get(tvb, pinfo, h4bcm_tree, offset); + break; + default: + break; + } + + /* Return the amount of data this dissector was able to dissect */ + return tvb_reported_length(tvb); +} + +/* register the protocol with Wireshark */ +void proto_register_h4bcm(void) +{ + /* list of fields */ + static hf_register_info hf[] = { + {&hf_h4bcm_type, + {"Type", "h4bcm.type", + FT_UINT8, BASE_HEX, VALS(h4bcm_types), 0x0, + "Diagnostic Information Type", HFILL}}, + {&hf_h4bcm_clock, + {"Clock", "h4bcm.clock", + FT_UINT32, BASE_HEX, NULL, 0x0, + "Bluetooth Master Clock", HFILL}}, + {&hf_h4bcm_maclow, + {"Remote MAC Address", "h4bcm.maclow", + FT_BYTES, SEP_COLON, NULL, 0x0, + "Lower MAC address part, sufficient for l2ping ff:ff:maclow", HFILL}}, + {&hf_h4bcm_pldhdr, + {"Payload Header", "h4bcm.pldhdr", + FT_NONE, BASE_NONE, NULL, 0x0, + NULL, HFILL}}, + {&hf_h4bcm_aclhdr, + {"ACL Header", "h4bcm.aclhdr", + FT_NONE, BASE_NONE, NULL, 0x0, + NULL, HFILL}}, + {&hf_h4bcm_llid, + {"LLID", "h4bcm.llid", + FT_UINT8, BASE_HEX, VALS(llid_codes), 0x03, + "Logical Link ID", HFILL}}, + {&hf_h4bcm_llid_acl, + {"LLID", "h4bcm.llid_acl", + FT_UINT16, BASE_HEX, VALS(llid_codes), 0x03, + "Logical Link ID", HFILL}}, + {&hf_h4bcm_pldflow_acl, + {"Flow", "h4bcm.flow_acl", + FT_BOOLEAN, 16, NULL, 0x04, + "Payload Flow indication", HFILL}}, + {&hf_h4bcm_rfu, + {"RFU", "h4bcm.rfu_acl", + FT_UINT16, BASE_HEX, 0, 0xE000, + "RFU", HFILL}}, + {&hf_h4bcm_pldflow, + {"Flow", "h4bcm.flow", + FT_BOOLEAN, 8, NULL, 0x04, + "Payload Flow indication", HFILL}}, + {&hf_h4bcm_length, + {"Length", "h4bcm.length", + FT_UINT8, BASE_DEC, NULL, 0xf8, + "Payload Length", HFILL}}, + {&hf_h4bcm_length_acl, + {"Length", "h4bcm.length_acl", + FT_UINT16, BASE_DEC, NULL, 0x1ff8, + "Payload Length", HFILL}}, + {&hf_h4bcm_payload, + {"Payload", "h4bcm.payload", + FT_BYTES, BASE_NONE, NULL, 0x0, + NULL, HFILL}}, + {&hf_h4bcm_acl_fragment, + {"Payload", "h4bcm.acl_fragment", + FT_BYTES, BASE_NONE, NULL, 0x0, + NULL, HFILL}}, + {&hf_h4bcm_lm_toggle, + {"LM and LM LE Logging", "h4bcm.logging", + FT_BOOLEAN, 8, TFS(&lm_toggle), 0x01, + NULL, HFILL}}, + {&hf_h4bcm_stats_null_rcvd, + {"Null Packets Received", "h4bcm.stats.null_rcvd", + FT_UINT16, BASE_DEC, NULL, 0x0, + NULL, HFILL}}, + {&hf_h4bcm_stats_poll_rcvd, + {"Poll Packets Received", "h4bcm.stats.poll_rcvd", + FT_UINT16, BASE_DEC, NULL, 0x0, + NULL, HFILL}}, + {&hf_h4bcm_stats_dm1_rcvd, + {"DM1 Packets Received", "h4bcm.stats.dm1_rcvd", + FT_UINT16, BASE_DEC, NULL, 0x0, + NULL, HFILL}}, + {&hf_h4bcm_stats_dh1_rcvd, + {"DH1 Packets Received", "h4bcm.stats.dh1_rcvd", + FT_UINT16, BASE_DEC, NULL, 0x0, + NULL, HFILL}}, + {&hf_h4bcm_stats_dv_rcvd, + {"DV Packets Received", "h4bcm.stats.dv_rcvd", + FT_UINT16, BASE_DEC, NULL, 0x0, + NULL, HFILL}}, + {&hf_h4bcm_stats_aux1_rcvd, + {"AUX1 Packets Received", "h4bcm.stats.aux1_rcvd", + FT_UINT16, BASE_DEC, NULL, 0x0, + NULL, HFILL}}, + {&hf_h4bcm_stats_dm3_rcvd, + {"DM3 Packets Received", "h4bcm.stats.dm3_rcvd", + FT_UINT16, BASE_DEC, NULL, 0x0, + NULL, HFILL}}, + {&hf_h4bcm_stats_dh3_rcvd, + {"DH3 Packets Received", "h4bcm.stats.dh3_rcvd", + FT_UINT16, BASE_DEC, NULL, 0x0, + NULL, HFILL}}, + {&hf_h4bcm_stats_dm5_rcvd, + {"DM5 Packets Received", "h4bcm.stats.dm5_rcvd", + FT_UINT16, BASE_DEC, NULL, 0x0, + NULL, HFILL}}, + {&hf_h4bcm_stats_dh5_rcvd, + {"DH5 Packets Received", "h4bcm.stats.dh5_rcvd", + FT_UINT16, BASE_DEC, NULL, 0x0, + NULL, HFILL}}, + {&hf_h4bcm_stats_null_tx, + {"Null Packets Transmitted", "h4bcm.stats.null_tx", + FT_UINT16, BASE_DEC, NULL, 0x0, + NULL, HFILL}}, + {&hf_h4bcm_stats_poll_tx, + {"Poll Packets Transmitted", "h4bcm.stats.poll_tx", + FT_UINT16, BASE_DEC, NULL, 0x0, + NULL, HFILL}}, + {&hf_h4bcm_stats_dm1_tx, + {"DM1 Packets Transmitted", "h4bcm.stats.dm1_tx", + FT_UINT16, BASE_DEC, NULL, 0x0, + NULL, HFILL}}, + {&hf_h4bcm_stats_dh1_tx, + {"DH1 Packets Transmitted", "h4bcm.stats.dh1_tx", + FT_UINT16, BASE_DEC, NULL, 0x0, + NULL, HFILL}}, + {&hf_h4bcm_stats_dv_tx, + {"DV Packets Transmitted", "h4bcm.stats.dv_tx", + FT_UINT16, BASE_DEC, NULL, 0x0, + NULL, HFILL}}, + {&hf_h4bcm_stats_aux1_tx, + {"AUX1 Packets Transmitted", "h4bcm.stats.aux1_tx", + FT_UINT16, BASE_DEC, NULL, 0x0, + NULL, HFILL}}, + {&hf_h4bcm_stats_dm3_tx, + {"DM3 Packets Transmitted", "h4bcm.stats.dm3_tx", + FT_UINT16, BASE_DEC, NULL, 0x0, + NULL, HFILL}}, + {&hf_h4bcm_stats_dh3_tx, + {"DH3 Packets Transmitted", "h4bcm.stats.dh3_tx", + FT_UINT16, BASE_DEC, NULL, 0x0, + NULL, HFILL}}, + {&hf_h4bcm_stats_dm5_tx, + {"DM5 Packets Transmitted", "h4bcm.stats.dm5_tx", + FT_UINT16, BASE_DEC, NULL, 0x0, + NULL, HFILL}}, + {&hf_h4bcm_stats_dh5_tx, + {"DH5 Packets Transmitted", "h4bcm.stats.dh5_tx", + FT_UINT16, BASE_DEC, NULL, 0x0, + NULL, HFILL}}, + {&hf_h4bcm_stats_acl_rx, + {"Total Received ACL Bytes", "h4bcm.stats.acl_rx", + FT_UINT32, BASE_DEC, NULL, 0x0, + NULL, HFILL}}, + {&hf_h4bcm_stats_acl_tx, + {"Total Transmitted ACL Bytes", "h4bcm.stats.acl_tx", + FT_UINT32, BASE_DEC, NULL, 0x0, + NULL, HFILL}}, + {&hf_h4bcm_stats_hec_err, + {"HEC Errors", "h4bcm.stats.hec_err", + FT_UINT32, BASE_DEC, NULL, 0x0, + NULL, HFILL}}, + {&hf_h4bcm_stats_crc_err, + {"CRC Errors", "h4bcm.stats.crc_err", + FT_UINT32, BASE_DEC, NULL, 0x0, + NULL, HFILL}}, + {&hf_h4bcm_stats_seqn_rep, + {"Seqn Repeat", "h4bcm.stats.seqn_rep", + FT_UINT16, BASE_DEC, NULL, 0x0, + NULL, HFILL}}, + {&hf_h4bcm_stats_soft_rst, + {"Soft Reset", "h4bcm.stats.soft_rst", + FT_UINT16, BASE_DEC, NULL, 0x0, + NULL, HFILL}}, + {&hf_h4bcm_stats_test_tx, + {"TestMode Transmitted Packets", "h4bcm.stats.test_tx", + FT_UINT16, BASE_DEC, NULL, 0x0, + NULL, HFILL}}, + {&hf_h4bcm_stats_test_rx, + {"TestMode Received Packets", "h4bcm.stats.test_rx", + FT_UINT16, BASE_DEC, NULL, 0x0, + NULL, HFILL}}, + {&hf_h4bcm_stats_test_err, + {"TestMode Packet Errors", "h4bcm.stats.test_err", + FT_UINT16, BASE_DEC, NULL, 0x0, + NULL, HFILL}}, + {&hf_h4bcm_stats_2dh1_rcvd, + {"2DH1 Packets Received", "h4bcm.stats.2dh1_rcvd", + FT_UINT16, BASE_DEC, NULL, 0x0, + NULL, HFILL}}, + {&hf_h4bcm_stats_3dh1_rcvd, + {"3DH1 Packets Received", "h4bcm.stats.3dh1_rcvd", + FT_UINT16, BASE_DEC, NULL, 0x0, + NULL, HFILL}}, + {&hf_h4bcm_stats_2dh3_rcvd, + {"2DH3 Packets Received", "h4bcm.stats.2dh3_rcvd", + FT_UINT16, BASE_DEC, NULL, 0x0, + NULL, HFILL}}, + {&hf_h4bcm_stats_3dh3_rcvd, + {"3DH3 Packets Received", "h4bcm.stats.3dh3_rcvd", + FT_UINT16, BASE_DEC, NULL, 0x0, + NULL, HFILL}}, + {&hf_h4bcm_stats_2dh5_rcvd, + {"2DH5 Packets Received", "h4bcm.stats.2dh5_rcvd", + FT_UINT16, BASE_DEC, NULL, 0x0, + NULL, HFILL}}, + {&hf_h4bcm_stats_3dh5_rcvd, + {"3DH5 Packets Received", "h4bcm.stats.3dh5_rcvd", + FT_UINT16, BASE_DEC, NULL, 0x0, + NULL, HFILL}}, + {&hf_h4bcm_stats_2dh1_tx, + {"2DH1 Packets Transmitted", "h4bcm.stats.2dh1_tx", + FT_UINT16, BASE_DEC, NULL, 0x0, + NULL, HFILL}}, + {&hf_h4bcm_stats_3dh1_tx, + {"3DH1 Packets Transmitted", "h4bcm.stats.3dh1_tx", + FT_UINT16, BASE_DEC, NULL, 0x0, + NULL, HFILL}}, + {&hf_h4bcm_stats_2dh3_tx, + {"2DH3 Packets Transmitted", "h4bcm.stats.2dh3_tx", + FT_UINT16, BASE_DEC, NULL, 0x0, + NULL, HFILL}}, + {&hf_h4bcm_stats_3dh3_tx, + {"3DH3 Packets Transmitted", "h4bcm.stats.3dh3_tx", + FT_UINT16, BASE_DEC, NULL, 0x0, + NULL, HFILL}}, + {&hf_h4bcm_stats_2dh5_tx, + {"2DH5 Packets Transmitted", "h4bcm.stats.2dh5_tx", + FT_UINT16, BASE_DEC, NULL, 0x0, + NULL, HFILL}}, + {&hf_h4bcm_stats_3dh5_tx, + {"3DH5 Packets Transmitted", "h4bcm.stats.3dh5_tx", + FT_UINT16, BASE_DEC, NULL, 0x0, + NULL, HFILL}}, + {&hf_h4bcm_le_ether, + {"Remote MAC Address", "h4bcm.le.address", + FT_BYTES, SEP_COLON, NULL, 0x0, + NULL, HFILL}}, + {&hf_h4bcm_le_handle, + {"Handle", "h4bcm.le.handle", + FT_UINT8, BASE_HEX, NULL, 0x0, + NULL, HFILL}}, + {&hf_h4bcm_le_opcode, + {"Opcode", "h4bcm.le.opcode", + FT_UINT8, BASE_HEX, VALS(lm_le_opcodes), 0x0, + NULL, HFILL}}, + {&hf_h4bcm_le_opcode_ext, + {"Broadcom Specific Opcode", "h4bcm.le.opcodeext", + FT_UINT8, BASE_HEX, VALS(lm_le_opcodes_ext), 0x0, + NULL, HFILL}}, + {&hf_h4bcm_ll_version_ind_versnr, + {"VersNr", "h4bcm.le.versnr", + FT_UINT8, BASE_HEX, NULL, 0x0, + "Version", HFILL}}, + {&hf_h4bcm_ll_version_ind_subversnr, + {"SubVersNr", "h4bcm.le.subversnr", + FT_UINT16, BASE_HEX, NULL, 0x0, + "Subversion", HFILL}}, + {&hf_h4bcm_ll_version_ind_compid, + {"CompID", "h4bcm.le.compid", + FT_UINT16, BASE_HEX, NULL, 0x0, + "Company", HFILL}}, + {&hf_btbbd, + {"Baseband", "btbbd", + FT_NONE, BASE_NONE, NULL, 0x0, + NULL, HFILL}}, + {&hf_btbbd_meta, + {"Meta Data", "btbbd.meta", + FT_NONE, BASE_NONE, NULL, 0x0, + NULL, HFILL}}, + {&hf_btbbd_clk, + {"CLK", "btbbd.clk", + FT_UINT32, BASE_DEC, NULL, 0x0, + NULL, HFILL}}, + {&hf_btbbd_channel, + {"Channel", "btbbd.ch", + FT_UINT32, BASE_DEC, NULL, 0x0, + NULL, HFILL}}, + {&hf_btbbd_ptt, + {"Table Type", "btbbd.ptt", + FT_BOOLEAN, 8, TFS(&packet_table_type_bits), 0b00000001, + NULL, HFILL}}, + {&hf_btbbd_role, + {"Role", "btbbd.role", + FT_BOOLEAN, 8, TFS(&packet_role_bits), 0b00000010, + NULL, HFILL}}, + {&hf_btbbd_tx_encrypted, + {"TX Enc.", "btbbd.txenc", + FT_BOOLEAN, 8, TFS(&lm_toggle), 0b00100000, + NULL, HFILL}}, + {&hf_btbbd_rx_encrypted, + {"RX Enc.", "btbbd.rxenc", + FT_BOOLEAN, 8, TFS(&lm_toggle), 0b01000000, + NULL, HFILL}}, + {&hf_btbbd_is_eir, + {"Is EIR", "btbbd.iseir", + FT_BOOLEAN, 8, TFS(&lm_toggle), 0b10000000, + NULL, HFILL}}, + {&hf_btbbd_pkthdr, + {"Packet Header", "btbbd.pkthdr", + FT_NONE, BASE_NONE, NULL, 0x0, + NULL, HFILL}}, + {&hf_btbbd_ltaddr, + {"LT_ADDR", "btbbd.lt_addr", + FT_UINT16, BASE_HEX, NULL, 0x07, + NULL, HFILL}}, + {&hf_btbbd_type, + {"Type", "btbbd.type", + FT_UINT16, BASE_HEX, VALS(packet_types), 0x78, + NULL, HFILL}}, + {&hf_btbbd_type_br, + {"Type", "btbbd.type_br", + FT_UINT16, BASE_HEX, VALS(packet_types_br), 0x78, + NULL, HFILL}}, + {&hf_btbbd_type_edr, + {"Type", "btbbd.type_edr", + FT_UINT16, BASE_HEX, VALS(packet_types_edr), 0x78, + NULL, HFILL}}, + {&hf_btbbd_flow, + {"FLOW", "btbbd.flow", + FT_BOOLEAN, 16, NULL, 0x80, + NULL, HFILL}}, + {&hf_btbbd_arqn, + {"ARQN", "btbbd.arqn", + FT_BOOLEAN, 8, NULL, 0x1, + NULL, HFILL}}, + {&hf_btbbd_seqn, + {"SEQN", "btbbd.seqn", + FT_BOOLEAN, 8, NULL, 0x2, + NULL, HFILL}}, + {&hf_btbbd_hec, + {"HEC", "btbbd.hec", + FT_UINT8, BASE_HEX, NULL, 0xFC, + NULL, HFILL}}, + {&hf_btbbd_fhs, + {"FHS", "fhs", + FT_NONE, BASE_NONE, NULL, 0x0, + NULL, HFILL}}, + {&hf_btbbd_fhs_parity, + {"Parity", "fhs.parity", + /* FIXME this doesn't work because bitmasks can only be 32 bits */ + FT_UINT64, BASE_HEX, NULL, /*0x00000003ffffffffULL,*/ 0x0, + "LAP parity", HFILL}}, + {&hf_btbbd_fhs_lap, + {"LAP", "fhs.lap", + FT_UINT24, BASE_HEX, NULL, 0x03fffffc, + "Lower Address Part", HFILL}}, + {&hf_btbbd_fhs_eir, + {"EIR", "fhs.eir", + FT_BOOLEAN, 8, NULL, 0x04, + "Extended Inquiry Response packet may follow", HFILL}}, + {&hf_btbbd_fhs_sr, + {"SR", "fhs.sr", + FT_UINT8, BASE_HEX, VALS(sr_modes), 0x30, + "Scan Repetition", HFILL}}, + {&hf_btbbd_fhs_uap, + {"UAP", "fhs.uap", + FT_UINT8, BASE_HEX, NULL, 0x0, + "Upper Address Part", HFILL}}, + {&hf_btbbd_fhs_nap, + {"NAP", "fhs.nap", + FT_UINT16, BASE_HEX, NULL, 0x0, + "Non-Significant Address Part", HFILL}}, + {&hf_btbbd_fhs_class, /* TODO: More options */ + {"Class of Device", "fhs.class", + FT_UINT24, BASE_HEX, NULL, 0x0, + NULL, HFILL}}, + {&hf_btbbd_fhs_ltaddr, + {"LT_ADDR", "fhs.lt_addr", + FT_UINT8, BASE_HEX, NULL, 0x07, + "Logical Transport Address", HFILL}}, + {&hf_btbbd_fhs_clk, + {"CLK", "fhs.clk", + FT_UINT32, BASE_HEX, NULL, 0x1ffffff8, + "Clock bits 2 through 27", HFILL}}, + {&hf_btbbd_fhs_psmode, + {"Page Scan Mode", "fhs.psmode", + FT_UINT8, BASE_HEX, NULL, 0xe0, + NULL, HFILL}}, + }; + + /* protocol subtree arrays */ + static gint *ett[] = { + &ett_h4bcm, + &ett_h4bcm_pldhdr, + &ett_h4bcm_aclhdr, + &ett_h4bcm_acl_br_stats, + &ett_h4bcm_acl_edr_stats, + &ett_btbbd, + &ett_btbbd_meta, + &ett_btbbd_pkthdr, + &ett_btbbd_fhs, + }; + + /* register the protocol name and description */ + proto_h4bcm = proto_register_protocol( + "Bluetooth H4 Serial Broadcom Vendor Specific", /* full name */ + "H4 Broadcom", /* short name */ + "h4bcm" /* abbreviation (e.g. for filters) */ + ); + + register_dissector("btacl", dissect_acl, proto_h4bcm); + + /* register the header fields and subtrees used */ + proto_register_field_array(proto_h4bcm, hf, array_length(hf)); + proto_register_subtree_array(ett, array_length(ett)); +} + +void proto_reg_handoff_h4bcm(void) +{ + dissector_handle_t h4bcm_handle; + + // Original InternalBlue Broadcom dissector + h4bcm_handle = create_dissector_handle(dissect_h4bcm, proto_h4bcm); + dissector_add_uint("hci_h4.type", 0x07, h4bcm_handle); + + // Bluetooth ACL Header (Payload Header) + h4bcm_handle = create_dissector_handle(dissect_acl, proto_h4bcm); + dissector_add_uint("hci_h4.type", 0x08, h4bcm_handle); + + // Bluetooth Baseband (Packet Header) + h4bcm_handle = create_dissector_handle(dissect_bt_baseband, proto_h4bcm); + dissector_add_uint("hci_h4.type", 0x09, h4bcm_handle); + + // PacketLogger + packetlogger_handle = find_dissector("packetlogger"); + dissector_add_uint("hci_h4.type", 0x0A, packetlogger_handle); + + /* LMP dissector from https://github.com/greatscottgadgets/libbtbb */ + btlmp_handle = find_dissector("btlmp"); + btl2cap_handle = find_dissector("btl2cap"); + + // dissector_add_uint("wtap_encap", WTAP_ENCAP_ESPRESSIF_BT, h4bcm_handle); +} + +/* + * Editor modelines - http://www.wireshark.org/tools/modelines.html + * + * Local variables: + * c-basic-offset: 4 + * tab-width: 8 + * indent-tabs-mode: nil + * End: + * + * vi: set shiftwidth=4 tabstop=8 expandtab: + * :indentSize=4:tabSize=8:noTabs=true: + */ diff --git a/dissectors/plugin.c b/dissectors/plugin.c new file mode 100644 index 0000000..6b2b02f --- /dev/null +++ b/dissectors/plugin.c @@ -0,0 +1,40 @@ +/* + * Do not modify this file. Changes will be overwritten. + * + * Generated automatically from /home/matheus/5g/wdissector/libs/wireshark/tools/make-plugin-reg.py. + */ + +#include "config.h" + +#include + +/* plugins are DLLs */ +#define WS_BUILD_DLL +#include "ws_symbol_export.h" + +#include "epan/proto.h" + +WS_DLL_PUBLIC void proto_register_btbrlmp(void); +WS_DLL_PUBLIC void proto_register_h4bcm(void); +WS_DLL_PUBLIC void proto_reg_handoff_btbrlmp(void); +WS_DLL_PUBLIC void proto_reg_handoff_h4bcm(void); + +WS_DLL_PUBLIC const gchar plugin_version[] = PLUGIN_VERSION; +WS_DLL_PUBLIC const int plugin_want_major = VERSION_MAJOR; +WS_DLL_PUBLIC const int plugin_want_minor = VERSION_MINOR; + +WS_DLL_PUBLIC void plugin_register(void); + +void plugin_register(void) +{ + static proto_plugin plug_btbrlmp; + + plug_btbrlmp.register_protoinfo = proto_register_btbrlmp; + plug_btbrlmp.register_handoff = proto_reg_handoff_btbrlmp; + proto_register_plugin(&plug_btbrlmp); + static proto_plugin plug_h4bcm; + + plug_h4bcm.register_protoinfo = proto_register_h4bcm; + plug_h4bcm.register_handoff = proto_reg_handoff_h4bcm; + proto_register_plugin(&plug_h4bcm); +}